Package org.apache.sling.scripting.javascript.wrapper

# Class ScriptableVersion

java.lang.Object
org.mozilla.javascript.ScriptableObject
org.apache.sling.scripting.javascript.wrapper.ScriptableBase
org.apache.sling.scripting.javascript.wrapper.ScriptableNode
org.apache.sling.scripting.javascript.wrapper.ScriptableVersion

All Implemented Interfaces:
  `Serializable`, `SlingWrapper`, `org.mozilla.javascript.ConstProperties`, `org.mozilla.javascript.debug.DebuggableObject`, `org.mozilla.javascript.Scriptable`, `org.mozilla.javascript.Wrapper`

public class ScriptableVersion extends ScriptableNode
Scriptable wrapper for the JCR Version class

See Also:
  - Serialized Form

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`CLASSNAME`

### Fields inherited from class org.apache.sling.scripting.javascript.wrapper.ScriptableBase

`JSFUNC_PREFIX`

### Fields inherited from class org.mozilla.javascript.ScriptableObject

`CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST`

### Fields inherited from interface org.mozilla.javascript.Scriptable

`NOT_FOUND`

## Constructor Summary

Constructors
Constructor
Description
`ScriptableVersion()`

## Method Summary

Modifier and Type
Method
Description
`String`
`getClassName()`
The name of the JavaScript host object "class".
`protected Class<?>`
`getStaticType()`
`Class<?>[]`
`getWrappedClasses()`
The list of Java classes wrapped by this wrapper.
`protected Object`
`getWrappedObject()`
`void`
`jsConstructor(Object res)`

### Methods inherited from class org.apache.sling.scripting.javascript.wrapper.ScriptableNode

`get, getDefaultValue, getIds, has, jsFunction_addNode, jsFunction_getBaseVersion, jsFunction_getCheckedOut, jsFunction_getChildren, jsFunction_getDefinition, jsFunction_getDepth, jsFunction_getIndex, jsFunction_getLock, jsFunction_getLocked, jsFunction_getMixinNodeTypes, jsFunction_getModified, jsFunction_getName, jsFunction_getNew, jsFunction_getNode, jsFunction_getNodes, jsFunction_getParent, jsFunction_getPath, jsFunction_getPrimaryItem, jsFunction_getPrimaryNodeType, jsFunction_getProperties, jsFunction_getProperty, jsFunction_getReferences, jsFunction_getSession, jsFunction_getUUID, jsFunction_getVersionHistory, jsFunction_hasNode, jsFunction_remove, toString, unwrap`

### Methods inherited from class org.apache.sling.scripting.javascript.wrapper.ScriptableBase

`getNative`

### Methods inherited from class org.mozilla.javascript.ScriptableObject

`applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChange, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, equivalentValues, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGetterOrSetter, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getSlot, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, hasInstance, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, put, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setExternalArrayData, setGetterOrSetter, setParentScope, setPrototype, size`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Field Details

### CLASSNAME

public static final String CLASSNAME

See Also:
  - Constant Field Values

## Constructor Details

### ScriptableVersion

public ScriptableVersion()

## Method Details

### jsConstructor

public void jsConstructor(Object res)

Overrides:
  `jsConstructor` in class `ScriptableNode`

### getStaticType

protected Class<?> getStaticType()

Overrides:
  `getStaticType` in class `ScriptableNode`
Returns:
  the static type to use for NativeJavaObject wrapping

### 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`
Overrides:
  `getClassName` in class `ScriptableNode`
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`
Overrides:
  `getWrappedClasses` in class `ScriptableNode`
Returns:
  the wrapped classes

### getWrappedObject

protected Object getWrappedObject()

Overrides:
  `getWrappedObject` in class `ScriptableNode`
Returns:
  the Java object that we're wrapping, used to create a NativeJavaObject instance for default wrapping.