| Java API Reference | Class Hierarchy | All Classes | All Fields and Methods |
com.ibm.xtools.patterns.framework
+-- Object +-- AbstractPatternStore.Definition
abstract static public Class AbstractPatternStore.Definition
extends Object
Represents the abstract pattern store definition class that defines the methods necessary to persist and reconstitute persisted pattern definitions.
This does not fully-define all persisted data regarding pattern definitions. It only persists the data needed for pattern applications. The data needed for pattern applications is currently the data needed to support of the pattern instance store.
| Constructor summary |
|---|
| AbstractPatternStore.Definition() |
| Method summary | |
|---|---|
| boolean | containsDefinition(AbstractPatternDefinition definition, Object containerObject) Determines if a definition already exists within the container object scope. |
| Object | createDefinition(AbstractPatternDefinition definition, Object containerObject) Creates a new pattern definition within the persistent pattern store. |
| Object | ensureDefinition(AbstractPatternDefinition definition, Object containerObject) Ensures that a pattern definition already exists in the pattern store for the given pattern definition using the container object as the scope. |
| Object | getDefinition(AbstractPatternDefinition definition, Object containerObject) Retrieves a pattern definition representation in the persistent store given the pattern definition and container object. |
| IPatternIdentity | getDefinitionIdentity(Object representation) Retrieves the definition identity associated with the instance representation object being passed in. |
| Object | getValidContainer(Object containerHint) Retrieves a valid container for a pattern instance to live given the input target object. |
| void | removeDefinition(AbstractPatternDefinition definition, Object containerObject) Removes a pattern definition in the persistent pattern store with the given definition using the container object as the scope. |
Constructor detail
Method detail
abstract public boolean containsDefinition(AbstractPatternDefinition definition, Object containerObject)
Determines if a definition already exists within the container object scope.
Parameters:
| definition | - The pattern definition of interest. |
| containerObject | - The container object to use as the scope. |
Returns:
A boolean value of true indicates existence. |
abstract public Object createDefinition(AbstractPatternDefinition definition, Object containerObject)
Creates a new pattern definition within the persistent pattern store.
Parameters:
| definition | - The pattern definition of interest. |
| containerObject | - The container object to use as the scope. |
Returns:
The newly created pattern definition representation in the store. The object returned is only used in subsequent calls to the pattern store which require a reference to the definition's corresponding persistent object. |
abstract public Object ensureDefinition(AbstractPatternDefinition definition, Object containerObject)
Ensures that a pattern definition already exists in the pattern store for the given pattern definition using the container object as the scope.
Parameters:
| definition | - The pattern definition of interest. |
| containerObject | - The container object to use as the scope. |
Returns:
The pattern definition representation in the pattern store. |
abstract public Object getDefinition(AbstractPatternDefinition definition, Object containerObject)
Retrieves a pattern definition representation in the persistent store given the pattern definition and container object.
Parameters:
| definition | - The pattern definition of interest. |
| containerObject | - The container object to use as the scope. |
Returns:
The pattern definition representation in the persistent store. |
abstract public IPatternIdentity getDefinitionIdentity(Object representation)
Retrieves the definition identity associated with the instance representation object being passed in.
Parameters:
| representation | - The definition representation to retrieve the pattern identity from. |
Returns:
The pattern identity associated with the definition representation passed in. |
abstract public Object getValidContainer(Object containerHint)
Retrieves a valid container for a pattern instance to live given the input target object.
The target object passed-in may or may not already be avalid container. Given the specified target object though this method must either return the target object back or find another valid container that is related to the target object in some way.
This method is on the definition store and not the instance store because it is typically used before an instance actually exists and makes more sense to be called upon the definition.
Parameters:
| containerHint | - The container candidate or container hint. |
Returns:
The valid container is returned. A valid value has to return. |
abstract public void removeDefinition(AbstractPatternDefinition definition, Object containerObject)
Removes a pattern definition in the persistent pattern store with the given definition using the container object as the scope.
Parameters:
| definition | - The pattern definition of interest. |
| containerObject | - The container object to use as the scope. |