|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.9.0) E52944-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.jdeveloper.audit.model.ModelType
public abstract class ModelType
An abstract model type which mediates between the Audit framework and an object model associated with an IDE Element
(usually, in fact, with an IDE Node
). A model type identifies the Element
classes which correspond to object models of its type, knows its corresponding ModelAdapter
subclass, and manufactures model adapter instances for each model of its type.
To reduce special case code in the Audit framework, IDE container elements such as Workspaces
, Workspace
, Project
, and packages and directories
each have a corresponding ModelType
and ModelAdapter
subclass.
IDE extensions which provide model types register an AuditProvider
with the AuditManager
at startup. When Audit initializes, it loads and instantiates the model types from the registered providers.
ModelAdapter
Constructor Summary | |
---|---|
ModelType() |
Method Summary | |
---|---|
abstract AuditEditorAdapter |
createEditorAdapter() Creates an editor adapter for this model type. |
ModelAdapter |
createModelAdapter(ModelAdapter model, java.util.Collection<Location> fragments) Creates a fragmentary model for this model type corresponding to fragments produced by a model of a different model type. |
abstract ModelAdapter |
createModelAdapter(ModelFactory factory, Element element, java.net.URL url, ContainerModelAdapter directory, ContainerModelAdapter project, ContainerModelAdapter workspace) Creates a model for this model type corresponding to a workspace, project, package, element, and URL. |
java.util.Collection<java.lang.Class<? extends Element>> |
getContainedElementTypes() Gets the IDE Element types which correspond to contained (non-root) constructs of this model type. |
java.util.Collection<java.lang.Class<?>> |
getDefaultPresentationTypes() Gets the default presentation types for this model type. |
abstract java.util.Collection<java.lang.Class<?>> |
getPresentationTypes() Gets the presentation types for this model type. |
abstract java.util.Collection<java.lang.Class<? extends Element>> |
getRootElementTypes() Gets the IDE Element types which correspond to root constructs of this model type. |
abstract javax.swing.Icon |
icon(java.lang.Class type) Gets the icon for a presentation type of this model type. |
boolean |
isAuditable(Element element, ContentDirectory directory, Project project, Workspace workspace) Gets whether a root element is auditable in the context of a directory, project, and workspace. |
boolean |
isContainedElementType(Element element) Gets whether an Element is an instance of one of the element types returned by getContainedElementTypes() . |
boolean |
isElementType(Element element) Gets whether an Element is an instance of one of the element types returned by getRootElementTypes() or getContainedElementTypes() . |
boolean |
isRootElementType(Element element) Gets whether an Element is an instance of one of the element types returned by getRootElementTypes() . |
abstract java.lang.String |
label(java.lang.Class type) Gets the label for a presentation type of this model type. |
abstract java.lang.String |
summary(java.lang.Class type) Gets the summary for a presentation type of this model type. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ModelType()
Method Detail |
---|
public abstract java.util.Collection<java.lang.Class<? extends Element>> getRootElementTypes()
Element
types which correspond to root constructs of this model type. These are used to map from objects selected in the IDE into the Audit object model.public java.util.Collection<java.lang.Class<? extends Element>> getContainedElementTypes()
Element
types which correspond to contained (non-root) constructs of this model type. These are used to map from objects selected in the IDE into the Audit object model. The default ModelType
implementation returns null.public boolean isAuditable(Element element, ContentDirectory directory, Project project, Workspace workspace)
ModelType
implementation requires that the directory, project, and workspace be non-null.element
- The element for which to create the model.directory
- The directory containing the element, or null if none.project
- The project containing the element, or null if none.workspace
- The workspace containing the element, or null if none.public abstract ModelAdapter createModelAdapter(ModelFactory factory, Element element, java.net.URL url, ContainerModelAdapter directory, ContainerModelAdapter project, ContainerModelAdapter workspace)
factory
- The model factory for creating contained models.element
- The element for which to create the model.url
- The URL of the file represented by the model.directory
- The directory containing the element, or null if none.project
- The project containing the element, or null if none.workspace
- The workspace containing the element, or null if none.public ModelAdapter createModelAdapter(ModelAdapter model, java.util.Collection<Location> fragments)
ModelType
implementation throws UnsupportedOperationException
.model
- The model producing the fragments.fragments
- A list of fragment Location
s from model
.public abstract java.util.Collection<java.lang.Class<?>> getPresentationTypes()
public java.util.Collection<java.lang.Class<?>> getDefaultPresentationTypes()
getPresentationTypes()
. The ModelType
implementation returns getPresentationTypes()
.public abstract AuditEditorAdapter createEditorAdapter()
public abstract java.lang.String label(java.lang.Class type)
public abstract java.lang.String summary(java.lang.Class type)
public abstract javax.swing.Icon icon(java.lang.Class type)
public boolean isElementType(Element element)
Element
is an instance of one of the element types returned by getRootElementTypes()
or getContainedElementTypes()
.public boolean isRootElementType(Element element)
Element
is an instance of one of the element types returned by getRootElementTypes()
.public boolean isContainedElementType(Element element)
Element
is an instance of one of the element types returned by getContainedElementTypes()
.
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.9.0) E52944-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |