Package helma.scripting.rhino
Class JavaObject
java.lang.Object
org.mozilla.javascript.NativeJavaObject
helma.scripting.rhino.JavaObject
- All Implemented Interfaces:
Serializable
,org.mozilla.javascript.Scriptable
,org.mozilla.javascript.SymbolScriptable
,org.mozilla.javascript.Wrapper
public class JavaObject
extends org.mozilla.javascript.NativeJavaObject
- See Also:
-
Field Summary
Fields inherited from class org.mozilla.javascript.NativeJavaObject
isAdapter, javaObject, members, parent, prototype, staticType
Fields inherited from interface org.mozilla.javascript.Scriptable
NOT_FOUND
-
Constructor Summary
ConstructorsConstructorDescriptionJavaObject
(org.mozilla.javascript.Scriptable scope, Object obj, String protoName, org.mozilla.javascript.Scriptable prototype, RhinoCore core) Creates a new JavaObject wrapper. -
Method Summary
Modifier and TypeMethodDescriptionGet a named property from this object.getResource
(String resourceName) Returns a prototype's resource of a given name.getResources
(String resourceName) Returns an array containing the prototype's resource with a given name.boolean
Checks whether the given property is defined in this object.Get the URL for this object with the applicationboolean
renderSkin
(Object skinobj, Object paramobj) renderSkinAsString
(Object skinobj, Object paramobj) Methods inherited from class org.mozilla.javascript.NativeJavaObject
canConvert, coerceType, createInterfaceAdapter, delete, delete, delete, get, get, getClassName, getDefaultValue, getIds, getParentScope, getPrototype, has, has, hasInstance, initMembers, put, put, put, setParentScope, setPrototype, unwrap, wrap
-
Constructor Details
-
Method Details
-
renderSkin
public boolean renderSkin(Object skinobj, Object paramobj) throws UnsupportedEncodingException, IOException - Parameters:
skinobj
- ...paramobj
- ...- Returns:
- ...
- Throws:
UnsupportedEncodingException
IOException
-
renderSkinAsString
public String renderSkinAsString(Object skinobj, Object paramobj) throws UnsupportedEncodingException, IOException - Parameters:
skinobj
- ...paramobj
- ...- Returns:
- ...
- Throws:
UnsupportedEncodingException
IOException
-
href
Get the URL for this object with the application- Parameters:
action
- optional action nameparams
- optional query parameters- Returns:
- the URL for the object
- Throws:
UnsupportedEncodingException
- if the application's charset property is not a valid encoding nameIOException
-
has
Checks whether the given property is defined in this object.- Specified by:
has
in interfaceorg.mozilla.javascript.Scriptable
- Overrides:
has
in classorg.mozilla.javascript.NativeJavaObject
-
get
Get a named property from this object.- Specified by:
get
in interfaceorg.mozilla.javascript.Scriptable
- Overrides:
get
in classorg.mozilla.javascript.NativeJavaObject
-
getResource
Returns a prototype's resource of a given name. Walks up the prototype's inheritance chain if the resource is not found- Parameters:
resourceName
- the name of the resource, e.g. "type.properties", "messages.properties", "script.js", etc.- Returns:
- the resource, if found, null otherwise
-
getResources
Returns an array containing the prototype's resource with a given name.- Parameters:
resourceName
- the name of the resource, e.g. "type.properties", "messages.properties", "script.js", etc.- Returns:
- an array of resources with the given name
-