Class ResourceHostObject
java.lang.Object
org.mozilla.javascript.ScriptableObject
org.wso2.carbon.mashup.javascript.hostobjects.registry.ResourceHostObject
- All Implemented Interfaces:
Serializable,org.mozilla.javascript.ConstProperties,org.mozilla.javascript.debug.DebuggableObject,org.mozilla.javascript.Scriptable
- Direct Known Subclasses:
CollectionHostObject
public class ResourceHostObject
extends org.mozilla.javascript.ScriptableObject
This is a JavaScript Rhino host object aimed to provide a javascript mapping
for a registry Resource object to the javascript service developers.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.mozilla.javascript.Contextprotected org.wso2.carbon.registry.core.ResourceFields inherited from class org.mozilla.javascript.ScriptableObject
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONSTFields inherited from interface org.mozilla.javascript.Scriptable
NOT_FOUND -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedResourceHostObject(org.wso2.carbon.registry.core.Resource resource, org.mozilla.javascript.Context cx) -
Method Summary
Modifier and TypeMethodDescriptionType to be used for this object inside the javascript.protected org.wso2.carbon.registry.core.Resourcestatic org.mozilla.javascript.ScriptablejsConstructor(org.mozilla.javascript.Context cx, Object[] args, org.mozilla.javascript.Function ctorObj, boolean inNewExpr) static voidjsFunction_addProperty(org.mozilla.javascript.Context cx, org.mozilla.javascript.Scriptable thisObj, Object[] arguments, org.mozilla.javascript.Function funObj) static voidjsFunction_editPropertyValue(org.mozilla.javascript.Context cx, org.mozilla.javascript.Scriptable thisObj, Object[] arguments, org.mozilla.javascript.Function funObj) static org.mozilla.javascript.NativeArrayjsFunction_getProperties(org.mozilla.javascript.Context cx, org.mozilla.javascript.Scriptable thisObj, Object[] arguments, org.mozilla.javascript.Function funObj) static StringjsFunction_getProperty(org.mozilla.javascript.Context cx, org.mozilla.javascript.Scriptable thisObj, Object[] arguments, org.mozilla.javascript.Function funObj) static org.mozilla.javascript.NativeArrayjsFunction_getPropertyValues(org.mozilla.javascript.Context cx, org.mozilla.javascript.Scriptable thisObj, Object[] arguments, org.mozilla.javascript.Function funObj) static voidjsFunction_removeProperty(org.mozilla.javascript.Context cx, org.mozilla.javascript.Scriptable thisObj, Object[] arguments, org.mozilla.javascript.Function funObj) static voidjsFunction_removePropertyValue(org.mozilla.javascript.Context cx, org.mozilla.javascript.Scriptable thisObj, Object[] arguments, org.mozilla.javascript.Function funObj) static voidjsFunction_setProperty(org.mozilla.javascript.Context cx, org.mozilla.javascript.Scriptable thisObj, Object[] arguments, org.mozilla.javascript.Function funObj) org.mozilla.javascript.ScriptablejsGet_id()org.mozilla.javascript.ScriptableintvoidjsSet_content(Object content) voidjsSet_description(Object description) voidjsSet_mediaType(Object mediaType) 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, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getDefaultValue, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getSlot, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, 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, setGetterOrSetter, setParentScope, setPrototype, size
-
Field Details
-
resource
protected org.wso2.carbon.registry.core.Resource resource -
context
protected org.mozilla.javascript.Context context
-
-
Constructor Details
-
ResourceHostObject
protected ResourceHostObject(org.wso2.carbon.registry.core.Resource resource, org.mozilla.javascript.Context cx) -
ResourceHostObject
public ResourceHostObject()
-
-
Method Details
-
jsConstructor
public static org.mozilla.javascript.Scriptable jsConstructor(org.mozilla.javascript.Context cx, Object[] args, org.mozilla.javascript.Function ctorObj, boolean inNewExpr) throws org.wso2.carbon.CarbonException - Throws:
org.wso2.carbon.CarbonException
-
getClassName
Type to be used for this object inside the javascript.- Specified by:
getClassNamein interfaceorg.mozilla.javascript.Scriptable- Specified by:
getClassNamein classorg.mozilla.javascript.ScriptableObject
-
jsFunction_addProperty
public static void jsFunction_addProperty(org.mozilla.javascript.Context cx, org.mozilla.javascript.Scriptable thisObj, Object[] arguments, org.mozilla.javascript.Function funObj) throws org.wso2.carbon.CarbonException - Throws:
org.wso2.carbon.CarbonException
-
jsFunction_getProperty
public static String jsFunction_getProperty(org.mozilla.javascript.Context cx, org.mozilla.javascript.Scriptable thisObj, Object[] arguments, org.mozilla.javascript.Function funObj) throws org.wso2.carbon.CarbonException - Throws:
org.wso2.carbon.CarbonException
-
jsFunction_getPropertyValues
public static org.mozilla.javascript.NativeArray jsFunction_getPropertyValues(org.mozilla.javascript.Context cx, org.mozilla.javascript.Scriptable thisObj, Object[] arguments, org.mozilla.javascript.Function funObj) throws org.wso2.carbon.CarbonException - Throws:
org.wso2.carbon.CarbonException
-
jsFunction_getProperties
public static org.mozilla.javascript.NativeArray jsFunction_getProperties(org.mozilla.javascript.Context cx, org.mozilla.javascript.Scriptable thisObj, Object[] arguments, org.mozilla.javascript.Function funObj) throws org.wso2.carbon.CarbonException - Throws:
org.wso2.carbon.CarbonException
-
jsFunction_editPropertyValue
public static void jsFunction_editPropertyValue(org.mozilla.javascript.Context cx, org.mozilla.javascript.Scriptable thisObj, Object[] arguments, org.mozilla.javascript.Function funObj) throws org.wso2.carbon.CarbonException - Throws:
org.wso2.carbon.CarbonException
-
jsFunction_removeProperty
public static void jsFunction_removeProperty(org.mozilla.javascript.Context cx, org.mozilla.javascript.Scriptable thisObj, Object[] arguments, org.mozilla.javascript.Function funObj) throws org.wso2.carbon.CarbonException - Throws:
org.wso2.carbon.CarbonException
-
jsFunction_removePropertyValue
public static void jsFunction_removePropertyValue(org.mozilla.javascript.Context cx, org.mozilla.javascript.Scriptable thisObj, Object[] arguments, org.mozilla.javascript.Function funObj) throws org.wso2.carbon.CarbonException - Throws:
org.wso2.carbon.CarbonException
-
jsFunction_setProperty
public static void jsFunction_setProperty(org.mozilla.javascript.Context cx, org.mozilla.javascript.Scriptable thisObj, Object[] arguments, org.mozilla.javascript.Function funObj) throws org.wso2.carbon.CarbonException - Throws:
org.wso2.carbon.CarbonException
-
jsGet_author
-
jsGet_lastUpdatedUser
-
jsGet_createdTime
public org.mozilla.javascript.Scriptable jsGet_createdTime() -
jsGet_lastUpdatedTime
public org.mozilla.javascript.Scriptable jsGet_lastUpdatedTime() -
jsGet_id
-
jsGet_parentPath
-
jsGet_path
-
jsGet_permanentPath
-
jsGet_state
public int jsGet_state() -
jsGet_mediaType
-
jsSet_mediaType
- Throws:
org.wso2.carbon.CarbonException
-
jsGet_content
- Throws:
org.wso2.carbon.CarbonException
-
jsSet_content
- Throws:
org.wso2.carbon.CarbonException
-
jsGet_description
-
jsSet_description
- Throws:
org.wso2.carbon.CarbonException
-
getResource
protected org.wso2.carbon.registry.core.Resource getResource()
-