X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=org.argeo.api%2Fsrc%2Forg%2Fargeo%2Fapi%2Fcms%2FCmsTheme.java;fp=org.argeo.api%2Fsrc%2Forg%2Fargeo%2Fapi%2Fcms%2FCmsTheme.java;h=50c3b1f251e770a8880f10cd3ab9fd5ca0dc9693;hb=b7683883512d924a039a43c2e1102290aa49f64d;hp=0000000000000000000000000000000000000000;hpb=03f646fd0d7e7ce393694c836c779bc67a4eef55;p=lgpl%2Fargeo-commons.git
diff --git a/org.argeo.api/src/org/argeo/api/cms/CmsTheme.java b/org.argeo.api/src/org/argeo/api/cms/CmsTheme.java
new file mode 100644
index 000000000..50c3b1f25
--- /dev/null
+++ b/org.argeo.api/src/org/argeo/api/cms/CmsTheme.java
@@ -0,0 +1,45 @@
+package org.argeo.api.cms;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Set;
+
+/** A CMS theme which can be applied to web apps as well as desktop apps. */
+public interface CmsTheme {
+ /** Unique ID of this theme. */
+ String getThemeId();
+
+ /**
+ * Load a resource as an input stream, base don its relative path, or
+ * null
if not found
+ */
+ InputStream getResourceAsStream(String resourceName) throws IOException;
+
+ /** Relative paths to standard web CSS. */
+ Set getWebCssPaths();
+
+ /** Relative paths to RAP specific CSS. */
+ Set getRapCssPaths();
+
+ /** Relative paths to SWT specific CSS. */
+ Set getSwtCssPaths();
+
+ /** Relative paths to images such as icons. */
+ Set getImagesPaths();
+
+ /** Relative paths to fonts. */
+ Set getFontsPaths();
+
+ /** Tags to be added to the header section of the HTML page. */
+ String getHtmlHeaders();
+
+ /** The HTML body to use. */
+ String getBodyHtml();
+
+ /** The default icon size (typically the smallest). */
+ Integer getDefaultIconSize();
+
+ /** Loads one of the relative path provided by the other methods. */
+ InputStream loadPath(String path) throws IOException;
+
+}