Skip navigation links

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

E13403-10


oracle.jdeveloper.deploy.dt
Class Deployment

java.lang.Object
  extended by oracle.jdeveloper.deploy.dt.Deployment


public final class Deployment
extends java.lang.Object

Main Addin class for the Deployment Framework and entry point into Deployment DT.


Field Summary
static int BC_SDO_PROFILE_TYPE
           
static java.lang.String BCDEPLOY_PROFILE_EXT
          File extension for BC4J deployment profiles.
static java.lang.String DEPLOY_PROFILE_EXT
          File extension for deployment profiles.
static java.lang.String STORED_PROC_EXPORT_EXT
          File extension for stored procedure export files.

 

Method Summary
static void buildDeploymentMenu(Context context, javax.swing.JMenu deployMenu, DataContainer dc)
           
static java.net.URL convertSuffix(java.net.URL deployProfileURL, java.lang.String newSuffix)
          Creates a new URL whose suffix has been converted from the Deployment.DEPLOY_PROFILE_EXT to the newSuffix.
static
<T extends Profile>
T
createDeploymentProfile(Context context, java.lang.String profileName, java.lang.Class<T> profileClass)
          Creates a Profile Profile of the specified name and type and associates it with a DataContainer.
static
<T extends Profile>
T
createDeploymentProfile(DataContainer container, java.lang.String profileName, java.lang.Class<T> profileClass)
          Creates a Profile Profile of the specified name and type and associates it with a DataContainer.
static Profile createDeploymentProfile(HashStructure hash, DataContainer container)
          Creates a Profile from a HashStructure.
static IdeAction createIdeAction(java.lang.String key, java.lang.String displayName)
          Create a new IdeAction for a deployment command, using the specified info.
static IdeAction createIdeAction(java.lang.String key, java.lang.String displayName, Controller controller)
          Create a new IdeAction for a deployment command, using the specified info.
static void deploy(Context context)
          Invoke the default action on a deployment profile.
static boolean deploy(Context context, java.lang.String command)
          Invoke an action on a deployment profile.
static DependableFactory getDependableFactory()
          Get a reference to the DependableFactory, which should be used to generate Dependables that can be added to a deployment Profile, or anything that implements Interdependency.
static DeploymentOptions getDeploymentOptions()
          Returns the current DeploymentOptions object used to configure environment-level options for deployment.
static java.net.URL getDeployOutputDir(java.net.URL projectURL)
          Returns the default deployment output directory as a URL, assuming a project-level deployment profile.
static java.net.URL getDeployOutputDir(java.net.URL containerURL, java.lang.Class<? extends DataContainer> profileContainerClass)
          Returns the default deployment output directory as an URL.
static java.util.logging.Logger getLogger()
           
static LogPage getLogPage()
          Returns the LogPage used for deployment messages.
static java.io.PrintStream getLogPrintStream()
          Deprecated. Use getLogger() instead.
static java.io.PrintWriter getLogPrintWriter()
          Deprecated. Use getLogger() instead.
static DeployProfileDt getProfileDesignTime(java.lang.Class profileClass)
          Completes the deferred loading of deployment addins.
static java.util.List<DeployProfileDt> getProfileDesignTimeList()
          Returns a List of Profile related DeployProfileDt instances registered.
static java.util.Map getProjectProfiles(Project project)
          Returns a Map of profiles Profile contained in the given project.
static java.util.Map getWorkspaceProfiles(Workspace workspace)
          Returns an Map of profiles Profile contained in the given Application workspace.
static void init()
           
static void invokeNewDeploymentProfileWizard(java.lang.Class dataClass, Context context)
           
static boolean isDeploymentContainerProfile(Element elem)
          Deprecated. 
static boolean isDeploymentProfile(Node node)
          Deprecated. 
static void loadDeployAddin(java.lang.ClassLoader loader, java.lang.String className)
          Loads a deployment addin.
static void loadDeployAddin(java.lang.String className)
          Deprecated. use loadDeployAddin(ClassLoader,String) since 11.1.1.0
static void maybeShowLogPage()
          Brings the focus to the Deployment Log Window.
static void processLoad()
          Completes the deferred loading of deployment addins.
 void registerDependableFactory(DependableRecognizer recognizer)
          Register a DependableRecognizer which will be consulted to create a Dependable of a given type.
static void registerDeployDesignTime(java.lang.Class dataClass, DeployDesignTime ddt)
          Registers the given ddt as the class that can provide design-time functionality associated with the given dataClass.
static void registerDeployDesignTime(java.lang.Class dataClass, DeployDesignTime ddt, java.lang.String category, java.lang.String folder)
          Registers the given ddt as the class that can provide design-time functionality associated with the given dataClass.
static void registerProfileDesignTime(java.lang.Class<? extends Profile> profileClass, DeployProfileDt pdt)
          Registers the given DeployProfileDt as representing a deployment profile type.
static void registerProfileDesignTime(java.lang.Class<? extends Profile> profileClass, DeployProfileDt dpdt, Wizard wiz)
          Registers a Profile, along with a Design Time, and a Wizard to be used for creating new Profiles of that type.
 void removeDependableFactory(DependableRecognizer recognizer)
           

 

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

 

Field Detail

STORED_PROC_EXPORT_EXT

public static final java.lang.String STORED_PROC_EXPORT_EXT
File extension for stored procedure export files.
See Also:
Constant Field Values

DEPLOY_PROFILE_EXT

public static final java.lang.String DEPLOY_PROFILE_EXT
File extension for deployment profiles.
See Also:
Constant Field Values

BCDEPLOY_PROFILE_EXT

public static final java.lang.String BCDEPLOY_PROFILE_EXT
File extension for BC4J deployment profiles.
See Also:
Constant Field Values

BC_SDO_PROFILE_TYPE

public static final int BC_SDO_PROFILE_TYPE
See Also:
Constant Field Values

Method Detail

isDeploymentProfile

@Deprecated
public static boolean isDeploymentProfile(Node node)
Deprecated. 
Returns true if the specified Node represents some kind of deployment profile.

isDeploymentContainerProfile

@Deprecated
public static boolean isDeploymentContainerProfile(Element elem)
Deprecated. 

createIdeAction

public static IdeAction createIdeAction(java.lang.String key,
                                        java.lang.String displayName)
Create a new IdeAction for a deployment command, using the specified info.

createIdeAction

public static IdeAction createIdeAction(java.lang.String key,
                                        java.lang.String displayName,
                                        Controller controller)
Create a new IdeAction for a deployment command, using the specified info.

deploy

public static void deploy(Context context)
Invoke the default action on a deployment profile. If no default action is defined, then no action is taken.

deploy

public static boolean deploy(Context context,
                             java.lang.String command)
Invoke an action on a deployment profile.
Parameters:
context - indicates the target deployment profile node, along with the context project and workspace objects
command - the name of the command to invoke

invokeNewDeploymentProfileWizard

public static void invokeNewDeploymentProfileWizard(java.lang.Class dataClass,
                                                    Context context)

registerDeployDesignTime

public static void registerDeployDesignTime(java.lang.Class dataClass,
                                            DeployDesignTime ddt)
Registers the given ddt as the class that can provide design-time functionality associated with the given dataClass. A single instance is kept by the Deployment class and reused for all design-time related events for a particular dataClass.

registerDeployDesignTime

public static void registerDeployDesignTime(java.lang.Class dataClass,
                                            DeployDesignTime ddt,
                                            java.lang.String category,
                                            java.lang.String folder)
Registers the given ddt as the class that can provide design-time functionality associated with the given dataClass. A single instance is kept by the Deployment class and reused for all design-time related events for a particular dataClass. The optional category and folder can be provided for registering the design time with the gallery manager.

registerProfileDesignTime

public static void registerProfileDesignTime(java.lang.Class<? extends Profile> profileClass,
                                             DeployProfileDt pdt)
Registers the given DeployProfileDt as representing a deployment profile type.

registerProfileDesignTime

public static void registerProfileDesignTime(java.lang.Class<? extends Profile> profileClass,
                                             DeployProfileDt dpdt,
                                             Wizard wiz)
Registers a Profile, along with a Design Time, and a Wizard to be used for creating new Profiles of that type. If the Wizard is null, then a default wizard is created automatically and used by the deployment framework.

This method also registers the DeployProfileDt with registerDeployDesignTime(Class, DeployDesignTime).


getDeploymentOptions

public static DeploymentOptions getDeploymentOptions()
Returns the current DeploymentOptions object used to configure environment-level options for deployment.

getDeployOutputDir

public static java.net.URL getDeployOutputDir(java.net.URL projectURL)
Returns the default deployment output directory as a URL, assuming a project-level deployment profile. For more details, see getDeployOutputDir( URL containerURL, int profileContainerType )

getDeployOutputDir

public static java.net.URL getDeployOutputDir(java.net.URL containerURL,
                                              java.lang.Class<? extends DataContainer> profileContainerClass)
Returns the default deployment output directory as an URL. The result of this method depends on what the user has specified in the IDE preferences. This directory only affects what directory is used by default when creating a deployment profile and setting the output URLs for JAR, WAR, and EAR files. Existing profiles are not modified when the user changes this IDE preference.

The containerURL is used if the user specifies a directory name that is relative to the project or application directory. This is the default setting and the subdirectory in the project or application where deployed output goes by default is named "deploy".

The profileContainerClass determines whether the project-level or application-level deployment output preferences are used. It should be the class oracle.ide.model.Workspace or oracle.ide.model.Project, depending on the level at which the deployment profile is being created.

If the user specifies an absolute directory for the deployment output directory, then that directory is returned directly and the containerURL parameter is not used.


getLogPage

public static LogPage getLogPage()
Returns the LogPage used for deployment messages.

maybeShowLogPage

public static void maybeShowLogPage()
Brings the focus to the Deployment Log Window. Note that no action is taken in the case where we're running headless (without the IDE main window).

getLogPrintWriter

@Deprecated
public static java.io.PrintWriter getLogPrintWriter()
Deprecated. Use getLogger() instead.
Returns a PrintWriter that is connected to the deployment log page. Any output sent to the PrintWriter will be sent to the deployment log page.

getLogger

public static java.util.logging.Logger getLogger()

getLogPrintStream

@Deprecated
public static java.io.PrintStream getLogPrintStream()
Deprecated. Use getLogger() instead.
Returns a PrintWriter that is connected to the deployment log page. Any output sent to the PrintWriter will be sent to the deployment log page.

convertSuffix

public static java.net.URL convertSuffix(java.net.URL deployProfileURL,
                                         java.lang.String newSuffix)
Creates a new URL whose suffix has been converted from the Deployment.DEPLOY_PROFILE_EXT to the newSuffix.

loadDeployAddin

public static void loadDeployAddin(java.lang.String className)
Deprecated. use loadDeployAddin(ClassLoader,String) since 11.1.1.0
The behavior of this method depends on whether or not the processLoad() method has been called. If processLoad() has not been called, then the specified className is appended to the list of deployment addins that will be loaded at a later time. If processLoad() has already been called, then the deployment addin is loaded immediately.

loadDeployAddin

public static void loadDeployAddin(java.lang.ClassLoader loader,
                                   java.lang.String className)
Loads a deployment addin.

The behavior of this method depends on whether or not the processLoad() method has been called. If processLoad() has not been called, then the specified className is appended to the list of deployment addins that will be loaded at a later time. If processLoad() has already been called, then the deployment addin is loaded immediately.

Parameters:
loader - the loader to load the addin on.
className - the fully qualified class name of the addin. This method does nothing if the specified className is null or its length is 0.
Throws:
java.lang.NullPointerException - if loader is null.
Since:
11.1.1.0.0

processLoad

public static void processLoad()
Completes the deferred loading of deployment addins. If deferred loading has already run, then this method does nothing.

init

public static void init()

getProfileDesignTime

public static DeployProfileDt getProfileDesignTime(java.lang.Class profileClass)
Completes the deferred loading of deployment addins. If deferred loading has already run, then this method does nothing.

getProfileDesignTimeList

public static java.util.List<DeployProfileDt> getProfileDesignTimeList()
Returns a List of Profile related DeployProfileDt instances registered. Note that this list will not include the StoredProcedureProfileDt or JarNodeDeployDt.

getProjectProfiles

public static java.util.Map getProjectProfiles(Project project)
Returns a Map of profiles Profile contained in the given project.

getWorkspaceProfiles

public static java.util.Map getWorkspaceProfiles(Workspace workspace)
Returns an Map of profiles Profile contained in the given Application workspace.

createDeploymentProfile

public static <T extends Profile> T createDeploymentProfile(Context context,
                                                            java.lang.String profileName,
                                                            java.lang.Class<T> profileClass)
Creates a Profile Profile of the specified name and type and associates it with a DataContainer.
Parameters:
context - the context for which this profile is to be created. At minimum, the context is required to contain a DataContainer, which can be populated using the DeployUtil.setProfileDataContainer(Context, DataContainer) method.
profileName - a name for the Profile. The name may be used as a prefix or suffix for default property values in the Profile.
profileClass - the type of Profile to create.
Returns:
a Profile of type T, null if a Profile could not be created for whatever reason.

createDeploymentProfile

public static <T extends Profile> T createDeploymentProfile(DataContainer container,
                                                            java.lang.String profileName,
                                                            java.lang.Class<T> profileClass)
Creates a Profile Profile of the specified name and type and associates it with a DataContainer.
Parameters:
container - the Project or Workspace with which to associate the Profile. A Profile can only be interpreted in the context of its associated Container.
profileName - a name for the Profile. The name may be used as a prefix or suffix for default property values in the Profile.
profileClass - the type of Profile to create.
Returns:
a Profile of type T, null if a Profile could not be created for whatever reason.

createDeploymentProfile

public static Profile createDeploymentProfile(HashStructure hash,
                                              DataContainer container)
                                       throws java.lang.InstantiationException
Creates a Profile from a HashStructure. This method is used to instantiate a Profile from a persisted HashStructure. The type of the Profile is stored as one of the values of the hash.
Parameters:
hash -
container -
Returns:
Throws:
java.lang.InstantiationException

buildDeploymentMenu

public static void buildDeploymentMenu(Context context,
                                       javax.swing.JMenu deployMenu,
                                       DataContainer dc)

getDependableFactory

public static DependableFactory getDependableFactory()
Get a reference to the DependableFactory, which should be used to generate Dependables that can be added to a deployment Profile, or anything that implements Interdependency. The Dependable provides the mechanism for persisting a reference to the target object in the Project or Workspace HashStructure without pulling in all of the referenced object. It may also implement lazy-loading of the target object. Example: Making an Archive (JAR) Profile dependant on another:
   final Profile profile1  = Deployment.createDeploymentProfile(project1, "archive1", ArchiveProfile.class);
   final Profile profile2  = Deployment.createDeploymentProfile(project1, "archive2", ArchiveProfile.class);
   
   final DependableFactory depFactory = Deployment.getDependableFactory();
   
   // Returns a dependable for profile2
   Dependable dependable = depFactory.findOrCreate( profile2, project1 );
   
   // Add it to profile1
   profile1.addDependency( dependable);
   
 
Example: Making a Profile dependant on a Jar Node
   Profile profile3 = Deployment.createDeploymentProfile(project1, "archive3", ArchiveProfile.class);
   Node jarNode = NodeFactory.findInFolder(project1, jarURL);
  
   // Create a dependable for the Node
   dependable = depFactory.findOrCreate( jarNode, project1 );
  
   // Add it to profile3
   profile3.addDependency( dependable );
  
 
Dependencies can also be chained.
    profile2.addDependency( depFactory.findOrCreate( profile3, project1 ));
 
The final directed dependency graph looks like this:
Profile1 -> Profile2 -> Profile3 -> JarNode
Returns:

registerDependableFactory

public void registerDependableFactory(DependableRecognizer recognizer)
Register a DependableRecognizer which will be consulted to create a Dependable of a given type.
Parameters:
recognizer -
See Also:
DependableRecognizer

removeDependableFactory

public void removeDependableFactory(DependableRecognizer recognizer)

Skip navigation links

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

E13403-10


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