Class ScriptableProperty

java.lang.Object
org.mozilla.javascript.ScriptableObject
org.apache.sling.scripting.javascript.wrapper.ScriptableBase
org.apache.sling.scripting.javascript.wrapper.ScriptableProperty
All Implemented Interfaces:
Serializable, SlingWrapper, org.mozilla.javascript.ConstProperties, org.mozilla.javascript.debug.DebuggableObject, org.mozilla.javascript.Scriptable, org.mozilla.javascript.Wrapper

public class ScriptableProperty extends ScriptableBase implements SlingWrapper
Wrap a JCR Property as a Scriptable
See Also:
  • Field Details

  • Constructor Details

    • ScriptableProperty

      public ScriptableProperty()
  • Method Details

    • jsConstructor

      public void jsConstructor(Object res)
    • getClassName

      public String getClassName()
      Description copied from interface: SlingWrapper
      The name of the JavaScript host object "class".
      Specified by:
      getClassName in interface org.mozilla.javascript.Scriptable
      Specified by:
      getClassName in interface SlingWrapper
      Specified by:
      getClassName in class org.mozilla.javascript.ScriptableObject
      Returns:
      the class name
    • getWrappedClasses

      public Class<?>[] getWrappedClasses()
      Description copied from interface: SlingWrapper
      The list of Java classes wrapped by this wrapper.
      Specified by:
      getWrappedClasses in interface SlingWrapper
      Returns:
      the wrapped classes
    • jsGet_value

      public Object jsGet_value()
    • jsGet_values

      public Object jsGet_values()
    • jsGet_string

      public Object jsGet_string()
    • jsGet_stream

      public Object jsGet_stream()
    • jsGet_long

      public Object jsGet_long()
    • jsGet_double

      public Object jsGet_double()
    • jsGet_date

      public Object jsGet_date()
    • jsGet_boolean

      public Object jsGet_boolean()
    • jsGet_node

      public Object jsGet_node()
    • jsGet_length

      public Object jsGet_length()
    • jsGet_lengths

      public long[] jsGet_lengths()
    • jsGet_definition

      public Object jsGet_definition()
    • getType

      public int getType()
    • jsGet_session

      public Object jsGet_session()
    • jsGet_path

      public String jsGet_path()
    • jsGet_name

      public String jsGet_name()
    • jsGet_parent

      public Object jsGet_parent()
    • jsGet_depth

      public int jsGet_depth()
    • jsGet_new

      public boolean jsGet_new()
    • jsGet_modified

      public boolean jsGet_modified()
    • jsFunction_valueOf

      public Object jsFunction_valueOf(String hint)
    • get

      public Object get(String name, org.mozilla.javascript.Scriptable start)
      Specified by:
      get in interface org.mozilla.javascript.Scriptable
      Overrides:
      get in class org.mozilla.javascript.ScriptableObject
    • jsFunction_toString

      public Object jsFunction_toString()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • unwrap

      public Object unwrap()
      Specified by:
      unwrap in interface org.mozilla.javascript.Wrapper
    • getStaticType

      protected Class<?> getStaticType()
      Specified by:
      getStaticType in class ScriptableBase
      Returns:
      the static type to use for NativeJavaObject wrapping
    • getWrappedObject

      protected Object getWrappedObject()
      Specified by:
      getWrappedObject in class ScriptableBase
      Returns:
      the Java object that we're wrapping, used to create a NativeJavaObject instance for default wrapping.