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

E13403-08

oracle.jdeveloper.deploy.dt
Class DeployProfileDt

java.lang.Object
  extended by oracle.jdeveloper.deploy.dt.DeployDesignTime
      extended by oracle.jdeveloper.deploy.dt.DeployProfileDt
All Implemented Interfaces:
Displayable, NodeInfo, DeployAddin

public abstract class DeployProfileDt
extends DeployDesignTime
implements NodeInfo, Displayable

An instance of this class implements design-time support for its particular deployment profile type and has three responsibilities:

  1. user interaction via Controller and ContextMenuListener interfaces, inherited from DeployDesignTime.
  2. representation of NodeInfo.
  3. creation of new deployment profile instances and its associated node.


Constructor Summary
DeployProfileDt()
           
 
Method Summary
 void addDeploymentSubmenu(Context context, javax.swing.JMenu profileSubMenu)
           
 boolean addToApplicationAssemblyOnProfileAutogen()
          Returns true if the profile created by this type of DeployProfileDt should be added to the default application level profile.
protected  Node createDesignTimeNode(Context context)
          The implementation of this method makes use of the template method design pattern.
protected  java.net.URL ensureSuffix(java.net.URL selectedURL)
          Part of template method design pattern.
protected  Node findOrCreateDeployNode(java.net.URL saveURL)
          Part of template method design pattern.
protected  void finishCreation(Context profileContext, Profile profile)
           
 Attributes getAttributes()
          This implementation returns attributes that make the deployment profile node deletable, saveable, renameable, closeable, and not deployable.
protected  Context getCreationContext()
          Returns the Context being used for the Profile being created.
protected abstract  java.lang.String getDefaultProfileName()
          Returns the prefix for the default deployment profile name that is generated for the user when a newly created deployment profile is being saved.
protected abstract  java.lang.String getDisplayName()
          Returns the display name that is used to identify the deployment profile in the object gallery.
 javax.swing.Icon getIcon()
          This implementatino returns a generic icon representing the deployment profile.
 java.lang.String getLongLabel()
          Returns a long label that can be displayed to the user.
 java.lang.String getMostRecentDeployTarget()
           
 java.lang.Class getNodeClass()
          This implementation returns the XMLDataNode class.
 java.lang.String getShortLabel()
          Returns a short label that can be displayed to the user.
protected  java.lang.String getSuffix()
           
protected  java.lang.String[] getTechnologyKeys()
          Support for technology scopes in deployment profiles.
 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.lang.String getUniqueName(java.util.Set usedNames)
          Generates a new unique namefor the deployment profile.
 java.lang.String getXMLNamespaceURI()
          This implementation always returns null.
protected  boolean isCreatedInContainer()
           
protected  boolean launchDialog(Context context, Profile profile)
           
protected  Profile newContainerDeploymentProfile(Context context)
          The implementation of this method makes use of the template method design pattern.
protected  Profile newProfileInstance(DataContainer container, java.lang.String profileName)
           
protected  java.net.URL newUniqueURL(Context context)
          Part of template method design pattern.
protected  void setCreationContext(Context context)
          Sets the creation Context being used for profile creation.
 boolean supportsApplicationLevelCreation()
          Returns true if this type of DeployProfileDt can be used to create an application-level profile.
 boolean supportsProjectLevelCreation()
          Returns true if this type of DeployProfileDt can be used to create a project-level profile.
 java.lang.String toString()
          Returns the Short Label displayed to a user.
 
Methods inherited from class oracle.jdeveloper.deploy.dt.DeployDesignTime
createDeployMenuItem, createDeployMenuItem, createDeployMenuItem, createIdeAction, getDefaultCommand, getLabelForCommand, handleDefaultAction, handleEvent, isInSupportedNavigator, isInSupportedNavigator, menuWillHide, menuWillShow, startup, unwrapData, unwrapData, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface oracle.ide.model.NodeInfo
getDataClass, getXMLRootElement
 

Constructor Detail

DeployProfileDt

public DeployProfileDt()
Method Detail

getNodeClass

public java.lang.Class getNodeClass()
This implementation returns the XMLDataNode class.

Specified by:
getNodeClass in interface NodeInfo
See Also:
NodeInfo.getNodeClass()

getIcon

public javax.swing.Icon getIcon()
This implementatino returns a generic icon representing the deployment profile.

Specified by:
getIcon in interface Displayable
Specified by:
getIcon in interface NodeInfo
Returns:
the Icon to be displayed for the Displayable.
See Also:
NodeInfo.getIcon()

getXMLNamespaceURI

public java.lang.String getXMLNamespaceURI()
This implementation always returns null. Subclasses should return a meaningful value from this method if the XML namespace URI is to be used for recognizing purposes.

Specified by:
getXMLNamespaceURI in interface NodeInfo

getAttributes

public Attributes getAttributes()
This implementation returns attributes that make the deployment profile node deletable, saveable, renameable, closeable, and not deployable.

Specified by:
getAttributes in interface NodeInfo
See Also:
NodeInfo.getAttributes()

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.

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()

isCreatedInContainer

protected boolean isCreatedInContainer()

launchDialog

protected boolean launchDialog(Context context,
                               Profile profile)

newProfileInstance

protected Profile newProfileInstance(DataContainer container,
                                     java.lang.String profileName)

addDeploymentSubmenu

public void addDeploymentSubmenu(Context context,
                                 javax.swing.JMenu profileSubMenu)

getMostRecentDeployTarget

public java.lang.String getMostRecentDeployTarget()

getTechnologyKeys

protected java.lang.String[] getTechnologyKeys()
Support for technology scopes in deployment profiles.


createDesignTimeNode

protected Node createDesignTimeNode(Context context)
The implementation of this method makes use of the template method design pattern.

This method is the launching point for the wizard that steps the user through the creation of a deployment profile. The default implementation puts up a URLChooser dialog for the default save location of the profile. Subclasses can customize this method to provide whatever UI is appropriate.

This method will return null if something goes wrong during creation or if the user canceled creation.


newContainerDeploymentProfile

protected Profile newContainerDeploymentProfile(Context context)
The implementation of this method makes use of the template method design pattern.

This method is the launching point for the wizard that steps the user through the creation of a deployment profile. Subclasses can customize this method to provide whatever UI is appropriate.

This method will return null if something goes wrong during creation or if the user canceled creation.


finishCreation

protected void finishCreation(Context profileContext,
                              Profile profile)

getDisplayName

protected abstract java.lang.String getDisplayName()
Returns the display name that is used to identify the deployment profile in the object gallery. The display name should be a noun identifying what the profile represents. There should be no ellipsis ("...") or action verb in the display name.

NOTE: The returned string is translatable.


getDefaultProfileName

protected abstract java.lang.String getDefaultProfileName()
Returns the prefix for the default deployment profile name that is generated for the user when a newly created deployment profile is being saved. For example, if this method returns "yourProfile", then the deployment framework will generate default profile names like "yourProfile1.deploy" and "yourProfile2.deploy".

NOTE: The returned string is translatable, even if it is some form of abbreviation.


newUniqueURL

protected java.net.URL newUniqueURL(Context context)
Part of template method design pattern. Called by #newDeploymentProfile(Context).

Generates a new unique URL for the deployment profile. The Context is provided to help build the default URL.


getUniqueName

public java.lang.String getUniqueName(java.util.Set usedNames)
Generates a new unique namefor the deployment profile. The Set is provided to help build the default name and contains the profile names already in the container (project/workspace).


ensureSuffix

protected final java.net.URL ensureSuffix(java.net.URL selectedURL)
Part of template method design pattern. Called by #newDeploymentProfile(Context).

Ensures that the specified URL has the ".deploy" suffix. If the suffix must be added, a new URL is created (since URLs are immutable).


getSuffix

protected java.lang.String getSuffix()

findOrCreateDeployNode

protected Node findOrCreateDeployNode(java.net.URL saveURL)
                               throws java.lang.IllegalAccessException,
                                      java.lang.InstantiationException
Part of template method design pattern. Called by #newDeploymentProfile(Context).

This method first checks if the path selected is already in the NodeFactory cache. If so, the user is requesting to overwrite it; the old Node is removed from the cache before the new Node is created.

Throws:
java.lang.IllegalAccessException
java.lang.InstantiationException

getCreationContext

protected final Context getCreationContext()
Returns the Context being used for the Profile being created.


setCreationContext

protected final void setCreationContext(Context context)
Sets the creation Context being used for profile creation.


supportsApplicationLevelCreation

public boolean supportsApplicationLevelCreation()
Returns true if this type of DeployProfileDt can be used to create an application-level profile. The default is false. Subtypes that support application-level creation should override this method and return true.


supportsProjectLevelCreation

public boolean supportsProjectLevelCreation()
Returns true if this type of DeployProfileDt can be used to create a project-level profile. Since most profiles suport project-level creation, the default is true. Subtypes that do not support project-level creation should override this method and return false.


addToApplicationAssemblyOnProfileAutogen

public boolean addToApplicationAssemblyOnProfileAutogen()
Returns true if the profile created by this type of DeployProfileDt should be added to the default application level profile. For example a WarProfile should be added to the application level EarFile assembly by default when that WarProfile is autogenerated upon project creation via templates. Subtypes that require automatic addition (such as WarProfileDt) to the application assembly in those cases should override this method and return true;


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.