IBM Rational Software Modeler
Release 6.0

com.ibm.xtools.transform.core
Interface ITransformationDescriptor

All Superinterfaces:
ITransformationItem
All Known Subinterfaces:
IParameterDescriptor, IPatternDescriptor
All Known Implementing Classes:
AbstractPatternDefinition, AbstractPatternParameter, PatternDefinitionUsage, PatternParameterUsage

public interface ITransformationDescriptor
extends ITransformationItem

The Transformation Descriptor interface provides access to the static information that is used to identify a transformation.

This static information includes the name of the transformation (localized), a unique identifier (non-localized) and a brief description on the purpose of the transformation. All information about a transformation is kept in properties associated with this descriptor. Each property also has a unique identifer and the default property values cannot be changed in this descriptor. However, These properties can also be accessed via ITransformContext when a transformation instance is executed.

The constants in this interface define the identifers for the pre-defined properties, which may be optional. In addition, transformation authors can define their own properties for the transformation.

See Also:
AbstractTransformationProvider, ITransformContext, TransformationServiceUtil, AbstractTransformGUI

Field Summary
static String AUTHOR
          Property ID for the transformation author.
static String DESCRIPTION
          Property ID for the brief transformation description.
static String DOCUMENT
          Property ID for an HTML document containing detailed transformation information.
static String EXTENSIBLE
          Property ID for the transformation extensibility flag.
static String GROUP_PATH
          Property ID for the transformation's group path.
static String GROUP_PATH_DELIMITERS
          Delimiters for the group path property value.
static String ICON
          Property ID for the transformation's icon representation.
static String ID
          Property ID for the transformation's unique identifier.
static String KEYWORDS
          Property ID for the transformation keywords.
static String KEYWORDS_DELIMITERS
          Delimiters for the keywords property value.
static String NAME
          Property ID for the transformation name.
static String PROFILES
          Property ID for the transformation's required profiles.
static String PROFILES_DELIMITERS
          Delimiters for the profiles property value.
static String PROVIDER
          Property ID for the transformation provider (class name).
static String PUBLIC
          Property ID for the transformation visibility flag.
static String SOURCE_MODEL_TYPE
          Property ID for the transformation's source model type.
static String SOURCE_MODEL_TYPE_DELIMITERS
          Delimiters for the source model type property value.
static String TARGET_MODEL_TYPE
          Property ID for the transformation's target model type.
static String TARGET_MODEL_TYPE_DELIMITERS
          Delimiters for the target model type property value.
static String TRANSFORM_GUI
          Property ID for the transformation custom GUI class.
static String VERSION
          Property ID for the transformation's version string.
 
Method Summary
 ITransformationProperty[] getProperties()
          Return all defined properties associated with this transformation.
 ITransformationProperty getProperty(String propertyId)
          Return the specified property associated with this transformation.
 String[] getPropertyIds()
          List the identifers of properties associated with this transformation.
 boolean isPublic()
          Return true if the transformation is public (visible in UI).
 
Methods inherited from interface com.ibm.xtools.transform.core.ITransformationItem
getDescription, getId, getName
 

Field Detail

AUTHOR

public static final String AUTHOR
Property ID for the transformation author.

See Also:
Constant Field Values

NAME

public static final String NAME
Property ID for the transformation name. The name, which should be localized in plugin.properties, is displayed in various places in the UI.

The value of this property is also accessible via getName().

See Also:
Constant Field Values

ID

public static final String ID
Property ID for the transformation's unique identifier. The ID must NOT be localized.

The value of this property is also accessible via getId().

See Also:
Constant Field Values

DESCRIPTION

public static final String DESCRIPTION
Property ID for the brief transformation description. This description should be localized in plugin.properties and should indicate what the transformation can be used for (in one sentence).

The value of this property is also accessible via getDescription().

This description corresponds to the RAS ShortDescription property.

See Also:
Constant Field Values

DOCUMENT

public static final String DOCUMENT
Property ID for an HTML document containing detailed transformation information. The HTML document reference can either be relative to the corresponding plug-in or can be an URL. Localized versions of this HTML file should follow the localization scheme used by Eclipse for plug-in data files.

The contents of the document corresponds to the RAS Description property.

See Also:
Constant Field Values

EXTENSIBLE

public static final String EXTENSIBLE
Property ID for the transformation extensibility flag. This flag is a string representing a boolean value (true or false) that indicates whether transformation extensions can be inserted into this transformation. By default, a transformation is extensible by everyone. A transformation that is not extensible (flag is false) can still be extended by a transformation extension defined in the same plug-in as the transformation. This enables the author to extend his own transformation if needed.

See Also:
Constant Field Values

ICON

public static final String ICON
Property ID for the transformation's icon representation. The icon will be displayed in the transformation configuration manager in a tree view and will also be displayed in the help documentation when all available transformations are listed.

See Also:
Constant Field Values

KEYWORDS

public static final String KEYWORDS
Property ID for the transformation keywords. Keywords will be used when searching for transformations. The property value is a comma separated list (a keyword may contain spaces).

See Also:
Constant Field Values

KEYWORDS_DELIMITERS

public static final String KEYWORDS_DELIMITERS
Delimiters for the keywords property value.

See Also:
Constant Field Values

SOURCE_MODEL_TYPE

public static final String SOURCE_MODEL_TYPE
Property ID for the transformation's source model type. This type is used by the UI to filter the current selection for obtaining possible source object candiates. Since a transformation may accept more than one type of source object (e.g., UML model object or a resource file that contains a model), the property value can be a comma separated list.

See Also:
Constant Field Values

SOURCE_MODEL_TYPE_DELIMITERS

public static final String SOURCE_MODEL_TYPE_DELIMITERS
Delimiters for the source model type property value.

See Also:
Constant Field Values

TARGET_MODEL_TYPE

public static final String TARGET_MODEL_TYPE
Property ID for the transformation's target model type. This type is used by the UI to filter the choices for selecting the target container. When a transformation is executed, it typically converts data from the source model into a destination model. This property defines the type of objects that will contain that destination model. For example, if a transformation generates a model file, then the target type may be a resource of some kind (a project or a folder within a project). Since a transformation may be able to create a new model or generate its data into an existing model, more than one type target object may be needed. Hence, the property value can be a comma separated list.

See Also:
Constant Field Values

TARGET_MODEL_TYPE_DELIMITERS

public static final String TARGET_MODEL_TYPE_DELIMITERS
Delimiters for the target model type property value.

See Also:
Constant Field Values

GROUP_PATH

public static final String GROUP_PATH
Property ID for the transformation's group path. The group path identifes how the transformation will be organized in a tree control when the UI presents the list of available transformations to the user. Although this property can be specified as a list or paths, the transform configuration UI only uses the first path specified.

A path is a slash ("/") separated list of subpaths, similar to a list of nested folders.

See Also:
Constant Field Values

GROUP_PATH_DELIMITERS

public static final String GROUP_PATH_DELIMITERS
Delimiters for the group path property value.

See Also:
Constant Field Values

PROFILES

public static final String PROFILES
Property ID for the transformation's required profiles. Some transformations may require the source UML model to be marked up by associating a profile with the model and applying steroetypes to elements in that model. The transformation would look for elements with specific sterotypes applied and would process them accordingly. The value for this property is a list of comma separted profile names, as defined by the "com.ibm.xtools.uml2.msl.UMLProfiles" extension point.

See Also:
Constant Field Values

PROFILES_DELIMITERS

public static final String PROFILES_DELIMITERS
Delimiters for the profiles property value.

See Also:
Constant Field Values

PUBLIC

public static final String PUBLIC
Property ID for the transformation visibility flag. This flag is a string representing a boolean value (true or false) that indicates whether this transformation is visible to the user in the UI. By default, a transformation is visible in the UI. If some component of the system uses transformations internally, the client would not want the user to see that transformation in the UI or execute it out of context. A value of false means the transformation is private. If a transformation service client knows the ID of a private transformation, it is still possible to programmatically execute that transformation.

See Also:
Constant Field Values

TRANSFORM_GUI

public static final String TRANSFORM_GUI
Property ID for the transformation custom GUI class. The transform configuration UI enables users to customize the non-readonly properties of a transformation before executing it. The transform configuration UI presents information on the current transformation in a series of tabs, similar to the Eclipse run configuration manager (e.g., Run ... dialog).

By defining this property, transformation authors have the ability to override the default tabs and/or to add their own custom tabs. For example, the standard transform property tab contains a table of property name/value pairs. This simplistic presentation of properties may not be suitable, especially if there are dependencies between these properties.

The value for this custom GUI transformation property should be a class in the transformation provider's plug-in that is derived from the class (@link com.ibm.xtools.transform.ui.AbstractTransformGUI).

See Also:
Constant Field Values

VERSION

public static final String VERSION
Property ID for the transformation's version string. The version of a transformation should use the same major.minor.revision format that is used by Eclipse plug-ins. Currently the transformation version number is simply information for users. If an author creates a newer version of a transformation that may be installed with older versions of that transformation, the author should install the entire plug-in and use the Eclipse versioning mechanism to override the previous transformation in the older plug-in.

See Also:
Constant Field Values

PROVIDER

public static final String PROVIDER
Property ID for the transformation provider (class name). This property is not extracted from the XML description but is added automatically to every transformation descriptor. The value corresponds to the fully qualified name of the transformation provider class defined in plugin.xml. This readonly property is used internally by the transformation service.

See Also:
Constant Field Values
Method Detail

getProperties

public ITransformationProperty[] getProperties()
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.

Returns:
TransformationProperty[] - an array of defined properties

getProperty

public ITransformationProperty getProperty(String propertyId)
Return the specified property associated with this transformation. If the property is not defeind for this transformation, null is returned.

Parameters:
propertyId - the identifier of the property
Returns:
ITransformationProperty - the property, if defined

getPropertyIds

public String[] getPropertyIds()
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).

Returns:
String[] - the identifiers of associated properties

isPublic

public boolean isPublic()
Return true if the transformation is public (visible in UI).

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

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.