Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)

E13403-03

oracle.jdeveloper.audit.model
Class ContainerModelAdapter

java.lang.Object
  extended by oracle.jdeveloper.audit.model.ModelAdapter
      extended by oracle.jdeveloper.audit.model.ContainerModelAdapter
All Implemented Interfaces:
java.lang.Comparable, Located
Direct Known Subclasses:
DirectoryModelAdapter, ProjectModelAdapter, RootModelAdapter, WorkspaceModelAdapter

public abstract class ContainerModelAdapter
extends ModelAdapter

An abstract ModelAdapter which adapts an Element which contains elements.

See Also:
ModelAdapter

Field Summary
 
Fields inherited from class oracle.jdeveloper.audit.model.ModelAdapter
index, log
 
Constructor Summary
protected ContainerModelAdapter(ModelFactory factory, ModelType type)
           
protected ContainerModelAdapter(ModelFactory factory, ModelType type, ContainerModelAdapter workspace, ContainerModelAdapter project, ContainerModelAdapter directory, ContentDirectory element, java.net.URL url)
           
protected ContainerModelAdapter(ModelFactory factory, ModelType type, ContainerModelAdapter workspace, Project project)
           
protected ContainerModelAdapter(ModelFactory factory, ModelType type, Workspace workspace)
           
 
Method Summary
 boolean addContainedModel(ModelAdapter model)
          Adds a model to the set contained by this model.
 boolean addContainedModels(java.util.Collection<ModelAdapter> models)
          Adds models to the set contained by this model.
 boolean addContainedModels(ModelAdapter[] models)
          Adds models to the set contained by this model.
protected abstract  void createContainedModels(java.lang.Object construct)
          Creates the models contained by the root construct of this model and adds them using addContainedModel(oracle.jdeveloper.audit.model.ModelAdapter) and addContainedModel(oracle.jdeveloper.audit.model.ModelAdapter).
 java.util.Iterator getContainedConstructs(java.lang.Object construct)
          Gets the constructs contained by a construct in this model.
 boolean isFile()
          Gets whether this model represents a "file".
protected  void removeContainedModel(java.lang.Object construct)
          Removes a model from the set contained by this model.
 
Methods inherited from class oracle.jdeveloper.audit.model.ModelAdapter
acquireReadLock, beginRead, beginRead, beginReadHook, cancelRead, compareSiblings, compareTo, contains, contains, contains, contextDescription, edit, endRead, endRead, endReadHook, equals, getAttribute, getCharacter, getColumnOffset, getConstruct, getConstruct, getContainingAdapter, getDependency, getDirectory, getDirectoryAdapter, getElement, getElementLocations, getEndLocation, getFactory, getFileAdapter, getFocusLocation, getFocusLocation, getIdeContext, getInitialLength, getLine, getLineOffset, getLocation, getLocation, getLocation, getLock, getNode, getPrimaryCollationKey, getProject, getProjectAdapter, getRoot, getSecondaryCollationKey, getSecondaryCollationString, getShortLabel, getText, getType, getUrl, getURL, getWorkspace, getWorkspaceAdapter, icon, icon, isEditable, isModifiable, isModified, isModified, label, label, release, releaseReadLock, setAttribute, summary, summary, toString, verifyReadTransaction
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ContainerModelAdapter

protected ContainerModelAdapter(ModelFactory factory,
                                ModelType type)

ContainerModelAdapter

protected ContainerModelAdapter(ModelFactory factory,
                                ModelType type,
                                Workspace workspace)

ContainerModelAdapter

protected ContainerModelAdapter(ModelFactory factory,
                                ModelType type,
                                ContainerModelAdapter workspace,
                                Project project)

ContainerModelAdapter

protected ContainerModelAdapter(ModelFactory factory,
                                ModelType type,
                                ContainerModelAdapter workspace,
                                ContainerModelAdapter project,
                                ContainerModelAdapter directory,
                                ContentDirectory element,
                                java.net.URL url)
Method Detail

isFile

public boolean isFile()
Gets whether this model represents a "file".

isFile() returns false.

Specified by:
isFile in class ModelAdapter

addContainedModel

public boolean addContainedModel(ModelAdapter model)
Adds a model to the set contained by this model.

Parameters:
model - An adapter for a model contained by the root construct of this model.

addContainedModels

public boolean addContainedModels(ModelAdapter[] models)
Adds models to the set contained by this model.

Parameters:
models - An array of adapters for the models contained by the root construct of this model.

addContainedModels

public boolean addContainedModels(java.util.Collection<ModelAdapter> models)
Adds models to the set contained by this model.

Parameters:
models - An array of adapters for the models contained by the root construct of this model.

getContainedConstructs

public java.util.Iterator getContainedConstructs(java.lang.Object construct)
Gets the constructs contained by a construct in this model. A read transacton must be active on this model.

Implementations must return an iterator which iterates the constructs in document order.

The default ContainerModelAdapter implementation returns an iterator over the model adapters added through addContainedModel(oracle.jdeveloper.audit.model.ModelAdapter) and addContainedModel(oracle.jdeveloper.audit.model.ModelAdapter). On the first invocation, it invokes createContainedModels(java.lang.Object) unless one of the add methods has already been invoked.

Specified by:
getContainedConstructs in class ModelAdapter
Parameters:
construct - A construct of this model.
Returns:
An iterator over the constructs contained by the construct.

createContainedModels

protected abstract void createContainedModels(java.lang.Object construct)
Creates the models contained by the root construct of this model and adds them using addContainedModel(oracle.jdeveloper.audit.model.ModelAdapter) and addContainedModel(oracle.jdeveloper.audit.model.ModelAdapter). This method is invoked by the getContainedConstructs(java.lang.Object) implementation on its first invocation, unless addContainedModel(oracle.jdeveloper.audit.model.ModelAdapter) or addContainedModel(oracle.jdeveloper.audit.model.ModelAdapter) has already been invoked.

Tbe Audit framework invokes this method with a read transaction active on this model and holding a private monitor lock.

Implementations must return an iterator which iterates the model adapters in their natural order.

Parameters:
construct - A construct of this model.

removeContainedModel

protected void removeContainedModel(java.lang.Object construct)
Removes a model from the set contained by this model.

Parameters:
construct - The root construct of the model to remove.

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)

E13403-03

Copyright © 1997, 2009, Oracle. All rights reserved.