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:
  - Serialized Form

## 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

Constructors
Constructor
Description
`JavaObject(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 Type
Method
Description
`Object`
`get(String name, org.mozilla.javascript.Scriptable start)`
Get a named property from this object.
`Object`
`getResource(String resourceName)`
Returns a prototype's resource of a given name.
`Object`
`getResources(String resourceName)`
Returns an array containing the prototype's resource with a given name.
`boolean`
`has(String name, org.mozilla.javascript.Scriptable start)`
Checks whether the given property is defined in this object.
`Object`
`href(Object action, Object params)`
Get the URL for this object with the application
`boolean`
`renderSkin(Object skinobj, Object paramobj)`
`String`
`renderSkinAsString(Object skinobj, Object paramobj)`

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

`canConvert, coerceType, createInterfaceAdapter, delete, delete, delete, equals, get, get, getClassName, getDefaultValue, getIds, getParentScope, getPrototype, has, has, hashCode, hasInstance, initMembers, put, put, put, setParentScope, setPrototype, unwrap, wrap`

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

`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### JavaObject

public JavaObject(org.mozilla.javascript.Scriptable scope, Object obj, String protoName, org.mozilla.javascript.Scriptable prototype, RhinoCore core)
Creates a new JavaObject wrapper.

## 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

public Object href(Object action, Object params) throws UnsupportedEncodingException, IOException
Get the URL for this object with the application

Parameters:
  `action` - optional action name
  `params` - optional query parameters
Returns:
  the URL for the object
Throws:
  `UnsupportedEncodingException` - if the application's charset property is not a valid encoding name
  `IOException`

### has

public boolean has(String name, org.mozilla.javascript.Scriptable start)
Checks whether the given property is defined in this object.

Specified by:
  `has` in interface `org.mozilla.javascript.Scriptable`
Overrides:
  `has` in class `org.mozilla.javascript.NativeJavaObject`

### get

public Object get(String name, org.mozilla.javascript.Scriptable start)
Get a named property from this object.

Specified by:
  `get` in interface `org.mozilla.javascript.Scriptable`
Overrides:
  `get` in class `org.mozilla.javascript.NativeJavaObject`

### getResource

public Object getResource(String resourceName)
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

public Object getResources(String resourceName)
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