com.ibm.carma.model.util
Class NavigationUtils

java.lang.Object
  extended by com.ibm.carma.model.util.NavigationUtils

public class NavigationUtils
extends java.lang.Object

Utility methods for navigating the CARMA model hierarchy.

Since:
7.0.1

Field Summary
static java.lang.String COPYRIGHT
           
 
Constructor Summary
NavigationUtils()
           
 
Method Summary
static CARMACommonObject getCommonObject(java.lang.Object resource)
          Helper method to wrap the given object to a CARMA common object.
static java.lang.String getDisplayName(java.lang.Object resource)
          Determines the (default) displayable name for the given CARMA model object.
static java.lang.String getRepositoryManagerId(java.lang.Object resource)
          Locates the Repository Manager of the associated resource if the resource can be resolved to a CARMA Resource or Repository Manager.
static boolean isContainer(CARMAResource resource)
          Checks if the given resource is a container type resource.
static boolean isContentsReady(java.lang.Object resource)
          Checks if the navigable children of the given resource are initialized (i.e., will not throw a NotSynchronizedException if accessed).
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT
See Also:
Constant Field Values
Constructor Detail

NavigationUtils

public NavigationUtils()
Method Detail

getCommonObject

public static CARMACommonObject getCommonObject(java.lang.Object resource)
Helper method to wrap the given object to a CARMA common object. If no common object is associated with the resource, then null will be returned

Parameters:
resource - the CARMA model object to wrap with a CARMACommonObject interface
Returns:
the wrapped CARMA model object, or null

isContainer

public static boolean isContainer(CARMAResource resource)
Checks if the given resource is a container type resource.

Parameters:
resource - the resource to check
Returns:
true if the resource is a container, false otherwise

isContentsReady

public static boolean isContentsReady(java.lang.Object resource)
Checks if the navigable children of the given resource are initialized (i.e., will not throw a NotSynchronizedException if accessed). If the given resource is not a CARMA model object then false will be returned.

Parameters:
resource - the resource to check for contents availability
Returns:
true if the resource has contents initialized, false otherwise
Since:
7.1

getRepositoryManagerId

public static java.lang.String getRepositoryManagerId(java.lang.Object resource)
Locates the Repository Manager of the associated resource if the resource can be resolved to a CARMA Resource or Repository Manager. If the resource is not a CARMA resource or Repository Manager, or does not have an associated manager, then null is returned.

Parameters:
resource - the resource to find the associated manager id
Returns:
the associated manager id, or null

getDisplayName

public static java.lang.String getDisplayName(java.lang.Object resource)
Determines the (default) displayable name for the given CARMA model object. The input should be one of the following: If the input is not a CARMA model object, then a NULL value shall be returned.

Parameters:
resource - the CARMA model object to gather a displayable String for
Returns:
the displayable name of the CARMA model object, or NULL if the resource is not a CARMA object
Since:
7.1