Search in sources :

Example 1 with FixedContent

use of org.glassfish.appclient.server.core.jws.servedcontent.FixedContent in project Payara by payara.

the class ApplicationSignedJARManager method developerSignedAppContentEntry.

private Map.Entry<URI, StaticContent> developerSignedAppContentEntry(URI absURIToFile) {
    final URI jarURIRelativeToApp = EARDirectoryServerURI.relativize(absURIToFile);
    StaticContent content = relURIToContent.get(absURIToFile);
    if (content == null) {
        content = new FixedContent(new File(absURIToFile));
        relURIToContent.put(jarURIRelativeToApp, content);
    }
    return new AbstractMap.SimpleEntry<URI, StaticContent>(jarURIRelativeToApp, content);
}
Also used : StaticContent(org.glassfish.appclient.server.core.jws.servedcontent.StaticContent) FixedContent(org.glassfish.appclient.server.core.jws.servedcontent.FixedContent) URI(java.net.URI) JarFile(java.util.jar.JarFile) File(java.io.File)

Example 2 with FixedContent

use of org.glassfish.appclient.server.core.jws.servedcontent.FixedContent in project Payara by payara.

the class JavaWebStartInfo method addImageContentIfSpecified.

private void addImageContentIfSpecified(final String imageURIStringWithinAppClient, final String imageURIStringForJNLP, final Map<String, StaticContent> staticContent) {
    if (imageURIStringWithinAppClient == null || imageURIStringWithinAppClient.length() == 0) {
        return;
    }
    final URI absoluteImageURI = dc.getSource().getURI().resolve(imageURIStringWithinAppClient);
    final File imageFile = new File(absoluteImageURI);
    if (!imageFile.exists()) {
        return;
    }
    staticContent.put(imageURIStringForJNLP, new FixedContent(imageFile));
}
Also used : FixedContent(org.glassfish.appclient.server.core.jws.servedcontent.FixedContent) URI(java.net.URI) JarFile(java.util.jar.JarFile) File(java.io.File)

Aggregations

File (java.io.File)2 URI (java.net.URI)2 JarFile (java.util.jar.JarFile)2 FixedContent (org.glassfish.appclient.server.core.jws.servedcontent.FixedContent)2 StaticContent (org.glassfish.appclient.server.core.jws.servedcontent.StaticContent)1