Skip to content
Reference > Classes

Layout

Definition

Layout var = .... ;

Extends

Extended By

None

Method Summary

Owner Name Return Type Description
Layout exec(when, amiScript) Object Runs script deferred. The provided script is compiled in the current thread, but executed outside this call. If provided time is in the past, will execute at earliest opportunity. Note, within the script 'this' refers to the current layout.
Layout exec(amiScript) Object Runs script inline. The provided script is compiled and executed in current thread. Note, within the script 'this' refers to the current layout.
Layout exportUserPreferences() List Exports all the user preferences associated with the layout.
Layout exportUserPreferencesById(upid) Map Exports user preferences associated with the upid (User Preferences Id).
Layout getAlias() String Returns the alias (name) of this layout instance (relative to the parent alias). Will be empty string if it is the root (top-level) layout.
DashboardResource getCallback(callbackName) Callback Returns a callback by name
DashboardResource getCallbacks() Map Returns a map of all callback definitions.
Layout getChild(alias) Layout Returns the child layout of this layout based on the relative alias (name), or null if no child alias exists with the given name
Layout getChildAliases() Set Returns the relative alias (name) of child layouts of this layout.
DashboardResource getChildren() List Returns a list of the child dashboard resources.
Object getClassName() String Returns the string name of this object's class type.
DashboardResource getDRI() String Returns the Dashboard Resource Indicator (DRI) as a string. DRI is the unique identifier of this resources within the entire dashboard.
DashboardResource getDashboardResourceType() String Returns the Dashboard Resource Type as a string
Layout getDatamodel(datamodelId) Datamodel Returns the datamodel given its name, or null if not found.
Layout getFieldValue(formPanelId, fieldId) String Returns the value from a form. Returns null if form or field doesn't exist.
DashboardResource getFormula(formulaName) Formula Returns a Formula given the formula name.
DashboardResource getFormulaNames() Set Returns a set of the names of all formulas for this object.
DashboardResource getFormulas() Map Returns a map of all available formulas for this object. The key is the formula name.
Layout getFullAlias() String Returns the full alias (name) of this layout instance. Will be empty string if it is the root (top-level) layout.
DashboardResource getLRI() String Returns the Localized Resource Indicator (LRI) as a string. LRI is the unique identifier of this resource with the parent element.
DashboardResource getOwner() DashboardResource Returns the DashboardResource that owns this object.
Layout getPanel(panelId) Panel Returns the panel for the given the panel id, or null if not found.
Layout getParent() Layout Returns the parent layout of this layout, or null if this is the root (top-level) layout.
Layout getProcessor(processorId) Processor Returns the processor given the processorId, or null if not found.
Layout getRelationship(relationshipId) Relationship Returns the relationship given the relationshipId, or null if there is no relationship with the given id.
Layout getStorageLocation() String Returns the location of this layout, usually the file name.
Layout getStorageType() String Returns the storage type, which is either CLOUD, LOCAL, ABSOLUTE, or WORKSPACE.
DashboardResource invokeCallback(callbackName, args) Object Executes the specified callback definition and returns the result from the callback.
Layout isReadonly() Boolean Returns true if the layout is read-only, false otherwise.
Layout isRelative() Boolean Returns true if path is relative, false otherwise.
DashboardResource isTransient() Boolean Returns true if this is transient, false otherwise. Transient objects are not saved to the layout.
Object toJson() String Returns a json representation of this object.

Method Definitions


exec(when,amiScript)

Object Layout::exec(Number when, String amiScript)

Description

Runs script deferred. The provided script is compiled in the current thread, but executed outside this call. If provided time is in the past, will execute at earliest opportunity. Note, within the script 'this' refers to the current layout.

Parameter Definition

Name Type Description
when Number  time - negative number is milliseconds in the future from now, zero or positive number is absolute time in millis.
amiScript String  Script to execute

exec(amiScript)

Object Layout::exec(String amiScript)

Description

Runs script inline. The provided script is compiled and executed in current thread. Note, within the script 'this' refers to the current layout.

Parameter Definition

Name Type Description
amiScript String  Script to execute

exportUserPreferences()

List Layout::exportUserPreferences()

Description

Exports all the user preferences associated with the layout.


exportUserPreferencesById(upid)

Map Layout::exportUserPreferencesById(String upid)

Description

Exports user preferences associated with the upid (User Preferences Id).

Parameter Definition

Name Type Description
upid String  user preferences id

getAlias()

String Layout::getAlias()

Description

Returns the alias (name) of this layout instance (relative to the parent alias). Will be empty string if it is the root (top-level) layout.


getChild(alias)

Layout Layout::getChild(String alias)

Description

Returns the child layout of this layout based on the relative alias (name), or null if no child alias exists with the given name

Parameter Definition

Name Type Description
alias String  alias of the child relative to this layout

getChildAliases()

Set Layout::getChildAliases()

Description

Returns the relative alias (name) of child layouts of this layout.


getDatamodel(datamodelId)

Datamodel Layout::getDatamodel(String datamodelId)

Description

Returns the datamodel given its name, or null if not found.

Parameter Definition

Name Type Description
datamodelId String  id of the datamodel

getFieldValue(formPanelId,fieldId)

String Layout::getFieldValue(String formPanelId, Object fieldId)

Description

Returns the value from a form. Returns null if form or field doesn't exist.

Parameter Definition

Name Type Description
formPanelId String 
fieldId Object 

getFullAlias()

String Layout::getFullAlias()

Description

Returns the full alias (name) of this layout instance. Will be empty string if it is the root (top-level) layout.


getPanel(panelId)

Panel Layout::getPanel(String panelId)

Description

Returns the panel for the given the panel id, or null if not found.

Parameter Definition

Name Type Description
panelId String  id of the panel to return

getParent()

Layout Layout::getParent()

Description

Returns the parent layout of this layout, or null if this is the root (top-level) layout.


getProcessor(processorId)

Processor Layout::getProcessor(String processorId)

Description

Returns the processor given the processorId, or null if not found.

Parameter Definition

Name Type Description
processorId String  id of the processor to return

getRelationship(relationshipId)

Relationship Layout::getRelationship(String relationshipId)

Description

Returns the relationship given the relationshipId, or null if there is no relationship with the given id.

Parameter Definition

Name Type Description
relationshipId String  id of the relationship

getStorageLocation()

String Layout::getStorageLocation()

Description

Returns the location of this layout, usually the file name.


getStorageType()

String Layout::getStorageType()

Description

Returns the storage type, which is either CLOUD, LOCAL, ABSOLUTE, or WORKSPACE.


isReadonly()

Boolean Layout::isReadonly()

Description

Returns true if the layout is read-only, false otherwise.


isRelative()

Boolean Layout::isRelative()

Description

Returns true if path is relative, false otherwise.