OverviewSingleDeprecatedPropertiesEventsXSL Parameters

jsx3.amp

class PlugIn

Object
->jsx3.lang.Object
  ->jsx3.amp.PlugIn

All Implemented Interfaces:

jsx3.amp.Bindable, jsx3.net.URIResolver, jsx3.util.EventDispatcher

class PlugIn
extends jsx3.lang.Object
An AMP plug-in. A plug-in is a logical collection of application logic and resources. Plug-ins are loaded as needed and may contain extension points and extensions.

Field Summary
static String
EXTENDED
Event subject published when an extension point of this plug-in has been extended.
static String
READY
Event subject published when this plug-in has loaded completely.
Method Summary
void
Adds an extension to this plug-in programmatically.
void
Adds an extension point to this plug-in programmatically.
jsx3.amp.Engine
Returns the engine of this plug-in.
jsx3.$Array<String>
Returns the list of event subjects that this plug-in declares to publish.
jsx3.amp.Ext
getExt(strId : String)
Returns an extension of this plug-in by its ID.
jsx3.amp.ExtPoint
getExtPoint(strId : String)
Returns an extension point of this plug-in by its ID.
jsx3.$Array<jsx3.amp.ExtPoint>
Returns the extension points of this plug-in.
jsx3.$Array<jsx3.amp.Ext>
Returns the extensions of this plug-in.
String
Returns the id attribute from the plug-in configuration element.
jsx3.util.Logger
Returns a logger for this plug-in.
String
Returns the name attribute from the plug-in configuration element.
jsx3.$Array<String>
Returns the list of plug-in IDs that this plug-in requires.
jsx3.amp.Resource
getResource(strId : String)
Returns a resource of this plug-in by its ID.
jsx3.$Array<jsx3.amp.Resource>
Returns the resources of this plug-in that are defined in the plug-in configuration data.
jsx3.app.Server
Returns the server of the engine of this plug-in.
String
Implements jsx3.net.URIResolver.
String
Returns the version attribute from the plug-in configuration element.
static void
Returns true if e is a binding expression.
boolean
Returns whether this is a global plug-in.
boolean
Returns true is all of the resources of this plug-in have loaded.
jsx3.$AsyncRV
Loads this plug-in asynchronously if it is not already loaded.
jsx3.app.Model
loadRsrcComponent(strRsrcId : String | jsx3.amp.Resource, objParent : jsx3.app.Model, bPaint : boolean)
Loads the contents of a plug-in resource as a GUI component.
void
onExtension(objExtPt : jsx3.amp.ExtPoint, arrExts : Array<jsx3.amp.Ext>)
Called (after this plug-in is instantiated) any time extensions are registered for an extension point of this plug-in.
void
Called when all the resources of this plug-in have loaded.
void
Calls when this plug-in is registered with its engine.
void
Called when the engine of this plug-in has completely registered all plug-ins.
void
regBindExpr(expression : String, handler : Function)
Registers a function to be called when the value of a binding expression changes.
jsx3.net.URI
relativizeURI(strURI : String | jsx3.net.URI, bRel : boolean)
Implements jsx3.net.URIResolver.
void
Removes an extension from this plug-in programmatically.
void
Removes an extension point from this plug-in programmatically.
jsx3.net.URI
Implements jsx3.net.URIResolver.
void
Called after this plug-in is instantiated to provide the plug-in with its XML configuration data.
void
setEngine(objEngine : jsx3.amp.Engine)
Called after this plug-in is instantiated to provide the plug-in with the engine that created it.
void
setPath(strPath : String)
Called after this plug-in is instantiated to provide the plug-in with its path.
void
Called after this plug-in is instantiated to provide the plug-in with the resources defined in the configuration data.
Methods Inherited From jsx3.util.EventDispatcher
publish, subscribe, unsubscribe, unsubscribeAll
Methods Inherited From jsx3.amp.Bindable
addBindableProp, getBindableProps, setBindableProp, updateBindable, updateBindableOn
Methods Inherited From jsx3.lang.Object
clone, equals, eval, getClass, getInstanceOf, getInstanceOfClass, getInstanceOfPackage, instanceOf, isInstanceOf, isSubclassOf, jsxmix, jsxsuper, jsxsupermix, setInstanceOf, toString
Field Detail

EXTENDED

static String EXTENDED
Event subject published when an extension point of this plug-in has been extended.

READY

static String READY
Event subject published when this plug-in has loaded completely.
Method Detail

addExt

void addExt(x : jsx3.amp.Ext)
Adds an extension to this plug-in programmatically. x.getPlugIn() must return this plug-in.

Parameters:

xthe extension to add.

Since:

3.9

addExtPoint

void addExtPoint(xp : jsx3.amp.ExtPoint)
Adds an extension point to this plug-in programmatically. xp.getPlugIn() must return this plug-in.

Parameters:

xpthe extension point to add.

Since:

3.9

getEngine

jsx3.amp.Engine getEngine()
Returns the engine of this plug-in.

Returns:

 

getEvents

jsx3.$Array<String> getEvents()
Returns the list of event subjects that this plug-in declares to publish.

Returns:

 

getExt

jsx3.amp.Ext getExt(strId : String)
Returns an extension of this plug-in by its ID.

Parameters:

strIdthe local ID of the extension.

Returns:

 

getExtPoint

jsx3.amp.ExtPoint getExtPoint(strId : String)
Returns an extension point of this plug-in by its ID.

Parameters:

strIdthe local ID of the extension point.

Returns:

 

getExtPoints

jsx3.$Array<jsx3.amp.ExtPoint> getExtPoints()
Returns the extension points of this plug-in.

Returns:

 

getExts

jsx3.$Array<jsx3.amp.Ext> getExts()
Returns the extensions of this plug-in.

Returns:

 

getId

String getId()
Returns the id attribute from the plug-in configuration element.

Returns:

 

getLog

jsx3.util.Logger getLog()
Returns a logger for this plug-in.

Returns:

 

getName

String getName()
Returns the name attribute from the plug-in configuration element.

Returns:

 

getRequires

jsx3.$Array<String> getRequires()
Returns the list of plug-in IDs that this plug-in requires. These plug-ins must be loaded before this plug-in loads.

Returns:

 

getResource

jsx3.amp.Resource getResource(strId : String)
Returns a resource of this plug-in by its ID.

Parameters:

strId

Returns:

 

getResources

jsx3.$Array<jsx3.amp.Resource> getResources()
Returns the resources of this plug-in that are defined in the plug-in configuration data.

Returns:

 

getServer

jsx3.app.Server getServer()
Returns the server of the engine of this plug-in.

Returns:

 

getUriPrefix

String getUriPrefix()
Implements jsx3.net.URIResolver.

Returns:

 

Overrides:

getUriPrefix in jsx3.net.URIResolver

getVersion

String getVersion()
Returns the version attribute from the plug-in configuration element.

Returns:

 

isBindExpr

static void isBindExpr(e : String)
Returns true if e is a binding expression. A binding expression starts with '{' and ends with '}'.

Parameters:

e

isGlobal

boolean isGlobal()
Returns whether this is a global plug-in. A global plug-in is only instantiated once for all of the applications that register it.

Returns:

 

isLoaded

boolean isLoaded()
Returns true is all of the resources of this plug-in have loaded.

Returns:

 

load

asynchronous jsx3.$AsyncRV load()
Loads this plug-in asynchronously if it is not already loaded.

Returns:

 

loadRsrcComponent

jsx3.app.Model loadRsrcComponent(strRsrcId : String | jsx3.amp.Resource, objParent : jsx3.app.Model, bPaint : boolean)
Loads the contents of a plug-in resource as a GUI component. The resource should be an XML resource whose data is a GI component file. The resource must be already loaded to call this method. This method loads the component with this plug-in as the URI resolver. Therefore, any relative paths in the component will be resolved relative to the directory of this plug-in.

Once the component is loaded, this method defines a getPlugIn() method on the root component object that returns this component. In addition, if the root component object defines an onRsrcLoad() method, that method is called.

Parameters:

strRsrcId
objParentthe GUI component into which to load the resource.
bPaintwhether to paint the loaded resource (default is true).

Returns:

the loaded component.  

onExtension

void onExtension(objExtPt : jsx3.amp.ExtPoint, arrExts : Array<jsx3.amp.Ext>)
Called (after this plug-in is instantiated) any time extensions are registered for an extension point of this plug-in. Subclasses may override this method to provide custom behavior but should call jsxsuper to ensure that the EXTENDED event is published.

Parameters:

objExtPt
arrExts

onLoaded

void onLoaded()
Called when all the resources of this plug-in have loaded. Subclasses may override this method to provide custom behavior.

onRegister

void onRegister()
Calls when this plug-in is registered with its engine. Subclasses may override this method to provide custom behavior.

onStartup

void onStartup()
Called when the engine of this plug-in has completely registered all plug-ins. Subclasses may override this method to provide custom behavior.

regBindExpr

void regBindExpr(expression : String, handler : Function)
Registers a function to be called when the value of a binding expression changes.

The binding expression should begin with a '{' and end with a '}'. The expression is parsed for any tokens that match a bindable property of this object. handler will be invoked any time one of these bindable properties changes value. This function is passed the value of the binding expression. The binding expression is evaluated in the context of this object. The "this" keyword is optional in the expression because the expression is evaluated inside of a with block.

Parameters:

expressiona valid binding expression.
handler

See Also:


relativizeURI

jsx3.net.URI relativizeURI(strURI : String | jsx3.net.URI, bRel : boolean)
Implements jsx3.net.URIResolver.

Parameters:

strURI
bRel

Returns:

 

Overrides:

relativizeURI in jsx3.net.URIResolver

removeExt

void removeExt(x : jsx3.amp.Ext)
Removes an extension from this plug-in programmatically. x must be an extension of this plug-in.

Parameters:

xthe extension of this plug-in to remove.

Since:

3.9

removeExtPoint

void removeExtPoint(xp : jsx3.amp.ExtPoint)
Removes an extension point from this plug-in programmatically. xp must be an extension point of this plug-in.

Parameters:

xpthe extension point of this plug-in to remove.

Since:

3.9

resolveURI

jsx3.net.URI resolveURI(strURI : String | jsx3.net.URI)
Implements jsx3.net.URIResolver.

Parameters:

strURI

Returns:

 

Overrides:

resolveURI in jsx3.net.URIResolver

setData

void setData(objElm : jsx3.xml.Entity)
Called after this plug-in is instantiated to provide the plug-in with its XML configuration data. This method is optional for objects used as plug-ins.

Parameters:

objElm

setEngine

void setEngine(objEngine : jsx3.amp.Engine)
Called after this plug-in is instantiated to provide the plug-in with the engine that created it. This method is optional for objects used as plug-ins.

Parameters:

objEngine

setPath

void setPath(strPath : String)
Called after this plug-in is instantiated to provide the plug-in with its path. This method is optional for objects used as plug-ins.

Parameters:

strPath

setResources

void setResources(arrRsrc : Array<jsx3.amp.Resource>)
Called after this plug-in is instantiated to provide the plug-in with the resources defined in the configuration data. This method is optional for objects used as plug-ins.

Parameters:

arrRsrc