diff --git a/guacamole/src/main/java/org/glyptodon/guacamole/net/basic/extension/Extension.java b/guacamole/src/main/java/org/glyptodon/guacamole/net/basic/extension/Extension.java index ea990351f..517e9c085 100644 --- a/guacamole/src/main/java/org/glyptodon/guacamole/net/basic/extension/Extension.java +++ b/guacamole/src/main/java/org/glyptodon/guacamole/net/basic/extension/Extension.java @@ -89,6 +89,12 @@ public class Extension { */ private final Map 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 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 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 diff --git a/guacamole/src/main/java/org/glyptodon/guacamole/net/basic/extension/ExtensionManifest.java b/guacamole/src/main/java/org/glyptodon/guacamole/net/basic/extension/ExtensionManifest.java index 6d121b7a9..750d7aa54 100644 --- a/guacamole/src/main/java/org/glyptodon/guacamole/net/basic/extension/ExtensionManifest.java +++ b/guacamole/src/main/java/org/glyptodon/guacamole/net/basic/extension/ExtensionManifest.java @@ -67,6 +67,12 @@ public class ExtensionManifest { */ private Collection cssPaths; + /** + * The paths of all HTML patch resources within the .jar of the extension + * associated with this manifest. + */ + private Collection 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 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 htmlPatchPaths) { + this.htmlPaths = htmlPatchPaths; + } + /** * Returns the paths to all translation resources within the extension. * These paths are defined within the manifest by the "translations"