OverviewSingleDeprecatedPropertiesEventsXSL Parameters

jsx3.amp

class Resource

Object
->jsx3.lang.Object
  ->jsx3.amp.Resource

All Implemented Interfaces:

jsx3.util.EventDispatcher

class Resource
extends jsx3.lang.Object
An AMP plug-in resource, such as a JavaScript file or XML file.

Field Summary
static String
LOAD_EARLY
Loads a resource before the plug-in is instantiated and registered.
static String
LOAD_MANUAL
Waits for a resource to be loaded programatically some time after the plug-in loads.
static String
LOAD_NORMAL
Loads a resource before the plug-in loads.
static String
READY
Event subject published when this resource has loaded.
static String
TYPE_BUNDLE
static String
TYPE_CSS
static String
TYPE_JSS
static String
TYPE_SCRIPT
static String
TYPE_XML
static String
TYPE_XSL
Constructor Summary
void
init(objPlugIn : jsx3.amp.PlugIn, strId : String, elm : jsx3.xml.Element)
Method Summary
void
attr(k : String)
Returns the value of any attribute of the XML declaration of this resource.
jsx3.xml.Document | jsx3.app.Properties | jsx3.app.PropsBundle
getData(bClear : boolean)
Returns the data associated with this resource.
String
Returns the full ID of this resource, which is unique to the entire AMP engine.
String
Returns the load type, such as LOAD_NORMAL.
String
Returns the ID Of this resource, which is unique among all resources of the same plug-in.
Array<String>
Returns the list of locale keys for which this resources is localized.
String
Returns the path of this resource, which is relative to the directory of the plug-in owning this resource.
String
Returns the path of the best localized version of this resource for objLocale.
jsx3.amp.PlugIn
Returns the plug-in that owns this resource.
String
Returns the resource type, such as TYPE_SCRIPT.
boolean
jsx3.$AsyncRV
Asynchronously loads this resource if it is not already loaded.
jsx3.$AsyncRV
Returns an asynchronous return value that completes when this resource is loaded.
jsx3.xml.Entity
xml()
Returns the XML declaration of this resource as passed to the constructor.
Methods Inherited From jsx3.util.EventDispatcher
publish, subscribe, unsubscribe, unsubscribeAll
Methods Inherited From jsx3.lang.Object
clone, equals, eval, getClass, getInstanceOf, getInstanceOfClass, getInstanceOfPackage, instanceOf, isInstanceOf, isSubclassOf, jsxmix, jsxsuper, jsxsupermix, setInstanceOf, toString
Field Detail

LOAD_EARLY

static String LOAD_EARLY
Loads a resource before the plug-in is instantiated and registered.

LOAD_MANUAL

static String LOAD_MANUAL
Waits for a resource to be loaded programatically some time after the plug-in loads.

LOAD_NORMAL

static String LOAD_NORMAL
Loads a resource before the plug-in loads.

READY

static String READY
Event subject published when this resource has loaded.

TYPE_BUNDLE

static final String TYPE_BUNDLE

TYPE_CSS

static final String TYPE_CSS

TYPE_JSS

static final String TYPE_JSS

TYPE_SCRIPT

static final String TYPE_SCRIPT

TYPE_XML

static final String TYPE_XML

TYPE_XSL

static final String TYPE_XSL
Constructor Detail

init

void init(objPlugIn : jsx3.amp.PlugIn, strId : String, elm : jsx3.xml.Element)

Parameters:

objPlugInthe plug-in owning the resource.
strIdthe ID of the resource. This ID is unique among all resources of the same plug-in.
elmthe XML declaration of the resource.
Method Detail

attr

void attr(k : String)
Returns the value of any attribute of the XML declaration of this resource.

Parameters:

kthe attribute name.

getData

jsx3.xml.Document | jsx3.app.Properties | jsx3.app.PropsBundle getData(bClear : boolean)
Returns the data associated with this resource. Only resources of type xml, xsl, jss, and propsbundle will return a defined value.

Parameters:

bClearif true then delete the reference to the data object in order to allow garbage collection.

Returns:

 

getId

String getId()
Returns the full ID of this resource, which is unique to the entire AMP engine.

Returns:

 

getLoadType

String getLoadType()
Returns the load type, such as LOAD_NORMAL. The load type is defined using the load attribute of the resource XML declaration.

Returns:

 

See Also:

, ,

getLocalId

String getLocalId()
Returns the ID Of this resource, which is unique among all resources of the same plug-in.

Returns:

 

getLocales

Array<String> getLocales()
Returns the list of locale keys for which this resources is localized. This is equal to the locales attribute of the resource, split by whitespace.

Returns:

 

getPath

String getPath()
Returns the path of this resource, which is relative to the directory of the plug-in owning this resource. The resource type is defined by the id attribute of the resource XML declaration.

Returns:

 

getPathForLocale

String getPathForLocale(objLocale : jsx3.util.Locale)
Returns the path of the best localized version of this resource for objLocale.

Parameters:

objLocale

Returns:

 

getPlugIn

jsx3.amp.PlugIn getPlugIn()
Returns the plug-in that owns this resource.

Returns:

 

getType

String getType()
Returns the resource type, such as TYPE_SCRIPT. The resource type is defined by the element node name of the resource XML declaration.

Returns:

 

isLoaded

boolean isLoaded()

Returns:

 

load

asynchronous jsx3.$AsyncRV load()
Asynchronously loads this resource if it is not already loaded.

Returns:

 

See Also:

loaded()

loaded

asynchronous jsx3.$AsyncRV loaded()
Returns an asynchronous return value that completes when this resource is loaded.

Returns:

 

See Also:

load()

xml

jsx3.xml.Entity xml()
Returns the XML declaration of this resource as passed to the constructor.

Returns: