|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1) E13403-04 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.jdeveloper.audit.transform.TransformContext
public class TransformContext
A context in which a Transform
can be applied to a Violation
.
Contexts are created by the Audit framework when it needs to invoke
transform methods, and discarded immediately after use. A context has
properties derived from the violation: in particular, rule, location, and
parameters. The location can be set differently than the location of the
violation, though typically it will at least be a related location of the
violation.
Violation
,
Transform
Constructor Summary | |
---|---|
TransformContext(TransformAdapter adapter,
Transform transform,
Violation violation,
Location location)
Creates a transform context for a transform to be applied to a violation. |
Method Summary | |
---|---|
void |
addHighlight(java.lang.Object construct)
Adds a highlight region for a construct in the model for this context. |
void |
addRemovedHighlight(java.lang.Object construct)
Adds a highlight region for an about-to-be-removed construct in the model for this context. |
TransformAdapter |
getAdapter()
Gets the transform adapter for the transform of this context. |
java.lang.Object |
getAttribute(java.lang.String name)
Gets the value of an attribute. |
Transform |
getDefaultTransform()
Gets the default transform of this violation, or null if none. |
Location |
getFocusLocation()
Gets the focus location of the violation, or null if none. |
Context |
getIdeContext()
Gets an IDE context in which this transform is being applied. |
Location |
getLocation()
Gets the location to be transformed. |
ModelAdapter |
getModel()
Gets the model to be transformed. |
ModelAdapter |
getModelAdapter()
Deprecated. use getModel() |
Node |
getNode()
Gets the node to be transformed. |
java.lang.Object |
getParameter(java.lang.String name)
Gets the value of a parameter added to the violation or a property of the transform, or null if none. |
int |
getParameterCount()
Gets the number of parameters of this violation. |
java.lang.String |
getParameterName(int index)
Gets the name of a parameter of this violation. |
java.lang.Object |
getParameterValue(int index)
Gets the value of a parameter of this violation. |
java.lang.Object |
getParameterValue(java.lang.String name)
Gets the value of a parameter of this violation by name. |
java.lang.Object |
getPredecessorApplyData()
Gets the data that was returned by the apply method of the immediate predecessor in a multiple context transform. |
Project |
getProject()
Gets the project containing the model to be transformed. |
Rule |
getRule()
Gets the rule violated by this violation. |
int |
getSerialNumber()
Gets the serial number of this violation. |
Transform |
getTransform()
Gets the transform of this context. |
Transform |
getTransform(int index)
Gets a transform of this violation. |
int |
getTransformCount()
Gets the number of transforms of this violation. |
Location |
getTransformFocusLocation(int index)
Gets the applicable location of a transform of this violation, or null if none. |
java.lang.String |
getVariation()
Gets the variation in the rule violated, or null if the default. |
Violation |
getViolation()
Gets the violation associated with the transform. |
Workspace |
getWorkspace()
Gets the workspace containing the model to be transformed. |
void |
invokeLater(Command command)
Invokes a command after the command currently being executed by the Audit framework completes. |
void |
setAttribute(java.lang.String name,
java.lang.Object value)
Sets the value of an attribute. |
protected void |
setPredecessorApplyData(java.lang.Object applyData)
Sets the data that was returned by the apply method of the immediate predecessor in a multiple context transform. |
void |
setSelection(ModelAdapter model,
java.lang.Object construct,
boolean before,
boolean after)
Deprecated. Use {@link #setSelection(ModelAdapter, Object, int, int) |
void |
setSelection(ModelAdapter model,
java.lang.Object construct,
int margin,
int endMargin)
Sets the selection after the transform is applied to a construct in a specified model. |
void |
setSelection(java.lang.Object construct,
boolean before,
boolean after)
Deprecated. Use {@link #setSelection(Object, int, int) |
void |
setSelection(java.lang.Object construct,
int margin,
int endMargin)
Sets the selection after the transform is applied to a construct in the model for this context. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TransformContext(TransformAdapter adapter, Transform transform, Violation violation, Location location)
adapter
- transform
- violation
- location
- Method Detail |
---|
public TransformAdapter getAdapter()
public Transform getTransform()
public Violation getViolation()
public Location getLocation()
getLocation
in interface Violation
public ModelAdapter getModel()
public ModelAdapter getModelAdapter()
getModel()
public Node getNode()
public Project getProject()
public Workspace getWorkspace()
public Context getIdeContext()
public Rule getRule()
Violation
getRule
in interface Violation
public java.lang.String getVariation()
getVariation
in interface Violation
public java.lang.Object getParameter(java.lang.String name)
name
- The name given to the parameter.ViolationReport.addParameter(java.lang.String, java.lang.Object)
public Location getFocusLocation()
Violation
getFocusLocation
in interface Violation
public int getParameterCount()
Violation
getParameterCount
in interface Violation
public java.lang.String getParameterName(int index)
Violation
getParameterName
in interface Violation
index
- The index of the parameter.public java.lang.Object getParameterValue(int index)
Violation
getParameterValue
in interface Violation
index
- The index of the parameter.public java.lang.Object getParameterValue(java.lang.String name)
Violation
getParameterValue
in interface Violation
public int getTransformCount()
Violation
getTransformCount
in interface Violation
public Transform getTransform(int index)
Violation
getTransform
in interface Violation
index
- The index of the transform.public Location getTransformFocusLocation(int index)
Violation
getTransformFocusLocation
in interface Violation
index
- The index of the transform.public Transform getDefaultTransform()
Violation
getDefaultTransform
in interface Violation
public int getSerialNumber()
Violation
getSerialNumber
in interface Violation
public void setAttribute(java.lang.String name, java.lang.Object value)
public java.lang.Object getAttribute(java.lang.String name)
public java.lang.Object getPredecessorApplyData()
public void setSelection(java.lang.Object construct, int margin, int endMargin)
construct
- The construct at which to place the caret.margin
- Margin from start of construct to start of selection.endMargin
- Margin from end of construct to end of selection.public void setSelection(ModelAdapter model, java.lang.Object construct, int margin, int endMargin)
model
- The model containing the construct to select.construct
- The construct at which to place the caret.margin
- Margin from start of construct to start of selection.endMargin
- Margin from end of construct to end of selection.public void addHighlight(java.lang.Object construct)
construct
- The construct to highlight.public void addRemovedHighlight(java.lang.Object construct)
construct
- The construct to be removed.public void invokeLater(Command command)
protected void setPredecessorApplyData(java.lang.Object applyData)
public java.lang.String toString()
toString
in class java.lang.Object
public void setSelection(java.lang.Object construct, boolean before, boolean after)
before
is true, the caret is
positioned at the beginning of the construct; otherwise at the end of the
construct.
construct
- The construct at which to place the caret.before
- Whether to place the caret at the beginning of the construct.after
- Whether to place the caret at the end of the construct.public void setSelection(ModelAdapter model, java.lang.Object construct, boolean before, boolean after)
before
is true,
the caret is positioned at the beginning of the construct; otherwise at
the end of the construct.
model
- The model containing the construct to select.construct
- The construct at which to place the caret.before
- Whether to place the caret at the beginning of the construct.after
- Whether to place the caret at the end of the construct.
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1) E13403-04 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |