StaticContentpublic class StaticContent extends Content Represents content that does not change from one request for it to the next. |
Fields Summary |
---|
private URI | relativeURIa URI relative to the install root URI of the app server installation | private boolean | isMainJarFileindicates if this static content should be marked as the main jar file
in a JNLP document |
Constructors Summary |
---|
public StaticContent(ContentOrigin origin, String contentKey, String path, File file, URI installRootURI, boolean isMainJarFile)Returns a new instance of StaticContent
super(origin, contentKey, path);
URI fileURI = file.toURI();
relativeURI = installRootURI.relativize(fileURI);
this.isMainJarFile = isMainJarFile;
|
Methods Summary |
---|
public java.lang.String | asJNLPJarElement()Returns a string expression suitable for inclusion in a JNLP document
listing this jar file.
String fullPath = "${request.scheme}://${request.host}:${request.port}" +
NamingConventions.fullJarPath(getContentKey());
return " <jar href=\"" + fullPath + "\" " + getMainExpr() + "/>" + lineSep;
| public java.lang.String | getMainExpr()Returns a string expression suitable for use in a JNLP document's
element for whether this represents the main jar file of the application.
String result;
if (isMainJarFile) {
result = " main=\"true\"";
} else {
result = "";
}
return result;
| public java.net.URI | getRelativeURI()Retrieves the content's URI relative to the product's installation root.
return relativeURI;
| public java.lang.String | toString()Returns a string representation of the StaticContent instance.
String result = super.toString() + ", relative URI=" + getRelativeURI() + ", isMain=" + isMainJarFile;
return result;
|
|