|
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.transform.core.AbstractTransformElement
com.ibm.xtools.transform.core.AbstractRule
com.ibm.xtools.transform.core.ValidateEditRule
This Validate Edit Rule provides a mechanism for transformations to ensure
that the files they want to modify will have the correct permissions.
The transformation author should insert this rule into his transformation
at a point where it will only be executed once and before any of the affected
files are modified. Before the rule is executed, the transformation must
indicate the files (IFile) that will be modified by calling the
addAffectedFiles()
methods. These (static) methods can be called
multiple times to add files to the set of affected files maintained by the
rule. The list of files is stored in the context.
Constructor Summary | |
ValidateEditRule()
The default constructor should only be used internally by the transformation service. |
|
ValidateEditRule(String id,
String name)
Construct a validate edit rule with an id and name. |
Method Summary | |
static void |
addAffectedFile(ITransformContext context,
org.eclipse.core.resources.IFile file)
Add a file to the list of affected files. |
static void |
addAffectedFiles(ITransformContext context,
List fileList)
Add the given files to the list of affected files. |
protected Object |
createTarget(ITransformContext context)
Ensure the files to be affected (extracted from the context) can be modified. |
protected void |
reportError(org.eclipse.core.runtime.IStatus status,
ITransformContext context)
Process error that occured during file validation. |
Methods inherited from class com.ibm.xtools.transform.core.AbstractRule |
execute, findTarget, isSourceConsumed, mapTarget, toString, updateTarget |
Methods inherited from class com.ibm.xtools.transform.core.AbstractTransformElement |
canAccept, getAcceptCondition, getDescription, getId, getName, getProgressMonitor, setAcceptCondition, setDescription, setId, setName |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ValidateEditRule()
public ValidateEditRule(String id, String name)
id
- A unique identifier for the rule.name
- The name of the rule.Method Detail |
public static void addAffectedFile(ITransformContext context, org.eclipse.core.resources.IFile file)
context
- the current context of the transformation executionfile
- A file that will be created or modified by the transform.public static void addAffectedFiles(ITransformContext context, List fileList)
context
- the current context of the transformation executionfileList
- a list of files (of type IFile)that will be created or modified by the transform.protected Object createTarget(ITransformContext context) throws Exception
createTarget
in class AbstractRule
context
- the current context of the transformation execution
Exception
protected void reportError(org.eclipse.core.runtime.IStatus status, ITransformContext context)
status
- - file validation statuscontext
- - the current context of the transformation execution
|
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.