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

E13403-08

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
protected  void addContainedElement(Element element, java.net.URL url)
          Gets the models for an element contained by the root construct of this model, and adds them to the models contained by this model.
 boolean addContainedModel(ModelAdapter model)
          Adds a model to the set contained by this model.
protected abstract  void createContainedModels(java.lang.Object construct)
          Creates models for each Element contained by the root construct of this model using addContainedElement(oracle.ide.model.Element, java.net.URL).
 java.util.Iterator getContainedConstructs(java.lang.Object construct)
          Gets the constructs contained by a construct in this model.
 java.util.Iterator<Element> getContainedUnauditableElements(java.lang.Object construct)
          
 boolean isFile()
          Gets whether this model represents a "file".
 
Methods inherited from class oracle.jdeveloper.audit.model.ModelAdapter
acquireReadLock, beginRead, beginRead, beginReadHook, cancelRead, compareSiblings, compareTo, contains, contains, contains, contextDescription, edit, endRead, endRead, endReadHook, enter, equals, exit, 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.

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 contained by this model adapter. On the first invocation, it invokes createContainedModels(java.lang.Object) unless the Audit framework has already invoked addContainedModel at least once to configure a subset.

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

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 models for each Element contained by the root construct of this model using addContainedElement(oracle.ide.model.Element, java.net.URL). This method is invoked by the first invocation of getContainedConstructs(java.lang.Object) or #getContainedUnauditableElements, unless {@link #addContainedModel} has already been invoked.

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

Parameters:
construct - A construct of this model.

addContainedElement

protected void addContainedElement(Element element,
                                   java.net.URL url)
Gets the models for an element contained by the root construct of this model, and adds them to the models contained by this model.

This method should only be invoked from subclass createContainedModels(java.lang.Object) methods.

Parameters:
element - An element contained by the root construct of this model.
url - The URL of the element, null to extract from element.

getContainedUnauditableElements

public java.util.Iterator<Element> getContainedUnauditableElements(java.lang.Object construct)

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.

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

Parameters:
construct - A construct of this model.
Returns:
An iterator over the constructs contained by the construct.

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

E13403-08

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