Skip navigation links

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

E13403-06


oracle.jdeveloper.deploy.dt
Class DeploymentProfiles

java.lang.Object
  extended by oracle.javatools.data.HashStructureAdapter
      extended by oracle.jdeveloper.deploy.dt.DeploymentProfiles

All Implemented Interfaces:
Displayable, Element

public class DeploymentProfiles
extends HashStructureAdapter
implements Element

Nested Class Summary
 class DeploymentProfiles.ProfileIterator
           

 

Field Summary
static java.lang.String DATA_KEY
          Use DATA_KEY to get the DeploymentProfiles from a containing HashStructure.
static java.lang.String DEFAULT_PROFILE_KEY
           
static java.lang.String DEFAULT_PROFILE_NAME
           
static java.lang.String PROFILE_DEFINITIONS
           
static java.lang.String PROFILE_LIST
           

 

Fields inherited from class oracle.javatools.data.HashStructureAdapter
_hash

 

Method Summary
 void addProfile(Profile profile)
          Adds a new Profile to DeploymentProfiles.
 Attributes getAttributes()
          This method returns an Attributes object that encodes the attributes of the Element.
 java.util.Iterator getChildren()
          This method is part of the Element interface to provide a convenient way of getting an Iterator over any contained child Elements without having to test the object's type with the instanceof operator or having to downcast to a more specific type.
 java.lang.Object getData()
          Returns the data object associated with this Element.
 Profile getDefaultDeploymentProfile()
          Gets the default profile from the container.
 java.util.Map getDefinedProfiles(boolean longProfileName)
          Deprecated. 
 javax.swing.Icon getIcon()
          Returns an Icon that can be shown in association with this Displayable.
static DeploymentProfiles getInstance(DataContainer container)
           
static DeploymentProfiles getInstance(DataContainer container, boolean userPropertiesMode)
           
 java.lang.String getLongLabel()
          Returns a long label that can be displayed to the user.
 Profile getProfileByName(java.lang.String name)
          Retrieve a Profile by its unique name.
static Profile getProfileByShortLabel(DataContainer container, java.lang.String name)
          Deprecated.  
 java.util.Set getProfileNames()
           
 Profile[] getProfiles()
          Returns all Profiles associated with the container.
 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.
static boolean isCustomSettingsActive(DataContainer container)
           
 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.
static boolean profileExists(DataContainer container, Profile profile)
          Deprecated. The isExist() question should be answered by the Dependable pointing to that Profile. See ProfileDependable.doesExist().
static void projectMigrating(Project project, TraversableContext tc)
           
 void removeProfile(java.lang.String profileName)
          Removes the given Profile from DeploymentProfiles.
 void setDefaultDeploymentProfile(Profile profile)
          Sets the default profile for this container.
 void setDeploymentProfiles(Profile[] profiles)
           
 Profile[] toSortedArray()
          Returns all Profiles associated with the container, sorted by name.
 java.lang.String toString()
          Returns the Short Label displayed to a user.
static void validateProfileName(java.util.Set usedNames, java.lang.String profileName, java.lang.String titlePrefix)
          Validates a deployment profile name throwing a TraversalException when the given profile name is invalid.

 

Methods inherited from class oracle.javatools.data.HashStructureAdapter
addStructureChangeListener, containsKey, copyTo, copyToImpl, equals, equalsImpl, findOrCreate, forcedCopyTo, getHashStructure, removeStructureChangeListener, useObjectEquals

 

Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

 

Field Detail

DATA_KEY

public static final java.lang.String DATA_KEY
Use DATA_KEY to get the DeploymentProfiles from a containing HashStructure.

PROFILE_DEFINITIONS

public static final java.lang.String PROFILE_DEFINITIONS
See Also:
Constant Field Values

PROFILE_LIST

public static final java.lang.String PROFILE_LIST
See Also:
Constant Field Values

DEFAULT_PROFILE_KEY

public static final java.lang.String DEFAULT_PROFILE_KEY
See Also:
Constant Field Values

DEFAULT_PROFILE_NAME

public static final java.lang.String DEFAULT_PROFILE_NAME
See Also:
Constant Field Values

Method Detail

getInstance

public static DeploymentProfiles getInstance(DataContainer container)

getInstance

public static DeploymentProfiles getInstance(DataContainer container,
                                             boolean userPropertiesMode)

addProfile

public void addProfile(Profile profile)
                throws InvalidProfileException,
                       ProfileOperationException
Adds a new Profile to DeploymentProfiles. The added Profile becomes a part of the DeploymentProfiles hash, which in turn is already a part of another datacontainer hash.
Each Profile added to an instance of DeploymentProfiles should have Profile.PROFILE_NAME set to a non-zero string unique to that container.
Parameters:
profile -
Throws:
InvalidProfileException
ProfileOperationException

removeProfile

public void removeProfile(java.lang.String profileName)
                   throws InvalidProfileException,
                          ProfileOperationException
Removes the given Profile from DeploymentProfiles. The Profile is also removed from it's dataContainer(Workspace/Project) hash.
Parameters:
profile -
Throws:
InvalidProfileException
ProfileOperationException

projectMigrating

public static void projectMigrating(Project project,
                                    TraversableContext tc)

setDefaultDeploymentProfile

public void setDefaultDeploymentProfile(Profile profile)
Sets the default profile for this container.
Parameters:
profile -

getDefaultDeploymentProfile

public Profile getDefaultDeploymentProfile()
Gets the default profile from the container.

getDefinedProfiles

@Deprecated
public java.util.Map getDefinedProfiles(boolean longProfileName)
Deprecated. 

getProfileNames

public java.util.Set getProfileNames()

validateProfileName

public static void validateProfileName(java.util.Set usedNames,
                                       java.lang.String profileName,
                                       java.lang.String titlePrefix)
                                throws TraversalException
Validates a deployment profile name throwing a TraversalException when the given profile name is invalid.
Parameters:
usedNames - a Set of deployment profile names already present in the DataContainer(project/workspace)
profileName - a new profile name proposed to be added.
titlePrefix - in case of an exception, this title Prefix will be used to format the complete title found in the TraversalException.getTitle().
Throws:
TraversalException

toSortedArray

public Profile[] toSortedArray()
Returns all Profiles associated with the container, sorted by name. Caches them to avoid creating new Profiles everytime this method is called for the same instance of the adapter.
Returns:
Profile[] sorted by name

getProfiles

public Profile[] getProfiles()
Returns all Profiles associated with the container. Caches them to avoid creating new Profiles everytime this method is called for the same instance of the adapter.
Returns:

isCustomSettingsActive

public static boolean isCustomSettingsActive(DataContainer container)

setDeploymentProfiles

public void setDeploymentProfiles(Profile[] profiles)

getProfileByShortLabel

@Deprecated
public static Profile getProfileByShortLabel(DataContainer container,
                                                        java.lang.String name)
Deprecated. 
Returns:
the profile from a container using the short label (The name of the profile as displayed from the user interface). The short label and name are the same for regular profiles. For contained Profiles however, the short label is the substring of the name following the "_" character.

getProfileByName

public Profile getProfileByName(java.lang.String name)
Retrieve a Profile by its unique name. Note: This method is non-static to enforce the notion of association of a Profile with a DataContainer, which is needed by the constructor.
Parameters:
name -
Returns:

profileExists

@Deprecated
public static boolean profileExists(DataContainer container,
                                               Profile profile)
Deprecated. The isExist() question should be answered by the Dependable pointing to that Profile. See ProfileDependable.doesExist().
Parameters:
container -
profile -
Returns:

mayHaveChildren

public boolean mayHaveChildren()
Description copied from interface: Element
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.

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

getChildren

public java.util.Iterator getChildren()
Description copied from interface: Element
This method is part of the Element interface to provide a convenient way of getting an Iterator over any contained child Elements 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 null from this method. An implementation of Element that could represent a non-leaf in a tree structure should return either an Iterator over the child Elements or null if there are no children.

Specified by:
getChildren in interface Element
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: Element
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.
Specified by:
getAttributes in interface Element

getData

public java.lang.Object getData()
Description copied from interface: Element
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.
Specified by:
getData in interface Element
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()

Skip navigation links

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

E13403-06


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