You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@guacamole.apache.org by mj...@apache.org on 2016/03/20 03:22:11 UTC
[31/50] incubator-guacamole-client git commit: GUAC-1378: Add "html"
property to manifest.
GUAC-1378: Add "html" property to manifest.
Project: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/commit/29a07158
Tree: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/tree/29a07158
Diff: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/diff/29a07158
Branch: refs/heads/master
Commit: 29a071587bfd7ef247b4a8f36a9a38b32c53a02d
Parents: c01e8c6
Author: Michael Jumper <mi...@guac-dev.org>
Authored: Fri Feb 19 00:06:49 2016 -0800
Committer: Michael Jumper <mi...@guac-dev.org>
Committed: Fri Feb 19 00:16:59 2016 -0800
----------------------------------------------------------------------
.../net/basic/extension/Extension.java | 20 +++++++++++
.../net/basic/extension/ExtensionManifest.java | 36 ++++++++++++++++++++
2 files changed, 56 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/29a07158/guacamole/src/main/java/org/glyptodon/guacamole/net/basic/extension/Extension.java
----------------------------------------------------------------------
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 ea99035..517e9c0 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
@@ -90,6 +90,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());
@@ -432,6 +439,19 @@ public class Extension {
}
/**
+ * 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
* resource within the extension .jar. Translation resources are declared
http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/29a07158/guacamole/src/main/java/org/glyptodon/guacamole/net/basic/extension/ExtensionManifest.java
----------------------------------------------------------------------
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 6d121b7..750d7aa 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
@@ -68,6 +68,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.
*/
private Collection<String> translationPaths;
@@ -233,6 +239,36 @@ public class ExtensionManifest {
}
/**
+ * 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"
* property as an array of strings, where each string is a path relative to