public class DeploymentUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
DAS_TARGET_NAME |
static Logger |
deplLogger |
static String |
DEPLOYMENT_PROPERTY_JAVA_WEB_START_ENABLED |
static String |
DOMAIN_TARGET_NAME |
| Constructor and Description |
|---|
DeploymentUtils() |
| Modifier and Type | Method and Description |
|---|---|
static long |
checksum(File directory)
Computes the checksum of the URIs of files contained in a directory.
|
static void |
copyStream(InputStream in,
OutputStream out) |
static Artifacts |
downloadableArtifacts(com.sun.enterprise.config.serverbeans.Application app)
Returns the downloadable artifacts object derived from the properties
saved with the specified Application
|
static Artifacts |
downloadableArtifacts(org.glassfish.api.deployment.DeploymentContext dc)
Returns the downloadable artifacts object from the specified deployment
context, creating it there if it does not already exist.
|
static void |
expand(org.glassfish.api.deployment.archive.ReadableArchive source,
org.glassfish.api.deployment.archive.WritableArchive target)
Expand an archive to a directory
|
static Artifacts |
generatedArtifacts(com.sun.enterprise.config.serverbeans.Application app)
Returns the generated artifacts object derived from the properties
saved with the specified Application
|
static Artifacts |
generatedArtifacts(org.glassfish.api.deployment.DeploymentContext dc)
Returns the generated artifacts object from the specified deployment
context, creating it there if it does not already exist.
|
static String |
getDefaultEEName(String pathName) |
static String |
getEmbeddedModulePath(String appRootPath,
String moduleUri)
This method returns the file path of an embedded module.
|
static List<URI> |
getExternalLibraries(org.glassfish.api.deployment.archive.ReadableArchive archive) |
static String |
getInternalNameForTenant(String appname,
String tenantname) |
static List<URL> |
getManifestLibraries(org.glassfish.api.deployment.DeploymentContext context) |
static List<URL> |
getManifestLibraries(org.glassfish.api.deployment.DeploymentContext context,
Manifest manifest) |
static List<URL> |
getManifestLibraries(org.glassfish.api.deployment.archive.ReadableArchive archive) |
static String |
getRelativeEmbeddedModulePath(String appRootPath,
String moduleUri)
This method returns the relative file path of an embedded module to
the application root.
|
static String |
getVirtualServers(String target,
org.glassfish.api.admin.ServerEnvironment env,
com.sun.enterprise.config.serverbeans.Domain domain) |
static boolean |
isArchiveOfType(org.glassfish.api.deployment.archive.ReadableArchive archive,
org.glassfish.api.deployment.archive.ArchiveType archiveType,
org.glassfish.api.deployment.DeploymentContext context,
org.glassfish.hk2.api.ServiceLocator locator) |
static boolean |
isArchiveOfType(org.glassfish.api.deployment.archive.ReadableArchive archive,
org.glassfish.api.deployment.archive.ArchiveType archiveType,
org.glassfish.hk2.api.ServiceLocator locator) |
static boolean |
isDASTarget(String targetName) |
static boolean |
isDomainTarget(String targetName) |
static FileArchive |
openAsFileArchive(File dir,
ArchiveFactory archiveFactory)
Opens the specified file as an archive, using the provided archive factory.
|
static String |
propertiesValue(Properties props,
char sep) |
static String |
relativizeWithinDomainIfPossible(URI absURI) |
static boolean |
useV2Compatibility(org.glassfish.api.deployment.DeploymentContext context) |
static void |
validateApplicationName(String name) |
public static final Logger deplLogger
public static final String DEPLOYMENT_PROPERTY_JAVA_WEB_START_ENABLED
public static final String DAS_TARGET_NAME
public static final String DOMAIN_TARGET_NAME
public static boolean isDASTarget(String targetName)
public static boolean isDomainTarget(String targetName)
public static long checksum(File directory)
directory - the directory for which to compute a checksumpublic static Artifacts downloadableArtifacts(org.glassfish.api.deployment.DeploymentContext dc)
dc - the deployment context from which to fetch the downloadable Artifacts objectpublic static Artifacts downloadableArtifacts(com.sun.enterprise.config.serverbeans.Application app)
app - the Application config object with (possibly) properties describing downloadable artifactspublic static Artifacts generatedArtifacts(org.glassfish.api.deployment.DeploymentContext dc)
app - public static Artifacts generatedArtifacts(com.sun.enterprise.config.serverbeans.Application app)
app - the Application config object with (possibly) properties describing generated artifactspublic static boolean isArchiveOfType(org.glassfish.api.deployment.archive.ReadableArchive archive,
org.glassfish.api.deployment.archive.ArchiveType archiveType,
org.glassfish.api.deployment.DeploymentContext context,
org.glassfish.hk2.api.ServiceLocator locator)
public static boolean isArchiveOfType(org.glassfish.api.deployment.archive.ReadableArchive archive,
org.glassfish.api.deployment.archive.ArchiveType archiveType,
org.glassfish.hk2.api.ServiceLocator locator)
public static String getDefaultEEName(String pathName)
pathName - public static String getRelativeEmbeddedModulePath(String appRootPath, String moduleUri)
appRootPath - The path of the application root which
contains the module
e.g. $domain_dir/applications/j2ee-apps/foomoduleUri - The module uri
e.g. fooEJB.jarpublic static String getEmbeddedModulePath(String appRootPath, String moduleUri)
appRootPath - The path of the application root which
contains the module
e.g. $domain_dir/applications/j2ee-apps/foomoduleUri - The module uri
e.g. fooEJB.jarpublic static boolean useV2Compatibility(org.glassfish.api.deployment.DeploymentContext context)
public static String relativizeWithinDomainIfPossible(URI absURI) throws URISyntaxException
URISyntaxExceptionpublic static void validateApplicationName(String name)
public static void expand(org.glassfish.api.deployment.archive.ReadableArchive source,
org.glassfish.api.deployment.archive.WritableArchive target)
throws IOException
source - of the expandingtarget - of the expandingIOException - when the archive is corruptedpublic static String getInternalNameForTenant(String appname, String tenantname)
public static String propertiesValue(Properties props, char sep)
public static List<URL> getManifestLibraries(org.glassfish.api.deployment.DeploymentContext context) throws IOException
IOExceptionpublic static List<URL> getManifestLibraries(org.glassfish.api.deployment.DeploymentContext context, Manifest manifest) throws IOException
IOExceptionpublic static List<URL> getManifestLibraries(org.glassfish.api.deployment.archive.ReadableArchive archive) throws IOException
IOExceptionpublic static List<URI> getExternalLibraries(org.glassfish.api.deployment.archive.ReadableArchive archive)
public static FileArchive openAsFileArchive(File dir, ArchiveFactory archiveFactory) throws IOException
dir - directory to be opened as an archivearchiveFactory - ArchiveFactory to use to create the archive objectIOExceptionpublic static String getVirtualServers(String target, org.glassfish.api.admin.ServerEnvironment env, com.sun.enterprise.config.serverbeans.Domain domain)
public static void copyStream(InputStream in, OutputStream out) throws IOException
IOExceptionCopyright © 2017–2019 Eclipse Foundation. All rights reserved.