IBM Rational Software Modeler
Release 6.0

com.ibm.xtools.patterns.framework
Class AbstractPatternStore.Definition

java.lang.Object
  extended bycom.ibm.xtools.patterns.framework.AbstractPatternStore.Definition
Direct Known Subclasses:
PatternDefinitionStore
Enclosing class:
AbstractPatternStore

public abstract static class AbstractPatternStore.Definition
extends Object

The abstract pattern store definition class defines the methods necessary to persist and reconsitute 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
abstract  boolean containsDefinition(AbstractPatternDefinition definition, Object containerObject)
          Determines if a definition already exists within the container object scope.
abstract  Object createDefinition(AbstractPatternDefinition definition, Object containerObject)
          Creates a new pattern definition within the persistent pattern store.
abstract  Object ensureDefinition(AbstractPatternDefinition definition, Object containerObject)
          Ensure a pattern definition already exists in the pattern store for the given pattern definition using the container object as the scope.
abstract  Object getDefinition(AbstractPatternDefinition definition, Object containerObject)
          Retrieve a pattern definition representation in the persistent store given the pattern definition and container object.
abstract  IPatternIdentity getDefinitionIdentity(Object representation)
          Get the definition identity associated with the instance representation object being passed in.
abstract  Object getValidContainer(Object containerHint)
          Get a valid container for an pattern instance to live given the input target object.
abstract  void removeDefinition(AbstractPatternDefinition definition, Object containerObject)
          Remove a pattern definition in the persistent pattern store with the given definition using the container object as the scope.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractPatternStore.Definition

public AbstractPatternStore.Definition()
Method Detail

containsDefinition

public abstract 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:
indicates existence with true

createDefinition

public abstract 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

public abstract Object ensureDefinition(AbstractPatternDefinition definition,
                                        Object containerObject)
Ensure 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

public abstract Object getDefinition(AbstractPatternDefinition definition,
                                     Object containerObject)
Retrieve 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

public abstract IPatternIdentity getDefinitionIdentity(Object representation)
Get 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

public abstract Object getValidContainer(Object containerHint)
Get a valid container for an pattern instance to live given the input target object. The target object passed-in may or may not already be a valid 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 is 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; something valid has to return

removeDefinition

public abstract void removeDefinition(AbstractPatternDefinition definition,
                                      Object containerObject)
Remove 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

IBM Rational Software Modeler
Release 6.0


Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2004. All rights reserved.