|
IBM Rational Software Modeler Release 6.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.xtools.common.core.service.AbstractProvider
com.ibm.xtools.patterns.core.AbstractPatternInstanceProvider
com.ibm.xtools.patterns.framework.AbstractPatternLibrary
This class is the abstract base class to all pattern libraries defined by the framework. This class implements the pattern provider and pattern instance provider interfaces defined by the patterns core plug-in. It provides an implementation for the provides method that demultiplexes the provides call into the more type-specific overloaded provides method. To override the default provides implementation for any operation, simply override one of the type-specific provides methods. The general provides method has been made final as a reminder to make changes in the type-specific overloaded provides methods only. The hot-spot method that must be overridden is the get available pattern definitions method; the return results from this method define what patterns are available for use during this library's run-time existence. The create framework configuration method is a hot-spot method that can be optionally overridden. This is a factory method that returns the configuration that should be in use for this particular library. There are less frequently overridden hot-spot methods that can be optionally overridden. These methods include the provides methods strongly-typed to a particular operation.
getAvailablePatternDefinitions()
,
createFrameworkConfiguration()
Constructor Summary | |
protected |
AbstractPatternLibrary(Plugin associatedPlugin)
Constructs an abstract pattern library given the specified associated plug-in. |
protected |
AbstractPatternLibrary(Plugin associatedPlugin,
String uniqueIdentifier,
String versionIdentifier)
Constructs an abstract pattern library given the specified associated plugin, unique identifier and version identifier. |
Method Summary | |
void |
accept(Visitor visitor)
Enable visitation of this entity. |
void |
addProviderChangeListener(IProviderChangeListener listener)
Adds the specified listener to the list of provider change listeners for this provider. |
AbstractPatternInstance |
createContainedPatternInstance(IPatternDescriptor pattern,
Object container,
PatternInstanceOption[] options,
AbstractPatternResult results,
MultiStatus status)
Creates an instance of the pattern represented by the given pattern descriptor using the given object as the container for the instance. |
protected AbstractConfiguration |
createFrameworkConfiguration()
This factory method is defaulted to create or return the default framework configuration instance. |
AbstractPatternInstance |
createPatternInstance(IPatternDescriptor pattern,
IParameterDescriptor parameter,
Object targetObject,
PatternInstanceOption[] options,
AbstractPatternResult results,
MultiStatus status)
Creates an instance of the pattern represented by the given pattern descriptor using the given object as an argument for the given parameter of the instance. |
AbstractPatternInstance |
createPatternInstance(IPatternDescriptor pattern,
Object targetObject,
PatternInstanceOption[] options,
AbstractPatternResult results,
MultiStatus status)
Creates an instance of the pattern represented by the given pattern descriptor using the given object as the bound element for the instance. |
URL |
findImage(String imagePathIdentifier)
Find an URL pointing to an image for the given image path identifier. |
AbstractPatternInstance |
getAppliedPatternInstance(IPatternApplication pattern,
EObject applicationObject,
MultiStatus status)
Returns the instance of an application of the given pattern to the given object. |
IPatternApplication[] |
getAppliedPatterns(EObject context,
MultiStatus status)
Returns a collection of pattern application objects for all known instances of patterns applied to the given object. |
protected abstract AbstractPatternDefinition[] |
getAvailablePatternDefinitions()
Get all the available pattern definitions in this library. |
boolean |
isPatternDefinitionAvailable(String identifier)
Determines if a pattern definition is available given the unique identifier specified. |
boolean |
provides(IOperation operation)
Indicates whether this pattern library provides the given operation as defined by the pattern service. |
void |
removeProviderChangeListener(IProviderChangeListener listener)
Removes the specified listener from the list of provider change listeners for this provider. |
Methods inherited from class com.ibm.xtools.common.core.service.AbstractProvider |
fireProviderChange |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected AbstractPatternLibrary(Plugin associatedPlugin)
associatedPlugin
- the associated plug-in for this pattern libraryprotected AbstractPatternLibrary(Plugin associatedPlugin, String uniqueIdentifier, String versionIdentifier)
associatedPlugin
- the associated plug-in for this pattern libraryuniqueIdentifier
- the unique identifier for this pattern libraryversionIdentifier
- the version identifier for this pattern libraryMethod Detail |
public void accept(Visitor visitor)
public AbstractPatternInstance createContainedPatternInstance(IPatternDescriptor pattern, Object container, PatternInstanceOption[] options, AbstractPatternResult results, MultiStatus status)
AbstractPatternInstanceProvider
createContainedPatternInstance
in class AbstractPatternInstanceProvider
pattern
- The pattern to be instantiated.container
- The container of the pattern instance.options
- The options to use when creating the instance.results
- The results of the operation.status
- The status produced by the operation.
protected AbstractConfiguration createFrameworkConfiguration()
public AbstractPatternInstance createPatternInstance(IPatternDescriptor pattern, IParameterDescriptor parameter, Object targetObject, PatternInstanceOption[] options, AbstractPatternResult results, MultiStatus status)
AbstractPatternInstanceProvider
createPatternInstance
in class AbstractPatternInstanceProvider
pattern
- The pattern to be instantiated.targetObject
- The candidate object the argument.parameter
- The parameter of the pattern for which
the object will be an argument.options
- The options to use when creating the instance.results
- The results of the operation.status
- The status produced by the operation.
public AbstractPatternInstance createPatternInstance(IPatternDescriptor pattern, Object targetObject, PatternInstanceOption[] options, AbstractPatternResult results, MultiStatus status)
AbstractPatternInstanceProvider
createPatternInstance
in class AbstractPatternInstanceProvider
pattern
- The pattern to be instantiated.targetObject
- The candidate object for the bound element
of the instance.options
- The options to use when creating the instance.results
- The results of the operation.status
- The status produced by the operation.
public final URL findImage(String imagePathIdentifier)
imagePathIdentifier
- the relative image path identifier
public AbstractPatternInstance getAppliedPatternInstance(IPatternApplication pattern, EObject applicationObject, MultiStatus status)
AbstractPatternInstanceProvider
getAppliedPatternInstance
in class AbstractPatternInstanceProvider
pattern
- The pattern definition which was
instantiated.applicationObject
- The ecore object to which the pattern
was applied.status
- The status produced by the operation.
public final IPatternApplication[] getAppliedPatterns(EObject context, MultiStatus status)
AbstractPatternInstanceProvider
The instance information must be stored with the object in a way that makes it accessible to the pattern service, so the object must be an EObject.
getAppliedPatterns
in class AbstractPatternInstanceProvider
context
- The ecore object to which the patterns
have been applied.status
- The status produced by the operation.
protected abstract AbstractPatternDefinition[] getAvailablePatternDefinitions()
public final boolean isPatternDefinitionAvailable(String identifier)
identifier
- the unique identifier of the pattern definition of interest
public boolean provides(IOperation operation)
provides
in interface IProvider
operation
- the operation checked to see if provided
public void addProviderChangeListener(IProviderChangeListener listener)
IProvider
addProviderChangeListener
in interface IProvider
addProviderChangeListener
in class AbstractProvider
listener
- The listener to be added.IProvider.addProviderChangeListener(IProviderChangeListener)
public void removeProviderChangeListener(IProviderChangeListener listener)
IProvider
removeProviderChangeListener
in interface IProvider
removeProviderChangeListener
in class AbstractProvider
listener
- The listener to be removed.IProvider.removeProviderChangeListener(IProviderChangeListener)
|
IBM Rational Software Modeler Release 6.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2004. All rights reserved.