mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
GUAC-1378: Add "html" property to manifest.
This commit is contained in:
@@ -89,6 +89,12 @@ public class Extension {
|
||||
*/
|
||||
private final Map<String, Resource> cssResources;
|
||||
|
||||
/**
|
||||
* Map of all HTML patch resources defined within the extension, where each
|
||||
* key is the path to that resource within the extension.
|
||||
*/
|
||||
private final Map<String, Resource> htmlResources;
|
||||
|
||||
/**
|
||||
* Map of all translation resources defined within the extension, where
|
||||
* each key is the path to that resource within the extension.
|
||||
@@ -352,6 +358,7 @@ public class Extension {
|
||||
// Define static resources
|
||||
cssResources = getClassPathResources("text/css", manifest.getCSSPaths());
|
||||
javaScriptResources = getClassPathResources("text/javascript", manifest.getJavaScriptPaths());
|
||||
htmlResources = getClassPathResources("text/html", manifest.getHTMLPaths());
|
||||
translationResources = getClassPathResources("application/json", manifest.getTranslationPaths());
|
||||
staticResources = getClassPathResources(manifest.getResourceTypes());
|
||||
|
||||
@@ -431,6 +438,19 @@ public class Extension {
|
||||
return cssResources;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a map of all declared HTML patch resources associated with this
|
||||
* extension, where the key of each entry in the map is the path to that
|
||||
* resource within the extension .jar. HTML patch resources are declared
|
||||
* within the extension manifest.
|
||||
*
|
||||
* @return
|
||||
* All declared HTML patch resources associated with this extension.
|
||||
*/
|
||||
public Map<String, Resource> getHTMLResources() {
|
||||
return htmlResources;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a map of all declared translation resources associated with this
|
||||
* extension, where the key of each entry in the map is the path to that
|
||||
|
@@ -67,6 +67,12 @@ public class ExtensionManifest {
|
||||
*/
|
||||
private Collection<String> cssPaths;
|
||||
|
||||
/**
|
||||
* The paths of all HTML patch resources within the .jar of the extension
|
||||
* associated with this manifest.
|
||||
*/
|
||||
private Collection<String> htmlPaths;
|
||||
|
||||
/**
|
||||
* The paths of all translation JSON files within this extension, if any.
|
||||
*/
|
||||
@@ -232,6 +238,36 @@ public class ExtensionManifest {
|
||||
this.cssPaths = cssPaths;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the paths to all HTML patch resources within the extension. These
|
||||
* paths are defined within the manifest by the "html" property as an array
|
||||
* of strings, where each string is a path relative to the root of the
|
||||
* extension .jar.
|
||||
*
|
||||
* @return
|
||||
* A collection of paths to all HTML patch resources within the
|
||||
* extension.
|
||||
*/
|
||||
@JsonProperty("html")
|
||||
public Collection<String> getHTMLPaths() {
|
||||
return htmlPaths;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the paths to all HTML patch resources within the extension. These
|
||||
* paths are defined within the manifest by the "html" property as an array
|
||||
* of strings, where each string is a path relative to the root of the
|
||||
* extension .jar.
|
||||
*
|
||||
* @param htmlPatchPaths
|
||||
* A collection of paths to all HTML patch resources within the
|
||||
* extension.
|
||||
*/
|
||||
@JsonProperty("html")
|
||||
public void setHTMLPaths(Collection<String> htmlPatchPaths) {
|
||||
this.htmlPaths = htmlPatchPaths;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the paths to all translation resources within the extension.
|
||||
* These paths are defined within the manifest by the "translations"
|
||||
|
Reference in New Issue
Block a user