|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.4.0) E13403-05 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectoracle.jdevimpl.audit.model.DefaultModelFactory
public class DefaultModelFactory
The default Audit model adapter factory.
The getModelAdapters(oracle.ide.model.Element, java.net.URL, oracle.ide.model.Project, oracle.ide.model.Workspace) method gets models corresponding to workspaces,
projects, directories, and files based on Element, URL, or
both. Each project is qualified by the workspace that contains it; each
directory is qualified by the workspace and project that contains it, and
each file is qualified by the workspace, project, and directory that contains
it. For example, if a project is contained by two workspaces and both
workspaces are audited, two models corresponding to the project will be
created and processed, one for each workspace.
Usually there is only one model type for an Element type, but
Audit does support registering multiple model types for an Element
type. In such a case, a model for each type will be created.
Directories and files are incorporated into projects through content sets. A content set defines one or more root directories and a pattern filter to be applied to the relative paths of files and directories directly or indirectly contained by a root directory.
A single directory can be contained by multiple content sets, possibly with different roots, and therefore implying different relative paths. Because of the semantic significance of the relative path (Java packages and so on), a model will be created for each different root directory among the content sets containing the directory.
Further, for each file in a directory which mapped to multiple models, a file model of the file will be created for each directory.
Files and directories are keyed by workspace, project, and URL. Whenever the models for a key have not yet been created, all the models for that key are created, and all the containing models are also created.
The algorithm is basically this:
Element must have been
supplied and is used to determine the URL(s).
Element is not supplied, it is determined form the URL.
ModelTypeFactory.
For each container model and for each type, a model is created.
Element supplied only maps to some of the models implied
by its URL(s), only those models are returned to the caller, but all the
created models are retained internally.
| Method Summary | ||
|---|---|---|
void |
addModelAdapters(java.util.Collection<ModelAdapter> models,
Element element,
java.net.URL url,
Project project,
Workspace workspace)
If the URL is not supplied, then the Element must have been
supplied and is used to determine the URL(s). |
|
void |
close()
Closes this factory. |
|
java.lang.Object |
getAttribute(java.lang.Object key)
Gets an Audit object model configuration attribute, or null if none. |
|
java.util.Map |
getAttributes()
Gets the Audit object model configuration attributes. |
|
java.util.Collection<ModelAdapter> |
getContainedModelAdapters(Element element,
java.net.URL url,
ContainerModelAdapter container)
Gets the models in a container corresponding to an Element. |
|
ContentCache |
getContentSetCache(Project project,
Workspace workspace)
Gets the ContentCache for a project and workspace. |
|
int |
getGeneration()
|
|
long |
getMaximumFileSize()
Gets the size of the largest file that can be audited, in Mb. |
|
|
getModelAdapter(java.lang.Class<T> type,
java.net.URL url,
Project project,
Workspace workspace)
Gets the model adapter of a type corresponding to a URL, or null if none. |
|
java.util.Collection<ModelAdapter> |
getModelAdapters(Element element,
java.net.URL url,
Project project,
Workspace workspace)
Gets the models corresponding to an Element or URL. |
|
Location |
getModelRoot()
Gets the location of the root of the Audit object model. |
|
ModelTypeFactory |
getModelTypeFactory()
Gets the model type factory used by this model factory. |
|
void |
getOrCreateModelAdapters(java.util.Collection<ModelAdapter> models,
Element element,
java.net.URL url,
Project project,
Workspace workspace)
The workspace/project/URL key is computed. |
|
WorkingSet |
getWorkingSet()
Gets the working set to use when filtering projects. |
|
void |
setMaximumFileSize(long maximumFileSize)
Sets the size of the largest auditable file. |
|
void |
setWorkingSet(WorkingSet workingSet)
Sets whether to filter projects by their current working set. |
|
java.lang.String |
toString()
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public ModelTypeFactory getModelTypeFactory()
ModelFactory
getModelTypeFactory in interface ModelFactorypublic void setMaximumFileSize(long maximumFileSize)
ModelFactory
setMaximumFileSize in interface ModelFactorymaximumFileSize - The size, in Mb, of the largest file that can be audited.public long getMaximumFileSize()
ModelFactory
getMaximumFileSize in interface ModelFactorypublic void setWorkingSet(WorkingSet workingSet)
ModelFactory
setWorkingSet in interface ModelFactorypublic WorkingSet getWorkingSet()
ModelFactory
getWorkingSet in interface ModelFactorypublic Location getModelRoot()
getModelRoot in interface ModelFactory
public ContentCache getContentSetCache(Project project,
Workspace workspace)
ModelFactoryContentCache for a project and workspace.
getContentSetCache in interface ModelFactory
public java.util.Collection<ModelAdapter> getModelAdapters(Element element,
java.net.URL url,
Project project,
Workspace workspace)
ModelFactoryElement or URL.
getModelAdapters in interface ModelFactoryelement - The element.url - The URL containing the element. Ignored if
element is a node or a directory.project - The project containing the element. Ignored if
element corresponds to a project.workspace - The workspace containing the element. Ignored if
element corresponds to a workspace.
public void addModelAdapters(java.util.Collection<ModelAdapter> models,
Element element,
java.net.URL url,
Project project,
Workspace workspace)
Element must have been
supplied and is used to determine the URL(s).
public <T extends ModelAdapter> ModelAdapter getModelAdapter(java.lang.Class<T> type,
java.net.URL url,
Project project,
Workspace workspace)
ModelFactory
Using the Class of the model type to identify the model type is
problematic (the concrete model type classes are not in the public API),
and hopefully will be replaced with some kind of public identifier.
getModelAdapter in interface ModelFactorytype - The Class of the model type of the model.url - The URL containing the model.project - The project containing the model.workspace - The workspace containing the model.
public java.util.Collection<ModelAdapter> getContainedModelAdapters(Element element,
java.net.URL url,
ContainerModelAdapter container)
ModelFactoryElement.
getContainedModelAdapters in interface ModelFactoryelement - The element.url - The URL of the element.container - The container containing the element.public void close()
ModelFactory
close in interface ModelFactorypublic java.lang.Object getAttribute(java.lang.Object key)
ModelFactory
getAttribute in interface ModelFactoryAuditor.setAttribute(java.lang.Object, java.lang.Object)public java.util.Map getAttributes()
ModelFactory
getAttributes in interface ModelFactorypublic int getGeneration()
public void getOrCreateModelAdapters(java.util.Collection<ModelAdapter> models,
Element element,
java.net.URL url,
Project project,
Workspace workspace)
Element is not supplied, it is determined form the URL.
ModelTypeFactory.
For each container model and for each type, a model is created.
Element supplied only maps to some of the models implied
by its URL(s), only those models are returned to the caller, but all the
created models are retained.
public java.lang.String toString()
toString in class java.lang.Object
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.4.0) E13403-05 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||