Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
Asset Class Reference
Inheritance diagram for Asset:
MatrixConstants RootFolder

Public Member Functions

 Asset (String id)
 
 Asset (Element assetElement, MatrixTreeNode parent, int index)
 
void setTotalKidsLoaded (int kidsLoaded)
 
int getTotalKidsLoaded ()
 
String toString ()
 
String getId ()
 
String getName (String linkid)
 
boolean setName (String name, String linkid)
 
void addNode (MatrixTreeNode node, String linkid)
 
MatrixTreeNode getNode (String linkid)
 
String[] getLinkIds ()
 
Iterator getTreeNodes ()
 
AssetType getType ()
 
int getStatus ()
 
String getURL ()
 
String getWebPath ()
 
boolean isAccessible ()
 
int getNumKids ()
 
void update (Element assetElement)
 
String processAssetXML (Element assetElement)
 
MatrixTreeNode processAssetXML (Element assetElement, MatrixTreeNode parent, int index)
 
boolean childrenLoaded ()
 
void setChildrenLoaded (boolean loaded)
 
MatrixTreeNode[] getNodesWithLinkid (String linkid)
 
void propagateNode (Asset childAsset, String linkid, int linkType, int index)
 
void propagateChildren (MatrixTreeNode node)
 
Color getStatusColour ()
 

Protected Member Functions

String processAssetXML (Element assetElement, boolean create)
 
MatrixTreeNode createNode (String linkid, int linkType, MatrixTreeNode parent, int index)
 
MatrixTreeNode createNode (String linkid, int linkType, MatrixTreeNode parent)
 
int getLinkType (Element assetElement)
 

Protected Attributes

final String id
 
String initName = ""
 
Map nodes = null
 

Additional Inherited Members

- Static Public Attributes inherited from MatrixConstants
static final int ARCHIVED = 1
 
static final int UNDER_CONSTRUCTION = 2
 
static final int PENDING_APPROVAL = 4
 
static final int APPROVED = 8
 
static final int LIVE = 16
 
static final int LIVE_APPROVAL = 32
 
static final int EDITING = 64
 
static final int EDITING_APPROVAL = 128
 
static final int EDITING_APPROVED = 256
 
static final Color ARCHIVED_COLOUR = new Color(0xC2B0A0)
 
static final Color UNDER_CONSTRUCTION_COLOUR = new Color(0xAACCDD)
 
static final Color PENDING_APPROVAL_COLOUR = new Color(0xDCD2E6)
 
static final Color APPROVED_COLOUR = new Color(0xF4D425)
 
static final Color LIVE_COLOUR = new Color(0xDBF18A)
 
static final Color LIVE_APPROVAL_COLOUR = new Color(0x50D000)
 
static final Color EDITING_COLOUR = new Color(0xF25C86)
 
static final Color EDITING_APPROVAL_COLOUR = new Color(0xCC7CC7)
 
static final Color EDITING_APPROVED_COLOUR = new Color(0xFF9A00)
 
static final Color UNKNOWN_STATUS_COLOUR = Color.white
 
static final Font PLAIN_FONT_10 = new Font("plain_font_10", Font.PLAIN, 10)
 
static final Font PLAIN_FONT_11 = new Font("plain_font_11", Font.PLAIN, 11)
 
static final Font PLAIN_FONT_12 = new Font("plain_font_12", Font.PLAIN, 12)
 
static final int LINK_TYPE_1 = 1
 
static final int LINK_TYPE_2 = 2
 
static final int LINK_TYPE_3 = 3
 

Detailed Description

Assets are created automatically by the system, and therefore a provided as a lookup device for the assets properties and its representing child nodes.

Author
Marc McIntyre mmcin.nosp@m.tyre.nosp@m.@squi.nosp@m.z.ne.nosp@m.t

Definition at line 37 of file Asset.java.

Constructor & Destructor Documentation

Asset ( Element  assetElement,
MatrixTreeNode  parent,
int  index 
)
inline

Constructs an asset. The asset is constructed from the specified XML element and 'attaches' it to the specified parent TreeNode, at the specified index

Parameters
assetElementthe xml element that represents this asset
parentthe parent to attach this asset to
indexthe index where to create the asset under the parent
Returns
the Asset

Definition at line 69 of file Asset.java.

Member Function Documentation

MatrixTreeNode createNode ( String  linkid,
int  linkType,
MatrixTreeNode  parent 
)
inlineprotected

Creates a node, but does not add it to the model bus or to the parent: it simply returns it. The parent it used to generate a url for this node

Parameters
linkidthe linkid of this node
parentthe parent of this node
indexthe index where this node

Definition at line 521 of file Asset.java.

String getId ( )
inline

Returns the assetid of this Asset

Returns
the assetid of this Asset

Definition at line 93 of file Asset.java.

String [] getLinkIds ( )
inline

Returns Links for this Asset. Each asset can have more than one node assign to it.

Returns
String[]

Definition at line 151 of file Asset.java.

String getName ( String  linkid)
inline

Returns the name of this Asset.

Returns
the name of this Asset

Definition at line 101 of file Asset.java.

MatrixTreeNode [] getNodesWithLinkid ( String  linkid)
inline

Returns an Iterator of the TreeNodes That this Asset is currently representing

Returns
an Iterator of the nodes of this Asset. Returns the tree nodes with the specified linkid. If is possible for an asset to have more than one linkid. This will occur when it has the same parent, but a different treeid in the tree.
Parameters
linkidthe linkid of the wanted nodes
Returns
the tree nodes with the specified linkid
See Also
getTreeNodes()

Definition at line 267 of file Asset.java.

int getNumKids ( )
inline

Returns the number of children this asset has

Returns
the number of children this asset has

Definition at line 213 of file Asset.java.

int getStatus ( )
inline

Returns the status of this Asset

Returns
the status of this Asset

Definition at line 181 of file Asset.java.

Color getStatusColour ( )
inline

Returns a status colour based on the status of this Asset

Returns
the status colour based on the status of this Asset. If the status unknown, Color.RED will be returned

Definition at line 360 of file Asset.java.

AssetType getType ( )
inline

Returns the AssetType of this asset.

Returns
the AssetType of this asset

Definition at line 173 of file Asset.java.

String getURL ( )
inline

Returns the URL of this Asset.

Returns
the URL of this Asset

Definition at line 189 of file Asset.java.

String getWebPath ( )
inline

Returns the web paths of this Asset.

Returns
the web paths of this Asset

Definition at line 197 of file Asset.java.

boolean isAccessible ( )
inline

Returns TRUE if this asset is Accessible

Returns
TRUE if this asset is accessible

Definition at line 205 of file Asset.java.

MatrixTreeNode processAssetXML ( Element  assetElement,
MatrixTreeNode  parent,
int  index 
)
inline

Processes the xml for the asset, and returns the MatrixTreeNode with the corresponding linkid from the xml

Definition at line 231 of file Asset.java.


The documentation for this class was generated from the following file: