-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' of https://github.com/andrehertwig/admintool i…
…nto develop # Conflicts: # admin-tools-demo-core/pom.xml # admin-tools-demo-core/src/main/java/de/chandre/admintool/Beans.java # admin-tools-demo-jar/pom.xml # admin-tools-demo-war/pom.xml # admin-tools-security/admin-tools-security-commons/src/main/java/de/chandre/admintool/security/commons/TemplateUserService.java # admin-tools-security/admin-tools-security-commons/src/main/java/de/chandre/admintool/security/commons/TemplateUserServiceImpl.java
- Loading branch information
Showing
59 changed files
with
6,881 additions
and
5,815 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
271 changes: 139 additions & 132 deletions
271
admin-tools-core/src/main/java/de/chandre/admintool/core/AdminTool.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,132 +1,139 @@ | ||
package de.chandre.admintool.core; | ||
|
||
import java.util.Comparator; | ||
import java.util.Map; | ||
import java.util.Set; | ||
|
||
import de.chandre.admintool.core.component.AdminComponent; | ||
|
||
/** | ||
* AdminTool core interface to get and add components.<br> | ||
* a component represents a main menu entry with possible sub menu entries<br> | ||
* it's also possible to add custom java scripts and css | ||
* | ||
* @author Andre | ||
* | ||
*/ | ||
public interface AdminTool { | ||
|
||
/** | ||
* just a slash | ||
*/ | ||
String SLASH = "/"; | ||
/** | ||
* name of admintool. | ||
*/ | ||
String ROOTCONTEXT_NAME = "admintool"; | ||
|
||
/** | ||
* root context path with a leading slash | ||
*/ | ||
String ROOTCONTEXT = SLASH + ROOTCONTEXT_NAME; | ||
|
||
/** | ||
* path to default error template: admintool/content/error | ||
*/ | ||
String GENERIC_ERROR_TPL_PATH = ROOTCONTEXT_NAME + SLASH + "content" + SLASH + "error"; | ||
|
||
/** | ||
* template name of "deactivated" template | ||
*/ | ||
String GENERIC_DEACTIVATED_TEMPLATE_NAME = "deactivated"; | ||
/** | ||
* template path to default deactivated template | ||
*/ | ||
String GENERIC_DEACTIVATED_TEMPLATE_TPL_PATH = ROOTCONTEXT_NAME + SLASH + GENERIC_DEACTIVATED_TEMPLATE_NAME; | ||
|
||
/** | ||
* prefix for for resource messages | ||
* @since 1.1.6 | ||
*/ | ||
String RESOURCE_MESSAGE_KEY_PREFIX = "ui." + ROOTCONTEXT_NAME + ".core."; | ||
|
||
/** | ||
* to set a custom comparator for ordering components. | ||
* | ||
* @since 1.0.1 | ||
* @param comparator own comparator or null. if null the default compare implementation of AdminComponent will be used | ||
*/ | ||
void setComponentComparator(Comparator<AdminComponent> comparator); | ||
|
||
/** | ||
* | ||
* @return | ||
*/ | ||
public Set<AdminComponent> getComponents(); | ||
|
||
/** | ||
* | ||
* @param components | ||
*/ | ||
public void addComponent(AdminComponent components); | ||
|
||
/** | ||
* | ||
* @param components | ||
*/ | ||
public void addComponents(Set<AdminComponent> components); | ||
|
||
/** | ||
* A map with script url as key and a boolean if it's a relative url<br> | ||
* Example:<br> | ||
* <code> | ||
* getGlobalJavaScripts().put("/static/myComponent/js/myScript.js", true);<br> | ||
* getGlobalJavaScripts().put("http://example.com/script.js", false); | ||
* </code> | ||
* @return | ||
*/ | ||
public Map<String, Boolean> getGlobalJavaScripts(); | ||
|
||
/** | ||
* Example:<br> | ||
* <code> | ||
* addGlobalJavaScript("/static/myComponent/js/myScript.js", true);<br> | ||
* addGlobalJavaScript("http://example.com/script.js", false); | ||
* </code> | ||
* | ||
* @param globalJavaScript | ||
* @param relative if url is relative (not absolute) and pointing to the server | ||
*/ | ||
public void addGlobalJavaScript(String globalJavaScript, boolean relative); | ||
|
||
/** | ||
* A map with css url as key and a boolean if it's a relative url | ||
* Example:<br> | ||
* <code> | ||
* getGlobalStyleSheets().put("/static/myComponent/css/myStyles.css", true);<br> | ||
* getGlobalStyleSheets().put("http://example.com/styles.css", false); | ||
* </code> | ||
* @return | ||
*/ | ||
public Map<String, Boolean> getGlobalStyleSheets(); | ||
|
||
/** | ||
* Example:<br> | ||
* <code> | ||
* addGlobalStyleSheet("/static/myComponent/css/myStyles.css", true);<br> | ||
* addGlobalStyleSheet("http://example.com/styles.css", false); | ||
* </code> | ||
* | ||
* @param globalStyleSheet | ||
* @param relative if url is relative (not absolute) and pointing to the server | ||
*/ | ||
public void addGlobalStyleSheet(String globalStyleSheet, boolean relative); | ||
|
||
/** | ||
* searches for a menuEntry with specified name | ||
* @since 1.0.1 | ||
* @param menuName | ||
* @return null or MenuEntrySearchResult | ||
*/ | ||
MenuEntrySearchResult searchComponent(String menuName); | ||
} | ||
package de.chandre.admintool.core; | ||
|
||
import java.util.Comparator; | ||
import java.util.Map; | ||
import java.util.Set; | ||
|
||
import de.chandre.admintool.core.component.AdminComponent; | ||
|
||
/** | ||
* AdminTool core interface to get and add components.<br> | ||
* a component represents a main menu entry with possible sub menu entries<br> | ||
* it's also possible to add custom java scripts and css | ||
* | ||
* @author Andre | ||
* | ||
*/ | ||
public interface AdminTool { | ||
|
||
/** | ||
* just a slash | ||
*/ | ||
String SLASH = "/"; | ||
/** | ||
* name of admintool. | ||
*/ | ||
String ROOTCONTEXT_NAME = "admintool"; | ||
|
||
/** | ||
* root context path with a leading slash | ||
*/ | ||
String ROOTCONTEXT = SLASH + ROOTCONTEXT_NAME; | ||
|
||
/** | ||
* path to default error template: admintool/content/error | ||
*/ | ||
String GENERIC_ERROR_TPL_PATH = ROOTCONTEXT_NAME + SLASH + "content" + SLASH + "error"; | ||
|
||
/** | ||
* template name of "deactivated" template | ||
*/ | ||
String GENERIC_DEACTIVATED_TEMPLATE_NAME = "deactivated"; | ||
/** | ||
* template path to default deactivated template | ||
*/ | ||
String GENERIC_DEACTIVATED_TEMPLATE_TPL_PATH = ROOTCONTEXT_NAME + SLASH + GENERIC_DEACTIVATED_TEMPLATE_NAME; | ||
|
||
/** | ||
* prefix for for resource messages | ||
* @since 1.1.6 | ||
*/ | ||
String RESOURCE_MESSAGE_KEY_PREFIX = "ui." + ROOTCONTEXT_NAME + ".core."; | ||
|
||
/** | ||
* to set a custom comparator for ordering components. | ||
* | ||
* @since 1.0.1 | ||
* @param comparator own comparator or null. if null the default compare implementation of AdminComponent will be used | ||
*/ | ||
void setComponentComparator(Comparator<AdminComponent> comparator); | ||
|
||
/** | ||
* | ||
* @return | ||
*/ | ||
Set<AdminComponent> getComponents(); | ||
|
||
/** | ||
* | ||
* @param components | ||
*/ | ||
void addComponent(AdminComponent components); | ||
|
||
/** | ||
* | ||
* @param components | ||
*/ | ||
void addComponents(Set<AdminComponent> components); | ||
|
||
/** | ||
* A map with script url as key and a boolean if it's a relative url<br> | ||
* Example:<br> | ||
* <code> | ||
* getGlobalJavaScripts().put("/static/myComponent/js/myScript.js", true);<br> | ||
* getGlobalJavaScripts().put("http://example.com/script.js", false); | ||
* </code> | ||
* @return | ||
*/ | ||
Map<String, Boolean> getGlobalJavaScripts(); | ||
|
||
/** | ||
* Example:<br> | ||
* <code> | ||
* addGlobalJavaScript("/static/myComponent/js/myScript.js", true);<br> | ||
* addGlobalJavaScript("http://example.com/script.js", false); | ||
* </code> | ||
* | ||
* @param globalJavaScript | ||
* @param relative if url is relative (not absolute) and pointing to the server | ||
*/ | ||
void addGlobalJavaScript(String globalJavaScript, boolean relative); | ||
|
||
/** | ||
* A map with css url as key and a boolean if it's a relative url | ||
* Example:<br> | ||
* <code> | ||
* getGlobalStyleSheets().put("/static/myComponent/css/myStyles.css", true);<br> | ||
* getGlobalStyleSheets().put("http://example.com/styles.css", false); | ||
* </code> | ||
* @return | ||
*/ | ||
Map<String, Boolean> getGlobalStyleSheets(); | ||
|
||
/** | ||
* Example:<br> | ||
* <code> | ||
* addGlobalStyleSheet("/static/myComponent/css/myStyles.css", true);<br> | ||
* addGlobalStyleSheet("http://example.com/styles.css", false); | ||
* </code> | ||
* | ||
* @param globalStyleSheet | ||
* @param relative if url is relative (not absolute) and pointing to the server | ||
*/ | ||
void addGlobalStyleSheet(String globalStyleSheet, boolean relative); | ||
|
||
/** | ||
* searches for a menuEntry with specified name | ||
* @since 1.0.1 | ||
* @param menuName | ||
* @return null or MenuEntrySearchResult | ||
*/ | ||
MenuEntrySearchResult searchComponent(String menuName); | ||
|
||
/** | ||
* Returns the version of admintool | ||
* @since 1.1.6.3 | ||
* @return admintool version | ||
*/ | ||
String getVersion(); | ||
} |
Oops, something went wrong.