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 voidaddTopLevelContentToClientFacade(OutputJarArchive facadeArchive)URIappClientServerOriginalAnchor(DeploymentContext dc)Returns the URI on the server to the original location of the app client.URIappClientServerURI(DeploymentContext dc)Returns the URI to the serverURIappClientURIWithinApp(DeploymentContext dc)Returns the URI for the app client within the artificial containing app.URIappClientUserURI(DeploymentContext dc)Returns the URI for the developer's original app client JAR within the user's download directory.URIappClientUserURIForFacade(DeploymentContext dc)Returns the URI to be used for the GlassFish-AppClient manifest entry in the facade.protected Set<Artifacts.FullAndPartURIs>clientLevelDownloads()protected voidcopyFileToTopLevelJAR(OutputJarArchive clientFacadeArchive, File f, String path)Copies a file's contents to the top-level JAR generated by this deployment.protected voidcopyOriginalAppClientJAR(DeploymentContext dc)voidcreateAndAddLibraryJNLPs(AppClientDeployerHelper helper, TokenHelper tHelper, Map<String,DynamicContent> dynamicContent)Set<Artifacts.FullAndPartURIs>earLevelDownloads()protected StringfacadeClassPath()Returns the class path to be stored in the manifest for the generated facade JAR file.protected StringfacadeFileNameAndType(DeploymentContext dc)Returns the file name and type of the facade.URIfacadeServerURI(DeploymentContext dc)Returns the URI for the generated facade JAR.URIfacadeUserURI(DeploymentContext dc)Returns the URI for the facade within the user's download directory.FixedContentfixedContentWithinEAR(String uriString)Returns a FixedContent object for the file, within the EAR, at the specified relative location.URIgroupFacadeServerURI(DeploymentContext dc)URIgroupFacadeUserURI(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."StringpathToAppclientWithinApp(DeploymentContext dc)Returns the relative path to the app client within the enclosing app.protected voidprepareJARs()protected StringPUScanTargets()FilerootForSignedFilesInApp()Returns the root directory for signed files in the applications.URIURIWithinAppDir(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:AppClientDeployerHelperReturns the root directory for signed files in the applications.- Specified by:
rootForSignedFilesInAppin classAppClientDeployerHelper- Returns:
- File object for the signed JAR root directory
-
prepareJARs
protected void prepareJARs() throws IOException, URISyntaxException- Overrides:
prepareJARsin classAppClientDeployerHelper- Throws:
IOExceptionURISyntaxException
-
addTopLevelContentToClientFacade
protected void addTopLevelContentToClientFacade(OutputJarArchive facadeArchive) throws IOException
- Specified by:
addTopLevelContentToClientFacadein classAppClientDeployerHelper- Throws:
IOException
-
createAndAddLibraryJNLPs
public void createAndAddLibraryJNLPs(AppClientDeployerHelper helper, TokenHelper tHelper, Map<String,DynamicContent> dynamicContent)
- Specified by:
createAndAddLibraryJNLPsin 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:
copyFileToTopLevelJARin classAppClientDeployerHelper- Parameters:
clientFacadeArchive-f-path-- Throws:
IOException
-
fixedContentWithinEAR
public FixedContent fixedContentWithinEAR(String uriString)
Description copied from class:AppClientDeployerHelperReturns a FixedContent object for the file, within the EAR, at the specified relative location.- Specified by:
fixedContentWithinEARin 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:
facadeFileNameAndTypein 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:
facadeServerURIin 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:
facadeUserURIin classAppClientDeployerHelper- Parameters:
dc-- Returns:
-
groupFacadeUserURI
public URI groupFacadeUserURI(DeploymentContext dc)
Description copied from class:AppClientDeployerHelperReturns 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:
groupFacadeUserURIin classAppClientDeployerHelper- Parameters:
dc- the deployment context for the current deployment- Returns:
-
groupFacadeServerURI
public URI groupFacadeServerURI(DeploymentContext dc)
- Specified by:
groupFacadeServerURIin 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:
appClientUserURIin classAppClientDeployerHelper- Parameters:
dc-- Returns:
-
appClientServerURI
public URI appClientServerURI(DeploymentContext dc)
Returns the URI to the server- Specified by:
appClientServerURIin classAppClientDeployerHelper- Parameters:
dc-- Returns:
-
appClientServerOriginalAnchor
public URI appClientServerOriginalAnchor(DeploymentContext dc)
Description copied from class:AppClientDeployerHelperReturns 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:
appClientServerOriginalAnchorin 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:
appClientURIWithinAppin classAppClientDeployerHelper- Parameters:
dc-- Returns:
-
clientLevelDownloads
protected Set<Artifacts.FullAndPartURIs> clientLevelDownloads() throws IOException
- Specified by:
clientLevelDownloadsin classAppClientDeployerHelper- Throws:
IOException
-
earLevelDownloads
public Set<Artifacts.FullAndPartURIs> earLevelDownloads() throws IOException
- Specified by:
earLevelDownloadsin classAppClientDeployerHelper- Throws:
IOException
-
appClientUserURIForFacade
public URI appClientUserURIForFacade(DeploymentContext dc)
Description copied from class:AppClientDeployerHelperReturns the URI to be used for the GlassFish-AppClient manifest entry in the facade.- Specified by:
appClientUserURIForFacadein classAppClientDeployerHelper- Returns:
-
URIWithinAppDir
public URI URIWithinAppDir(DeploymentContext dc, URI absoluteURI)
Description copied from class:AppClientDeployerHelperReturns a relative URI within the app directory for the specified absolute URI.- Specified by:
URIWithinAppDirin classAppClientDeployerHelper- Returns:
-
pathToAppclientWithinApp
public String pathToAppclientWithinApp(DeploymentContext dc)
Description copied from class:AppClientDeployerHelperReturns 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:
pathToAppclientWithinAppin classAppClientDeployerHelper- Returns:
-
facadeClassPath
protected String facadeClassPath()
Description copied from class:AppClientDeployerHelperReturns the class path to be stored in the manifest for the generated facade JAR file.- Specified by:
facadeClassPathin classAppClientDeployerHelper- Returns:
-
copyOriginalAppClientJAR
protected void copyOriginalAppClientJAR(DeploymentContext dc) throws IOException
- Throws:
IOException
-
PUScanTargets
protected String PUScanTargets()
- Specified by:
PUScanTargetsin classAppClientDeployerHelper
-
-