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

E13403-07

oracle.jdeveloper.deploy
Class DeployUtil

java.lang.Object
  extended by oracle.jdeveloper.deploy.DeployUtil

public final class DeployUtil
extends java.lang.Object

Bucket for miscellaneous methods that are in the process of being refactored or otherwise don't properly belong anywhere else yet.


Method Summary
static Dependable[] clearAllDependencies(oracle.jdeveloper.deploy.common.Interdependency interDep)
           
static
<T extends Dependable>
T[]
clearDependencies(oracle.jdeveloper.deploy.common.Interdependency interDep, java.lang.Class<T> clazz)
           
static ArchiveEntry createArchiveEntry(oracle.jdeveloper.deploy.common.NodeDependable nodeDependable, java.lang.String prefix)
          Make an ArchiveEntry out of a NodeDependable.
static ArchiveEntry createArchiveEntry(oracle.jdeveloper.deploy.common.ProfileDependable profileDependable, java.lang.String prefix)
           
static java.net.URL[] findFast(Project project, java.lang.String fileName, java.lang.String extension)
          Find a list of URLs matching a filename and extension in specific Project.
static java.net.URL[] findFastXml(Project project, java.lang.String rootElem, java.lang.String nameSpace)
          Find a list of URLs in project that match an XML root element and namespace.
static Profile findProfileInElement(java.lang.String profileName, Element parent)
           
static Profile findProfileInElement(java.net.URL profileURL, Element parent)
           
static oracle.jdeveloper.deploy.common.NodeDependable[] getAllJarDependables(oracle.jdeveloper.deploy.common.Interdependency interdep)
          Get all the Jar dependables starting from a Profile and branching out to all its ProfileDependants.
static DataContainer getContainer(javax.swing.Action action, Context context)
           
static oracle.jdeveloper.deploy.common.ProfileDependable[] getContainerProfileDependables(DataContainer container)
          Return an unordered array of all Container to Profile dependencies.
static java.net.URL getContainerURL(java.net.URL profileURL)
           
static
<T extends Dependable>
T[]
getDependables(oracle.jdeveloper.deploy.common.Interdependency interDep, java.lang.Class<T> type)
          Returns an unordered array of all dependencies of InterDep that implement or subclass a particular type.
static
<T extends Dependable>
java.util.List<T>
getDependablesList(oracle.jdeveloper.deploy.common.Interdependency interDep, java.lang.Class<T> type)
           
static Element getDeployElement(DeployShell shell)
          Returns the deploy element from a DeployShell.
static DeploymentModule getDeploymentModule(DeployShell shell, Profile profile)
          Get the Deployment Module for the specified Profile
static DeploymentOptions getDeploymentOptions(Context context)
          Get Deployment Options from Context or the IDE.
static java.net.URL getDeployPathURL(java.net.URL projectURL, java.net.URL selectedURL)
          Generates a deploy output URL based on the IDE Prferences setting and project location.
static java.util.List getGalleryList()
          The returned list is the actual list (not a copy) of GalleryElement objects used for the "Deployment" gallery folder.
static oracle.jdeveloper.deploy.common.NodeDependable[] getJarDependables(oracle.jdeveloper.deploy.common.Interdependency profile)
          Get the Jar Dependables of an Interdependency
static java.util.jar.Manifest getManifestFromApplicationFile(java.io.File applicationFile)
          Returns the Manifest from the Application File if present, null otherwise.
static oracle.jdeveloper.deploy.meta.Platform getPlatform(Context context)
          Deprecated. Use JavaDeployment.setPlatform() instead.
static oracle.jdeveloper.deploy.meta.Platform getPlatform(DeployShell shell)
          Deprecated. Use JavaDeployment.getPlatform()
static Profile getProfile(Context context)
           
static Profile getProfile(DataContainer container, java.lang.String profileName)
           
static Profile getProfile(DeployShell shell)
           
static Profile getProfile(java.net.URL profileURL)
           
static DataContainer getProfileDataContainer(Context context)
          Deprecated. Use profile.getDataContainer() instead.
static DataContainer getProfileDataContainer(DeployShell shell)
          Deprecated. Use profile.getDataContainer() instead.
static oracle.jdeveloper.deploy.common.ProfileDependable[] getProfileDependables(DataContainer container, oracle.jdeveloper.deploy.common.Interdependency profile)
          Returns an unordered array of all Container to Profiles and Profile to Dependable dependencies.
static oracle.jdeveloper.deploy.common.ProfileDependable[] getProfileDependables(Profile profile, java.lang.Class<? extends Profile> sourceClass)
          Get all Profile Dependables that point to Profile of type sourceClass.
static java.lang.String getProfileName(javax.swing.Action action)
           
static java.lang.String getProfileName(java.net.URL profileURL)
          Deprecated. 
static java.net.URL getProfileURL(DataContainer container, Profile profile)
           
static java.net.URL getProfileURL(java.net.URL containerURL, Profile profile)
           
static java.lang.String getShortCommandKey(javax.swing.Action action)
           
static boolean isDependableExist(Dependable dependable)
          Does a Dependant object still exist.
static boolean isDirectoryLibrary(JLibrary lib)
           
static boolean isForceJarRewrite()
           
static void setContainerType(javax.swing.Action action, DataContainer container)
           
static void setDependencies(oracle.jdeveloper.deploy.common.Interdependency interDep, Dependable[] dependables)
          Utility method to set all the dependencies on an Interdependency.
static
<T extends Dependable>
T[]
setDependencies(oracle.jdeveloper.deploy.common.Interdependency interDep, T[] dependables, java.lang.Class<T> clazz)
          Sets only the sub-set of Dependables that match a particular type.
static void setDeploymentModule(DeployShell shell, Profile profile, DeploymentModule module)
          Sets the DeploymentModule in the topmost DeployShell shell.
static void setDeploymentOptions(Context context, DeploymentOptions options)
           
static void setPlatform(Context context, oracle.jdeveloper.deploy.meta.Platform platform)
          Deprecated. Use JavaDeployment.setPlatform()
static void setProfile(Context context, Profile profile)
           
static void setProfile(Context context, Profile profile, DataContainer container)
           
static void setProfileDataContainer(javax.swing.Action action, DataContainer container)
          Deprecated. The DataContainer for the Profile is set within the profile and is immutable.
static void setProfileDataContainer(Context context, DataContainer container)
          Deprecated. The DataContainer for the Profile is set within the profile and is immutable.
static void setProfileName(javax.swing.Action action, java.lang.String profileName)
           
static void setShortCommandKey(javax.swing.Action action, java.lang.String shortCommandKey)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getGalleryList

public static java.util.List getGalleryList()
The returned list is the actual list (not a copy) of GalleryElement objects used for the "Deployment" gallery folder. All items in the list must be an instance of GalleryElement.


getDeployPathURL

public static java.net.URL getDeployPathURL(java.net.URL projectURL,
                                            java.net.URL selectedURL)
Generates a deploy output URL based on the IDE Prferences setting and project location.


getProfileDependables

public static oracle.jdeveloper.deploy.common.ProfileDependable[] getProfileDependables(DataContainer container,
                                                                                        oracle.jdeveloper.deploy.common.Interdependency profile)
Returns an unordered array of all Container to Profiles and Profile to Dependable dependencies.

Parameters:
container -
interDep -
Returns:

getContainerProfileDependables

public static oracle.jdeveloper.deploy.common.ProfileDependable[] getContainerProfileDependables(DataContainer container)
Return an unordered array of all Container to Profile dependencies.

Parameters:
container -
Returns:

getDependables

public static <T extends Dependable> T[] getDependables(oracle.jdeveloper.deploy.common.Interdependency interDep,
                                                        java.lang.Class<T> type)
Returns an unordered array of all dependencies of InterDep that implement or subclass a particular type.

Parameters:
interDep -
type - the super class or interface that should be implemented.
Returns:

getDependablesList

public static <T extends Dependable> java.util.List<T> getDependablesList(oracle.jdeveloper.deploy.common.Interdependency interDep,
                                                                          java.lang.Class<T> type)

isForceJarRewrite

public static boolean isForceJarRewrite()

getProfileURL

public static java.net.URL getProfileURL(DataContainer container,
                                         Profile profile)

getProfileURL

public static java.net.URL getProfileURL(java.net.URL containerURL,
                                         Profile profile)

findProfileInElement

public static Profile findProfileInElement(java.net.URL profileURL,
                                           Element parent)

findProfileInElement

public static Profile findProfileInElement(java.lang.String profileName,
                                           Element parent)

getProfile

public static Profile getProfile(java.net.URL profileURL)

getProfile

public static Profile getProfile(DataContainer container,
                                 java.lang.String profileName)

setProfile

public static void setProfile(Context context,
                              Profile profile)

setProfile

public static void setProfile(Context context,
                              Profile profile,
                              DataContainer container)

getProfile

public static Profile getProfile(Context context)

getShortCommandKey

public static java.lang.String getShortCommandKey(javax.swing.Action action)

setShortCommandKey

public static void setShortCommandKey(javax.swing.Action action,
                                      java.lang.String shortCommandKey)

getProfileName

public static java.lang.String getProfileName(javax.swing.Action action)

setProfileName

public static void setProfileName(javax.swing.Action action,
                                  java.lang.String profileName)

setContainerType

public static void setContainerType(javax.swing.Action action,
                                    DataContainer container)

getContainer

public static DataContainer getContainer(javax.swing.Action action,
                                         Context context)

getProfile

public static Profile getProfile(DeployShell shell)

setDeploymentModule

public static void setDeploymentModule(DeployShell shell,
                                       Profile profile,
                                       DeploymentModule module)
Sets the DeploymentModule in the topmost DeployShell shell.

Parameters:
module -

getDeploymentModule

public static DeploymentModule getDeploymentModule(DeployShell shell,
                                                   Profile profile)
Get the Deployment Module for the specified Profile

Returns:
a reference to a DeploymentModule.

getProfileName

@Deprecated
public static java.lang.String getProfileName(java.net.URL profileURL)
Deprecated. 


getContainerURL

public static java.net.URL getContainerURL(java.net.URL profileURL)

setProfileDataContainer

@Deprecated
public static void setProfileDataContainer(Context context,
                                                      DataContainer container)
Deprecated. The DataContainer for the Profile is set within the profile and is immutable.

Utility method to set the DataContainer a Profile belongs to in a context.

Parameters:
context -
container -

getProfileDataContainer

@Deprecated
public static DataContainer getProfileDataContainer(Context context)
Deprecated. Use profile.getDataContainer() instead.

Utility method to retrieve a DataContainer from a context. The DataContainer is either a Project or a Workspace.

Parameters:
context -
Returns:
a DataContainer object. Null if a DataContainer has not been set in the context.

getProfileDataContainer

@Deprecated
public static DataContainer getProfileDataContainer(DeployShell shell)
Deprecated. Use profile.getDataContainer() instead.

Utility method to retrieve a DataContainer from a DeployShell.

Parameters:
shell -
Returns:
a DataContainer object. Null if a DataContainer has not been set in the Context passed to the DeployShell

setProfileDataContainer

@Deprecated
public static void setProfileDataContainer(javax.swing.Action action,
                                                      DataContainer container)
Deprecated. The DataContainer for the Profile is set within the profile and is immutable.

Parameters:
action -
container -

setPlatform

@Deprecated
public static void setPlatform(Context context,
                                          oracle.jdeveloper.deploy.meta.Platform platform)
Deprecated. Use JavaDeployment.setPlatform()

Utility method to set a deployment Platform in a Context.

Parameters:
context_ -

getPlatform

@Deprecated
public static oracle.jdeveloper.deploy.meta.Platform getPlatform(Context context)
Deprecated. Use JavaDeployment.setPlatform() instead.

Parameters:
context -
Returns:

getPlatform

@Deprecated
public static oracle.jdeveloper.deploy.meta.Platform getPlatform(DeployShell shell)
Deprecated. Use JavaDeployment.getPlatform()

Parameters:
shell -

getProfileDependables

public static oracle.jdeveloper.deploy.common.ProfileDependable[] getProfileDependables(Profile profile,
                                                                                        java.lang.Class<? extends Profile> sourceClass)
Get all Profile Dependables that point to Profile of type sourceClass.

Parameters:
sourceClass -
Returns:

createArchiveEntry

public static ArchiveEntry createArchiveEntry(oracle.jdeveloper.deploy.common.NodeDependable nodeDependable,
                                              java.lang.String prefix)
Make an ArchiveEntry out of a NodeDependable. The filename part of the Node URL is used as the entryName for the ArchiveEntry.

Parameters:
nodeDependable -
prefix - if supplied, prefix + filename = entryName.
Returns:

createArchiveEntry

public static ArchiveEntry createArchiveEntry(oracle.jdeveloper.deploy.common.ProfileDependable profileDependable,
                                              java.lang.String prefix)
Parameters:
profileDependable -
prefix -
Returns:

getJarDependables

public static oracle.jdeveloper.deploy.common.NodeDependable[] getJarDependables(oracle.jdeveloper.deploy.common.Interdependency profile)
Get the Jar Dependables of an Interdependency

Parameters:
profile -
Returns:
array of NodeDependables that point to JarNodes. Zero length array is returned if no JarNodes are found.

getAllJarDependables

public static oracle.jdeveloper.deploy.common.NodeDependable[] getAllJarDependables(oracle.jdeveloper.deploy.common.Interdependency interdep)
Get all the Jar dependables starting from a Profile and branching out to all its ProfileDependants.

Parameters:
profile -
Returns:

isDependableExist

public static boolean isDependableExist(Dependable dependable)
Does a Dependant object still exist. This check may be made after reading a Dependable from persistence to verify that the thing it points to still exists.

Parameters:
dependable -
Returns:

getDeploymentOptions

public static DeploymentOptions getDeploymentOptions(Context context)
Get Deployment Options from Context or the IDE.


setDeploymentOptions

public static void setDeploymentOptions(Context context,
                                        DeploymentOptions options)

clearDependencies

public static <T extends Dependable> T[] clearDependencies(oracle.jdeveloper.deploy.common.Interdependency interDep,
                                                           java.lang.Class<T> clazz)

clearAllDependencies

public static Dependable[] clearAllDependencies(oracle.jdeveloper.deploy.common.Interdependency interDep)

setDependencies

public static void setDependencies(oracle.jdeveloper.deploy.common.Interdependency interDep,
                                   Dependable[] dependables)
Utility method to set all the dependencies on an Interdependency.

Parameters:
dependables -

setDependencies

public static <T extends Dependable> T[] setDependencies(oracle.jdeveloper.deploy.common.Interdependency interDep,
                                                         T[] dependables,
                                                         java.lang.Class<T> clazz)
Sets only the sub-set of Dependables that match a particular type.

Parameters:
interDep -
dependables - the replacement set. All elements of this set should be of the same type.
clazz - the type of the Dependable to set
Returns:

getDeployElement

public static Element getDeployElement(DeployShell shell)
Returns the deploy element from a DeployShell. This is the Profile, if its set in the shell, else the Element in the Context. The search is restricted to the current shell, any parent shells are not searched.

Parameters:
shell -
Returns:
an Element. Null if a Profile could not be located, or the Context did not have an Element set (this should be extremely rare).

findFast

public static java.net.URL[] findFast(Project project,
                                      java.lang.String fileName,
                                      java.lang.String extension)
Find a list of URLs matching a filename and extension in specific Project.

Parameters:
project - the project to search.
fileName - name of file to find. Can include the *(asterisk) as a wildcard.
extension - null to find all extensions. If specified, the extension should start with a . (dot). The | (pipe) character may be used to separate multiple extensions.
Returns:
array of URLs, or null if an exception is encountered.

findFastXml

public static java.net.URL[] findFastXml(Project project,
                                         java.lang.String rootElem,
                                         java.lang.String nameSpace)
Find a list of URLs in project that match an XML root element and namespace. Note: This is a blocking query, for non-blocking queries use the Indexing APIs directly.

Parameters:
project - the project to search in.
rootElem - XML root element, cannot be null.
nameSpace - namespace of rootElem. If null, searches for matches on just rootElem.
Returns:

isDirectoryLibrary

public static boolean isDirectoryLibrary(JLibrary lib)

getManifestFromApplicationFile

public static java.util.jar.Manifest getManifestFromApplicationFile(java.io.File applicationFile)
Returns the Manifest from the Application File if present, null otherwise.

Parameters:
applicationFile - the applicationFile (typically EAR/WAR etc or application Directory).
Returns:
the manifest file contained in the supplied applicationFile.

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

E13403-07

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