Java API ReferenceClass Hierarchy | All Classes | All Fields and Methods

com.ibm.xtools.patterns.framework

Class AbstractPatternStore.Definition

+-- 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.

Enclosing Class:


Constructor summary
AbstractPatternStore.Definition()

Method summary
booleancontainsDefinition(AbstractPatternDefinition definition, Object containerObject)

Determines if a definition already exists within the container object scope.

ObjectcreateDefinition(AbstractPatternDefinition definition, Object containerObject)

Creates a new pattern definition within the persistent pattern store.

ObjectensureDefinition(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.

ObjectgetDefinition(AbstractPatternDefinition definition, Object containerObject)

Retrieves a pattern definition representation in the persistent store given the pattern definition and container object.

IPatternIdentitygetDefinitionIdentity(Object representation)

Retrieves the definition identity associated with the instance representation object being passed in.

ObjectgetValidContainer(Object containerHint)

Retrieves a valid container for a pattern instance to live given the input target object.

voidremoveDefinition(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

AbstractPatternStore.Definition

public AbstractPatternStore.Definition()


Method detail

containsDefinition

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.

createDefinition

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.

ensureDefinition

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.

getDefinition

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.

getDefinitionIdentity

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.

getValidContainer

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.

removeDefinition

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.


Feedback