Class StandaloneAppClientDeployerHelper
- java.lang.Object
-
- org.glassfish.appclient.server.core.AppClientDeployerHelper
-
- org.glassfish.appclient.server.core.StandaloneAppClientDeployerHelper
-
public class StandaloneAppClientDeployerHelper extends AppClientDeployerHelper
Encapsulates logic that is specific to stand-alone app client deployments regarding the generation of app client files.The facade JAR file - ${appName}Client.jar - will reside at the top of the user's local directory and will refer to the developer's original app client JAR which will reside in the ${appName}Client subdirectory within the user's download directory.
- Author:
- tjquinn
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.glassfish.appclient.server.core.AppClientDeployerHelper
AppClientDeployerHelper.Proxy
-
-
Field Summary
-
Fields inherited from class org.glassfish.appclient.server.core.AppClientDeployerHelper
ACC_MAIN_LOGGER, archivist, LOG_MESSAGE_RESOURCE
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addTopLevelContentToClientFacade(OutputJarArchive facadeArchive)
URI
appClientServerOriginalAnchor(DeploymentContext dc)
Returns the URI on the server to the original location of the app client.URI
appClientServerURI(DeploymentContext dc)
Returns the URI to the serverURI
appClientURIWithinApp(DeploymentContext dc)
Returns the URI for the app client within the artificial containing app.URI
appClientUserURI(DeploymentContext dc)
Returns the URI for the developer's original app client JAR within the user's download directory.URI
appClientUserURIForFacade(DeploymentContext dc)
Returns the URI to be used for the GlassFish-AppClient manifest entry in the facade.protected Set<Artifacts.FullAndPartURIs>
clientLevelDownloads()
protected void
copyFileToTopLevelJAR(OutputJarArchive clientFacadeArchive, File f, String path)
Copies a file's contents to the top-level JAR generated by this deployment.protected void
copyOriginalAppClientJAR(DeploymentContext dc)
void
createAndAddLibraryJNLPs(AppClientDeployerHelper helper, TokenHelper tHelper, Map<String,DynamicContent> dynamicContent)
Set<Artifacts.FullAndPartURIs>
earLevelDownloads()
protected String
facadeClassPath()
Returns the class path to be stored in the manifest for the generated facade JAR file.protected String
facadeFileNameAndType(DeploymentContext dc)
Returns the file name and type of the facade.URI
facadeServerURI(DeploymentContext dc)
Returns the URI for the generated facade JAR.URI
facadeUserURI(DeploymentContext dc)
Returns the URI for the facade within the user's download directory.FixedContent
fixedContentWithinEAR(String uriString)
Returns a FixedContent object for the file, within the EAR, at the specified relative location.URI
groupFacadeServerURI(DeploymentContext dc)
URI
groupFacadeUserURI(DeploymentContext dc)
Returns the URI for the group facade JAR, relative to the download directory to which the user will fetch the relevant JARs (either as part of "deploy --retrieve" or "get-client-stubs."String
pathToAppclientWithinApp(DeploymentContext dc)
Returns the relative path to the app client within the enclosing app.protected void
prepareJARs()
protected String
PUScanTargets()
File
rootForSignedFilesInApp()
Returns the root directory for signed files in the applications.URI
URIWithinAppDir(DeploymentContext dc, URI absoluteURI)
Returns a relative URI within the app directory for the specified absolute URI.-
Methods inherited from class org.glassfish.appclient.server.core.AppClientDeployerHelper
addClientPolicyFiles, appClientDesc, appName, appName, clientName, dc, generateAppClientFacade, openByteCodeStream, relativeURIToGroupFacade, signedJARManager, signingAliasToJar
-
-
-
-
Method Detail
-
rootForSignedFilesInApp
public File rootForSignedFilesInApp()
Description copied from class:AppClientDeployerHelper
Returns the root directory for signed files in the applications.- Specified by:
rootForSignedFilesInApp
in classAppClientDeployerHelper
- Returns:
- File object for the signed JAR root directory
-
prepareJARs
protected void prepareJARs() throws IOException, URISyntaxException
- Overrides:
prepareJARs
in classAppClientDeployerHelper
- Throws:
IOException
URISyntaxException
-
addTopLevelContentToClientFacade
protected void addTopLevelContentToClientFacade(OutputJarArchive facadeArchive) throws IOException
- Specified by:
addTopLevelContentToClientFacade
in classAppClientDeployerHelper
- Throws:
IOException
-
createAndAddLibraryJNLPs
public void createAndAddLibraryJNLPs(AppClientDeployerHelper helper, TokenHelper tHelper, Map<String,DynamicContent> dynamicContent)
- Specified by:
createAndAddLibraryJNLPs
in classAppClientDeployerHelper
-
copyFileToTopLevelJAR
protected void copyFileToTopLevelJAR(OutputJarArchive clientFacadeArchive, File f, String path) throws IOException
Copies a file's contents to the top-level JAR generated by this deployment.- Specified by:
copyFileToTopLevelJAR
in classAppClientDeployerHelper
- Parameters:
clientFacadeArchive
-f
-path
-- Throws:
IOException
-
fixedContentWithinEAR
public FixedContent fixedContentWithinEAR(String uriString)
Description copied from class:AppClientDeployerHelper
Returns a FixedContent object for the file, within the EAR, at the specified relative location.- Specified by:
fixedContentWithinEAR
in classAppClientDeployerHelper
- Parameters:
uriString
- relative path within the EAR- Returns:
- FixedContent object for the file
-
facadeFileNameAndType
protected String facadeFileNameAndType(DeploymentContext dc)
Returns the file name and type of the facade.For stand-alone app clients, the facade is ${appName}Client.jar.
- Specified by:
facadeFileNameAndType
in classAppClientDeployerHelper
- Parameters:
dc
-- Returns:
-
facadeServerURI
public URI facadeServerURI(DeploymentContext dc)
Returns the URI for the generated facade JAR.The facade is ${appName}Client.jar and for stand-alone app clients is stored at generated/xml/${appName}/${appName}Client.jar.
- Specified by:
facadeServerURI
in classAppClientDeployerHelper
- Parameters:
dc
-- Returns:
-
facadeUserURI
public URI facadeUserURI(DeploymentContext dc)
Returns the URI for the facade within the user's download directory.The facade for a stand-alone app client will reside at the top level of the user's download directory.
- Specified by:
facadeUserURI
in classAppClientDeployerHelper
- Parameters:
dc
-- Returns:
-
groupFacadeUserURI
public URI groupFacadeUserURI(DeploymentContext dc)
Description copied from class:AppClientDeployerHelper
Returns the URI for the group facade JAR, relative to the download directory to which the user will fetch the relevant JARs (either as part of "deploy --retrieve" or "get-client-stubs."- Specified by:
groupFacadeUserURI
in classAppClientDeployerHelper
- Parameters:
dc
- the deployment context for the current deployment- Returns:
-
groupFacadeServerURI
public URI groupFacadeServerURI(DeploymentContext dc)
- Specified by:
groupFacadeServerURI
in classAppClientDeployerHelper
-
appClientUserURI
public URI appClientUserURI(DeploymentContext dc)
Returns the URI for the developer's original app client JAR within the user's download directory.- Specified by:
appClientUserURI
in classAppClientDeployerHelper
- Parameters:
dc
-- Returns:
-
appClientServerURI
public URI appClientServerURI(DeploymentContext dc)
Returns the URI to the server- Specified by:
appClientServerURI
in classAppClientDeployerHelper
- Parameters:
dc
-- Returns:
-
appClientServerOriginalAnchor
public URI appClientServerOriginalAnchor(DeploymentContext dc)
Description copied from class:AppClientDeployerHelper
Returns the URI on the server to the original location of the app client.This is distinct from the appClientServerURI which could be in the generated directory (in the case of a directory deployment, for example). In some cases we need the original location of the app client on the server (for example, to resolve relative references from the app client JAR's manifest Class-Path).
- Specified by:
appClientServerOriginalAnchor
in classAppClientDeployerHelper
- Returns:
-
appClientURIWithinApp
public URI appClientURIWithinApp(DeploymentContext dc)
Returns the URI for the app client within the artificial containing app. For stand-alone clients the module URI is reported as the directory into which the app client JAR was expanded, without the "_jar" suffix. To that we add .jar to get a URI at the "top-level" of the pseudo-containing app.- Specified by:
appClientURIWithinApp
in classAppClientDeployerHelper
- Parameters:
dc
-- Returns:
-
clientLevelDownloads
protected Set<Artifacts.FullAndPartURIs> clientLevelDownloads() throws IOException
- Specified by:
clientLevelDownloads
in classAppClientDeployerHelper
- Throws:
IOException
-
earLevelDownloads
public Set<Artifacts.FullAndPartURIs> earLevelDownloads() throws IOException
- Specified by:
earLevelDownloads
in classAppClientDeployerHelper
- Throws:
IOException
-
appClientUserURIForFacade
public URI appClientUserURIForFacade(DeploymentContext dc)
Description copied from class:AppClientDeployerHelper
Returns the URI to be used for the GlassFish-AppClient manifest entry in the facade.- Specified by:
appClientUserURIForFacade
in classAppClientDeployerHelper
- Returns:
-
URIWithinAppDir
public URI URIWithinAppDir(DeploymentContext dc, URI absoluteURI)
Description copied from class:AppClientDeployerHelper
Returns a relative URI within the app directory for the specified absolute URI.- Specified by:
URIWithinAppDir
in classAppClientDeployerHelper
- Returns:
-
pathToAppclientWithinApp
public String pathToAppclientWithinApp(DeploymentContext dc)
Description copied from class:AppClientDeployerHelper
Returns the relative path to the app client within the enclosing app. The result will be an empty string for a stand-alone app clients because it has no such path, in reality. The result will be the relative URI within the EAR for a nested app client.- Specified by:
pathToAppclientWithinApp
in classAppClientDeployerHelper
- Returns:
-
facadeClassPath
protected String facadeClassPath()
Description copied from class:AppClientDeployerHelper
Returns the class path to be stored in the manifest for the generated facade JAR file.- Specified by:
facadeClassPath
in classAppClientDeployerHelper
- Returns:
-
copyOriginalAppClientJAR
protected void copyOriginalAppClientJAR(DeploymentContext dc) throws IOException
- Throws:
IOException
-
PUScanTargets
protected String PUScanTargets()
- Specified by:
PUScanTargets
in classAppClientDeployerHelper
-
-