IBM Rational Software Modeler
Release 6.0

com.ibm.xtools.patterns.framework
Class PatternDefinitionUsage

java.lang.Object
  extended bycom.ibm.xtools.patterns.framework.PatternDefinitionUsage
All Implemented Interfaces:
Comparable, IPatternDescriptor, ITransformationDescriptor, ITransformationItem

public class PatternDefinitionUsage
extends Object
implements IPatternDescriptor

The pattern definition usage class represents the use of a pattern definition. Any pattern definition to be used within framework-based pattern implementations should use the pattern definition usage class. A pattern definition usage is required when constructing a pattern delegate instance. A pattern parameter mapping is associated with a pattern definition usage and used at expansion time. This class is a proxy and for the case where a pattern identity is used to construct a usage, lazy loading is used and therefore the proxy is not resolved until first use. The state pattern is used to encapsulate the state-related code.

See Also:
AbstractPatternDelegate#AbstractPatternDelegate(PatternDefinitionUsage, PatternParameterMapping.Provider)

Field Summary
 
Fields inherited from interface com.ibm.xtools.patterns.core.IPatternDescriptor
DIAGRAM, DIAGRAM_DELIMITERS, DOCUMENTATION, MANIFEST, MODEL, OVERVIEW_DIAGRAM, PLUGIN_NAME, PLUGIN_URL, TARGET_TYPE, TARGET_TYPE_DELIMITERS, TEMPLATE, TYPE
 
Fields inherited from interface com.ibm.xtools.transform.core.ITransformationDescriptor
AUTHOR, DESCRIPTION, DOCUMENT, EXTENSIBLE, GROUP_PATH, GROUP_PATH_DELIMITERS, ICON, ID, KEYWORDS, KEYWORDS_DELIMITERS, NAME, PROFILES, PROFILES_DELIMITERS, PROVIDER, PUBLIC, SOURCE_MODEL_TYPE, SOURCE_MODEL_TYPE_DELIMITERS, TARGET_MODEL_TYPE, TARGET_MODEL_TYPE_DELIMITERS, TRANSFORM_GUI, VERSION
 
Constructor Summary
PatternDefinitionUsage(AbstractPatternDefinition used)
          Constructs a pattern definition usage with the given pattern definition.
PatternDefinitionUsage(PatternIdentity identity)
          Constructs a pattern definition usage with the given pattern identity.
 
Method Summary
 int compareTo(Object object)
           
 IAdaptable getAdaptableProperty(String propertyId)
          Returns the property with the given property id that is implemented as an adaptable object.
 String[] getAssignedGroups()
          Returns the string paths of groups to which the pattern represented by this pattern descriptor is assigned.
 IPatternMetatype[] getContainerTypes()
          Returns the types of elements that are valid containers for an instance of the pattern represented by this pattern descriptor.
 String getDescription()
          Retrieve the localized description of the transformation item.
 String getId()
          Retrieve the unique id of the transformation item.
 IPatternIdentity getIdentity()
          Returns the composite identity of the pattern represented by this pattern descriptor.
 String[] getKeywords()
          Returns the keywords associated with the pattern represented by this pattern descriptor.
 String getName()
          Retrieve the localized name of the transformation item.
 IParameterDescriptor[] getParameters()
          Returns the parameters for the pattern represented by this pattern descriptor.
 ITransformationProperty[] getProperties()
          Return all defined properties associated with this transformation.
 ITransformationProperty getProperty(String propertyName)
          Return the specified property associated with this transformation.
 String[] getPropertyIds()
          List the identifers of properties associated with this transformation.
 IPatternMetatype[] getTargetTypes()
          Returns the types of elements that are valid targets for an instance of the pattern represented by this pattern descriptor.
 IPatternMetatype getType()
          Returns the type of element to which an instance of the pattern represented by this pattern descriptor will be bound.
 String getVersion()
          Returns the version of the pattern represented by this pattern descriptor.
 boolean isGroupMember(String groupPathString)
          Determines whether the pattern represented by this pattern descriptor is assigned to the group designated by the given group path string.
 boolean isPublic()
          Return true if the transformation is public (visible in UI).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PatternDefinitionUsage

public PatternDefinitionUsage(AbstractPatternDefinition used)
Constructs a pattern definition usage with the given pattern definition.

Parameters:
used - the definition to be used within this usage

PatternDefinitionUsage

public PatternDefinitionUsage(PatternIdentity identity)
Constructs a pattern definition usage with the given pattern identity.

Parameters:
identity - the identity to be used to retrieve the pattern definition when needed (lazily bound)
Method Detail

compareTo

public int compareTo(Object object)
Specified by:
compareTo in interface Comparable

getAdaptableProperty

public IAdaptable getAdaptableProperty(String propertyId)
Description copied from interface: IPatternDescriptor
Returns the property with the given property id that is implemented as an adaptable object.

Specified by:
getAdaptableProperty in interface IPatternDescriptor
Returns:
Returns the adaptable object with the given property id associated with the pattern.

getAssignedGroups

public String[] getAssignedGroups()
Description copied from interface: IPatternDescriptor
Returns the string paths of groups to which the pattern represented by this pattern descriptor is assigned.

Specified by:
getAssignedGroups in interface IPatternDescriptor
Returns:
Returns the string paths of the groups to which the pattern is assigned.

getContainerTypes

public IPatternMetatype[] getContainerTypes()
Description copied from interface: IPatternDescriptor
Returns the types of elements that are valid containers for an instance of the pattern represented by this pattern descriptor.

Specified by:
getContainerTypes in interface IPatternDescriptor
Returns:
Returns the types of elements that are the containers for an instance of the pattern.

getDescription

public String getDescription()
Description copied from interface: ITransformationItem
Retrieve the localized description of the transformation item.

Specified by:
getDescription in interface ITransformationItem
Returns:
String - the localized description for the transformation item.

getId

public String getId()
Description copied from interface: ITransformationItem
Retrieve the unique id of the transformation item.

Specified by:
getId in interface ITransformationItem
Returns:
String - the unique identifier for the transformation item

getIdentity

public IPatternIdentity getIdentity()
Description copied from interface: IPatternDescriptor
Returns the composite identity of the pattern represented by this pattern descriptor.

Specified by:
getIdentity in interface IPatternDescriptor
Returns:
Returns the identity of the pattern.

getKeywords

public String[] getKeywords()
Description copied from interface: IPatternDescriptor
Returns the keywords associated with the pattern represented by this pattern descriptor.

Specified by:
getKeywords in interface IPatternDescriptor
Returns:
Returns the keywords associated with the pattern.

getName

public String getName()
Description copied from interface: ITransformationItem
Retrieve the localized name of the transformation item.

Specified by:
getName in interface ITransformationItem
Returns:
String - the localized name for the transformation item.

getParameters

public IParameterDescriptor[] getParameters()
Description copied from interface: IPatternDescriptor
Returns the parameters for the pattern represented by this pattern descriptor.

Specified by:
getParameters in interface IPatternDescriptor
Returns:
Returns the parameters for the pattern.

getProperties

public ITransformationProperty[] getProperties()
Description copied from interface: ITransformationDescriptor
Return all defined properties associated with this transformation. This method returns all of the static properties defined for this transformation, including readonly properties. Properties defined in a transform context (@link ITransformContext) are not returned by this method. Each associated property defines the default value, which cannot be changed. However the values for non-readonly properties can be overridden in the transform context.

Specified by:
getProperties in interface ITransformationDescriptor
Returns:
TransformationProperty[] - an array of defined properties

getProperty

public ITransformationProperty getProperty(String propertyName)
Description copied from interface: ITransformationDescriptor
Return the specified property associated with this transformation. If the property is not defeind for this transformation, null is returned.

Specified by:
getProperty in interface ITransformationDescriptor
Parameters:
propertyName - the identifier of the property
Returns:
ITransformationProperty - the property, if defined

getPropertyIds

public String[] getPropertyIds()
Description copied from interface: ITransformationDescriptor
List the identifers of properties associated with this transformation. This list contains only those properties that have been defined and does not include any new properties defined in a transform context (@link ITransformContext).

Specified by:
getPropertyIds in interface ITransformationDescriptor
Returns:
String[] - the identifiers of associated properties

getTargetTypes

public IPatternMetatype[] getTargetTypes()
Description copied from interface: IPatternDescriptor
Returns the types of elements that are valid targets for an instance of the pattern represented by this pattern descriptor.

Specified by:
getTargetTypes in interface IPatternDescriptor
Returns:
Returns the types of elements that are targets for an instance of the pattern.

getType

public IPatternMetatype getType()
Description copied from interface: IPatternDescriptor
Returns the type of element to which an instance of the pattern represented by this pattern descriptor will be bound.

Specified by:
getType in interface IPatternDescriptor
Returns:
Returns the type to which an instance the pattern will be bound.

getVersion

public String getVersion()
Description copied from interface: IPatternDescriptor
Returns the version of the pattern represented by this pattern descriptor.

Specified by:
getVersion in interface IPatternDescriptor
Returns:
Returns the version of the pattern.

isGroupMember

public boolean isGroupMember(String groupPathString)
Description copied from interface: IPatternDescriptor
Determines whether the pattern represented by this pattern descriptor is assigned to the group designated by the given group path string.

Specified by:
isGroupMember in interface IPatternDescriptor
Parameters:
groupPathString - The string for the group path designating a group for which the pattern represented by this pattern descriptor will be tested for membership.
Returns:
Returns true if the pattern is a member of the group designated by the given group path string; otherwise, it returns false.

isPublic

public boolean isPublic()
Description copied from interface: ITransformationDescriptor
Return true if the transformation is public (visible in UI).

This is a convenience method for returning the value of the PUBLIC property.

Specified by:
isPublic in interface ITransformationDescriptor
Returns:
boolean - true for public transformations

IBM Rational Software Modeler
Release 6.0


Guidelines for using Eclipse APIs.

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