Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
AssetManager Class Reference

Static Public Member Functions

static MatrixTreeNode init () throws IOException
 
static void addInitialisationListener (InitialisationListener l)
 
static void setLimit (int newLimit)
 
static int getLimit ()
 
static void refreshAsset (MatrixTreeNode parent, String direction, int start, int limit) throws IOException
 
static void refreshAsset (MatrixTreeNode parent, String direction) throws IOException
 
static int calcNextOffset (String assetid)
 
static int calcPrevOffset (String assetid)
 
static Element makeRefreshRequest (String[] assetids, String direction, int start, int limit) throws IOException
 
static Element makeRefreshRequest (String[] assetids, String direction) throws IOException
 
static void refreshAssets (Element element)
 
static String[] getAllRefreshableAssetids ()
 
static void updateAsset (Element childElement)
 
static void updateAsset (Element childElement, Asset parent)
 
static boolean isShadowAsset (Asset asset)
 
static Asset getAsset (String assetid)
 
static AssetType getAssetType (String typeCode)
 
static Iterator getAssetTypes ()
 
static String getWorkspaceid ()
 
static Asset getCurrentUser ()
 
static AssetType getCurrentUserType ()
 
static MatrixTreeNode getRootFolderNode ()
 
static String[] getAssetsOfType (String typeCode)
 
static String[] getTypeCodeNames ()
 

Detailed Description

The Asset Manager handles processing the xml return upon request to the matrix system. It also serves as a central repository for the assets and asset types.

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

Definition at line 35 of file AssetManager.java.

Member Function Documentation

static Asset getAsset ( String  assetid)
inlinestatic

Returns the Asset with the specifed assetid.

Parameters
assetidthe asset of the wanted asset
Returns
the Asset

Definition at line 497 of file AssetManager.java.

static String [] getAssetsOfType ( String  typeCode)
inlinestatic

Returns all the assetids of assets of the specified type.

Parameters
typeCodethe typeCode of the wanted assets
Returns
the assetids of the assets of the specified type
See Also
getAsset(String)
getAssetTypes()
getAssetType(String)

Definition at line 538 of file AssetManager.java.

static AssetType getAssetType ( String  typeCode)
inlinestatic

Returns the asset type given a type code

Parameters
typeCodethe type code of the wanted asset type
Returns
the asset type

Definition at line 506 of file AssetManager.java.

static MatrixTreeNode init ( ) throws IOException
inlinestatic

Initialises the information needed for the Asset Map. An xml request is made to the matrix system, which returns xml.

Returns
the root folder node of the matrix system.
Exceptions
IOExceptionif the request to matrix fails

Definition at line 63 of file AssetManager.java.

static Element makeRefreshRequest ( String[]  assetids,
String  direction,
int  start,
int  limit 
) throws IOException
inlinestatic

Performs a request to the matrix system for the specified assets. The xml is returned in the following format.

   <assets>
      <asset ...>
         <asset ...>
         <asset ...>
      </asset>
    </assets>
Parameters
assetidsthe list of assetids to refresh
Returns
the xml element for the specified assetids
Exceptions
IOExceptionif the request fails

Definition at line 299 of file AssetManager.java.

static void updateAsset ( Element  childElement,
Asset  parent 
)
inlinestatic

Updates an asset and its children using the information from the specified xml element. Calling this method may make changes to the tree structure and therefore must be executed within the Event Dispach Thread.

Parameters
childElementthe xml element to process
parentthe parent asset of the xml element.

Definition at line 416 of file AssetManager.java.


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