|
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.patterns.core.AbstractPatternInstance
Provides operations by which the pattern is bound to an element, arguments are added, replaced, or removed for the parameters of the pattern, and the pattern is reapplied or unapplied.
A pattern instance represents an instance of an application
of a pattern. To retrieve the default arguments for a given parameter of the pattern, use the
getDefaultArguments
method. To check if it is valid to replace arguments, use the
validToReplaceArguments
method.
Use the validToAddArguments
method, to check if it is valid to add new arguments to the parameter.
To add arguments and retrieve the status of adding the arguments operation, use the addArguments
method.
expandPattern
method. To reapply or remove a pattern, use the
reapplyPattern
and the unapplyPattern
methods.
Use the validatePattern
and the canCompletePattern
methods to
check whether the application of the pattern is correct and if the parameters have sufficient arguments.
Constructor Summary | |
AbstractPatternInstance()
The default constructor for an abstract pattern instance. |
Method Summary | |
abstract IStatus |
addArgument(IParameterDescriptor parameter,
AbstractParameterArgument argument)
Adds an argument and returns the status of the adding an argument operation. |
abstract IStatus |
addArguments(IParameterDescriptor parameter,
AbstractParameterArgument[] arguments)
Adds arguments and returns the status of the adding arguments operation. |
abstract IStatus |
canCompletePattern()
Checks whether correct and sufficient arguments have been provided for the parameters of the pattern represented by this instance, so that expansion will produce a complete and semantically valid application of the pattern. |
abstract IStatus |
createArguments(IParameterDescriptor parameter,
IPatternMetatype metatype)
Creates the arguments for the given parameter of the pattern applied in this instance. |
abstract IStatus |
createArgumentsUsingPairs(IParameterDescriptor parameter,
IPatternMetatype metatype,
AbstractParameterArgument.Pair[] pairs)
Uses the given collection of argument pairs in creating arguments for the given parameter. |
abstract IStatus |
createSomeArguments()
Creates arguments for all parameters of the pattern application represented by this instance for which argument creation is applicable. |
abstract IStatus |
expandPattern(AbstractPatternResult results)
Expands the pattern represented by this instance based on the current arguments supplied for the parameters. |
abstract Object |
getBoundElement()
Returns the object that is the bound element in the pattern applied in this instance. |
abstract Date |
getCreationTime()
Returns the time when this pattern application instance was created. |
abstract AbstractParameterArgument[] |
getDefaultArguments(IParameterDescriptor parameter)
Returns the default arguments, if any, for the given parameter of the pattern applied in this instance. |
abstract AbstractParameterArgument[] |
getFirstArgumentCandidates(IParameterDescriptor parameter,
IPatternMetatype metatype,
MultiStatus status)
Returns the collection of arguments that are the candidates for the first argument in an argument pair used in creating an argument for the given parameter of the pattern applied in this instance. |
abstract Date |
getLastExpansionTime()
Returns the latest expansion time for this pattern application instance. |
abstract AbstractParameterArgument[] |
getParameterArguments(IParameterDescriptor parameter)
Returns the arguments supplied for the given parameter. |
abstract IPatternDescriptor |
getPatternDescriptor()
Returns the descriptor for the pattern. |
abstract AbstractParameterArgument[] |
getSecondArgumentCandidates(IParameterDescriptor parameter,
IPatternMetatype metatype,
MultiStatus status)
Returns the collection of arguments that are candidates for the second argument in an argument pair used in creating an argument for the given parameter of the pattern applied in this instance. |
AbstractParameterArgument[] |
getSecondArgumentCandidatesForFirstArgumentValue(IParameterDescriptor parameter,
IPatternMetatype metatype,
AbstractParameterArgument firstValue,
MultiStatus status)
Returns the collection of arguments that are candidates for the second argument in an argument pair given a particular value for the first argument in the pair. |
abstract boolean |
getTraceabilityEnabled()
Checks whether traceability is enabled for the application of the pattern represented by this instance. |
abstract IStatus |
reapplyPattern(AbstractPatternResult results)
Reapplies the pattern represented by this instance. |
abstract IStatus |
removeArgument(IParameterDescriptor parameter,
AbstractParameterArgument argument)
Removes the argument and returns the status of the removing the argument operation. |
abstract IStatus |
removeArguments(IParameterDescriptor parameter,
AbstractParameterArgument[] arguments)
Removes arguments and returns the status of removing the arguments operation. |
abstract IStatus |
replaceArgument(IParameterDescriptor parameter,
AbstractParameterArgument oldArgument,
AbstractParameterArgument newArgument)
Replaces an argument and returns the status of replacing an argument operation. |
abstract IStatus |
replaceArguments(IParameterDescriptor parameter,
AbstractParameterArgument oldArgument,
AbstractParameterArgument[] newArguments)
Replaces arguments and returns the status of replacing the arguments operation. |
abstract IStatus |
setTraceabilityEnabled(boolean enableTraceability)
Sets whether traceability is enabled for the application of the pattern represented by this instance. |
abstract IStatus |
unapplyPattern(AbstractPatternResult results)
Unapplies the pattern represented by this instance. |
abstract IStatus |
usesPairsToCreateArguments(IParameterDescriptor parameter,
IPatternMetatype metatype)
Indicates whether the argument pairs must be supplied in order to create arguments for the given parameter of the pattern applied in this instance. |
abstract IStatus |
validatePattern()
Checks whether the application of the pattern represented by this instance is complete and semantically valid. |
abstract IStatus |
validToAddArgument(IParameterDescriptor parameter,
AbstractParameterArgument argument)
Returns the validation status for adding an argument operation. |
abstract IStatus |
validToAddArguments(IParameterDescriptor parameter,
AbstractParameterArgument[] arguments)
Returns the validation status for the adding arguments operation. |
abstract IStatus |
validToCreateArguments(IParameterDescriptor parameter,
IPatternMetatype metatype)
Indicates whether arguments can be created for the given parameter of the pattern applied in this instance. |
abstract IStatus |
validToCreateSomeArguments()
Indicates whether for all parameters of the pattern application represented by this instance either arguments can be created for the parameter or argument creation is not applicable to the parameter. |
abstract IStatus |
validToRemoveArgument(IParameterDescriptor parameter,
AbstractParameterArgument argument)
Returns the validation status for removing an argument operation. |
abstract IStatus |
validToRemoveArguments(IParameterDescriptor parameter,
AbstractParameterArgument[] arguments)
Returns the validation status for the remove the arguments operation. |
abstract IStatus |
validToReplaceArgument(IParameterDescriptor parameter,
AbstractParameterArgument oldArgument,
AbstractParameterArgument newArgument)
Returns the validation status for replacing an argument operation. |
abstract IStatus |
validToReplaceArguments(IParameterDescriptor parameter,
AbstractParameterArgument oldArgument,
AbstractParameterArgument[] newArguments)
Returns the validation status for replacing the arguments operation. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AbstractPatternInstance()
Method Detail |
public abstract IPatternDescriptor getPatternDescriptor()
The descriptor includes simple information such as the name, unique id, version, the author of the pattern and complex information such as descriptors for the parameters of the pattern.
public abstract Date getLastExpansionTime()
public abstract Date getCreationTime()
public abstract Object getBoundElement()
null
.public abstract AbstractParameterArgument[] getParameterArguments(IParameterDescriptor parameter)
parameter
- The descriptor of the parameter of the pattern applied
in this instance for which the arguments are to be returned.
public abstract IStatus validToAddArgument(IParameterDescriptor parameter, AbstractParameterArgument argument)
parameter
- The descriptor of the parameter of the pattern
applied in this instance for which the given
argument is tested for validity.argument
- The parameter argument to be tested for validity
as an argument for the given parameter.
public abstract IStatus addArgument(IParameterDescriptor parameter, AbstractParameterArgument argument)
parameter
- The descriptor of the parameter of the pattern
applied in this instance for which the given
argument is supplied.argument
- The argument supplied for the given parameter.
public abstract IStatus validToAddArguments(IParameterDescriptor parameter, AbstractParameterArgument[] arguments)
parameter
- The descriptor of the parameter of the pattern
applied in this instance for which the given
arguments are tested for validity.arguments
- The arguments to be tested for validity.
public abstract IStatus addArguments(IParameterDescriptor parameter, AbstractParameterArgument[] arguments)
parameter
- The descriptor of the parameter of the pattern
applied in this instance for which the given
arguments are supplied.arguments
- The arguments supplied for the given parameter.
public abstract IStatus validToReplaceArgument(IParameterDescriptor parameter, AbstractParameterArgument oldArgument, AbstractParameterArgument newArgument)
parameter
- The descriptor of the parameter of the pattern
applied in this instance for which the given
arguments are tested as a valid replacement.oldArgument
- The argument to be tested for validity as the
replaceable argument for the given parameter.newArgument
- The argument to be tested for validity as the
replacement argument for the given parameter.
public abstract IStatus replaceArgument(IParameterDescriptor parameter, AbstractParameterArgument oldArgument, AbstractParameterArgument newArgument)
parameter
- The descriptor of the parameter of the pattern
applied in this instance for which the given
arguments are supplied for replacement.oldArgument
- The argument to be replaced for the given
parameter.newArgument
- The argument to be the replacement argument for
the given parameter.
public abstract IStatus validToReplaceArguments(IParameterDescriptor parameter, AbstractParameterArgument oldArgument, AbstractParameterArgument[] newArguments)
parameter
- The descriptor of the parameter of the pattern
applied in this instance for which the given
arguments are tested as a valid replacement.oldArgument
- The single argument to be tested as replaceable
for the given parameter.newArguments
- The arguments to be tested as replacements
for the given parameter.
public abstract IStatus replaceArguments(IParameterDescriptor parameter, AbstractParameterArgument oldArgument, AbstractParameterArgument[] newArguments)
parameter
- The descriptor of the parameter of the pattern
applied in this instance for which the given
arguments are supplied replacements.oldArgument
- The argument supplied as replaceable for the given
parameter.newArguments
- The arguments supplied as replacements for the given
parameter.
public abstract IStatus validToRemoveArgument(IParameterDescriptor parameter, AbstractParameterArgument argument)
parameter
- The descriptor of the parameter of the pattern
applied in this instance for which the given
argument is tested for removal.argument
- The argument to be tested for removal
for the given parameter.
public abstract IStatus removeArgument(IParameterDescriptor parameter, AbstractParameterArgument argument)
parameter
- The descriptor of the parameter of the pattern
applied in this instance for which the given
argument is to be removed.argument
- The argument to be removed for the given
parameter.
public abstract IStatus validToRemoveArguments(IParameterDescriptor parameter, AbstractParameterArgument[] arguments)
parameter
- The descriptor of the parameter of the pattern
applied in this instance for which the given
arguments are to be tested for removal.arguments
- The arguments to be tested for removal
for the given parameter.
public abstract IStatus removeArguments(IParameterDescriptor parameter, AbstractParameterArgument[] arguments)
parameter
- The descriptor of the parameter of the pattern
applied in this instance for which the given
arguments are to be removed.arguments
- The arguments to be removed for the given
parameter.
public abstract AbstractParameterArgument[] getDefaultArguments(IParameterDescriptor parameter)
parameter
- The descriptor of the parameter of the pattern applied
in this instance for which the default arguments are
to be returned.
public abstract IStatus validToCreateArguments(IParameterDescriptor parameter, IPatternMetatype metatype)
parameter
- The descriptor of the parameter of the pattern applied
in this instance for which arguments are to be created.metatype
- The desired type of the arguments to be created.
public abstract IStatus createArguments(IParameterDescriptor parameter, IPatternMetatype metatype)
parameter
- The descriptor of the parameter of the pattern applied
in this instance for which arguments are to be created.metatype
- The desired type of the arguments to be created.
public abstract IStatus usesPairsToCreateArguments(IParameterDescriptor parameter, IPatternMetatype metatype)
parameter
- The descriptor of the parameter of the pattern applied
in this instance for which arguments are to be created.metatype
- The desired type of the arguments to be created.
public abstract AbstractParameterArgument[] getFirstArgumentCandidates(IParameterDescriptor parameter, IPatternMetatype metatype, MultiStatus status)
parameter
- The descriptor of the parameter of the pattern applied
in this instance for which first argument candidates
are to be return.metatype
- The desired type of the arguments to be created.status
- The status produced by getting the first argument
candidates. An INFO status can be used to convey
information to the caller about the semantics of
the first argument candidates, for example, that
the first argument is source element of a relationship.
public abstract AbstractParameterArgument[] getSecondArgumentCandidates(IParameterDescriptor parameter, IPatternMetatype metatype, MultiStatus status)
parameter
- The descriptor of the parameter of the pattern applied
in this instance for which second argument candidates
are to be return.metatype
- The desired type of the arguments to be created.status
- The status produced by getting the second argument
candidates. An INFO status can be used to convey
information to the caller about the semantics of
the second argument candidates, for example, that
the second argument is target element of a relationship.
public AbstractParameterArgument[] getSecondArgumentCandidatesForFirstArgumentValue(IParameterDescriptor parameter, IPatternMetatype metatype, AbstractParameterArgument firstValue, MultiStatus status)
parameter
- The descriptor of the parameter of the pattern applied
in this instance for which second argument candidates
are to be returned.metatype
- The desired type of the arguments to be created.firstValue
- The value for the first argument in the argument pair.status
- The status produced by getting the second argument
candidates. An INFO status can be used to convey
information to the caller about the semantics of
the second argument candidates, for example, that
the second argument is target element of a relationship.
public abstract IStatus createArgumentsUsingPairs(IParameterDescriptor parameter, IPatternMetatype metatype, AbstractParameterArgument.Pair[] pairs)
parameter
- The descriptor of the parameter of the pattern applied
in this instance for arguments are to be created.metatype
- The desired type of the arguments to be created.pairs
- The collection of argument pairs to be used in creating
arguments of the given type for the given parameter
public abstract IStatus validToCreateSomeArguments()
public abstract IStatus createSomeArguments()
public abstract IStatus expandPattern(AbstractPatternResult results)
results
- The results of the expanding the pattern.
public abstract IStatus reapplyPattern(AbstractPatternResult results)
results
- The results of the reapplying the pattern.
public abstract IStatus unapplyPattern(AbstractPatternResult results)
results
- The results of the unapplying the pattern.
public abstract IStatus validatePattern()
public abstract IStatus canCompletePattern()
public abstract boolean getTraceabilityEnabled()
true
if traceability is enabled for the application
of the pattern represented by this instance; otherwise, it returns false
.public abstract IStatus setTraceabilityEnabled(boolean enableTraceability)
enableTraceability
- The boolean indication of whether to set traceability enabled
for the application of the pattern represented by this instance.
If enableTraceability is true
then traceability
is to be set to enabled.
|
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.