Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/andrehertwig/admintool i…
Browse files Browse the repository at this point in the history
…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
andrehertwig committed Apr 22, 2018
2 parents 31d7d5c + fdffb2d commit 80e07d6
Show file tree
Hide file tree
Showing 59 changed files with 6,881 additions and 5,815 deletions.
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@
This is just a spare-time project. The usage of this tool (especially in production systems) is at your own risk.

Last Release: 1.1.6.1 - 18.01.2018
Prev Release: 1.1.6.1 - 18.01.2018

Prev Release: 1.1.6.2 - 20.03.2018


Prev Release: 1.1.6.3 - 03.04.2018

Last Release: 1.1.6.4 - 08.04.2018

[![Maven Central](https://img.shields.io/maven-central/v/de.chandre.admin-tools/admin-tools-core.svg)](https://mvnrepository.com/artifact/de.chandre.admin-tools)
[![GitHub issues](https://img.shields.io/github/issues/andrehertwig/admintool.svg)](https://github.com/andrehertwig/admintool/issues)
Expand Down Expand Up @@ -58,7 +65,7 @@ Last Release: 1.1.6.1 - 18.01.2018

## Based on
* [Spring Boot 1.3.*](http://projects.spring.io/spring-boot/)
* Since 1.1.2 also Spring Boot 1.4.* is supported
* Since 1.1.2 also Spring Boot 1.4.*+ is supported
* [Admin LTE](https://almsaeedstudio.com/preview)
* [Thymeleaf](http://www.thymeleaf.org/)

Expand All @@ -79,7 +86,7 @@ Include the dependencies in your dependency management. You can find it in [Mave
<dependency>
<groupId>de.chandre.admin-tools</groupId>
<artifactId>admin-tools-core</artifactId>
<version>1.1.6.1</version>
<version>1.1.6.4</version>
</dependency>
...
```
Expand Down
2 changes: 1 addition & 1 deletion admin-tools-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<dependency>
<groupId>de.chandre.admin-tools</groupId>
<artifactId>admin-tools-core</artifactId>
<version>1.1.6.1</version>
<version>1.1.6.4</version>
</dependency>
```

Expand Down
271 changes: 139 additions & 132 deletions admin-tools-core/src/main/java/de/chandre/admintool/core/AdminTool.java
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();
}
Loading

0 comments on commit 80e07d6

Please sign in to comment.