use of org.glassfish.appclient.server.core.jws.servedcontent.StaticContent in project Payara by payara.
the class JavaWebStartInfo method createSignedStaticContent.
private StaticContent createSignedStaticContent(final File unsignedFile, final File signedFile, final URI uriForLookup, final String appName) throws FileNotFoundException {
mkdirs(signedFile.getParentFile());
final StaticContent signedJarContent = new AutoSignedContent(unsignedFile, signedFile, signingAlias, jarSigner, uriForLookup.toASCIIString(), appName);
return signedJarContent;
}
use of org.glassfish.appclient.server.core.jws.servedcontent.StaticContent in project Payara by payara.
the class RestrictedContentAdapter method addContentIfAbsent.
// public String userFriendlyContextRoot() {
// return userFriendlyContextRoot;
// }
public synchronized void addContentIfAbsent(final String relativeURIString, final StaticContent newContent) throws IOException {
final StaticContent existingContent = content.get(relativeURIString);
if (existingContent != null) {
if (!existingContent.equals(newContent)) {
logger.log(Level.FINE, "enterprise.deployment.appclient.jws.staticContentCollision", new Object[] { relativeURIString, newContent.toString() });
}
return;
}
this.content.put(relativeURIString, newContent);
// this.cache.put(relativeURIString, newContent.file());
if (logger.isLoggable(Level.FINE)) {
logger.fine(logPrefix() + "adding static content " + relativeURIString + " " + newContent.toString());
}
}
use of org.glassfish.appclient.server.core.jws.servedcontent.StaticContent in project Payara by payara.
the class NestedAppClientDeployerHelper method createAndAddLibraryJNLPs.
@Override
public void createAndAddLibraryJNLPs(final AppClientDeployerHelper helper, final TokenHelper tHelper, final Map<String, DynamicContent> dynamicContent) throws IOException {
/*
* For each group of like-signed library JARs create a separate JNLP for
* the group and add it to the dynamic content for the client. Also
* build up a property to hold the full list of such generated JNLPs
* so it can be substituted into the generated client JNLP below.
*/
libExtensionElementsForMainDocument = new StringBuilder();
for (Map.Entry<String, Map<URI, StaticContent>> aliasToContentEntry : signingAliasToJar().entrySet()) {
final String alias = aliasToContentEntry.getKey();
final Map<URI, StaticContent> libURIs = aliasToContentEntry.getValue();
tHelper.setProperty(LIBRARY_SECURITY_PROPERTY_NAME, librarySecurity(alias));
tHelper.setProperty(LIBRARY_JNLP_PATH_PROPERTY_NAME, libJNLPRelPath(alias));
final StringBuilder libJarElements = new StringBuilder();
for (Map.Entry<URI, StaticContent> entry : libURIs.entrySet()) {
final URI uri = entry.getKey();
libJarElements.append("<jar href=\"").append(libJARRelPath(uri)).append("\"/>");
}
tHelper.setProperty(LIBRARY_JARS_PROPERTY_NAME, libJarElements.toString());
JavaWebStartInfo.createAndAddDynamicContent(tHelper, dynamicContent, libJNLPRelPath(alias), LIBRARY_DOCUMENT_TEMPLATE);
libExtensionElementsForMainDocument.append(extensionElement(alias, libJNLPRelPath(alias)));
}
tHelper.setProperty(JavaWebStartInfo.APP_LIBRARY_EXTENSION_PROPERTY_NAME, libExtensionElementsForMainDocument.toString());
}
Aggregations