|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.adt.topology.provider.impl.TopologyProviderImpl
public abstract class TopologyProviderImpl
TopologyProviderImpl provides a default implementation of TopologyProvider. This implementation provides the foundation for a Provider and binds together a set of supporting classes for TopologyProvider and TopologyObject. In addition to implementing the public TopologyProvider methods, it also provides several helper methods for the custom provider to use.
Constructor Summary | |
---|---|
protected |
TopologyProviderImpl(java.net.URL objectTypeMap)
Constructor for building default Provider implementation. |
Method Summary | |
---|---|
protected void |
addProviderExtension(TopologyProviderExtensionImpl extension)
|
protected void |
addRelationship(RelationshipMetaInfo relationship)
Helper method that registers the specified relationship for this provider. |
protected void |
cacheObjectProperties(TopologyObject object,
PropertyList props)
Deprecated. replaced by TopologyObjectImpl.cacheProperties(PropertyList) |
protected void |
cacheParentObject(TopologyObject childObject,
TopologyObject parentObject)
Deprecated. replaced by cacheRelatedObjects(TopologyObjectImpl, TopologyObjectImpl, RelationshipMetaInfo) |
protected void |
cacheRelatedObject(TopologyObject sourceObject,
TopologyObject targetObject,
RelationshipMetaInfo relationship)
Deprecated. replaced by cacheRelatedObjects(TopologyObjectImpl, TopologyObjectImpl, RelationshipMetaInfo) |
void |
cacheRelatedObjects(TopologyObjectImpl sourceObject,
TopologyObjectImpl targetObject,
RelationshipMetaInfo relationship)
Helper method that binds together related TopologyObject instances using the specified relationship. |
protected void |
cacheTopologyObject(TopologyObjectImpl to)
Helper method that caches a TopologyObject to the TopologyProvider and TopologyObjectType caches if caching is enabled. |
protected TopologyObjectType |
createObjectType(java.lang.String type,
java.lang.String superType,
java.lang.String internalType)
Helper method that registers the specified creates and registers a TopologyObjectType for this provider. |
protected TopologyObjectImpl |
createTopologyObject(java.lang.String internalId,
java.lang.String displayName,
TopologyObjectType objectType)
Helper method that creates a TopologyObject instance and caches it in the TopologyProvider and TopologyObjectType caches (if caching is enabled). |
protected TopologyObject[] |
filterTopologyObjects(TopologyObject[] objects,
java.lang.String objectKey)
Helper method that filters the specified TopologyObject instances by the specified key. |
protected void |
finalizeRelationshipMap()
Helper method that finalizes the relationships map. |
java.lang.String |
generateUniqueId()
Helper method that generates returns a provider uniqueId. |
java.lang.String[] |
getApplicationTypes()
Get all registered TopologyObject types that are of supertype TopologyObjectType.APPLICATION. |
java.lang.String[] |
getArtifactTypes()
Get all registered TopologyObject types that are of supertype TopologyObjectType.ARTIFACT. |
java.lang.String[] |
getComputerSystemTypes()
Get all registered TopologyObject types that are of supertype TopologyObjectType.COMPUTER_SYSTEM. |
abstract java.lang.String |
getId()
Gets the id associated with the Provider. |
TopologyObjectImpl |
getObjectByInternalId(java.lang.String internalId)
Helper method that returns the TopologyObjectImpl instance associated with the specified internalId. |
TopologyObjectImpl |
getObjectByUniqueId(java.lang.String uniqueId)
Helper method that returns the TopologyObjectImpl instance associated with the specified uniqueId. |
TopologyObjectImpl[] |
getObjectsByTopologyObjectType(TopologyObjectType type)
Helper method that returns the cached TopologyObjectImpl objects of the specified public type. |
TopologyObjectType |
getObjectTypeByInternalType(java.lang.String internalType)
Helper method that returns the TopologyObjectType instance associated with the specified internal type. |
TopologyObjectType |
getObjectTypeByPublicType(java.lang.String publicType)
Helper method that returns the TopologyObjectType instance associated with the specified well-known type. |
java.lang.String |
getObjectTypeNamespace()
Helper method that returns the TopologyObjectType namespace as was defined by the Provider implementation. |
java.util.Collection |
getObjectTypes()
Helper method that returns a collection of TopologyObjectType objects registered for this provider. |
TopologyObject |
getProviderTopologyObject()
Get the root TopologyObject instance for the Provider. |
java.lang.String |
getProviderType()
Get the TopologyProvider type. |
RelationshipMetaInfo |
getRelationshipByUniqueId(java.lang.String uniqueId)
Helper method that returns the RelationshipMetaInfo instance associated with the specified uniqueId. |
RelationshipMetaInfo[] |
getRelationshipsMetaInfo(java.lang.String sourceRelationshipKey)
Get all defined relationships that correspond to specified relationshipKey. |
java.lang.String[] |
getResourceTypes()
Get all registered TopologyObject types that are of supertype TopologyObjectType.RESOURCE. |
java.lang.String[] |
getServerCollectionTypes()
Get all registered TopologyObject types that are of supertype TopologyObjectType.SERVER_COLLECTION. |
java.lang.String[] |
getServerTypes()
Get all registered TopologyObject types that are of supertype TopologyObjectType.SERVER. |
TopologyObject[] |
getTopologyObjects(java.lang.String objectKey)
Get all TopologyObject instances that correspond to the given objectKey. |
java.lang.String[] |
getTopologyObjectTypes()
Get all registered TopologyObject types. |
abstract void |
initialize(ProviderInfo info)
Initializes the provider instance using the specified ProviderInfo. |
boolean |
isCacheObjects()
Helper method to test if TopologyObject caching is enabled for this Provider. |
boolean |
isCacheProperties()
Helper method to test if Property caching is enabled for this Provider. |
boolean |
isObjectsCached(TopologyObjectType type)
Helper method to test if TopologyObject instances of the specified type have been cached. |
void |
logError(java.lang.String errMsg)
Logs provider initialization errors to the "errorMessages" property of the provider TopologyObject. |
void |
registerTopologyService(TopologyService service)
Registers this provider instance with the specified service instance. |
boolean |
setObjectCachingEnabled(boolean enable)
Controls provider TopologyObject caching. |
void |
setObjectsCached(TopologyObjectType type)
Helper method that sets the "objects cached" indicator for TopologyObjects of the specified type. |
protected void |
setObjectTypeNamespace(java.lang.String objectTypeNamespace)
Helper method that sets the object type namespace for the provider. |
boolean |
setPropertyCachingEnabled(boolean enable)
Controls provider Property caching. |
void |
shutdown()
To override this method, super.shutdown() must be called from the overridden method. |
void |
unregisterTopologyService(TopologyService service)
Unregisters this provider instance with the specified service instance. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected TopologyProviderImpl(java.net.URL objectTypeMap) throws TopologyException
objectTypeMap
- points to the XML file that defines the object type map for
this provider.
TopologyException
Method Detail |
---|
public abstract java.lang.String getId()
TopologyProvider
getId
in interface TopologyProvider
public abstract void initialize(ProviderInfo info) throws TopologyException
TopologyProvider
initialize
in interface TopologyProvider
info
- a ProviderInfo object that specifies the initialization
parameters.
TopologyException
public TopologyObject getProviderTopologyObject() throws TopologyException
TopologyProvider
getProviderTopologyObject
in interface TopologyProvider
TopologyException
public java.lang.String[] getTopologyObjectTypes()
TopologyProvider
getTopologyObjectTypes
in interface TopologyProvider
public TopologyObject[] getTopologyObjects(java.lang.String objectKey) throws TopologyException
TopologyProvider
getTopologyObjects
in interface TopologyProvider
objectKey
- in the form of
"objectType::objectName/objectType::objectName/..."
TopologyException
public final java.lang.String getProviderType()
TopologyProvider
getProviderType
in interface TopologyProvider
public final java.lang.String[] getServerTypes()
TopologyProvider
getServerTypes
in interface TopologyProvider
public final java.lang.String[] getComputerSystemTypes()
TopologyProvider
getComputerSystemTypes
in interface TopologyProvider
public final java.lang.String[] getArtifactTypes()
TopologyProvider
getArtifactTypes
in interface TopologyProvider
public final java.lang.String[] getServerCollectionTypes()
TopologyProvider
getServerCollectionTypes
in interface TopologyProvider
public final java.lang.String[] getResourceTypes()
TopologyProvider
getResourceTypes
in interface TopologyProvider
public final java.lang.String[] getApplicationTypes()
TopologyProvider
getApplicationTypes
in interface TopologyProvider
public final RelationshipMetaInfo[] getRelationshipsMetaInfo(java.lang.String sourceRelationshipKey) throws TopologyException
TopologyProvider
getRelationshipsMetaInfo
in interface TopologyProvider
sourceRelationshipKey
- in the form of "key=value::key=value::..." where key can be
any of the following: relationshipType, sourceType, label,
targetType, isCrossProvider, sourceRole, targetRole,
navigable, uniqueId
TopologyException
public final void registerTopologyService(TopologyService service)
TopologyProvider
registerTopologyService
in interface TopologyProvider
public final void unregisterTopologyService(TopologyService service)
TopologyProvider
unregisterTopologyService
in interface TopologyProvider
public void shutdown() throws TopologyException
shutdown
in interface TopologyProvider
TopologyException
TopologyProvider.shutdown()
public final TopologyObjectType getObjectTypeByPublicType(java.lang.String publicType)
publicType
-
public final TopologyObjectType getObjectTypeByInternalType(java.lang.String internalType)
internalType
-
public final TopologyObjectImpl[] getObjectsByTopologyObjectType(TopologyObjectType type)
type
-
public final TopologyObjectImpl getObjectByInternalId(java.lang.String internalId)
internalId
-
public final TopologyObjectImpl getObjectByUniqueId(java.lang.String uniqueId)
uniqueId
-
public final RelationshipMetaInfo getRelationshipByUniqueId(java.lang.String uniqueId)
uniqueId
-
public final java.lang.String generateUniqueId()
public final java.util.Collection getObjectTypes()
public final java.lang.String getObjectTypeNamespace()
public final void setObjectsCached(TopologyObjectType type)
type
- public final boolean isObjectsCached(TopologyObjectType type)
type
-
public final boolean isCacheObjects()
public final boolean isCacheProperties()
public final void cacheRelatedObjects(TopologyObjectImpl sourceObject, TopologyObjectImpl targetObject, RelationshipMetaInfo relationship) throws TopologyException
sourceObject
- specifies source object. For composition relationships, the
source object must specify the parent object.targetObject
- specifies target object. For composition relationships, the
target object must specify the child object.relationship
-
TopologyException
public final void logError(java.lang.String errMsg)
errMsg
- the error to logprotected final TopologyObject[] filterTopologyObjects(TopologyObject[] objects, java.lang.String objectKey) throws TopologyException
objects
- -
the TopologyObjects to be filteredobjectKey
- -
objectKey in the form of
"objectType::objectName/objectType::objectName/..."
TopologyException
protected final TopologyObjectImpl createTopologyObject(java.lang.String internalId, java.lang.String displayName, TopologyObjectType objectType) throws TopologyException
internalId
- displayName
- objectType
-
TopologyException
protected final void cacheTopologyObject(TopologyObjectImpl to) throws TopologyException
to
-
TopologyException
protected void cacheRelatedObject(TopologyObject sourceObject, TopologyObject targetObject, RelationshipMetaInfo relationship) throws TopologyException
cacheRelatedObjects(TopologyObjectImpl, TopologyObjectImpl, RelationshipMetaInfo)
sourceObject
- targetObject
- relationship
-
TopologyException
protected void cacheParentObject(TopologyObject childObject, TopologyObject parentObject)
cacheRelatedObjects(TopologyObjectImpl, TopologyObjectImpl, RelationshipMetaInfo)
childObject
- parentObject
- protected void cacheObjectProperties(TopologyObject object, PropertyList props) throws TopologyException
TopologyObjectImpl.cacheProperties(PropertyList)
object
- props
-
TopologyException
protected final void addRelationship(RelationshipMetaInfo relationship)
relationship
- protected final TopologyObjectType createObjectType(java.lang.String type, java.lang.String superType, java.lang.String internalType)
type
- superType
- internalType
-
protected void addProviderExtension(TopologyProviderExtensionImpl extension) throws TopologyException
extension
-
TopologyException
protected final void finalizeRelationshipMap() throws TopologyException
TopologyException
protected final void setObjectTypeNamespace(java.lang.String objectTypeNamespace)
objectTypeNamespace
- the objectTypeNamespace to setpublic final boolean setObjectCachingEnabled(boolean enable)
TopologyProvider
setObjectCachingEnabled
in interface TopologyProvider
public final boolean setPropertyCachingEnabled(boolean enable)
TopologyProvider
setPropertyCachingEnabled
in interface TopologyProvider
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |