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

E13403-04

oracle.jdevimpl.audit.model
Class DefaultContentDirectory

java.lang.Object
  extended by oracle.jdevimpl.audit.model.DefaultContentDirectory
All Implemented Interfaces:
Displayable, Element, Locatable, ContentDirectory

public class DefaultContentDirectory
extends java.lang.Object
implements ContentDirectory


Constructor Summary
DefaultContentDirectory(ContentDirectory parent, java.lang.String relativePath)
           
DefaultContentDirectory(java.net.URL url, java.lang.String relativePath, java.util.Collection<ContentRoot> roots)
           
 
Method Summary
 boolean canContainJavaSources()
          Gets whether this directory can contain Java sources.
 Attributes getAttributes()
          This method returns an Attributes object that encodes the attributes of the Element.
 java.util.Iterator<Element> getChildren()
          Gets the children of this content set directory.
 java.util.Collection<java.lang.String> getContentSetKeys()
          Gets the keys of the content sets containing this directory.
 java.lang.Object getData()
          Returns the data object associated with this Element.
 int getDepth()
          Gets the depth of this directory.
 javax.swing.Icon getIcon()
          Returns an Icon that can be shown in association with this Displayable.
 java.lang.String getLongLabel()
          Returns a long label that can be displayed to the user.
 java.lang.String getName()
          Gets the simple name of this directory.
 java.lang.String getRelativePath()
          Gets the slash-separated path of this directory relative to its content set root directory.
 java.util.Collection<ContentRoot> getRoots()
          Gets the ContentRoots containing this directory.
 java.lang.String getShortLabel()
          Returns a short label that can be displayed to the user.
 java.lang.String getToolTipText()
          Returns the tool tip text to show when the mouse pointer pauses over a UI component that represents this Displayable.
 java.net.URL getURL()
          Gets the URL of this directory.
 boolean mayHaveChildren()
          This method is part of the Element interface to provide a convenient way of determining whether an object may have children without having to test the object's type with the instanceof operator or having to downcast to a more specific type.
 void setURL(java.net.URL url)
          Sets the URL associated with this Locatable.
 java.lang.String toString()
          Returns the Short Label displayed to a user.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultContentDirectory

public DefaultContentDirectory(java.net.URL url,
                               java.lang.String relativePath,
                               java.util.Collection<ContentRoot> roots)

DefaultContentDirectory

public DefaultContentDirectory(ContentDirectory parent,
                               java.lang.String relativePath)
Method Detail

getRelativePath

public java.lang.String getRelativePath()
Description copied from interface: ContentDirectory
Gets the slash-separated path of this directory relative to its content set root directory.

Specified by:
getRelativePath in interface ContentDirectory

getDepth

public int getDepth()
Description copied from interface: ContentDirectory
Gets the depth of this directory.

Specified by:
getDepth in interface ContentDirectory

getName

public java.lang.String getName()
Description copied from interface: ContentDirectory
Gets the simple name of this directory.

Specified by:
getName in interface ContentDirectory

getURL

public java.net.URL getURL()
Description copied from interface: ContentDirectory
Gets the URL of this directory.

Specified by:
getURL in interface Locatable
Specified by:
getURL in interface ContentDirectory
Returns:
The URL identifying this Locatable.

getRoots

public java.util.Collection<ContentRoot> getRoots()
Description copied from interface: ContentDirectory
Gets the ContentRoots containing this directory.

Specified by:
getRoots in interface ContentDirectory

getContentSetKeys

public java.util.Collection<java.lang.String> getContentSetKeys()
Description copied from interface: ContentDirectory
Gets the keys of the content sets containing this directory.

Specified by:
getContentSetKeys in interface ContentDirectory

canContainJavaSources

public boolean canContainJavaSources()
Description copied from interface: ContentDirectory
Gets whether this directory can contain Java sources.

Specified by:
canContainJavaSources in interface ContentDirectory

setURL

public void setURL(java.net.URL url)
Sets the URL associated with this Locatable. It is important that the URL only be changed when the Locatable has just been created or when all caches keyed on the previous URL can also be updated. Required by {#link Locatable}.

Specified by:
setURL in interface Locatable
Parameters:
url - The URL to set.

mayHaveChildren

public boolean mayHaveChildren()
Description copied from interface: ContentDirectory
This method is part of the Element interface to provide a convenient way of determining whether an object may have children without having to test the object's type with the instanceof operator or having to downcast to a more specific type.

An implementation of Element that represents a leaf in a tree structure should return false from this method. An implementation of Element that could represent a non-leaf in a tree structure should return true from this method, even if it does not currently contain any children.

A ContentDirectory should always return true.

Specified by:
mayHaveChildren in interface Element
Specified by:
mayHaveChildren in interface ContentDirectory
Returns:
true if this Element may contain child Elements.

getChildren

public java.util.Iterator<Element> getChildren()
Description copied from interface: ContentDirectory
Gets the children of this content set directory.

The children are Node and ContentDirectory elements for the file and directories directly contained by the directory.

Specified by:
getChildren in interface Element
Specified by:
getChildren in interface ContentDirectory
Returns:
an Iterator over any child Elements contained by this Element. If there are no children, null is returned.

getAttributes

public Attributes getAttributes()
Description copied from interface: ContentDirectory
This method returns an Attributes object that encodes the attributes of the Element. Changing the attribute settings on the return object changes the element attributes. Subclasses should use their super class attributes object to define their own attributes. This allows subclasses to inherit their super class attributes. If a subclass does not wish to inherit attributes, they should first call getAttributes().clear() and define new attributes.

The default attributes of a ContentDirectory are empty.

Specified by:
getAttributes in interface Element
Specified by:
getAttributes in interface ContentDirectory

getData

public java.lang.Object getData()
Description copied from interface: ContentDirectory
Returns the data object associated with this Element. Implementations will often simply return this, since the Element is often its own data object. If the implementation returns an object other than this, be sure to set ElementAttributes.DECORATES_DATA_ELEMENT.

The data of a ContentDirectory is itself.

Specified by:
getData in interface Element
Specified by:
getData in interface ContentDirectory
Returns:
the data object associated with this Element instance.

getShortLabel

public java.lang.String getShortLabel()
Description copied from interface: Displayable
Returns a short label that can be displayed to the user. Generally, the value of the returned String is considered translatable and should therefore be placed in an appropriate resource file. When possible, the returned label should be reasonably short enough to show in the navigator or explorer windows but long enough to clearly identify and distinguish the Displayable.

Specified by:
getShortLabel in interface Displayable
Returns:
a short descriptive label of the Displayable that can be shown to the user.

getLongLabel

public java.lang.String getLongLabel()
Description copied from interface: Displayable
Returns a long label that can be displayed to the user. Generally, the value of the returned String is considered translatable and should therefore be placed in an appropriate resource file. The long label differs from the short label essentially on length. Usually the long label will only be shown on-demand and in places where horizontal space is more available. Examples are the status bar and tooltips.

Specified by:
getLongLabel in interface Displayable
Returns:
a long descriptive label of the Displayable that can be shown to the user.

getIcon

public javax.swing.Icon getIcon()
Description copied from interface: Displayable
Returns an Icon that can be shown in association with this Displayable. Typically the icon will be used in a tree control or list control. Therefore the icon must fit naturally within the space normally given to items within those controls. Such icons are usually 16x16 in size or, if there is a one-pixel transparent padding around the edge, 18x18 in size. It is strongly recommended that icons returned by this method be either 16x16 or 18x18 in size. If null is returned, the control may show a default icon, or it may show no icon, whichever is appropriate.

Specified by:
getIcon in interface Displayable
Returns:
the Icon to be displayed for the Displayable.

getToolTipText

public java.lang.String getToolTipText()
Description copied from interface: Displayable
Returns the tool tip text to show when the mouse pointer pauses over a UI component that represents this Displayable. In many cases it may be appropriate for this method to return the same value as Displayable.getLongLabel().

Specified by:
getToolTipText in interface Displayable
Returns:
the tooltip to show when the mouse pointer pauses over a UI component that represents this Displayable.

toString

public java.lang.String toString()
Description copied from interface: Displayable
Returns the Short Label displayed to a user. This overrides the toString method in java.lang.Object.

Implementors of the Displayable interface should override this as appropriate. The default implementation is the same as getShortLabel

Specified by:
toString in interface Displayable
Overrides:
toString in class java.lang.Object
See Also:
Object.toString(), Displayable.getShortLabel()

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

E13403-04

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