menuEntry = Optional.empty();
+ for (AdminComponent comp : getComponents()) {
+ if (null != comp.getMainMenu()) {
+ menuEntry = comp.getMainMenu().flattened().filter(entry -> null != entry.getName() && entry.getName().equals(menuName)).findFirst();
+ if (menuEntry.isPresent()) {
+ result = new MenuEntrySearchResult(comp, menuEntry.get());
+ break;
+ }
+ }
+ }
+ if (null == result && menuName.lastIndexOf('/') != -1) {
+ result = searchComponent(menuName.substring(0, menuName.lastIndexOf('/')));
+ }
+ return result;
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder builder = new StringBuilder();
+ builder.append("AdminToolImpl [components=").append(components).append(", globalJavaScripts=")
+ .append(globalJavaScripts).append(", globalStyleSheets=").append(globalStyleSheets).append("]");
+ return builder.toString();
+ }
+
+}
diff --git a/admin-tools-core/src/main/resources-filtered/admintool-version.properties b/admin-tools-core/src/main/resources-filtered/admintool-version.properties
new file mode 100644
index 0000000..e5683df
--- /dev/null
+++ b/admin-tools-core/src/main/resources-filtered/admintool-version.properties
@@ -0,0 +1 @@
+version=${project.version}
\ No newline at end of file
diff --git a/admin-tools-core/src/main/resources/templates/admintool/includes/footer.inc.html b/admin-tools-core/src/main/resources/templates/admintool/includes/footer.inc.html
index cc0b01e..5e4f83e 100644
--- a/admin-tools-core/src/main/resources/templates/admintool/includes/footer.inc.html
+++ b/admin-tools-core/src/main/resources/templates/admintool/includes/footer.inc.html
@@ -1,8 +1,8 @@
-
-
-The Admin-UI
-
-Copyright © 2017 AdminTool.
- All rights reserved.
-
+
+
+The Admin-UI
+
+Copyright © 2017 AdminTool.
+ All rights reserved. (Version: )
+
\ No newline at end of file
diff --git a/admin-tools-dbbrowser/README.md b/admin-tools-dbbrowser/README.md
index cdb3736..200aeff 100644
--- a/admin-tools-dbbrowser/README.md
+++ b/admin-tools-dbbrowser/README.md
@@ -32,12 +32,12 @@ Result will be displayed via jquery.datatables
de.chandre.admin-tools
admin-tools-core
- 1.1.6.2
+ 1.1.6.3
de.chandre.admin-tools
admin-tools-dbbrowser
- 1.1.6.2
+ 1.1.6.3
```
diff --git a/admin-tools-demo-core/src/main/java/de/chandre/admintool/jobs/SimpleJob.java b/admin-tools-demo-core/src/main/java/de/chandre/admintool/jobs/SimpleJob.java
index 1bf239c..184bb93 100644
--- a/admin-tools-demo-core/src/main/java/de/chandre/admintool/jobs/SimpleJob.java
+++ b/admin-tools-demo-core/src/main/java/de/chandre/admintool/jobs/SimpleJob.java
@@ -1,39 +1,41 @@
-package de.chandre.admintool.jobs;
-
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-import org.quartz.Job;
-import org.quartz.JobExecutionContext;
-
-/**
- * simple example of Quartz job
- * @author Andre
- *
- */
-public class SimpleJob implements Job
-{
- private static final Logger LOGGER = LogManager.getFormatterLogger(SimpleJob.class);
-
- @Override
- public void execute(JobExecutionContext jobExecutionContext) {
- LOGGER.info("start executing job: %s", jobExecutionContext.getJobDetail().getKey().getName());
- try {
- Thread.sleep(20000L);
- } catch (InterruptedException e) {
- LOGGER.error(e.getMessage(), e);
- }
- LOGGER.info("I'm div
");
- LOGGER.warn("Warning with umlauts äöü &");
- LOGGER.info("I'm a XML");
- LOGGER.info("finished executing job: %s", jobExecutionContext.getJobDetail().getKey().getName());
-
- StackTraceElement[] trace = Thread.currentThread().getStackTrace();
- if (null != trace) {
- StringBuilder traceStr = new StringBuilder("Example Trace");
- for (StackTraceElement stackTraceElement : trace) {
- traceStr.append("\n").append(stackTraceElement.toString());
- }
- LOGGER.error(traceStr);
- }
- }
-}
+package de.chandre.admintool.jobs;
+
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.quartz.DisallowConcurrentExecution;
+import org.quartz.Job;
+import org.quartz.JobExecutionContext;
+
+/**
+ * simple example of Quartz job
+ * @author Andre
+ *
+ */
+@DisallowConcurrentExecution
+public class SimpleJob implements Job
+{
+ private static final Logger LOGGER = LogManager.getFormatterLogger(SimpleJob.class);
+
+ @Override
+ public void execute(JobExecutionContext jobExecutionContext) {
+ LOGGER.info("start executing job: %s", jobExecutionContext.getJobDetail().getKey().getName());
+ try {
+ Thread.sleep(20000L);
+ } catch (InterruptedException e) {
+ LOGGER.error(e.getMessage(), e);
+ }
+ LOGGER.info("I'm div
");
+ LOGGER.warn("Warning with umlauts äöü &");
+ LOGGER.info("I'm a XML");
+ LOGGER.info("finished executing job: %s", jobExecutionContext.getJobDetail().getKey().getName());
+
+ StackTraceElement[] trace = Thread.currentThread().getStackTrace();
+ if (null != trace) {
+ StringBuilder traceStr = new StringBuilder("Example Trace");
+ for (StackTraceElement stackTraceElement : trace) {
+ traceStr.append("\n").append(stackTraceElement.toString());
+ }
+ LOGGER.error(traceStr);
+ }
+ }
+}
diff --git a/admin-tools-demo-core/src/main/resources/templates/admintool/includes/footer.inc.html b/admin-tools-demo-core/src/main/resources/templates/admintool/includes/footer.inc.html
index 137f79c..e426cb2 100644
--- a/admin-tools-demo-core/src/main/resources/templates/admintool/includes/footer.inc.html
+++ b/admin-tools-demo-core/src/main/resources/templates/admintool/includes/footer.inc.html
@@ -1,8 +1,8 @@
-
-
-Just Test it!
-
-Copyright © 2017 Demo Admin App.
- All rights reserved.
-
+
+
+Just Test it!
+
+Copyright © 2017 Demo Admin App.
+ All rights reserved. (Version: )
+
\ No newline at end of file
diff --git a/admin-tools-filebrowser/README.md b/admin-tools-filebrowser/README.md
index ec5e6ea..95e587e 100644
--- a/admin-tools-filebrowser/README.md
+++ b/admin-tools-filebrowser/README.md
@@ -34,12 +34,12 @@
de.chandre.admin-tools
admin-tools-core
- 1.1.6.2
+ 1.1.6.3
de.chandre.admin-tools
admin-tools-filebrowser
- 1.1.6.2
+ 1.1.6.3
```
diff --git a/admin-tools-jminix/README.md b/admin-tools-jminix/README.md
index 5df30ac..1d1a2f1 100644
--- a/admin-tools-jminix/README.md
+++ b/admin-tools-jminix/README.md
@@ -12,12 +12,12 @@
de.chandre.admin-tools
admin-tools-core
- 1.1.6.2
+ 1.1.6.3
de.chandre.admin-tools
admin-tools-jminix
- 1.1.6.2
+ 1.1.6.3
```
diff --git a/admin-tools-jminix/src/main/java/de/chandre/admintool/jminix/AdminToolJminixLoader.java b/admin-tools-jminix/src/main/java/de/chandre/admintool/jminix/AdminToolJminixLoader.java
index 57d2c80..998dc5c 100644
--- a/admin-tools-jminix/src/main/java/de/chandre/admintool/jminix/AdminToolJminixLoader.java
+++ b/admin-tools-jminix/src/main/java/de/chandre/admintool/jminix/AdminToolJminixLoader.java
@@ -1,66 +1,62 @@
-package de.chandre.admintool.jminix;
-
-import javax.annotation.PostConstruct;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import de.chandre.admintool.core.AbstractAdminToolLoader;
-import de.chandre.admintool.core.AdminTool;
-import de.chandre.admintool.core.component.AdminComponent;
-import de.chandre.admintool.core.component.AdminComponentImpl;
-import de.chandre.admintool.core.component.MenuEntry;
-
-/**
- * @author Andre
- */
-@Component
-public class AdminToolJminixLoader extends AbstractAdminToolLoader
-{
- private static final Log LOGGER = LogFactory.getLog(AdminToolJminixLoader.class);
-
- @Autowired
- private AdminTool adminTool;
-
- @Autowired
- private AdminToolJminixConfig config;
-
- @PostConstruct
- public void configureAdminTool()
- {
- if(!coreConfig.isEnabled() || !config.isEnabled()) {
- LOGGER.info("admin tool's jminix browser is deactivated");
- return;
- }
-
- LOGGER.info("adding JMX Console to admin tool");
- LOGGER.debug(toString());
- boolean relative = !shouldCDNsUsed();
-
- AdminComponent component = new AdminComponentImpl();
- component.setPosition(config.getComponentPosition());
- component.getSecurityRoles().addAll(config.getSecurityRoles());
- component.setDisplayName("JMX Console");
-
- component.addAdditionalJS(getWebjarsPrefixUri() + "mustache/" + config.getMustacheVersion() + "/mustache.min.js", relative);
- component.addAdditionalJS(getWebjarsPrefixUri() + "jstree/" + config.getJsTreeVersion() + "/dist/jstree.js", relative);
-
- component.addAdditionalJS("/static/admintool/jmx/js/jquery-resizable.js", true);
- component.addAdditionalJS("/static/admintool/jmx/js/jmx.js", true);
-
- component.addAdditionalCSS(getWebjarsPrefixUri() + "jstree/" + config.getJsTreeVersion()+ "/dist/themes/default/style.css", relative);
- component.addAdditionalCSS("/static/admintool/jmx/css/jmx.css", true);
-
-
- MenuEntry mainMenu = new MenuEntry();
- mainMenu.setDisplayName("JMX");
- mainMenu.setName("jmx");
- mainMenu.setTarget("content/jmx/jmx");
- mainMenu.setResouceMessageKey(AdminTool.RESOURCE_MESSAGE_KEY_PREFIX + "jmx.displayName");
- component.setMainMenu(mainMenu);
-
- adminTool.addComponent(component);
- }
-}
+package de.chandre.admintool.jminix;
+
+import javax.annotation.PostConstruct;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import de.chandre.admintool.core.AbstractAdminToolLoader;
+import de.chandre.admintool.core.AdminTool;
+import de.chandre.admintool.core.component.AdminComponent;
+import de.chandre.admintool.core.component.AdminComponentImpl;
+import de.chandre.admintool.core.component.MenuEntry;
+
+/**
+ * @author Andre
+ */
+@Component
+public class AdminToolJminixLoader extends AbstractAdminToolLoader
+{
+ private static final Log LOGGER = LogFactory.getLog(AdminToolJminixLoader.class);
+
+ @Autowired
+ private AdminTool adminTool;
+
+ @Autowired
+ private AdminToolJminixConfig config;
+
+ @PostConstruct
+ public void configureAdminTool()
+ {
+ if(!coreConfig.isEnabled() || !config.isEnabled()) {
+ LOGGER.info("admin tool's jminix browser is deactivated");
+ return;
+ }
+
+ LOGGER.info("adding JMX Console to admin tool");
+ LOGGER.debug(toString());
+ boolean relative = !shouldCDNsUsed();
+
+ AdminComponent component = new AdminComponentImpl();
+ component.setPosition(config.getComponentPosition());
+ component.getSecurityRoles().addAll(config.getSecurityRoles());
+ component.setDisplayName("JMX Console");
+
+ component.addAdditionalJS(getWebjarsBowerPrefixUri() + "mustache/" + config.getMustacheVersion() + "/mustache.min.js", relative);
+ component.addAdditionalJS(getWebjarsBowerPrefixUri() + "jstree/" + config.getJsTreeVersion() + "/dist/jstree.js", relative);
+
+ component.addAdditionalJS("/static/admintool/jmx/js/jquery-resizable.js", true);
+ component.addAdditionalJS("/static/admintool/jmx/js/jmx.js", true);
+
+ component.addAdditionalCSS(getWebjarsBowerPrefixUri() + "jstree/" + config.getJsTreeVersion() + "/dist/themes/default/style.css", relative);
+ component.addAdditionalCSS("/static/admintool/jmx/css/jmx.css", true);
+
+ component.setMainMenu(
+ MenuEntry.builder().displayName("JMX").name("jmx").target("content/jmx/jmx").resouceMessageKeySuffix("jmx.displayName")
+ .build());
+
+ adminTool.addComponent(component);
+ }
+}
diff --git a/admin-tools-jminix/src/main/resources/static/admintool/jminix.css b/admin-tools-jminix/src/main/resources/static/admintool/jminix.css
deleted file mode 100644
index b1d8e8a..0000000
--- a/admin-tools-jminix/src/main/resources/static/admintool/jminix.css
+++ /dev/null
@@ -1,15 +0,0 @@
-.fluidMedia {
- position: relative;
- padding-bottom: 56.25%; /* proportion value to aspect ratio 16:9 (9 / 16 = 0.5625 or 56.25%) */
- padding-top: 30px;
- height: 0;
- overflow: hidden;
-}
-
-.fluidMedia iframe {
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
-}
diff --git a/admin-tools-jminix/src/main/resources/static/admintool/jmx/js/jmx.js b/admin-tools-jminix/src/main/resources/static/admintool/jmx/js/jmx.js
index 2d8fa45..54a6f87 100644
--- a/admin-tools-jminix/src/main/resources/static/admintool/jmx/js/jmx.js
+++ b/admin-tools-jminix/src/main/resources/static/admintool/jmx/js/jmx.js
@@ -1,333 +1,329 @@
-
-AdminTool.Jmx = function(el, options) {
- if (el) {
- this.init(el, options)
- }
-}
-AdminTool.Jmx.prototype = new AdminTool.Core();
-
-$.extend(AdminTool.Jmx.prototype, {
-
- name : 'adminToolJmx',
-
- postInit: function() {
- this.initJsTree()
- },
-
- initJsTree: function() {
-
- $('#jmxTree').on("changed.jstree", $.proxy(this.selectNode, this)).jstree({
- 'core' : {
- 'data' : {
- 'url' : getWebContext() + '/admintool/jmx/tree',
- 'data' : function (node) {
- return { 'id' : node.id };
- }
- }
- },
- 'types' : {
- 'server' : {
- 'icon' : 'fa fa-server'
- },
- 'domain' : {
- 'icon' : 'fa fa-folder-o'
- },
- 'mbean' : {
- 'icon' : 'fa fa-coffee'
- },
- 'attributes' : {
- 'icon' : 'fa fa-cubes'
- },
- 'attribute' : {
- 'icon' : 'fa fa-cube'
- },
- 'operations' : {
- 'icon' : 'fa fa-cogs'
- },
- 'operation' : {
- 'icon' : 'fa fa-cog'
- },
- },
- "plugins" : [
- "state", "search", "types", "wholerow"
- ]
- });
- },
-
- selectNode: function(e, data) {
- if(data.selected.length) {
-
- var selectedNode = data.instance.get_node(data.selected[0]);
- if (selectedNode.type == 'attributes') {
-
- console.log('The selected node is: ' + selectedNode.text);
- console.log('The selected parent is: ' + selectedNode.parent);
- console.log('The selected parents parent is: ' + data.instance.get_node(selectedNode.parent).parent);
-
- var domain = this.getParent(data, selectedNode.parent);
- var queryData = {
- 'mbean' : selectedNode.parent,
- 'domain' : domain,
- 'server' : this.getParent(data, domain)
- };
-
- console.log(queryData);
-
- this.sendRequest(
- {
- url: getWebContext() + "/admintool/jmx/attributes",
- requestType:'POST',
- dataType: "json",
- data: JSON.stringify(queryData),
- my: this
- },
- $.proxy(this.viewAttributeList, this));
-
- } else if (selectedNode.type == 'attribute' || selectedNode.type == 'operation') {
-
- console.log('The selected node is: ' + selectedNode.text);
- try {
- var mbeanType = this.getParent(null, selectedNode);
-
- var isAttribute = mbeanType.indexOf("_attributes") !== -1;
- var mbean = this.getParent(data, mbeanType);
- var domain = this.getParent(data, mbean);
- var server = this.getParent(data, domain);
-
- var queryData = {
- 'name' : selectedNode.text,
- 'mbean' : mbean,
- 'domain' : domain,
- 'server' : server
- };
- console.log(queryData);
-
- if(isAttribute) {
- this.loadAttribute(queryData);
- } else {
- this.sendRequest(
- {
- url: getWebContext() + "/admintool/jmx/operation",
- requestType:'POST',
- dataType: "json",
- data: JSON.stringify(queryData),
- my: this
- },
- $.proxy(this.viewOperation, this));
- }
-
- } catch (e) {
- console.log(e)
- }
- }
- }
- },
-
- getParent: function(selectedNode) {
- return selectedNode.parent;
- },
-
- getParent: function(data, currentNode) {
- if (null == data) {
- return currentNode.parent;
- }
- return data.instance.get_node(currentNode).parent;
- },
-
- loadAttribute: function(queryData) {
- this.sendRequest(
- {
- url: getWebContext() + "/admintool/jmx/attribute",
- requestType:'POST',
- dataType: "json",
- data: JSON.stringify(queryData),
- showModalOnError: true,
- showXHRErrorInModal: true,
- my: this,
- },
- $.proxy(this.viewAttributeList, this));
- },
-
- viewAttributeList: function(data, query) {
- var result = "";
- var orgData = JSON.parse(query.data);
- if (data && data.methods && data.methods.length > 0) {
-
- for(var i=-1, l=data.methods.length; ++i < l;) {
- var method = data.methods[i];
- if (method.value == null) {
-
- } else if (Array.isArray(method.value) || typeof method.value === 'object') {
- data.methods[i].value = JSON.stringify(method.value, null, "\t");
- }
- }
-
- if(data.methods.length == 1) {
- result = Mustache.render(attributeTpl, data.methods[0]);
- } else {
- data["headline"] = orgData.domain + " - " + orgData.mbean;
- result = Mustache.render(attributeListTpl, data);
- }
- }
- $('#jmxView').html(result);
- $('#jmxView').find('#refreshView').on('click', $.proxy(this.loadAttribute, this, orgData));
- },
-
- viewOperation: function(data, query) {
- console.log(data)
-
- var result = "";
- if (data && data.methods && data.methods.length > 0) {
-
- if(data.success != null && data.success === false) {
- result = Mustache.render(opperationFailedTpl, data.methods[0]);
- } else {
- data.methods[0].success = data.success;
- data.methods[0].successMessage = function () {
- return function (text, render) {
- if (this.success && this.success === true) {
- return ''+
- '' +
- 'Value saved successfully' +
- '
';
- }
- return "";
- }
- }
- result = Mustache.render(opperationsTpl, data.methods[0]);
- }
- }
- $('#jmxView').html(result);
- $('#jmxView').find('#execute').off();
- if (data && (data.success == null || data.success) && data.methods && data.methods.length > 0) {
- $('#jmxView').find('#execute').on('click', $.proxy(
- this.executeOperation, this, data.methods[0], JSON.parse(query.data)));
- }
-
- var msg = $('#jmxView').find('#save_success');
- if (msg && msg.length > 0) {
- window.setTimeout(function() {
- $("#save_success").fadeTo(500, 0).slideUp(500, function(){
- $(this).remove();
- });
- }, 3000);
- }
- },
-
- executeOperation: function(operation, queryData) {
-
- if (operation.parameters && operation.parameters.length > 0) {
- var paramList = [];
- for (var i = -1, l = operation.parameters.length; ++i < l;) {
- var param = operation.parameters[i];
- var parameter = {
- "name" : param.name,
- "type" : param.type,
- "newValue" : $('#jmxView').find(getID(param.name)).val()
- };
- paramList.push(parameter);
- }
- queryData["parameters"] = paramList;
- }
-
- this.sendRequest(
- {
- url: getWebContext() + "/admintool/jmx/operation/execute",
- requestType:'POST',
- dataType: "json",
- data: JSON.stringify(queryData),
- showModalOnError: true,
- showXHRErrorInModal: true,
- my: this,
- },
- $.proxy(this.viewOperation, this));
- }
-});
-
-$.pluginMaker(AdminTool.Jmx);
-
-var attributeListTpl =
- ''+
- '
{{headline}}
'+
- '
'+
- '
'+
- ''+
- '' +
- '{{#methods}}' +
- '' +
- '{{name}} | ' +
- '{{value}} | ' +
- '
' +
- '{{/methods}}' +
- '
';
-Mustache.parse(attributeListTpl);
-
-var attributeTpl =
- ''+
- '
{{name}}
'+
- '
'+
- '
'+
- '' +
- '' +
- 'Description | ' +
- '{{description}} | ' +
- '
' +
- '' +
- 'Type | ' +
- '{{type}} | ' +
- '
' +
- '
'+
- '{{value}}
';
-Mustache.parse(attributeTpl);
-
-var opperationsTpl =
- '{{name}}
'+
- '{{#successMessage}}1{{/successMessage}}' +
- ''+
- ''
- ;
-Mustache.parse(opperationsTpl);
-
-var opperationFailedTpl =
- '{{name}}
'+
- 'Operation failed
'
- ;
-Mustache.parse(opperationFailedTpl);
-
-$( document ).ready(function() {
-
- $(".panel-left").resizable({
- handleSelector: ".splitter",
- resizeHeight: false
- });
-
- $('#jmxContent').adminToolJmx();
-});
-
-$(function () {
- var to = false;
- $('#jmxTreeSearch').keyup(function () {
- if(to) { clearTimeout(to); }
- to = setTimeout(function () {
- var v = $('#jmxTreeSearch').val();
- $('#jmxTree').jstree(true).search(v);
- }, 250);
- });
+
+AdminTool.Jmx = function(el, options) {
+ if (el) {
+ this.init(el, options)
+ }
+}
+AdminTool.Jmx.prototype = new AdminTool.Core();
+
+$.extend(AdminTool.Jmx.prototype, {
+
+ name : 'adminToolJmx',
+
+ postInit: function() {
+ this.initJsTree()
+ },
+
+ initJsTree: function() {
+
+ $('#jmxTree').on("changed.jstree", $.proxy(this.selectNode, this)).jstree({
+ 'core' : {
+ 'data' : {
+ 'url' : getWebContext() + '/admintool/jmx/tree',
+ 'data' : function (node) {
+ return { 'id' : node.id };
+ }
+ }
+ },
+ 'types' : {
+ 'server' : {
+ 'icon' : 'fa fa-server'
+ },
+ 'domain' : {
+ 'icon' : 'fa fa-folder-o'
+ },
+ 'mbean' : {
+ 'icon' : 'fa fa-coffee'
+ },
+ 'attributes' : {
+ 'icon' : 'fa fa-cubes'
+ },
+ 'attribute' : {
+ 'icon' : 'fa fa-cube'
+ },
+ 'operations' : {
+ 'icon' : 'fa fa-cogs'
+ },
+ 'operation' : {
+ 'icon' : 'fa fa-cog'
+ },
+ },
+ "plugins" : [
+ "state", "search", "types", "wholerow"
+ ]
+ });
+ },
+
+ selectNode: function(e, data) {
+ if(data.selected.length) {
+
+ var selectedNode = data.instance.get_node(data.selected[0]);
+ if (selectedNode.type == 'attributes') {
+
+ console.log('The selected node is: ' + selectedNode.text);
+ console.log('The selected parent is: ' + selectedNode.parent);
+ console.log('The selected parents parent is: ' + data.instance.get_node(selectedNode.parent).parent);
+
+ var domain = this.getParent(data, selectedNode.parent);
+ var queryData = {
+ 'mbean' : selectedNode.parent,
+ 'domain' : domain,
+ 'server' : this.getParent(data, domain)
+ };
+
+ console.log(queryData);
+
+ this.sendRequest({
+ url: "/admintool/jmx/attributes",
+ requestType:'POST',
+ dataType: "json",
+ data: JSON.stringify(queryData),
+ my: this
+ },
+ $.proxy(this.viewAttributeList, this));
+
+ } else if (selectedNode.type == 'attribute' || selectedNode.type == 'operation') {
+
+ console.log('The selected node is: ' + selectedNode.text);
+ try {
+ var mbeanType = this.getParent(null, selectedNode);
+
+ var isAttribute = mbeanType.indexOf("_attributes") !== -1;
+ var mbean = this.getParent(data, mbeanType);
+ var domain = this.getParent(data, mbean);
+ var server = this.getParent(data, domain);
+
+ var queryData = {
+ 'name' : selectedNode.text,
+ 'mbean' : mbean,
+ 'domain' : domain,
+ 'server' : server
+ };
+ console.log(queryData);
+
+ if(isAttribute) {
+ this.loadAttribute(queryData);
+ } else {
+ this.sendRequest({
+ url: "/admintool/jmx/operation",
+ requestType:'POST',
+ dataType: "json",
+ data: JSON.stringify(queryData),
+ my: this
+ },
+ $.proxy(this.viewOperation, this));
+ }
+
+ } catch (e) {
+ console.log(e)
+ }
+ }
+ }
+ },
+
+ getParent: function(selectedNode) {
+ return selectedNode.parent;
+ },
+
+ getParent: function(data, currentNode) {
+ if (null == data) {
+ return currentNode.parent;
+ }
+ return data.instance.get_node(currentNode).parent;
+ },
+
+ loadAttribute: function(queryData) {
+ this.sendRequest({
+ url: "/admintool/jmx/attribute",
+ requestType:'POST',
+ dataType: "json",
+ data: JSON.stringify(queryData),
+ showModalOnError: true,
+ showXHRErrorInModal: true,
+ my: this,
+ },
+ $.proxy(this.viewAttributeList, this));
+ },
+
+ viewAttributeList: function(data, query) {
+ var result = "";
+ var orgData = JSON.parse(query.data);
+ if (data && data.methods && data.methods.length > 0) {
+
+ for(var i=-1, l=data.methods.length; ++i < l;) {
+ var method = data.methods[i];
+ if (method.value == null) {
+
+ } else if (Array.isArray(method.value) || typeof method.value === 'object') {
+ data.methods[i].value = JSON.stringify(method.value, null, "\t");
+ }
+ }
+
+ if(data.methods.length == 1) {
+ result = Mustache.render(attributeTpl, data.methods[0]);
+ } else {
+ data["headline"] = orgData.domain + " - " + orgData.mbean;
+ result = Mustache.render(attributeListTpl, data);
+ }
+ }
+ $('#jmxView').html(result);
+ $('#jmxView').find('#refreshView').on('click', $.proxy(this.loadAttribute, this, orgData));
+ },
+
+ viewOperation: function(data, query) {
+ console.log(data)
+
+ var result = "";
+ if (data && data.methods && data.methods.length > 0) {
+
+ if(data.success != null && data.success === false) {
+ result = Mustache.render(opperationFailedTpl, data.methods[0]);
+ } else {
+ data.methods[0].success = data.success;
+ data.methods[0].successMessage = function () {
+ return function (text, render) {
+ if (this.success && this.success === true) {
+ return ''+
+ '' +
+ 'Value saved successfully' +
+ '
';
+ }
+ return "";
+ }
+ }
+ result = Mustache.render(opperationsTpl, data.methods[0]);
+ }
+ }
+ $('#jmxView').html(result);
+ $('#jmxView').find('#execute').off();
+ if (data && (data.success == null || data.success) && data.methods && data.methods.length > 0) {
+ $('#jmxView').find('#execute').on('click', $.proxy(
+ this.executeOperation, this, data.methods[0], JSON.parse(query.data)));
+ }
+
+ var msg = $('#jmxView').find('#save_success');
+ if (msg && msg.length > 0) {
+ window.setTimeout(function() {
+ $("#save_success").fadeTo(500, 0).slideUp(500, function(){
+ $(this).remove();
+ });
+ }, 3000);
+ }
+ },
+
+ executeOperation: function(operation, queryData) {
+
+ if (operation.parameters && operation.parameters.length > 0) {
+ var paramList = [];
+ for (var i = -1, l = operation.parameters.length; ++i < l;) {
+ var param = operation.parameters[i];
+ var parameter = {
+ "name" : param.name,
+ "type" : param.type,
+ "newValue" : $('#jmxView').find(getID(param.name)).val()
+ };
+ paramList.push(parameter);
+ }
+ queryData["parameters"] = paramList;
+ }
+
+ this.sendRequest({
+ url: "/admintool/jmx/operation/execute",
+ requestType:'POST',
+ dataType: "json",
+ data: JSON.stringify(queryData),
+ showModalOnError: true,
+ showXHRErrorInModal: true,
+ my: this,
+ },
+ $.proxy(this.viewOperation, this));
+ }
+});
+
+$.pluginMaker(AdminTool.Jmx);
+
+var attributeListTpl =
+ ''+
+ '
{{headline}}
'+
+ '
'+
+ '
'+
+ ''+
+ '' +
+ '{{#methods}}' +
+ '' +
+ '{{name}} | ' +
+ '{{value}} | ' +
+ '
' +
+ '{{/methods}}' +
+ '
';
+Mustache.parse(attributeListTpl);
+
+var attributeTpl =
+ ''+
+ '
{{name}}
'+
+ '
'+
+ '
'+
+ '' +
+ '' +
+ 'Description | ' +
+ '{{description}} | ' +
+ '
' +
+ '' +
+ 'Type | ' +
+ '{{type}} | ' +
+ '
' +
+ '
'+
+ '{{value}}
';
+Mustache.parse(attributeTpl);
+
+var opperationsTpl =
+ '{{name}}
'+
+ '{{#successMessage}}1{{/successMessage}}' +
+ ''+
+ ''
+ ;
+Mustache.parse(opperationsTpl);
+
+var opperationFailedTpl =
+ '{{name}}
'+
+ 'Operation failed
'
+ ;
+Mustache.parse(opperationFailedTpl);
+
+$( document ).ready(function() {
+
+ $(".panel-left").resizable({
+ handleSelector: ".splitter",
+ resizeHeight: false
+ });
+
+ $('#jmxContent').adminToolJmx();
+});
+
+$(function () {
+ var to = false;
+ $('#jmxTreeSearch').keyup(function () {
+ if(to) { clearTimeout(to); }
+ to = setTimeout(function () {
+ var v = $('#jmxTreeSearch').val();
+ $('#jmxTree').jstree(true).search(v);
+ }, 250);
+ });
});
\ No newline at end of file
diff --git a/admin-tools-log4j2/README.md b/admin-tools-log4j2/README.md
index 60e0861..c4d5bbc 100644
--- a/admin-tools-log4j2/README.md
+++ b/admin-tools-log4j2/README.md
@@ -15,12 +15,12 @@
de.chandre.admin-tools
admin-tools-core
- 1.1.6.2
+ 1.1.6.3
de.chandre.admin-tools
admin-tools-log4j2
- 1.1.6.2
+ 1.1.6.3
```
diff --git a/admin-tools-melody/README.md b/admin-tools-melody/README.md
index 4fb6298..f1b0902 100644
--- a/admin-tools-melody/README.md
+++ b/admin-tools-melody/README.md
@@ -22,12 +22,12 @@ http
de.chandre.admin-tools
admin-tools-core
- 1.1.6.2
+ 1.1.6.3
de.chandre.admin-tools
admin-tools-melody
- 1.1.6.2
+ 1.1.6.3
```
diff --git a/admin-tools-properties/README.md b/admin-tools-properties/README.md
index 1ac7275..351ddee 100644
--- a/admin-tools-properties/README.md
+++ b/admin-tools-properties/README.md
@@ -12,12 +12,12 @@
de.chandre.admin-tools
admin-tools-core
- 1.1.6.2
+ 1.1.6.3
de.chandre.admin-tools
admin-tools-properties
- 1.1.6.2
+ 1.1.6.3
```
diff --git a/admin-tools-quartz/README.md b/admin-tools-quartz/README.md
index 0f32d93..66fc774 100644
--- a/admin-tools-quartz/README.md
+++ b/admin-tools-quartz/README.md
@@ -22,12 +22,12 @@
de.chandre.admin-tools
admin-tools-core
- 1.1.6.2
+ 1.1.6.3
de.chandre.admin-tools
admin-tools-quartz
- 1.1.6.2
+ 1.1.6.3
```
diff --git a/admin-tools-quartz/src/main/java/de/chandre/admintool/quartz/AdminToolQuartzServiceImpl.java b/admin-tools-quartz/src/main/java/de/chandre/admintool/quartz/AdminToolQuartzServiceImpl.java
index 5a78476..56131d2 100644
--- a/admin-tools-quartz/src/main/java/de/chandre/admintool/quartz/AdminToolQuartzServiceImpl.java
+++ b/admin-tools-quartz/src/main/java/de/chandre/admintool/quartz/AdminToolQuartzServiceImpl.java
@@ -1,828 +1,833 @@
-package de.chandre.admintool.quartz;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.Date;
-import java.util.List;
-import java.util.Map.Entry;
-import java.util.Optional;
-import java.util.Set;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.quartz.CalendarIntervalScheduleBuilder;
-import org.quartz.CalendarIntervalTrigger;
-import org.quartz.CronScheduleBuilder;
-import org.quartz.CronTrigger;
-import org.quartz.DailyTimeIntervalScheduleBuilder;
-import org.quartz.DailyTimeIntervalTrigger;
-import org.quartz.DateBuilder.IntervalUnit;
-import org.quartz.InterruptableJob;
-import org.quartz.JobBuilder;
-import org.quartz.JobDetail;
-import org.quartz.JobExecutionContext;
-import org.quartz.JobKey;
-import org.quartz.ScheduleBuilder;
-import org.quartz.Scheduler;
-import org.quartz.SchedulerException;
-import org.quartz.SchedulerMetaData;
-import org.quartz.SimpleScheduleBuilder;
-import org.quartz.SimpleTrigger;
-import org.quartz.StatefulJob;
-import org.quartz.Trigger;
-import org.quartz.Trigger.TriggerState;
-import org.quartz.TriggerBuilder;
-import org.quartz.impl.matchers.GroupMatcher;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.scheduling.quartz.SchedulerFactoryBean;
-import org.springframework.stereotype.Service;
-import org.springframework.util.CollectionUtils;
-import org.springframework.util.StringUtils;
-
-import de.chandre.admintool.quartz.JobTriggerTO.TriggerType;
-
-/**
- * the quart service for thymeleaf functions and actions
- * @author Andre
- *
- */
-@Service("adminToolQuartzService")
-public class AdminToolQuartzServiceImpl implements AdminToolQuartzService
-{
- private static final Log LOGGER = LogFactory.getLog(AdminToolQuartzServiceImpl.class);
-
- @Autowired
- private Scheduler scheduler;
-
- @Autowired
- private SchedulerFactoryBean schedulerFactory;
-
- @Autowired
- private AdminToolQuartzConfig config;
-
- private String prevGroup;
- private String prevJob;
-
- /* (non-Javadoc)
- * @see de.chandre.admintool.quartz.AdminToolQuartzService#startScheduler()
- */
- @Override
- public void startScheduler() {
- if(LOGGER.isDebugEnabled()) LOGGER.debug("starting scheduler factory");
- schedulerFactory.start();
- }
- /* (non-Javadoc)
- * @see de.chandre.admintool.quartz.AdminToolQuartzService#stopScheduler()
- */
- @Override
- public void stopScheduler() {
- if (!config.isStopSchedulerAllowed()) {
- LOGGER.warn("not allowed to stop the scheduler");
- return;
- }
- if(LOGGER.isDebugEnabled()) LOGGER.debug("stopping scheduler factory");
- schedulerFactory.stop();
- }
- /* (non-Javadoc)
- * @see de.chandre.admintool.quartz.AdminToolQuartzService#isSchedulerRunning()
- */
- @Override
- public boolean isSchedulerRunning() {
- return schedulerFactory.isRunning();
- }
- /* (non-Javadoc)
- * @see de.chandre.admintool.quartz.AdminToolQuartzService#getMetaData()
- */
- @Override
- public SchedulerMetaData getMetaData() throws SchedulerException {
- return scheduler.getMetaData();
- }
- /* (non-Javadoc)
- * @see de.chandre.admintool.quartz.AdminToolQuartzService#getJobGroups()
- */
- @Override
- public List getJobGroups() throws SchedulerException {
- List groups = scheduler.getJobGroupNames();
- Collections.sort(groups);
- return groups;
- }
- /* (non-Javadoc)
- * @see de.chandre.admintool.quartz.AdminToolQuartzService#isPrevGoupNotEq(java.lang.String)
- */
- @Override
- public boolean isPrevGoupNotEq(String actualGroup) {
- if (LOGGER.isTraceEnabled()) LOGGER.trace(String.format("check group prev: %s, act: %s", this.prevGroup, actualGroup));
- return StringUtils.isEmpty(this.prevGroup) || !actualGroup.equals(this.prevGroup);
- }
- /* (non-Javadoc)
- * @see de.chandre.admintool.quartz.AdminToolQuartzService#setPrevGroup(java.lang.String)
- */
- @Override
- public boolean setPrevGroup(String prevGroup) {
- if (LOGGER.isTraceEnabled()) LOGGER.trace(String.format("set previous group : %s", prevGroup));
- this.prevGroup = prevGroup;
- return true;
- }
-
- /* (non-Javadoc)
- * @see de.chandre.admintool.quartz.AdminToolQuartzService#isPrevJobNotEq(java.lang.String)
- */
- @Override
- public boolean isPrevJobNotEq(String actualJob) {
- if (LOGGER.isTraceEnabled()) LOGGER.trace(String.format("check job prev: %s, act: %s", this.prevJob, actualJob));
- return StringUtils.isEmpty(this.prevJob) || !actualJob.equals(this.prevJob);
- }
- /* (non-Javadoc)
- * @see de.chandre.admintool.quartz.AdminToolQuartzService#setPrevJob(java.lang.String)
- */
- @Override
- public boolean setPrevJob(String prevJob) {
- if (LOGGER.isTraceEnabled()) LOGGER.trace(String.format("set previous job : %s", prevJob));
- this.prevJob = prevJob;
- return true;
- }
-
- /* (non-Javadoc)
- * @see de.chandre.admintool.quartz.AdminToolQuartzService#getJobKeys(java.lang.String)
- */
- @Override
- public Set getJobKeys(String group) throws SchedulerException {
- return scheduler.getJobKeys(GroupMatcher.jobGroupEquals(group));
- }
-
- /* (non-Javadoc)
- * @see de.chandre.admintool.quartz.AdminToolQuartzService#getJobDescription(org.quartz.JobKey)
- */
- @Override
- public String getJobDescription(JobKey jobKey) throws SchedulerException {
- return scheduler.getJobDetail(jobKey).getDescription();
- }
-
-
- /* (non-Javadoc)
- * @see de.chandre.admintool.quartz.AdminToolQuartzService#getTriggers(org.quartz.JobKey)
- */
- @Override
- public List extends Trigger> getTriggers(JobKey jobKey) throws SchedulerException {
- List triggers = new ArrayList<>();
- if (!CollectionUtils.isEmpty(scheduler.getTriggersOfJob(jobKey))) {
- triggers.addAll(scheduler.getTriggersOfJob(jobKey));
- Collections.sort(triggers, new Comparator() {
- @Override
- public int compare(Trigger o1, Trigger o2) {
- return o1.getKey().compareTo(o2.getKey());
- }
- });
- }
- return triggers;
- }
-
- /* (non-Javadoc)
- * @see de.chandre.admintool.quartz.AdminToolQuartzService#getCurrentlyExecutingAmount(org.quartz.JobKey)
- */
- @Override
- public int getCurrentlyExecutingAmount(JobKey jobKey) throws SchedulerException {
- List executingJobs = scheduler.getCurrentlyExecutingJobs();
- JobDetail jobDetail = scheduler.getJobDetail(jobKey);
- int numInstances = 0;
- for (JobExecutionContext jobExecutionContext : executingJobs) {
- JobDetail execJobDetail = jobExecutionContext.getJobDetail();
- if (execJobDetail.getKey().equals(jobDetail.getKey())) {
- if (LOGGER.isTraceEnabled())
- LOGGER.trace(String.format("found running job for jobkey: (%s, %s)", jobKey.getGroup(), jobKey.getName()));
- ++numInstances;
- }
- }
- return numInstances;
- }
-
- /* (non-Javadoc)
- * @see de.chandre.admintool.quartz.AdminToolQuartzService#isPaused(org.quartz.JobKey)
- */
- @Override
- public boolean isPaused(JobKey jobKey) throws SchedulerException {
- List extends Trigger> triggers = scheduler.getTriggersOfJob(jobKey);
- boolean result = true;
- if (null != triggers && triggers.size() > 0) {
- for (Trigger trigger : triggers) {
- result = result && scheduler.getTriggerState(trigger.getKey()) == TriggerState.PAUSED;
- }
- return result;
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see de.chandre.admintool.quartz.AdminToolQuartzService#isOnePaused(org.quartz.JobKey)
- */
- @Override
- public boolean isOnePaused(JobKey jobKey) throws SchedulerException {
- List extends Trigger> triggers = scheduler.getTriggersOfJob(jobKey);
- boolean result = false;
- if (null != triggers && triggers.size() > 0) {
- for (Trigger trigger : triggers) {
- result = result || scheduler.getTriggerState(trigger.getKey()) == TriggerState.PAUSED;
- }
- return result;
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see de.chandre.admintool.quartz.AdminToolQuartzService#isPaused(org.quartz.Trigger)
- */
- @Override
- public boolean isPaused(Trigger trigger) throws SchedulerException {
- return scheduler.getTriggerState(trigger.getKey()) == TriggerState.PAUSED;
- }
-
- /* (non-Javadoc)
- * @see de.chandre.admintool.quartz.AdminToolQuartzService#getTriggerStateCssClass(org.quartz.JobKey, org.quartz.Trigger)
- */
- @Override
- public String getTriggerStateCssClass(JobKey jobKey, Trigger trigger) throws SchedulerException {
- if (isPaused(trigger)) {
- return "btn-warning";
- }
- if (isCurrentlyRunning(jobKey, trigger)) {
- return "btn-success";
- }
- return "btn-info";
- }
-
- /* (non-Javadoc)
- * @see de.chandre.admintool.quartz.AdminToolQuartzService#getTriggerState(org.quartz.JobKey, org.quartz.Trigger)
- */
- @Override
- public String getTriggerState(JobKey jobKey, Trigger trigger) throws SchedulerException {
- if (isPaused(trigger)) {
- return "paused";
- }
- if (isCurrentlyRunning(jobKey, trigger)) {
- return "running";
- }
- return "pending";
- }
-
- /* (non-Javadoc)
- * @see de.chandre.admintool.quartz.AdminToolQuartzService#isCurrentlyRunning(org.quartz.JobKey, org.quartz.Trigger)
- */
- @Override
- public boolean isCurrentlyRunning(JobKey jobKey, Trigger trigger) throws SchedulerException {
- List executingJobs = scheduler.getCurrentlyExecutingJobs();
- JobDetail jobDetail = scheduler.getJobDetail(jobKey);
- Trigger triggerFound = findTrigger(jobKey.getGroup(), jobKey.getName(), trigger.getKey().getGroup(), trigger.getKey().getName());
- for (JobExecutionContext jobExecutionContext : executingJobs) {
- JobDetail execJobDetail = jobExecutionContext.getJobDetail();
- if (execJobDetail.getKey().equals(jobDetail.getKey())
- && jobExecutionContext.getTrigger().getKey().equals(triggerFound.getKey())) {
- if (LOGGER.isTraceEnabled())
- LOGGER.trace(String.format("found running trigger for jobkey: (%s, %s, %s)",
- jobKey.getGroup(), jobKey.getName(), trigger.getKey().getName()));
- return true;
- }
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see de.chandre.admintool.quartz.AdminToolQuartzService#getCronExpression(org.quartz.Trigger, java.lang.String)
- */
- @Override
- public String getCronExpression(Trigger trigger, String defaultValue) {
- return isCronTrigger(trigger) ? ((CronTrigger)trigger).getCronExpression() : defaultValue;
- }
-
- /* (non-Javadoc)
- * @see de.chandre.admintool.quartz.AdminToolQuartzService#isCronTrigger(org.quartz.Trigger)
- */
- @Override
- public boolean isCronTrigger(Trigger trigger) {
- if (trigger instanceof CronTrigger) {
- return true;
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see de.chandre.admintool.quartz.AdminToolQuartzService#isInteruptable(org.quartz.JobKey)
- */
- @Override
- public boolean isInteruptable(JobKey jobKey) throws SchedulerException {
- return InterruptableJob.class.isAssignableFrom(scheduler.getJobDetail(jobKey).getJobClass());
- }
-
- /* (non-Javadoc)
- * @see de.chandre.admintool.quartz.AdminToolQuartzService#isStateful(org.quartz.JobKey)
- */
- @Override
- public boolean isStateful(JobKey jobKey) throws SchedulerException {
- return StatefulJob.class.isAssignableFrom(scheduler.getJobDetail(jobKey).getJobClass());
- }
-
- /* (non-Javadoc)
- * @see de.chandre.admintool.quartz.AdminToolQuartzService#interruptJob(java.lang.String, java.lang.String)
- */
- @Override
- public void interruptJob(String jobGroup, String jobName) throws SchedulerException {
- if (!config.isInterruptJobAllowed()) {
- LOGGER.warn("not allowed to interrupt any job");
- return;
- }
- JobKey jobKey = new JobKey(jobName, jobGroup);
- if (isInteruptable(jobKey)) {
- List executingJobs = scheduler.getCurrentlyExecutingJobs();
- JobDetail jobDetail = scheduler.getJobDetail(jobKey);
- for (JobExecutionContext jobExecutionContext : executingJobs) {
- JobDetail execJobDetail = jobExecutionContext.getJobDetail();
- if (execJobDetail.getKey().equals(jobDetail.getKey())) {
- if (LOGGER.isDebugEnabled())
- LOGGER.debug(String.format("interrupting job (%s, %s)", jobDetail.getKey().getGroup(),
- jobDetail.getKey().getName()));
- ((InterruptableJob) jobExecutionContext.getJobInstance()).interrupt();
- }
- }
- }
- }
-
- /* (non-Javadoc)
- * @see de.chandre.admintool.quartz.AdminToolQuartzService#interruptTrigger(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
- */
- @Override
- public void interruptTrigger(String jobGroup, String jobName, final String triggerGroup, final String triggerName) throws SchedulerException {
- if (!config.isInterruptTriggerAllowed()) {
- LOGGER.warn("not allowed to interrupt any trigger");
- return;
- }
- JobKey jobKey = new JobKey(jobName, jobGroup);
- if (isInteruptable(jobKey)) {
- List executingJobs = scheduler.getCurrentlyExecutingJobs();
- JobDetail jobDetail = scheduler.getJobDetail(jobKey);
- Trigger triggerFound = findTrigger(jobGroup, jobName, triggerGroup, triggerName);
- for (JobExecutionContext jobExecutionContext : executingJobs) {
- if (jobExecutionContext.getJobDetail().getKey().equals(jobDetail.getKey())
- && jobExecutionContext.getTrigger().getKey().equals(triggerFound.getKey())) {
- if (LOGGER.isDebugEnabled())
- LOGGER.debug(String.format("interrupting jobTrigger (%s, %s, %s)", jobDetail.getKey().getGroup(),
- jobDetail.getKey().getName(), triggerFound.getKey().getName()));
- ((InterruptableJob) jobExecutionContext.getJobInstance()).interrupt();
- }
- }
- }
- }
-
- /* (non-Javadoc)
- * @see de.chandre.admintool.quartz.AdminToolQuartzService#changeTriggerState(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
- */
- @Override
- public void changeTriggerState(String groupName, String jobName, final String triggerGroup, final String triggerName) throws SchedulerException {
- if (!config.isChangetTriggerStateAllowed()) {
- LOGGER.warn("not allowed to change any trigger state");
- return;
- }
- Trigger triggerFound = findTrigger(groupName, jobName, triggerGroup, triggerName);
- if (null != triggerFound) {
- // pause only the one trigger of job
- changeTriggerState(triggerFound);
- if (LOGGER.isDebugEnabled())
- LOGGER.debug(String.format("pausing trigger for group: %s, job: %s, trigger: %s ", groupName, jobName,
- triggerName));
- } else {
- if (LOGGER.isDebugEnabled())
- LOGGER.debug(String.format("pausing all triggers for group: %s, job: %s", groupName, jobName));
- List extends Trigger> triggers = scheduler.getTriggersOfJob(new JobKey(jobName, groupName));
- for (Trigger trigger : triggers) {
- // pause all triggers of job
- changeTriggerState(trigger);
- }
- }
- }
-
- private Trigger findTrigger(String jobGroup, String jobName, final String triggerGroup, final String triggerName) throws SchedulerException {
- List extends Trigger> triggers = scheduler.getTriggersOfJob(new JobKey(jobName, jobGroup));
- if (!CollectionUtils.isEmpty(triggers)) {
- Optional extends Trigger> tr = triggers.stream()
- .filter(trigger -> trigger.getKey().getGroup().equals(triggerGroup)
- && trigger.getKey().getName().equals(triggerName))
- .findFirst();
- if (tr.isPresent()) {
- return tr.get();
- }
- }
- return null;
- }
-
- private void changeTriggerState(Trigger trigger) throws SchedulerException {
- if (scheduler.getTriggerState(trigger.getKey()) == TriggerState.PAUSED) {
- scheduler.resumeTrigger(trigger.getKey());
- } else {
- scheduler.pauseTrigger(trigger.getKey());
- }
- }
-
- /* (non-Javadoc)
- * @see de.chandre.admintool.quartz.AdminToolQuartzService#triggerJob(java.lang.String, java.lang.String)
- */
- @Override
- public void triggerJob(String groupName, String jobName) throws SchedulerException {
- if (!config.isExecuteJobAllowed()) {
- LOGGER.warn("not allowed to execute any job");
- return;
- }
- scheduler.triggerJob(new JobKey(jobName, groupName));
- }
-
- private JobDetail findJob(String groupName, String jobName) throws SchedulerException {
- return scheduler.getJobDetail(new JobKey(jobName, groupName));
- }
-
- /* (non-Javadoc)
- * @see de.chandre.admintool.quartz.AdminToolQuartzService#removeTrigger(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
- */
- @Override
- public boolean removeTrigger(String groupName, String jobName, final String triggerGroup, final String triggerName) throws SchedulerException {
- if (!config.isRemoveTriggerAllowed()) {
- LOGGER.warn("not allowed to remove any trigger");
- return false;
- }
- Trigger triggerFound = findTrigger(groupName, jobName, triggerGroup, triggerName);
- if (null != triggerFound) {
- return scheduler.unscheduleJob(triggerFound.getKey());
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see de.chandre.admintool.quartz.AdminToolQuartzService#getTriggerInfo(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
- */
- @Override
- public JobTriggerTO getTriggerInfo(String groupName, String jobName, final String triggerGroup, final String triggerName) throws SchedulerException {
- JobDetail detail = findJob(groupName, jobName);
-
- JobTriggerTO triggerTO = new JobTriggerTO();
- triggerTO.setJobGroup(groupName);
- triggerTO.setJobName(jobName);
- triggerTO.setDescription(detail.getDescription());
-
- triggerTO.setJobData(detail.getJobDataMap());
-
- if (null == triggerName) {
- return triggerTO;
- }
- Trigger trigger = findTrigger(groupName, jobName, triggerGroup, triggerName);
- triggerTO.setTriggerName(triggerName);
- triggerTO.setTriggerGroup(trigger.getKey().getGroup());
- triggerTO.setTriggerDescription(trigger.getDescription());
-
- triggerTO.setMisfireInstruction(trigger.getMisfireInstruction());
- triggerTO.setPriority(trigger.getPriority());
- triggerTO.setCalendarName(trigger.getCalendarName());
- triggerTO.setStartTime(trigger.getStartTime());
-
- if (isCronTrigger(trigger)) {
- addSimilarMisfireInstructionSet(triggerTO, null, TriggerType.CRON);
- triggerTO.setCronExpression(((CronTrigger)trigger).getCronExpression());
- triggerTO.setTimeZone(((CronTrigger)trigger).getTimeZone());
- } else if (trigger instanceof SimpleTrigger) {
- addSimpleMisfireInstructionSet(triggerTO, null);
- triggerTO.setRepeatCount(((SimpleTrigger)trigger).getRepeatCount());
- triggerTO.setRepeatInterval(((SimpleTrigger)trigger).getRepeatInterval());
- } else if (trigger instanceof CalendarIntervalTrigger) {
- addSimilarMisfireInstructionSet(triggerTO, null, TriggerType.CALENDAR);
- triggerTO.setRepeatInterval(Long.valueOf(((CalendarIntervalTrigger)trigger).getRepeatInterval()));
- triggerTO.setRepeatIntervalUnit(((CalendarIntervalTrigger)trigger).getRepeatIntervalUnit());
- } else if (trigger instanceof DailyTimeIntervalTrigger) {
- addSimilarMisfireInstructionSet(triggerTO, null, TriggerType.DAILY);
- triggerTO.setRepeatInterval(Long.valueOf(((DailyTimeIntervalTrigger)trigger).getRepeatInterval()));
- triggerTO.setRepeatIntervalUnit(((DailyTimeIntervalTrigger)trigger).getRepeatIntervalUnit());
- triggerTO.setRepeatCount(((DailyTimeIntervalTrigger)trigger).getRepeatCount());
- }
-
- triggerTO.setJobData(trigger.getJobDataMap());
-
- addGlobalMisfireInstructionSet(triggerTO, null);
-
- return triggerTO;
- }
-
- /* (non-Javadoc)
- * @see de.chandre.admintool.quartz.AdminToolQuartzService#getCalendarNames()
- */
- @Override
- public Collection getCalendarNames() throws SchedulerException {
- return scheduler.getCalendarNames();
- }
-
- /* (non-Javadoc)
- * @see de.chandre.admintool.quartz.AdminToolQuartzService#getInstructionSets()
- */
- @Override
- public Collection getInstructionSets() {
- List instructionSets = new ArrayList<>();
-
- addSimilarMisfireInstructionSet(null, instructionSets, TriggerType.CRON);
- addSimpleMisfireInstructionSet(null, instructionSets);
- addSimilarMisfireInstructionSet(null, instructionSets, TriggerType.CALENDAR);
- addSimilarMisfireInstructionSet(null, instructionSets, TriggerType.DAILY);
-
- addGlobalMisfireInstructionSet(null, instructionSets);
-
- return instructionSets;
- }
-
- private void addGlobalMisfireInstructionSet(JobTriggerTO jobTrigger, List instructionSets) {
- if (null != instructionSets) {
- for (JobTriggerTO trigger : instructionSets) {
- trigger.addMisfireInstructions("IGNORE_MISFIRE_POLICY", Trigger.MISFIRE_INSTRUCTION_IGNORE_MISFIRE_POLICY);
- trigger.addMisfireInstructions("SMART_POLICY", Trigger.MISFIRE_INSTRUCTION_SMART_POLICY);
- }
- } else {
- jobTrigger.addMisfireInstructions("IGNORE_MISFIRE_POLICY", Trigger.MISFIRE_INSTRUCTION_IGNORE_MISFIRE_POLICY);
- jobTrigger.addMisfireInstructions("SMART_POLICY", Trigger.MISFIRE_INSTRUCTION_SMART_POLICY);
- }
- }
-
- private void addSimpleMisfireInstructionSet(JobTriggerTO jobTrigger, List instructionSets) {
- if (null == jobTrigger) {
- jobTrigger = new JobTriggerTO();
- }
- jobTrigger.setTriggerType(TriggerType.SIMPLE);
- jobTrigger.addMisfireInstructions("FIRE_NOW", SimpleTrigger.MISFIRE_INSTRUCTION_FIRE_NOW);
- jobTrigger.addMisfireInstructions("RESCHEDULE_NEXT_WITH_EXISTING_COUNT", SimpleTrigger.MISFIRE_INSTRUCTION_RESCHEDULE_NEXT_WITH_EXISTING_COUNT);
- jobTrigger.addMisfireInstructions("RESCHEDULE_NEXT_WITH_REMAINING_COUNT", SimpleTrigger.MISFIRE_INSTRUCTION_RESCHEDULE_NEXT_WITH_REMAINING_COUNT);
- jobTrigger.addMisfireInstructions("RESCHEDULE_NOW_WITH_EXISTING_REPEAT_COUNT", SimpleTrigger.MISFIRE_INSTRUCTION_RESCHEDULE_NOW_WITH_EXISTING_REPEAT_COUNT);
- jobTrigger.addMisfireInstructions("RESCHEDULE_NOW_WITH_REMAINING_REPEAT_COUNT", SimpleTrigger.MISFIRE_INSTRUCTION_RESCHEDULE_NOW_WITH_REMAINING_REPEAT_COUNT);
-
- addSimpleRepeatIntervalUnits(jobTrigger);
- if (null != instructionSets) {
- instructionSets.add(jobTrigger);
- }
-
- }
-
- private void addSimilarMisfireInstructionSet(JobTriggerTO jobTrigger, List instructionSets, TriggerType type) {
- if (null == jobTrigger) {
- jobTrigger = new JobTriggerTO();
- }
- jobTrigger.setTriggerType(type);
- jobTrigger.addMisfireInstructions("DO_NOTHING", CronTrigger.MISFIRE_INSTRUCTION_DO_NOTHING);
- jobTrigger.addMisfireInstructions("FIRE_ONCE_NOW", CronTrigger.MISFIRE_INSTRUCTION_FIRE_ONCE_NOW);
-
- if (type == TriggerType.CALENDAR || type == TriggerType.DAILY) {
- addSimpleRepeatIntervalUnits(jobTrigger);
- addExtendedRepeatIntervalUnits(jobTrigger);
- }
- if (null != instructionSets) {
- instructionSets.add(jobTrigger);
- }
- }
-
- private void addSimpleRepeatIntervalUnits(JobTriggerTO jobTrigger) {
- jobTrigger.addRepeatIntervalUnits("Milliseconds", IntervalUnit.MILLISECOND);
- jobTrigger.addRepeatIntervalUnits("Second", IntervalUnit.SECOND);
- jobTrigger.addRepeatIntervalUnits("Minute", IntervalUnit.MINUTE);
- jobTrigger.addRepeatIntervalUnits("Hour", IntervalUnit.HOUR);
- }
-
- private void addExtendedRepeatIntervalUnits(JobTriggerTO jobTrigger) {
- jobTrigger.addRepeatIntervalUnits("Day", IntervalUnit.DAY);
- jobTrigger.addRepeatIntervalUnits("Week", IntervalUnit.WEEK);
- jobTrigger.addRepeatIntervalUnits("Month", IntervalUnit.MONTH);
- jobTrigger.addRepeatIntervalUnits("Year", IntervalUnit.YEAR);
- }
-
- private String nvl(String check, String defaultVal) {
- return StringUtils.isEmpty(check) ? defaultVal : check;
- }
-
- /* (non-Javadoc)
- * @see de.chandre.admintool.quartz.AdminToolQuartzService#changeJob(de.chandre.admintool.quartz.JobTriggerTO)
- */
- @Override
- public boolean changeJob(JobTriggerTO triggerTO) throws SchedulerException {
- if (!config.isChangeJobInfoAllowed()) {
- LOGGER.warn("not allowed to change any job info");
- return false;
- }
- JobDetail detail = findJob(triggerTO.getOriginalJobGroup(), triggerTO.getOriginalJobName());
- if (null == detail) {
- return false;
- }
- JobBuilder builder = detail.getJobBuilder()
- .withIdentity(nvl(triggerTO.getJobName(), triggerTO.getOriginalJobName()),
- nvl(triggerTO.getJobGroup(), triggerTO.getOriginalJobGroup()))
- .withDescription(triggerTO.getDescription());
-
- //Builder don't have an interface :-/ so code duplication with triggers
- if (null != triggerTO.getJobData() && !triggerTO.getJobData().isEmpty()) {
- for (Entry entry : triggerTO.getJobData().entrySet()) {
- if (String.class.isAssignableFrom(entry.getValue().getClass())) {
- builder.usingJobData(entry.getKey(), (String)entry.getValue());
- } else if (Boolean.class.isAssignableFrom(entry.getValue().getClass())) {
- builder.usingJobData(entry.getKey(), (Boolean)entry.getValue());
- } else if (Integer.class.isAssignableFrom(entry.getValue().getClass())) {
- builder.usingJobData(entry.getKey(), (Integer)entry.getValue());
- } else if (Long.class.isAssignableFrom(entry.getValue().getClass())) {
- builder.usingJobData(entry.getKey(), (Long)entry.getValue());
- } else if (Double.class.isAssignableFrom(entry.getValue().getClass())) {
- builder.usingJobData(entry.getKey(), (Double)entry.getValue());
- } else if (Float.class.isAssignableFrom(entry.getValue().getClass())) {
- builder.usingJobData(entry.getKey(), (Float)entry.getValue());
- }
- if (LOGGER.isDebugEnabled())
- LOGGER.debug("jobDataEntry: " + entry.getKey() +", val: "+ entry.getValue() + ", class: " + entry.getValue().getClass());
- }
- }
-
- scheduler.addJob(builder.build(), true, true);
- return true;
- }
-
- /* (non-Javadoc)
- * @see de.chandre.admintool.quartz.AdminToolQuartzService#changeTrigger(de.chandre.admintool.quartz.JobTriggerTO, boolean)
- */
- @Override
- public boolean changeTrigger(JobTriggerTO triggerTO, boolean add) throws SchedulerException {
- if (!config.isChangeTriggerAllowed()) {
- LOGGER.warn("not allowed to change any trigger");
- return false;
- }
- JobDetail detail = findJob(triggerTO.getOriginalJobGroup(), triggerTO.getOriginalJobName());
- if (null == detail) {
- return false;
- }
- Trigger trigger = findTrigger(triggerTO.getOriginalJobGroup(), triggerTO.getOriginalJobName(),
- triggerTO.getOriginalTriggerGroup(), triggerTO.getOriginalTriggerName());
- if(null == trigger) {
- if (add) {
- this.scheduler.scheduleJob(buildTrigger(detail, null, triggerTO));
- return true;
- }
- return false;
- }
- this.scheduler.rescheduleJob(trigger.getKey(), buildTrigger(detail, trigger, triggerTO));
- return true;
- }
-
- private Trigger buildTrigger(JobDetail detail, Trigger trigger, JobTriggerTO triggerTO) {
-
- TriggerBuilder builder = TriggerBuilder.newTrigger().forJob(detail).withIdentity(
- nvl(triggerTO.getTriggerName(), triggerTO.getOriginalTriggerName()),
- nvl(triggerTO.getTriggerGroup(), triggerTO.getOriginalTriggerGroup()));
-
- ScheduleBuilder extends Trigger> schedule = null;
- switch (triggerTO.getTriggerType()) {
- case CRON: {
- schedule = CronScheduleBuilder.cronSchedule(triggerTO.getCronExpression());
- if (null != triggerTO.getTimeZone()) {
- ((CronScheduleBuilder)schedule).inTimeZone(triggerTO.getTimeZone());
- }
- switch (triggerTO.getMisfireInstruction()) {
- case CronTrigger.MISFIRE_INSTRUCTION_FIRE_ONCE_NOW:
- ((CronScheduleBuilder)schedule).withMisfireHandlingInstructionFireAndProceed();
- break;
- case CronTrigger.MISFIRE_INSTRUCTION_IGNORE_MISFIRE_POLICY:
- ((CronScheduleBuilder)schedule).withMisfireHandlingInstructionIgnoreMisfires();
- break;
- case CronTrigger.MISFIRE_INSTRUCTION_SMART_POLICY:
- case CronTrigger.MISFIRE_INSTRUCTION_DO_NOTHING:
- default:
- ((CronScheduleBuilder)schedule).withMisfireHandlingInstructionDoNothing();
- break;
- }
- break;
- }
- case SIMPLE: {
- schedule = SimpleScheduleBuilder.simpleSchedule();
- if (triggerTO.getRepeatCount() < 0) {
- ((SimpleScheduleBuilder)schedule).repeatForever();
- }
- else {
- ((SimpleScheduleBuilder)schedule).withRepeatCount(triggerTO.getRepeatCount());
- }
- switch (triggerTO.getRepeatIntervalUnit()) {
- case MILLISECOND:
- ((SimpleScheduleBuilder)schedule).withIntervalInMilliseconds(Long.valueOf(triggerTO.getRepeatInterval()));
- break;
- case SECOND:
- ((SimpleScheduleBuilder)schedule).withIntervalInSeconds(Long.valueOf(triggerTO.getRepeatInterval()).intValue());
- break;
- case MINUTE:
- ((SimpleScheduleBuilder)schedule).withIntervalInMinutes(Long.valueOf(triggerTO.getRepeatInterval()).intValue());
- break;
- case HOUR:
- ((SimpleScheduleBuilder)schedule).withIntervalInHours(Long.valueOf(triggerTO.getRepeatInterval()).intValue());
- break;
- case DAY:
- ((SimpleScheduleBuilder)schedule).withIntervalInHours(Long.valueOf(triggerTO.getRepeatInterval()).intValue() * 24);
- break;
- case WEEK:
- ((SimpleScheduleBuilder)schedule).withIntervalInHours(Long.valueOf(triggerTO.getRepeatInterval()).intValue() * 24 * 7);
- break;
- default:
- break;
- }
- switch (triggerTO.getMisfireInstruction()) {
- case SimpleTrigger.MISFIRE_INSTRUCTION_RESCHEDULE_NEXT_WITH_EXISTING_COUNT:
- ((SimpleScheduleBuilder)schedule).withMisfireHandlingInstructionNextWithExistingCount();
- break;
- case SimpleTrigger.MISFIRE_INSTRUCTION_RESCHEDULE_NEXT_WITH_REMAINING_COUNT:
- ((SimpleScheduleBuilder)schedule).withMisfireHandlingInstructionNextWithRemainingCount();
- break;
- case SimpleTrigger.MISFIRE_INSTRUCTION_RESCHEDULE_NOW_WITH_EXISTING_REPEAT_COUNT:
- ((SimpleScheduleBuilder)schedule).withMisfireHandlingInstructionNowWithExistingCount();
- break;
- case SimpleTrigger.MISFIRE_INSTRUCTION_RESCHEDULE_NOW_WITH_REMAINING_REPEAT_COUNT:
- ((SimpleScheduleBuilder)schedule).withMisfireHandlingInstructionNowWithRemainingCount();
- break;
- case SimpleTrigger.MISFIRE_INSTRUCTION_IGNORE_MISFIRE_POLICY:
- ((SimpleScheduleBuilder)schedule).withMisfireHandlingInstructionIgnoreMisfires();
- break;
- case SimpleTrigger.MISFIRE_INSTRUCTION_SMART_POLICY:
- case SimpleTrigger.MISFIRE_INSTRUCTION_FIRE_NOW:
- default:
- ((SimpleScheduleBuilder)schedule).withMisfireHandlingInstructionFireNow();
- break;
- }
-
- }
- case CALENDAR: {
- schedule = CalendarIntervalScheduleBuilder.calendarIntervalSchedule().withInterval(
- Long.valueOf(triggerTO.getRepeatInterval()).intValue(), triggerTO.getRepeatIntervalUnit());
- switch (triggerTO.getMisfireInstruction()) {
- case CalendarIntervalTrigger.MISFIRE_INSTRUCTION_FIRE_ONCE_NOW:
- ((CalendarIntervalScheduleBuilder)schedule).withMisfireHandlingInstructionFireAndProceed();
- break;
- case CalendarIntervalTrigger.MISFIRE_INSTRUCTION_IGNORE_MISFIRE_POLICY:
- ((CalendarIntervalScheduleBuilder)schedule).withMisfireHandlingInstructionIgnoreMisfires();
- break;
- case CalendarIntervalTrigger.MISFIRE_INSTRUCTION_SMART_POLICY:
- case CalendarIntervalTrigger.MISFIRE_INSTRUCTION_DO_NOTHING:
- default:
- ((CalendarIntervalScheduleBuilder)schedule).withMisfireHandlingInstructionDoNothing();
- break;
- }
- break;
- }
- case DAILY: {
- schedule = DailyTimeIntervalScheduleBuilder.dailyTimeIntervalSchedule().withInterval(
- Long.valueOf(triggerTO.getRepeatInterval()).intValue(), triggerTO.getRepeatIntervalUnit())
- .withRepeatCount(triggerTO.getRepeatCount());
- switch (triggerTO.getMisfireInstruction()) {
- case DailyTimeIntervalTrigger.MISFIRE_INSTRUCTION_FIRE_ONCE_NOW:
- ((DailyTimeIntervalScheduleBuilder)schedule).withMisfireHandlingInstructionFireAndProceed();
- break;
- case DailyTimeIntervalTrigger.MISFIRE_INSTRUCTION_IGNORE_MISFIRE_POLICY:
- ((DailyTimeIntervalScheduleBuilder)schedule).withMisfireHandlingInstructionIgnoreMisfires();
- break;
- case DailyTimeIntervalTrigger.MISFIRE_INSTRUCTION_SMART_POLICY:
- case DailyTimeIntervalTrigger.MISFIRE_INSTRUCTION_DO_NOTHING:
- default:
- ((DailyTimeIntervalScheduleBuilder)schedule).withMisfireHandlingInstructionDoNothing();
- break;
- }
- break;
- }
- default:
- break;
- }
-
- if (null != triggerTO.getJobData() && !triggerTO.getJobData().isEmpty()) {
- for (Entry entry : triggerTO.getJobData().entrySet()) {
- if (String.class.isAssignableFrom(entry.getValue().getClass())) {
- builder.usingJobData(entry.getKey(), (String)entry.getValue());
- } else if (Boolean.class.isAssignableFrom(entry.getValue().getClass())) {
- builder.usingJobData(entry.getKey(), (Boolean)entry.getValue());
- } else if (Integer.class.isAssignableFrom(entry.getValue().getClass())) {
- builder.usingJobData(entry.getKey(), (Integer)entry.getValue());
- } else if (Long.class.isAssignableFrom(entry.getValue().getClass())) {
- builder.usingJobData(entry.getKey(), (Long)entry.getValue());
- } else if (Double.class.isAssignableFrom(entry.getValue().getClass())) {
- builder.usingJobData(entry.getKey(), (Double)entry.getValue());
- } else if (Float.class.isAssignableFrom(entry.getValue().getClass())) {
- builder.usingJobData(entry.getKey(), (Float)entry.getValue());
- }
- if (LOGGER.isDebugEnabled())
- LOGGER.debug("jobDataEntry: " + entry.getKey() +", val: "+ entry.getValue() + ", class: " + entry.getValue().getClass());
- }
- }
-// else if (null != trigger && null != trigger.getJobDataMap() && !trigger.getJobDataMap().isEmpty()) {
-// builder.usingJobData(trigger.getJobDataMap());
-// }
-
- builder.withSchedule(schedule);
-
- if (null != triggerTO.getPriority()) {
- builder.withPriority(triggerTO.getPriority());
- }
- builder.withDescription(triggerTO.getTriggerDescription());
- if (null == triggerTO.getStartTime()) {
- builder.startAt(new Date());
- } else {
- builder.startAt(triggerTO.getStartTime());
- }
- return builder.build();
- }
-}
+package de.chandre.admintool.quartz;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.Date;
+import java.util.List;
+import java.util.Map.Entry;
+import java.util.Optional;
+import java.util.Set;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.quartz.CalendarIntervalScheduleBuilder;
+import org.quartz.CalendarIntervalTrigger;
+import org.quartz.CronScheduleBuilder;
+import org.quartz.CronTrigger;
+import org.quartz.DailyTimeIntervalScheduleBuilder;
+import org.quartz.DailyTimeIntervalTrigger;
+import org.quartz.DisallowConcurrentExecution;
+import org.quartz.DateBuilder.IntervalUnit;
+import org.quartz.InterruptableJob;
+import org.quartz.JobBuilder;
+import org.quartz.JobDetail;
+import org.quartz.JobExecutionContext;
+import org.quartz.JobKey;
+import org.quartz.PersistJobDataAfterExecution;
+import org.quartz.ScheduleBuilder;
+import org.quartz.Scheduler;
+import org.quartz.SchedulerException;
+import org.quartz.SchedulerMetaData;
+import org.quartz.SimpleScheduleBuilder;
+import org.quartz.SimpleTrigger;
+import org.quartz.StatefulJob;
+import org.quartz.Trigger;
+import org.quartz.Trigger.TriggerState;
+import org.quartz.TriggerBuilder;
+import org.quartz.impl.matchers.GroupMatcher;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.quartz.SchedulerFactoryBean;
+import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
+import org.springframework.util.StringUtils;
+
+import de.chandre.admintool.quartz.JobTriggerTO.TriggerType;
+
+/**
+ * the quart service for thymeleaf functions and actions
+ * @author Andre
+ *
+ */
+@Service("adminToolQuartzService")
+public class AdminToolQuartzServiceImpl implements AdminToolQuartzService
+{
+ private static final Log LOGGER = LogFactory.getLog(AdminToolQuartzServiceImpl.class);
+
+ @Autowired
+ private Scheduler scheduler;
+
+ @Autowired
+ private SchedulerFactoryBean schedulerFactory;
+
+ @Autowired
+ private AdminToolQuartzConfig config;
+
+ private String prevGroup;
+ private String prevJob;
+
+ /* (non-Javadoc)
+ * @see de.chandre.admintool.quartz.AdminToolQuartzService#startScheduler()
+ */
+ @Override
+ public void startScheduler() {
+ if(LOGGER.isDebugEnabled()) LOGGER.debug("starting scheduler factory");
+ schedulerFactory.start();
+ }
+ /* (non-Javadoc)
+ * @see de.chandre.admintool.quartz.AdminToolQuartzService#stopScheduler()
+ */
+ @Override
+ public void stopScheduler() {
+ if (!config.isStopSchedulerAllowed()) {
+ LOGGER.warn("not allowed to stop the scheduler");
+ return;
+ }
+ if(LOGGER.isDebugEnabled()) LOGGER.debug("stopping scheduler factory");
+ schedulerFactory.stop();
+ }
+ /* (non-Javadoc)
+ * @see de.chandre.admintool.quartz.AdminToolQuartzService#isSchedulerRunning()
+ */
+ @Override
+ public boolean isSchedulerRunning() {
+ return schedulerFactory.isRunning();
+ }
+ /* (non-Javadoc)
+ * @see de.chandre.admintool.quartz.AdminToolQuartzService#getMetaData()
+ */
+ @Override
+ public SchedulerMetaData getMetaData() throws SchedulerException {
+ return scheduler.getMetaData();
+ }
+ /* (non-Javadoc)
+ * @see de.chandre.admintool.quartz.AdminToolQuartzService#getJobGroups()
+ */
+ @Override
+ public List getJobGroups() throws SchedulerException {
+ List groups = scheduler.getJobGroupNames();
+ Collections.sort(groups);
+ return groups;
+ }
+ /* (non-Javadoc)
+ * @see de.chandre.admintool.quartz.AdminToolQuartzService#isPrevGoupNotEq(java.lang.String)
+ */
+ @Override
+ public boolean isPrevGoupNotEq(String actualGroup) {
+ if (LOGGER.isTraceEnabled()) LOGGER.trace(String.format("check group prev: %s, act: %s", this.prevGroup, actualGroup));
+ return StringUtils.isEmpty(this.prevGroup) || !actualGroup.equals(this.prevGroup);
+ }
+ /* (non-Javadoc)
+ * @see de.chandre.admintool.quartz.AdminToolQuartzService#setPrevGroup(java.lang.String)
+ */
+ @Override
+ public boolean setPrevGroup(String prevGroup) {
+ if (LOGGER.isTraceEnabled()) LOGGER.trace(String.format("set previous group : %s", prevGroup));
+ this.prevGroup = prevGroup;
+ return true;
+ }
+
+ /* (non-Javadoc)
+ * @see de.chandre.admintool.quartz.AdminToolQuartzService#isPrevJobNotEq(java.lang.String)
+ */
+ @Override
+ public boolean isPrevJobNotEq(String actualJob) {
+ if (LOGGER.isTraceEnabled()) LOGGER.trace(String.format("check job prev: %s, act: %s", this.prevJob, actualJob));
+ return StringUtils.isEmpty(this.prevJob) || !actualJob.equals(this.prevJob);
+ }
+ /* (non-Javadoc)
+ * @see de.chandre.admintool.quartz.AdminToolQuartzService#setPrevJob(java.lang.String)
+ */
+ @Override
+ public boolean setPrevJob(String prevJob) {
+ if (LOGGER.isTraceEnabled()) LOGGER.trace(String.format("set previous job : %s", prevJob));
+ this.prevJob = prevJob;
+ return true;
+ }
+
+ /* (non-Javadoc)
+ * @see de.chandre.admintool.quartz.AdminToolQuartzService#getJobKeys(java.lang.String)
+ */
+ @Override
+ public Set getJobKeys(String group) throws SchedulerException {
+ return scheduler.getJobKeys(GroupMatcher.jobGroupEquals(group));
+ }
+
+ /* (non-Javadoc)
+ * @see de.chandre.admintool.quartz.AdminToolQuartzService#getJobDescription(org.quartz.JobKey)
+ */
+ @Override
+ public String getJobDescription(JobKey jobKey) throws SchedulerException {
+ return scheduler.getJobDetail(jobKey).getDescription();
+ }
+
+
+ /* (non-Javadoc)
+ * @see de.chandre.admintool.quartz.AdminToolQuartzService#getTriggers(org.quartz.JobKey)
+ */
+ @Override
+ public List extends Trigger> getTriggers(JobKey jobKey) throws SchedulerException {
+ List triggers = new ArrayList<>();
+ if (!CollectionUtils.isEmpty(scheduler.getTriggersOfJob(jobKey))) {
+ triggers.addAll(scheduler.getTriggersOfJob(jobKey));
+ Collections.sort(triggers, new Comparator() {
+ @Override
+ public int compare(Trigger o1, Trigger o2) {
+ return o1.getKey().compareTo(o2.getKey());
+ }
+ });
+ }
+ return triggers;
+ }
+
+ /* (non-Javadoc)
+ * @see de.chandre.admintool.quartz.AdminToolQuartzService#getCurrentlyExecutingAmount(org.quartz.JobKey)
+ */
+ @Override
+ public int getCurrentlyExecutingAmount(JobKey jobKey) throws SchedulerException {
+ List executingJobs = scheduler.getCurrentlyExecutingJobs();
+ JobDetail jobDetail = scheduler.getJobDetail(jobKey);
+ int numInstances = 0;
+ for (JobExecutionContext jobExecutionContext : executingJobs) {
+ JobDetail execJobDetail = jobExecutionContext.getJobDetail();
+ if (execJobDetail.getKey().equals(jobDetail.getKey())) {
+ if (LOGGER.isTraceEnabled())
+ LOGGER.trace(String.format("found running job for jobkey: (%s, %s)", jobKey.getGroup(), jobKey.getName()));
+ ++numInstances;
+ }
+ }
+ return numInstances;
+ }
+
+ /* (non-Javadoc)
+ * @see de.chandre.admintool.quartz.AdminToolQuartzService#isPaused(org.quartz.JobKey)
+ */
+ @Override
+ public boolean isPaused(JobKey jobKey) throws SchedulerException {
+ List extends Trigger> triggers = scheduler.getTriggersOfJob(jobKey);
+ boolean result = true;
+ if (null != triggers && triggers.size() > 0) {
+ for (Trigger trigger : triggers) {
+ result = result && scheduler.getTriggerState(trigger.getKey()) == TriggerState.PAUSED;
+ }
+ return result;
+ }
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see de.chandre.admintool.quartz.AdminToolQuartzService#isOnePaused(org.quartz.JobKey)
+ */
+ @Override
+ public boolean isOnePaused(JobKey jobKey) throws SchedulerException {
+ List extends Trigger> triggers = scheduler.getTriggersOfJob(jobKey);
+ boolean result = false;
+ if (null != triggers && triggers.size() > 0) {
+ for (Trigger trigger : triggers) {
+ result = result || scheduler.getTriggerState(trigger.getKey()) == TriggerState.PAUSED;
+ }
+ return result;
+ }
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see de.chandre.admintool.quartz.AdminToolQuartzService#isPaused(org.quartz.Trigger)
+ */
+ @Override
+ public boolean isPaused(Trigger trigger) throws SchedulerException {
+ return scheduler.getTriggerState(trigger.getKey()) == TriggerState.PAUSED;
+ }
+
+ /* (non-Javadoc)
+ * @see de.chandre.admintool.quartz.AdminToolQuartzService#getTriggerStateCssClass(org.quartz.JobKey, org.quartz.Trigger)
+ */
+ @Override
+ public String getTriggerStateCssClass(JobKey jobKey, Trigger trigger) throws SchedulerException {
+ if (isPaused(trigger)) {
+ return "btn-warning";
+ }
+ if (isCurrentlyRunning(jobKey, trigger)) {
+ return "btn-success";
+ }
+ return "btn-info";
+ }
+
+ /* (non-Javadoc)
+ * @see de.chandre.admintool.quartz.AdminToolQuartzService#getTriggerState(org.quartz.JobKey, org.quartz.Trigger)
+ */
+ @Override
+ public String getTriggerState(JobKey jobKey, Trigger trigger) throws SchedulerException {
+ if (isPaused(trigger)) {
+ return "paused";
+ }
+ if (isCurrentlyRunning(jobKey, trigger)) {
+ return "running";
+ }
+ return "pending";
+ }
+
+ /* (non-Javadoc)
+ * @see de.chandre.admintool.quartz.AdminToolQuartzService#isCurrentlyRunning(org.quartz.JobKey, org.quartz.Trigger)
+ */
+ @Override
+ public boolean isCurrentlyRunning(JobKey jobKey, Trigger trigger) throws SchedulerException {
+ List executingJobs = scheduler.getCurrentlyExecutingJobs();
+ JobDetail jobDetail = scheduler.getJobDetail(jobKey);
+ Trigger triggerFound = findTrigger(jobKey.getGroup(), jobKey.getName(), trigger.getKey().getGroup(), trigger.getKey().getName());
+ for (JobExecutionContext jobExecutionContext : executingJobs) {
+ JobDetail execJobDetail = jobExecutionContext.getJobDetail();
+ if (execJobDetail.getKey().equals(jobDetail.getKey())
+ && jobExecutionContext.getTrigger().getKey().equals(triggerFound.getKey())) {
+ if (LOGGER.isTraceEnabled())
+ LOGGER.trace(String.format("found running trigger for jobkey: (%s, %s, %s)",
+ jobKey.getGroup(), jobKey.getName(), trigger.getKey().getName()));
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see de.chandre.admintool.quartz.AdminToolQuartzService#getCronExpression(org.quartz.Trigger, java.lang.String)
+ */
+ @Override
+ public String getCronExpression(Trigger trigger, String defaultValue) {
+ return isCronTrigger(trigger) ? ((CronTrigger)trigger).getCronExpression() : defaultValue;
+ }
+
+ /* (non-Javadoc)
+ * @see de.chandre.admintool.quartz.AdminToolQuartzService#isCronTrigger(org.quartz.Trigger)
+ */
+ @Override
+ public boolean isCronTrigger(Trigger trigger) {
+ if (trigger instanceof CronTrigger) {
+ return true;
+ }
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see de.chandre.admintool.quartz.AdminToolQuartzService#isInteruptable(org.quartz.JobKey)
+ */
+ @Override
+ public boolean isInteruptable(JobKey jobKey) throws SchedulerException {
+ return InterruptableJob.class.isAssignableFrom(scheduler.getJobDetail(jobKey).getJobClass());
+ }
+
+ /* (non-Javadoc)
+ * @see de.chandre.admintool.quartz.AdminToolQuartzService#isStateful(org.quartz.JobKey)
+ */
+ @Override
+ public boolean isStateful(JobKey jobKey) throws SchedulerException {
+ Class> jobClazz = scheduler.getJobDetail(jobKey).getJobClass();
+ DisallowConcurrentExecution annotation1 = jobClazz.getAnnotation(DisallowConcurrentExecution.class);
+ PersistJobDataAfterExecution annotation2 = jobClazz.getAnnotation(PersistJobDataAfterExecution.class);
+ return StatefulJob.class.isAssignableFrom(jobClazz) || null != annotation1 || null != annotation2;
+ }
+
+ /* (non-Javadoc)
+ * @see de.chandre.admintool.quartz.AdminToolQuartzService#interruptJob(java.lang.String, java.lang.String)
+ */
+ @Override
+ public void interruptJob(String jobGroup, String jobName) throws SchedulerException {
+ if (!config.isInterruptJobAllowed()) {
+ LOGGER.warn("not allowed to interrupt any job");
+ return;
+ }
+ JobKey jobKey = new JobKey(jobName, jobGroup);
+ if (isInteruptable(jobKey)) {
+ List executingJobs = scheduler.getCurrentlyExecutingJobs();
+ JobDetail jobDetail = scheduler.getJobDetail(jobKey);
+ for (JobExecutionContext jobExecutionContext : executingJobs) {
+ JobDetail execJobDetail = jobExecutionContext.getJobDetail();
+ if (execJobDetail.getKey().equals(jobDetail.getKey())) {
+ if (LOGGER.isDebugEnabled())
+ LOGGER.debug(String.format("interrupting job (%s, %s)", jobDetail.getKey().getGroup(),
+ jobDetail.getKey().getName()));
+ ((InterruptableJob) jobExecutionContext.getJobInstance()).interrupt();
+ }
+ }
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see de.chandre.admintool.quartz.AdminToolQuartzService#interruptTrigger(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
+ */
+ @Override
+ public void interruptTrigger(String jobGroup, String jobName, final String triggerGroup, final String triggerName) throws SchedulerException {
+ if (!config.isInterruptTriggerAllowed()) {
+ LOGGER.warn("not allowed to interrupt any trigger");
+ return;
+ }
+ JobKey jobKey = new JobKey(jobName, jobGroup);
+ if (isInteruptable(jobKey)) {
+ List executingJobs = scheduler.getCurrentlyExecutingJobs();
+ JobDetail jobDetail = scheduler.getJobDetail(jobKey);
+ Trigger triggerFound = findTrigger(jobGroup, jobName, triggerGroup, triggerName);
+ for (JobExecutionContext jobExecutionContext : executingJobs) {
+ if (jobExecutionContext.getJobDetail().getKey().equals(jobDetail.getKey())
+ && jobExecutionContext.getTrigger().getKey().equals(triggerFound.getKey())) {
+ if (LOGGER.isDebugEnabled())
+ LOGGER.debug(String.format("interrupting jobTrigger (%s, %s, %s)", jobDetail.getKey().getGroup(),
+ jobDetail.getKey().getName(), triggerFound.getKey().getName()));
+ ((InterruptableJob) jobExecutionContext.getJobInstance()).interrupt();
+ }
+ }
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see de.chandre.admintool.quartz.AdminToolQuartzService#changeTriggerState(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
+ */
+ @Override
+ public void changeTriggerState(String groupName, String jobName, final String triggerGroup, final String triggerName) throws SchedulerException {
+ if (!config.isChangetTriggerStateAllowed()) {
+ LOGGER.warn("not allowed to change any trigger state");
+ return;
+ }
+ Trigger triggerFound = findTrigger(groupName, jobName, triggerGroup, triggerName);
+ if (null != triggerFound) {
+ // pause only the one trigger of job
+ changeTriggerState(triggerFound);
+ if (LOGGER.isDebugEnabled())
+ LOGGER.debug(String.format("pausing trigger for group: %s, job: %s, trigger: %s ", groupName, jobName,
+ triggerName));
+ } else {
+ if (LOGGER.isDebugEnabled())
+ LOGGER.debug(String.format("pausing all triggers for group: %s, job: %s", groupName, jobName));
+ List extends Trigger> triggers = scheduler.getTriggersOfJob(new JobKey(jobName, groupName));
+ for (Trigger trigger : triggers) {
+ // pause all triggers of job
+ changeTriggerState(trigger);
+ }
+ }
+ }
+
+ private Trigger findTrigger(String jobGroup, String jobName, final String triggerGroup, final String triggerName) throws SchedulerException {
+ List extends Trigger> triggers = scheduler.getTriggersOfJob(new JobKey(jobName, jobGroup));
+ if (!CollectionUtils.isEmpty(triggers)) {
+ Optional extends Trigger> tr = triggers.stream()
+ .filter(trigger -> trigger.getKey().getGroup().equals(triggerGroup)
+ && trigger.getKey().getName().equals(triggerName))
+ .findFirst();
+ if (tr.isPresent()) {
+ return tr.get();
+ }
+ }
+ return null;
+ }
+
+ private void changeTriggerState(Trigger trigger) throws SchedulerException {
+ if (scheduler.getTriggerState(trigger.getKey()) == TriggerState.PAUSED) {
+ scheduler.resumeTrigger(trigger.getKey());
+ } else {
+ scheduler.pauseTrigger(trigger.getKey());
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see de.chandre.admintool.quartz.AdminToolQuartzService#triggerJob(java.lang.String, java.lang.String)
+ */
+ @Override
+ public void triggerJob(String groupName, String jobName) throws SchedulerException {
+ if (!config.isExecuteJobAllowed()) {
+ LOGGER.warn("not allowed to execute any job");
+ return;
+ }
+ scheduler.triggerJob(new JobKey(jobName, groupName));
+ }
+
+ private JobDetail findJob(String groupName, String jobName) throws SchedulerException {
+ return scheduler.getJobDetail(new JobKey(jobName, groupName));
+ }
+
+ /* (non-Javadoc)
+ * @see de.chandre.admintool.quartz.AdminToolQuartzService#removeTrigger(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
+ */
+ @Override
+ public boolean removeTrigger(String groupName, String jobName, final String triggerGroup, final String triggerName) throws SchedulerException {
+ if (!config.isRemoveTriggerAllowed()) {
+ LOGGER.warn("not allowed to remove any trigger");
+ return false;
+ }
+ Trigger triggerFound = findTrigger(groupName, jobName, triggerGroup, triggerName);
+ if (null != triggerFound) {
+ return scheduler.unscheduleJob(triggerFound.getKey());
+ }
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see de.chandre.admintool.quartz.AdminToolQuartzService#getTriggerInfo(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
+ */
+ @Override
+ public JobTriggerTO getTriggerInfo(String groupName, String jobName, final String triggerGroup, final String triggerName) throws SchedulerException {
+ JobDetail detail = findJob(groupName, jobName);
+
+ JobTriggerTO triggerTO = new JobTriggerTO();
+ triggerTO.setJobGroup(groupName);
+ triggerTO.setJobName(jobName);
+ triggerTO.setDescription(detail.getDescription());
+
+ triggerTO.setJobData(detail.getJobDataMap());
+
+ if (null == triggerName) {
+ return triggerTO;
+ }
+ Trigger trigger = findTrigger(groupName, jobName, triggerGroup, triggerName);
+ triggerTO.setTriggerName(triggerName);
+ triggerTO.setTriggerGroup(trigger.getKey().getGroup());
+ triggerTO.setTriggerDescription(trigger.getDescription());
+
+ triggerTO.setMisfireInstruction(trigger.getMisfireInstruction());
+ triggerTO.setPriority(trigger.getPriority());
+ triggerTO.setCalendarName(trigger.getCalendarName());
+ triggerTO.setStartTime(trigger.getStartTime());
+
+ if (isCronTrigger(trigger)) {
+ addSimilarMisfireInstructionSet(triggerTO, null, TriggerType.CRON);
+ triggerTO.setCronExpression(((CronTrigger)trigger).getCronExpression());
+ triggerTO.setTimeZone(((CronTrigger)trigger).getTimeZone());
+ } else if (trigger instanceof SimpleTrigger) {
+ addSimpleMisfireInstructionSet(triggerTO, null);
+ triggerTO.setRepeatCount(((SimpleTrigger)trigger).getRepeatCount());
+ triggerTO.setRepeatInterval(((SimpleTrigger)trigger).getRepeatInterval());
+ } else if (trigger instanceof CalendarIntervalTrigger) {
+ addSimilarMisfireInstructionSet(triggerTO, null, TriggerType.CALENDAR);
+ triggerTO.setRepeatInterval(Long.valueOf(((CalendarIntervalTrigger)trigger).getRepeatInterval()));
+ triggerTO.setRepeatIntervalUnit(((CalendarIntervalTrigger)trigger).getRepeatIntervalUnit());
+ } else if (trigger instanceof DailyTimeIntervalTrigger) {
+ addSimilarMisfireInstructionSet(triggerTO, null, TriggerType.DAILY);
+ triggerTO.setRepeatInterval(Long.valueOf(((DailyTimeIntervalTrigger)trigger).getRepeatInterval()));
+ triggerTO.setRepeatIntervalUnit(((DailyTimeIntervalTrigger)trigger).getRepeatIntervalUnit());
+ triggerTO.setRepeatCount(((DailyTimeIntervalTrigger)trigger).getRepeatCount());
+ }
+
+ triggerTO.setJobData(trigger.getJobDataMap());
+
+ addGlobalMisfireInstructionSet(triggerTO, null);
+
+ return triggerTO;
+ }
+
+ /* (non-Javadoc)
+ * @see de.chandre.admintool.quartz.AdminToolQuartzService#getCalendarNames()
+ */
+ @Override
+ public Collection getCalendarNames() throws SchedulerException {
+ return scheduler.getCalendarNames();
+ }
+
+ /* (non-Javadoc)
+ * @see de.chandre.admintool.quartz.AdminToolQuartzService#getInstructionSets()
+ */
+ @Override
+ public Collection getInstructionSets() {
+ List instructionSets = new ArrayList<>();
+
+ addSimilarMisfireInstructionSet(null, instructionSets, TriggerType.CRON);
+ addSimpleMisfireInstructionSet(null, instructionSets);
+ addSimilarMisfireInstructionSet(null, instructionSets, TriggerType.CALENDAR);
+ addSimilarMisfireInstructionSet(null, instructionSets, TriggerType.DAILY);
+
+ addGlobalMisfireInstructionSet(null, instructionSets);
+
+ return instructionSets;
+ }
+
+ private void addGlobalMisfireInstructionSet(JobTriggerTO jobTrigger, List instructionSets) {
+ if (null != instructionSets) {
+ for (JobTriggerTO trigger : instructionSets) {
+ trigger.addMisfireInstructions("IGNORE_MISFIRE_POLICY", Trigger.MISFIRE_INSTRUCTION_IGNORE_MISFIRE_POLICY);
+ trigger.addMisfireInstructions("SMART_POLICY", Trigger.MISFIRE_INSTRUCTION_SMART_POLICY);
+ }
+ } else {
+ jobTrigger.addMisfireInstructions("IGNORE_MISFIRE_POLICY", Trigger.MISFIRE_INSTRUCTION_IGNORE_MISFIRE_POLICY);
+ jobTrigger.addMisfireInstructions("SMART_POLICY", Trigger.MISFIRE_INSTRUCTION_SMART_POLICY);
+ }
+ }
+
+ private void addSimpleMisfireInstructionSet(JobTriggerTO jobTrigger, List instructionSets) {
+ if (null == jobTrigger) {
+ jobTrigger = new JobTriggerTO();
+ }
+ jobTrigger.setTriggerType(TriggerType.SIMPLE);
+ jobTrigger.addMisfireInstructions("FIRE_NOW", SimpleTrigger.MISFIRE_INSTRUCTION_FIRE_NOW);
+ jobTrigger.addMisfireInstructions("RESCHEDULE_NEXT_WITH_EXISTING_COUNT", SimpleTrigger.MISFIRE_INSTRUCTION_RESCHEDULE_NEXT_WITH_EXISTING_COUNT);
+ jobTrigger.addMisfireInstructions("RESCHEDULE_NEXT_WITH_REMAINING_COUNT", SimpleTrigger.MISFIRE_INSTRUCTION_RESCHEDULE_NEXT_WITH_REMAINING_COUNT);
+ jobTrigger.addMisfireInstructions("RESCHEDULE_NOW_WITH_EXISTING_REPEAT_COUNT", SimpleTrigger.MISFIRE_INSTRUCTION_RESCHEDULE_NOW_WITH_EXISTING_REPEAT_COUNT);
+ jobTrigger.addMisfireInstructions("RESCHEDULE_NOW_WITH_REMAINING_REPEAT_COUNT", SimpleTrigger.MISFIRE_INSTRUCTION_RESCHEDULE_NOW_WITH_REMAINING_REPEAT_COUNT);
+
+ addSimpleRepeatIntervalUnits(jobTrigger);
+ if (null != instructionSets) {
+ instructionSets.add(jobTrigger);
+ }
+
+ }
+
+ private void addSimilarMisfireInstructionSet(JobTriggerTO jobTrigger, List instructionSets, TriggerType type) {
+ if (null == jobTrigger) {
+ jobTrigger = new JobTriggerTO();
+ }
+ jobTrigger.setTriggerType(type);
+ jobTrigger.addMisfireInstructions("DO_NOTHING", CronTrigger.MISFIRE_INSTRUCTION_DO_NOTHING);
+ jobTrigger.addMisfireInstructions("FIRE_ONCE_NOW", CronTrigger.MISFIRE_INSTRUCTION_FIRE_ONCE_NOW);
+
+ if (type == TriggerType.CALENDAR || type == TriggerType.DAILY) {
+ addSimpleRepeatIntervalUnits(jobTrigger);
+ addExtendedRepeatIntervalUnits(jobTrigger);
+ }
+ if (null != instructionSets) {
+ instructionSets.add(jobTrigger);
+ }
+ }
+
+ private void addSimpleRepeatIntervalUnits(JobTriggerTO jobTrigger) {
+ jobTrigger.addRepeatIntervalUnits("Milliseconds", IntervalUnit.MILLISECOND);
+ jobTrigger.addRepeatIntervalUnits("Second", IntervalUnit.SECOND);
+ jobTrigger.addRepeatIntervalUnits("Minute", IntervalUnit.MINUTE);
+ jobTrigger.addRepeatIntervalUnits("Hour", IntervalUnit.HOUR);
+ }
+
+ private void addExtendedRepeatIntervalUnits(JobTriggerTO jobTrigger) {
+ jobTrigger.addRepeatIntervalUnits("Day", IntervalUnit.DAY);
+ jobTrigger.addRepeatIntervalUnits("Week", IntervalUnit.WEEK);
+ jobTrigger.addRepeatIntervalUnits("Month", IntervalUnit.MONTH);
+ jobTrigger.addRepeatIntervalUnits("Year", IntervalUnit.YEAR);
+ }
+
+ private String nvl(String check, String defaultVal) {
+ return StringUtils.isEmpty(check) ? defaultVal : check;
+ }
+
+ /* (non-Javadoc)
+ * @see de.chandre.admintool.quartz.AdminToolQuartzService#changeJob(de.chandre.admintool.quartz.JobTriggerTO)
+ */
+ @Override
+ public boolean changeJob(JobTriggerTO triggerTO) throws SchedulerException {
+ if (!config.isChangeJobInfoAllowed()) {
+ LOGGER.warn("not allowed to change any job info");
+ return false;
+ }
+ JobDetail detail = findJob(triggerTO.getOriginalJobGroup(), triggerTO.getOriginalJobName());
+ if (null == detail) {
+ return false;
+ }
+ JobBuilder builder = detail.getJobBuilder()
+ .withIdentity(nvl(triggerTO.getJobName(), triggerTO.getOriginalJobName()),
+ nvl(triggerTO.getJobGroup(), triggerTO.getOriginalJobGroup()))
+ .withDescription(triggerTO.getDescription());
+
+ //Builder don't have an interface :-/ so code duplication with triggers
+ if (null != triggerTO.getJobData() && !triggerTO.getJobData().isEmpty()) {
+ for (Entry entry : triggerTO.getJobData().entrySet()) {
+ if (String.class.isAssignableFrom(entry.getValue().getClass())) {
+ builder.usingJobData(entry.getKey(), (String)entry.getValue());
+ } else if (Boolean.class.isAssignableFrom(entry.getValue().getClass())) {
+ builder.usingJobData(entry.getKey(), (Boolean)entry.getValue());
+ } else if (Integer.class.isAssignableFrom(entry.getValue().getClass())) {
+ builder.usingJobData(entry.getKey(), (Integer)entry.getValue());
+ } else if (Long.class.isAssignableFrom(entry.getValue().getClass())) {
+ builder.usingJobData(entry.getKey(), (Long)entry.getValue());
+ } else if (Double.class.isAssignableFrom(entry.getValue().getClass())) {
+ builder.usingJobData(entry.getKey(), (Double)entry.getValue());
+ } else if (Float.class.isAssignableFrom(entry.getValue().getClass())) {
+ builder.usingJobData(entry.getKey(), (Float)entry.getValue());
+ }
+ if (LOGGER.isDebugEnabled())
+ LOGGER.debug("jobDataEntry: " + entry.getKey() +", val: "+ entry.getValue() + ", class: " + entry.getValue().getClass());
+ }
+ }
+
+ scheduler.addJob(builder.build(), true, true);
+ return true;
+ }
+
+ /* (non-Javadoc)
+ * @see de.chandre.admintool.quartz.AdminToolQuartzService#changeTrigger(de.chandre.admintool.quartz.JobTriggerTO, boolean)
+ */
+ @Override
+ public boolean changeTrigger(JobTriggerTO triggerTO, boolean add) throws SchedulerException {
+ if (!config.isChangeTriggerAllowed()) {
+ LOGGER.warn("not allowed to change any trigger");
+ return false;
+ }
+ JobDetail detail = findJob(triggerTO.getOriginalJobGroup(), triggerTO.getOriginalJobName());
+ if (null == detail) {
+ return false;
+ }
+ Trigger trigger = findTrigger(triggerTO.getOriginalJobGroup(), triggerTO.getOriginalJobName(),
+ triggerTO.getOriginalTriggerGroup(), triggerTO.getOriginalTriggerName());
+ if(null == trigger) {
+ if (add) {
+ this.scheduler.scheduleJob(buildTrigger(detail, null, triggerTO));
+ return true;
+ }
+ return false;
+ }
+ this.scheduler.rescheduleJob(trigger.getKey(), buildTrigger(detail, trigger, triggerTO));
+ return true;
+ }
+
+ private Trigger buildTrigger(JobDetail detail, Trigger trigger, JobTriggerTO triggerTO) {
+
+ TriggerBuilder builder = TriggerBuilder.newTrigger().forJob(detail).withIdentity(
+ nvl(triggerTO.getTriggerName(), triggerTO.getOriginalTriggerName()),
+ nvl(triggerTO.getTriggerGroup(), triggerTO.getOriginalTriggerGroup()));
+
+ ScheduleBuilder extends Trigger> schedule = null;
+ switch (triggerTO.getTriggerType()) {
+ case CRON: {
+ schedule = CronScheduleBuilder.cronSchedule(triggerTO.getCronExpression());
+ if (null != triggerTO.getTimeZone()) {
+ ((CronScheduleBuilder)schedule).inTimeZone(triggerTO.getTimeZone());
+ }
+ switch (triggerTO.getMisfireInstruction()) {
+ case CronTrigger.MISFIRE_INSTRUCTION_FIRE_ONCE_NOW:
+ ((CronScheduleBuilder)schedule).withMisfireHandlingInstructionFireAndProceed();
+ break;
+ case CronTrigger.MISFIRE_INSTRUCTION_IGNORE_MISFIRE_POLICY:
+ ((CronScheduleBuilder)schedule).withMisfireHandlingInstructionIgnoreMisfires();
+ break;
+ case CronTrigger.MISFIRE_INSTRUCTION_SMART_POLICY:
+ case CronTrigger.MISFIRE_INSTRUCTION_DO_NOTHING:
+ default:
+ ((CronScheduleBuilder)schedule).withMisfireHandlingInstructionDoNothing();
+ break;
+ }
+ break;
+ }
+ case SIMPLE: {
+ schedule = SimpleScheduleBuilder.simpleSchedule();
+ if (triggerTO.getRepeatCount() < 0) {
+ ((SimpleScheduleBuilder)schedule).repeatForever();
+ }
+ else {
+ ((SimpleScheduleBuilder)schedule).withRepeatCount(triggerTO.getRepeatCount());
+ }
+ switch (triggerTO.getRepeatIntervalUnit()) {
+ case MILLISECOND:
+ ((SimpleScheduleBuilder)schedule).withIntervalInMilliseconds(Long.valueOf(triggerTO.getRepeatInterval()));
+ break;
+ case SECOND:
+ ((SimpleScheduleBuilder)schedule).withIntervalInSeconds(Long.valueOf(triggerTO.getRepeatInterval()).intValue());
+ break;
+ case MINUTE:
+ ((SimpleScheduleBuilder)schedule).withIntervalInMinutes(Long.valueOf(triggerTO.getRepeatInterval()).intValue());
+ break;
+ case HOUR:
+ ((SimpleScheduleBuilder)schedule).withIntervalInHours(Long.valueOf(triggerTO.getRepeatInterval()).intValue());
+ break;
+ case DAY:
+ ((SimpleScheduleBuilder)schedule).withIntervalInHours(Long.valueOf(triggerTO.getRepeatInterval()).intValue() * 24);
+ break;
+ case WEEK:
+ ((SimpleScheduleBuilder)schedule).withIntervalInHours(Long.valueOf(triggerTO.getRepeatInterval()).intValue() * 24 * 7);
+ break;
+ default:
+ break;
+ }
+ switch (triggerTO.getMisfireInstruction()) {
+ case SimpleTrigger.MISFIRE_INSTRUCTION_RESCHEDULE_NEXT_WITH_EXISTING_COUNT:
+ ((SimpleScheduleBuilder)schedule).withMisfireHandlingInstructionNextWithExistingCount();
+ break;
+ case SimpleTrigger.MISFIRE_INSTRUCTION_RESCHEDULE_NEXT_WITH_REMAINING_COUNT:
+ ((SimpleScheduleBuilder)schedule).withMisfireHandlingInstructionNextWithRemainingCount();
+ break;
+ case SimpleTrigger.MISFIRE_INSTRUCTION_RESCHEDULE_NOW_WITH_EXISTING_REPEAT_COUNT:
+ ((SimpleScheduleBuilder)schedule).withMisfireHandlingInstructionNowWithExistingCount();
+ break;
+ case SimpleTrigger.MISFIRE_INSTRUCTION_RESCHEDULE_NOW_WITH_REMAINING_REPEAT_COUNT:
+ ((SimpleScheduleBuilder)schedule).withMisfireHandlingInstructionNowWithRemainingCount();
+ break;
+ case SimpleTrigger.MISFIRE_INSTRUCTION_IGNORE_MISFIRE_POLICY:
+ ((SimpleScheduleBuilder)schedule).withMisfireHandlingInstructionIgnoreMisfires();
+ break;
+ case SimpleTrigger.MISFIRE_INSTRUCTION_SMART_POLICY:
+ case SimpleTrigger.MISFIRE_INSTRUCTION_FIRE_NOW:
+ default:
+ ((SimpleScheduleBuilder)schedule).withMisfireHandlingInstructionFireNow();
+ break;
+ }
+
+ }
+ case CALENDAR: {
+ schedule = CalendarIntervalScheduleBuilder.calendarIntervalSchedule().withInterval(
+ Long.valueOf(triggerTO.getRepeatInterval()).intValue(), triggerTO.getRepeatIntervalUnit());
+ switch (triggerTO.getMisfireInstruction()) {
+ case CalendarIntervalTrigger.MISFIRE_INSTRUCTION_FIRE_ONCE_NOW:
+ ((CalendarIntervalScheduleBuilder)schedule).withMisfireHandlingInstructionFireAndProceed();
+ break;
+ case CalendarIntervalTrigger.MISFIRE_INSTRUCTION_IGNORE_MISFIRE_POLICY:
+ ((CalendarIntervalScheduleBuilder)schedule).withMisfireHandlingInstructionIgnoreMisfires();
+ break;
+ case CalendarIntervalTrigger.MISFIRE_INSTRUCTION_SMART_POLICY:
+ case CalendarIntervalTrigger.MISFIRE_INSTRUCTION_DO_NOTHING:
+ default:
+ ((CalendarIntervalScheduleBuilder)schedule).withMisfireHandlingInstructionDoNothing();
+ break;
+ }
+ break;
+ }
+ case DAILY: {
+ schedule = DailyTimeIntervalScheduleBuilder.dailyTimeIntervalSchedule().withInterval(
+ Long.valueOf(triggerTO.getRepeatInterval()).intValue(), triggerTO.getRepeatIntervalUnit())
+ .withRepeatCount(triggerTO.getRepeatCount());
+ switch (triggerTO.getMisfireInstruction()) {
+ case DailyTimeIntervalTrigger.MISFIRE_INSTRUCTION_FIRE_ONCE_NOW:
+ ((DailyTimeIntervalScheduleBuilder)schedule).withMisfireHandlingInstructionFireAndProceed();
+ break;
+ case DailyTimeIntervalTrigger.MISFIRE_INSTRUCTION_IGNORE_MISFIRE_POLICY:
+ ((DailyTimeIntervalScheduleBuilder)schedule).withMisfireHandlingInstructionIgnoreMisfires();
+ break;
+ case DailyTimeIntervalTrigger.MISFIRE_INSTRUCTION_SMART_POLICY:
+ case DailyTimeIntervalTrigger.MISFIRE_INSTRUCTION_DO_NOTHING:
+ default:
+ ((DailyTimeIntervalScheduleBuilder)schedule).withMisfireHandlingInstructionDoNothing();
+ break;
+ }
+ break;
+ }
+ default:
+ break;
+ }
+
+ if (null != triggerTO.getJobData() && !triggerTO.getJobData().isEmpty()) {
+ for (Entry entry : triggerTO.getJobData().entrySet()) {
+ if (String.class.isAssignableFrom(entry.getValue().getClass())) {
+ builder.usingJobData(entry.getKey(), (String)entry.getValue());
+ } else if (Boolean.class.isAssignableFrom(entry.getValue().getClass())) {
+ builder.usingJobData(entry.getKey(), (Boolean)entry.getValue());
+ } else if (Integer.class.isAssignableFrom(entry.getValue().getClass())) {
+ builder.usingJobData(entry.getKey(), (Integer)entry.getValue());
+ } else if (Long.class.isAssignableFrom(entry.getValue().getClass())) {
+ builder.usingJobData(entry.getKey(), (Long)entry.getValue());
+ } else if (Double.class.isAssignableFrom(entry.getValue().getClass())) {
+ builder.usingJobData(entry.getKey(), (Double)entry.getValue());
+ } else if (Float.class.isAssignableFrom(entry.getValue().getClass())) {
+ builder.usingJobData(entry.getKey(), (Float)entry.getValue());
+ }
+ if (LOGGER.isDebugEnabled())
+ LOGGER.debug("jobDataEntry: " + entry.getKey() +", val: "+ entry.getValue() + ", class: " + entry.getValue().getClass());
+ }
+ }
+// else if (null != trigger && null != trigger.getJobDataMap() && !trigger.getJobDataMap().isEmpty()) {
+// builder.usingJobData(trigger.getJobDataMap());
+// }
+
+ builder.withSchedule(schedule);
+
+ if (null != triggerTO.getPriority()) {
+ builder.withPriority(triggerTO.getPriority());
+ }
+ builder.withDescription(triggerTO.getTriggerDescription());
+ if (null == triggerTO.getStartTime()) {
+ builder.startAt(new Date());
+ } else {
+ builder.startAt(triggerTO.getStartTime());
+ }
+ return builder.build();
+ }
+}
diff --git a/admin-tools-quartz/src/main/resources/i18n/admintool/quartz-messages.properties b/admin-tools-quartz/src/main/resources/i18n/admintool/quartz-messages.properties
index 67138c4..b8dddab 100644
--- a/admin-tools-quartz/src/main/resources/i18n/admintool/quartz-messages.properties
+++ b/admin-tools-quartz/src/main/resources/i18n/admintool/quartz-messages.properties
@@ -1,37 +1,47 @@
-ui.admintool.core.quartz.displayName=Quartz Scheduler
-ui.admintool.core.quartz.config.displayName=Quartz-Config
-ui.admintool.core.quartz.jobs.displayName=Quartz-Jobs
-
-ui.admintool.core.quartz.config.subHeadline=Quartz Scheduler MetaData
-ui.admintool.core.quartz.config.tblHead.name=Name
-ui.admintool.core.quartz.config.tblHead.val=Value
-
-ui.admintool.core.quartz.config.tbl.isRunning=Scheduler is running
-ui.admintool.core.quartz.config.tbl.schedulerName=Scheduler name
-ui.admintool.core.quartz.config.tbl.schedulerInstance=Scheduler instance Id
-ui.admintool.core.quartz.config.tbl.schedulerVersion=Scheduler version
-ui.admintool.core.quartz.config.tbl.jobsExecuted=Number of jobs executed
-ui.admintool.core.quartz.config.tbl.isStarted=is started
-ui.admintool.core.quartz.config.tbl.inStandby=is in standby
-ui.admintool.core.quartz.config.tbl.isRemote=Scheduler is remote
-ui.admintool.core.quartz.config.tbl.runningSince=is running since
-ui.admintool.core.quartz.config.tbl.schedulerClass=Scheduler Class
-ui.admintool.core.quartz.config.tbl.threadPoolClass=Thread pool Class
-ui.admintool.core.quartz.config.tbl.threadPoolSize=Thread pool size
-ui.admintool.core.quartz.config.tbl.jobStoreClass=JobStore Class
-ui.admintool.core.quartz.config.tbl.jobStoreClustered=Job store is clustered
-ui.admintool.core.quartz.config.tbl.jobStorePersisted=Job store supports persistence
-
-ui.admintool.core.quartz.jobs.subHeadline=Quartz Scheduler Jobs
-ui.admintool.core.quartz.jobs.text.autoReload=(auto reload)
-
-ui.admintool.core.quartz.jobs.text.noDescription=-- no description --
-ui.admintool.core.quartz.jobs.text.triggerName=Trigger Name
-ui.admintool.core.quartz.jobs.text.cronExpression=Cron Expression
-ui.admintool.core.quartz.jobs.text.prevFireTime=Previous Fire Time
-ui.admintool.core.quartz.jobs.text.nextFireTime=Next Fire Time
-ui.admintool.core.quartz.jobs.text.state=State
-ui.admintool.core.quartz.jobs.text.interruptable=Interr.
-ui.admintool.core.quartz.jobs.text.change=Change
-ui.admintool.core.quartz.jobs.text.remove=Remove
-ui.admintool.core.quartz.jobs.text.notAvailable=N/A
\ No newline at end of file
+ui.admintool.core.quartz.displayName=Quartz Scheduler
+ui.admintool.core.quartz.config.displayName=Quartz-Config
+ui.admintool.core.quartz.jobs.displayName=Quartz-Jobs
+
+ui.admintool.core.quartz.config.subHeadline=Quartz Scheduler MetaData
+ui.admintool.core.quartz.config.tblHead.name=Name
+ui.admintool.core.quartz.config.tblHead.val=Value
+
+ui.admintool.core.quartz.config.tbl.isRunning=Scheduler is running
+ui.admintool.core.quartz.config.tbl.schedulerName=Scheduler name
+ui.admintool.core.quartz.config.tbl.schedulerInstance=Scheduler instance Id
+ui.admintool.core.quartz.config.tbl.schedulerVersion=Scheduler version
+ui.admintool.core.quartz.config.tbl.jobsExecuted=Number of jobs executed
+ui.admintool.core.quartz.config.tbl.isStarted=is started
+ui.admintool.core.quartz.config.tbl.inStandby=is in standby
+ui.admintool.core.quartz.config.tbl.isRemote=Scheduler is remote
+ui.admintool.core.quartz.config.tbl.runningSince=is running since
+ui.admintool.core.quartz.config.tbl.schedulerClass=Scheduler Class
+ui.admintool.core.quartz.config.tbl.threadPoolClass=Thread pool Class
+ui.admintool.core.quartz.config.tbl.threadPoolSize=Thread pool size
+ui.admintool.core.quartz.config.tbl.jobStoreClass=JobStore Class
+ui.admintool.core.quartz.config.tbl.jobStoreClustered=Job store is clustered
+ui.admintool.core.quartz.config.tbl.jobStorePersisted=Job store supports persistence
+
+ui.admintool.core.quartz.jobs.subHeadline=Quartz Scheduler Jobs
+ui.admintool.core.quartz.jobs.text.autoReload=(auto reload)
+
+ui.admintool.core.quartz.jobs.text.noDescription=-- no description --
+ui.admintool.core.quartz.jobs.text.triggerName=Trigger Name
+ui.admintool.core.quartz.jobs.text.cronExpression=Cron Expression
+ui.admintool.core.quartz.jobs.text.prevFireTime=Previous Fire Time
+ui.admintool.core.quartz.jobs.text.nextFireTime=Next Fire Time
+ui.admintool.core.quartz.jobs.text.state=State
+ui.admintool.core.quartz.jobs.text.interruptable=Interr.
+ui.admintool.core.quartz.jobs.text.change=Change
+ui.admintool.core.quartz.jobs.text.remove=Remove
+ui.admintool.core.quartz.jobs.text.notAvailable=N/A
+
+ui.admintool.core.quartz.jobs.text.state.title=Change Job-Trigger state
+ui.admintool.core.quartz.jobs.text.interruptable.title=is interruptable
+ui.admintool.core.quartz.jobs.text.change.title=Change Job-Trigger
+ui.admintool.core.quartz.jobs.text.remove.title=Remove Job-Trigger
+
+ui.admintool.core.quartz.jobs.button.state.title=Activate/Pause Job-Trigger
+ui.admintool.core.quartz.jobs.button.interruptable.title=Interrupt Job-Trigger
+ui.admintool.core.quartz.jobs.button.change.title=Change Job-Trigger data
+ui.admintool.core.quartz.jobs.button.remove.title=Remove the Job-Trigger
\ No newline at end of file
diff --git a/admin-tools-quartz/src/main/resources/i18n/admintool/quartz-messages_en.properties b/admin-tools-quartz/src/main/resources/i18n/admintool/quartz-messages_en.properties
index 67138c4..b8dddab 100644
--- a/admin-tools-quartz/src/main/resources/i18n/admintool/quartz-messages_en.properties
+++ b/admin-tools-quartz/src/main/resources/i18n/admintool/quartz-messages_en.properties
@@ -1,37 +1,47 @@
-ui.admintool.core.quartz.displayName=Quartz Scheduler
-ui.admintool.core.quartz.config.displayName=Quartz-Config
-ui.admintool.core.quartz.jobs.displayName=Quartz-Jobs
-
-ui.admintool.core.quartz.config.subHeadline=Quartz Scheduler MetaData
-ui.admintool.core.quartz.config.tblHead.name=Name
-ui.admintool.core.quartz.config.tblHead.val=Value
-
-ui.admintool.core.quartz.config.tbl.isRunning=Scheduler is running
-ui.admintool.core.quartz.config.tbl.schedulerName=Scheduler name
-ui.admintool.core.quartz.config.tbl.schedulerInstance=Scheduler instance Id
-ui.admintool.core.quartz.config.tbl.schedulerVersion=Scheduler version
-ui.admintool.core.quartz.config.tbl.jobsExecuted=Number of jobs executed
-ui.admintool.core.quartz.config.tbl.isStarted=is started
-ui.admintool.core.quartz.config.tbl.inStandby=is in standby
-ui.admintool.core.quartz.config.tbl.isRemote=Scheduler is remote
-ui.admintool.core.quartz.config.tbl.runningSince=is running since
-ui.admintool.core.quartz.config.tbl.schedulerClass=Scheduler Class
-ui.admintool.core.quartz.config.tbl.threadPoolClass=Thread pool Class
-ui.admintool.core.quartz.config.tbl.threadPoolSize=Thread pool size
-ui.admintool.core.quartz.config.tbl.jobStoreClass=JobStore Class
-ui.admintool.core.quartz.config.tbl.jobStoreClustered=Job store is clustered
-ui.admintool.core.quartz.config.tbl.jobStorePersisted=Job store supports persistence
-
-ui.admintool.core.quartz.jobs.subHeadline=Quartz Scheduler Jobs
-ui.admintool.core.quartz.jobs.text.autoReload=(auto reload)
-
-ui.admintool.core.quartz.jobs.text.noDescription=-- no description --
-ui.admintool.core.quartz.jobs.text.triggerName=Trigger Name
-ui.admintool.core.quartz.jobs.text.cronExpression=Cron Expression
-ui.admintool.core.quartz.jobs.text.prevFireTime=Previous Fire Time
-ui.admintool.core.quartz.jobs.text.nextFireTime=Next Fire Time
-ui.admintool.core.quartz.jobs.text.state=State
-ui.admintool.core.quartz.jobs.text.interruptable=Interr.
-ui.admintool.core.quartz.jobs.text.change=Change
-ui.admintool.core.quartz.jobs.text.remove=Remove
-ui.admintool.core.quartz.jobs.text.notAvailable=N/A
\ No newline at end of file
+ui.admintool.core.quartz.displayName=Quartz Scheduler
+ui.admintool.core.quartz.config.displayName=Quartz-Config
+ui.admintool.core.quartz.jobs.displayName=Quartz-Jobs
+
+ui.admintool.core.quartz.config.subHeadline=Quartz Scheduler MetaData
+ui.admintool.core.quartz.config.tblHead.name=Name
+ui.admintool.core.quartz.config.tblHead.val=Value
+
+ui.admintool.core.quartz.config.tbl.isRunning=Scheduler is running
+ui.admintool.core.quartz.config.tbl.schedulerName=Scheduler name
+ui.admintool.core.quartz.config.tbl.schedulerInstance=Scheduler instance Id
+ui.admintool.core.quartz.config.tbl.schedulerVersion=Scheduler version
+ui.admintool.core.quartz.config.tbl.jobsExecuted=Number of jobs executed
+ui.admintool.core.quartz.config.tbl.isStarted=is started
+ui.admintool.core.quartz.config.tbl.inStandby=is in standby
+ui.admintool.core.quartz.config.tbl.isRemote=Scheduler is remote
+ui.admintool.core.quartz.config.tbl.runningSince=is running since
+ui.admintool.core.quartz.config.tbl.schedulerClass=Scheduler Class
+ui.admintool.core.quartz.config.tbl.threadPoolClass=Thread pool Class
+ui.admintool.core.quartz.config.tbl.threadPoolSize=Thread pool size
+ui.admintool.core.quartz.config.tbl.jobStoreClass=JobStore Class
+ui.admintool.core.quartz.config.tbl.jobStoreClustered=Job store is clustered
+ui.admintool.core.quartz.config.tbl.jobStorePersisted=Job store supports persistence
+
+ui.admintool.core.quartz.jobs.subHeadline=Quartz Scheduler Jobs
+ui.admintool.core.quartz.jobs.text.autoReload=(auto reload)
+
+ui.admintool.core.quartz.jobs.text.noDescription=-- no description --
+ui.admintool.core.quartz.jobs.text.triggerName=Trigger Name
+ui.admintool.core.quartz.jobs.text.cronExpression=Cron Expression
+ui.admintool.core.quartz.jobs.text.prevFireTime=Previous Fire Time
+ui.admintool.core.quartz.jobs.text.nextFireTime=Next Fire Time
+ui.admintool.core.quartz.jobs.text.state=State
+ui.admintool.core.quartz.jobs.text.interruptable=Interr.
+ui.admintool.core.quartz.jobs.text.change=Change
+ui.admintool.core.quartz.jobs.text.remove=Remove
+ui.admintool.core.quartz.jobs.text.notAvailable=N/A
+
+ui.admintool.core.quartz.jobs.text.state.title=Change Job-Trigger state
+ui.admintool.core.quartz.jobs.text.interruptable.title=is interruptable
+ui.admintool.core.quartz.jobs.text.change.title=Change Job-Trigger
+ui.admintool.core.quartz.jobs.text.remove.title=Remove Job-Trigger
+
+ui.admintool.core.quartz.jobs.button.state.title=Activate/Pause Job-Trigger
+ui.admintool.core.quartz.jobs.button.interruptable.title=Interrupt Job-Trigger
+ui.admintool.core.quartz.jobs.button.change.title=Change Job-Trigger data
+ui.admintool.core.quartz.jobs.button.remove.title=Remove the Job-Trigger
\ No newline at end of file
diff --git a/admin-tools-quartz/src/main/resources/templates/admintool/quartz/includes/quartzJobs.inc.html b/admin-tools-quartz/src/main/resources/templates/admintool/quartz/includes/quartzJobs.inc.html
index cfd8620..8562707 100644
--- a/admin-tools-quartz/src/main/resources/templates/admintool/quartz/includes/quartzJobs.inc.html
+++ b/admin-tools-quartz/src/main/resources/templates/admintool/quartz/includes/quartzJobs.inc.html
@@ -1,155 +1,177 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- |
-
-
- |
-
-
-
-
- |
-
-
- |
-
-
- |
-
-
- |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- |
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/admin-tools-security/admin-tools-security-simple/README.md b/admin-tools-security/admin-tools-security-simple/README.md
index f995b28..8dba8b8 100644
--- a/admin-tools-security/admin-tools-security-simple/README.md
+++ b/admin-tools-security/admin-tools-security-simple/README.md
@@ -19,12 +19,12 @@ Until version 1.1.6 the following dependencies must be used.
de.chandre.admin-tools
admin-tools-core
- 1.1.6.2
+ 1.1.6.3
de.chandre.admin-tools
admin-tools-core-security
- 1.1.6.2
+ 1.1.6.3
```
diff --git a/message-properties/admintool_de.properties b/message-properties/admintool_de.properties
new file mode 100644
index 0000000..a4270fd
--- /dev/null
+++ b/message-properties/admintool_de.properties
@@ -0,0 +1,179 @@
+## /admintool/core-messages.properties
+ui.admintool.core.menu.headline=HAUPTMENÜ
+
+ui.admintool.core.modal.error.title=Fehler
+ui.admintool.core.modal.error.text=Es ist ein Fehler aufgetreten
+
+ui.admintool.core.modal.confirm.title=Bestätigung
+ui.admintool.core.modal.confirm.text=Bestätigen sie die Aktion?
+
+ui.admintool.core.modal.btn.save=Speichern
+ui.admintool.core.modal.btn.delete=Löschen
+ui.admintool.core.modal.btn.close=Schließen
+ui.admintool.core.modal.btn.confirm=OK
+
+## /admintool/security-messages.properties
+ui.admintool.core.security.userMenu.signIn=Einloggen
+ui.admintool.core.security.userMenu.signOut=Ausloggen
+ui.admintool.core.security.login.error.headline=Fehler
+ui.admintool.core.security.login.error.message=Benutzername oder Passwort falsch
+
+ui.admintool.core.security.users.displayName=Benutzer
+ui.admintool.core.security.users.headline=Alle Benutzer
+ui.admintool.core.security.users.subHeadline=Benutzer
+ui.admintool.core.security.users.tableHead.name=Name
+ui.admintool.core.security.users.tableHead.enabled=Enabled
+ui.admintool.core.security.users.tableHead.expired=Expired
+ui.admintool.core.security.users.tableHead.locked=Locked
+ui.admintool.core.security.users.tableHead.credExp=CredentialsExpired
+ui.admintool.core.security.users.tableHead.roles=Roles
+
+ui.admintool.core.security.users.modal.head=Benutzer bearbeiten
+ui.admintool.core.security.users.modal.name=Name
+ui.admintool.core.security.users.modal.password=Passwort
+
+## /admintool/dbbrowser-messages.properties
+ui.admintool.core.dbbrowser.displayName=DB-Browser
+
+## /admintool/filebrowser-messages.properties
+ui.admintool.core.filebrowser.displayName=Datei-Browser
+
+ui.admintool.core.filebrowser.exception.headline=Es ist ein Fehler aufgetreten!
+
+ui.admintool.core.filebrowser.text.roots=Roots:
+
+ui.admintool.core.filebrowser.tableHead.name=Name
+ui.admintool.core.filebrowser.tableHead.size=Größe
+ui.admintool.core.filebrowser.tableHead.type=Typ
+ui.admintool.core.filebrowser.tableHead.date=Datum
+
+ui.admintool.core.filebrowser.text.up=[..]
+ui.admintool.core.filebrowser.text.dirs=[Ordner]
+
+ui.admintool.core.filebrowser.btn.selectAllDirs=Alle Ordner auswählen
+ui.admintool.core.filebrowser.btn.selectAllFiles=Alle Dateien auswählen
+ui.admintool.core.filebrowser.btn.downloadAsZip=Ausgewähle Dateien als Zip herunterladen
+
+ui.admintool.core.filebrowser.modal.createFolder.headline=Order erstellen
+ui.admintool.core.filebrowser.modal.createFolder.input.name=Ordername
+
+ui.admintool.core.filebrowser.modal.delete.confirm.headline=Löschen bestätigen
+ui.admintool.core.filebrowser.modal.delete.confirm.text=Wollen sie diese Ressource wirklich löschen?
+
+ui.admintool.core.filebrowser.modal.upload.headline=Upload
+
+ui.admintool.core.filebrowser.modal.info.headline=Datei-Info
+ui.admintool.core.filebrowser.modal.info.file.lastModified=zuletzt geändert
+ui.admintool.core.filebrowser.modal.info.file.creationTime=erstellt
+ui.admintool.core.filebrowser.modal.info.file.lastAccessTime=letzter Zugriff
+ui.admintool.core.filebrowser.modal.info.file.checksumCRC32=CRC32
+ui.admintool.core.filebrowser.modal.info.file.md5Hex=MD5
+ui.admintool.core.filebrowser.modal.info.file.sha1Hex=SHA-1
+ui.admintool.core.filebrowser.modal.info.file.sha256Hex=SHA-256
+ui.admintool.core.filebrowser.modal.info.file.permissions=Rechte
+ui.admintool.core.filebrowser.modal.info.file.canRead=lesbar
+ui.admintool.core.filebrowser.modal.info.file.canWrite=schreibbar
+ui.admintool.core.filebrowser.modal.info.file.canExecute=ausführbar
+ui.admintool.core.filebrowser.modal.info.file.isHidden=versteckt
+ui.admintool.core.filebrowser.modal.info.file.isArchive=Archiv
+ui.admintool.core.filebrowser.modal.info.file.isSymbolicLink=Symbolischer Link
+ui.admintool.core.filebrowser.modal.info.subHeadline.size=Größeninformation
+ui.admintool.core.filebrowser.modal.info.file.size=Datei größe
+ui.admintool.core.filebrowser.modal.info.disk.totalSpace=HDD total
+ui.admintool.core.filebrowser.modal.info.disk.usableSpace=HDD nutzbar
+ui.admintool.core.filebrowser.modal.info.disk.freeSpace=HDD frei
+
+ui.admintool.core.fileviewer.link.back=zurück zum Datei-Browser
+ui.admintool.core.fileviewer.text.encoding=Encoding
+ui.admintool.core.fileviewer.btn.reload=reload
+ui.admintool.core.fileviewer.text.states=Datei-Rechte:
+ui.admintool.core.fileviewer.btn.save=Änderungen speichern
+
+## /admintool/jmx-messages.properties
+ui.admintool.core.jmx.displayName=JMX
+
+## /admintool/log4j2-messages.properties
+ui.admintool.core.log4j.displayName=Log4j2 Config
+ui.admintool.core.log4j.loggers.displayName=Log4j2 Loggers
+ui.admintool.core.log4j.console.displayName=Log4j2 Console
+
+ui.admintool.core.log4j.loggers.parent.subHeadline=Parent Loggers
+ui.admintool.core.log4j.loggers.parent.btn.remove=Remove Custom Parent Loggers
+
+ui.admintool.core.log4j.loggers.all.subHeadline=All Loggers
+ui.admintool.core.log4j.loggers.all.btn.remove=Remove Custom Loggers
+
+ui.admintool.core.log4j.loggers.tableHead.name=Name
+ui.admintool.core.log4j.loggers.tableHead.level=Level
+ui.admintool.core.log4j.loggers.tableHead.action=Change Level
+
+ui.admintool.core.log4j.console.input.headline=Log4j Console Configuration
+ui.admintool.core.log4j.console.input.name=Logger Name
+ui.admintool.core.log4j.console.input.pattern=Logger Pattern
+ui.admintool.core.log4j.console.input.level=Logger Level
+ui.admintool.core.log4j.console.input.recursive=Recursive
+ui.admintool.core.log4j.console.input.override=Override log level
+ui.admintool.core.log4j.console.input.encoding=Logger Encoding
+ui.admintool.core.log4j.console.input.loggers=Logger Names
+
+ui.admintool.core.log4j.console.out.headline=Log4j Konsolenausgabe
+ui.admintool.core.log4j.console.out.input.scroll=Zum Boden scrollen
+
+ui.admintool.core.log4j.console.btn.start=Konsole starten
+ui.admintool.core.log4j.console.btn.stop=Konsole stoppen
+ui.admintool.core.log4j.console.btn.clear=Konsole leeren
+
+## /admintool/melody-messages.properties
+ui.admintool.core.javamelody.displayName=JavaMelody
+
+## /admintool/properties-messages.properties
+ui.admintool.core.properties.displayName=System-Information
+
+## /admintool/quartz-messages.properties
+ui.admintool.core.quartz.displayName=Quartz Scheduler
+ui.admintool.core.quartz.config.displayName=Quartz-Config
+ui.admintool.core.quartz.jobs.displayName=Quartz-Jobs
+
+ui.admintool.core.quartz.config.subHeadline=Quartz Scheduler Meta-Daten
+ui.admintool.core.quartz.config.tblHead.name=Name
+ui.admintool.core.quartz.config.tblHead.val=Wert
+
+ui.admintool.core.quartz.config.tbl.isRunning=Scheduler läuft
+ui.admintool.core.quartz.config.tbl.schedulerName=Scheduler Name
+ui.admintool.core.quartz.config.tbl.schedulerInstance=Scheduler Instanz-Id
+ui.admintool.core.quartz.config.tbl.schedulerVersion=Scheduler Version
+ui.admintool.core.quartz.config.tbl.jobsExecuted=Anzahl ausgeführter Jobs
+ui.admintool.core.quartz.config.tbl.isStarted=ist gestartet
+ui.admintool.core.quartz.config.tbl.inStandby=ist im Stand-by
+ui.admintool.core.quartz.config.tbl.isRemote=Scheduler ist Remote
+ui.admintool.core.quartz.config.tbl.runningSince=Scheduler läuft seit
+ui.admintool.core.quartz.config.tbl.schedulerClass=Scheduler Class
+ui.admintool.core.quartz.config.tbl.threadPoolClass=Thread pool Class
+ui.admintool.core.quartz.config.tbl.threadPoolSize=Thread pool size
+ui.admintool.core.quartz.config.tbl.jobStoreClass=JobStore Class
+ui.admintool.core.quartz.config.tbl.jobStoreClustered=Job store clustered
+ui.admintool.core.quartz.config.tbl.jobStorePersisted=Job store unterstützt Persistenz
+
+ui.admintool.core.quartz.jobs.subHeadline=Quartz Scheduler Jobs
+ui.admintool.core.quartz.jobs.text.autoReload=(auto reload)
+
+ui.admintool.core.quartz.jobs.text.noDescription=-- no description --
+ui.admintool.core.quartz.jobs.text.triggerName=Trigger Name
+ui.admintool.core.quartz.jobs.text.cronExpression=Cron Expression
+ui.admintool.core.quartz.jobs.text.prevFireTime=Letzte Ausführung
+ui.admintool.core.quartz.jobs.text.nextFireTime=Nächste Ausführung
+ui.admintool.core.quartz.jobs.text.state=Zustand
+ui.admintool.core.quartz.jobs.text.interruptable=Interr.
+ui.admintool.core.quartz.jobs.text.change=Ändern
+ui.admintool.core.quartz.jobs.text.remove=Löschen
+ui.admintool.core.quartz.jobs.text.notAvailable=N/A
+
+ui.admintool.core.quartz.jobs.text.state.title=Job-Trigger Zustand ändern
+ui.admintool.core.quartz.jobs.text.interruptable.title=is unterbrechbar
+ui.admintool.core.quartz.jobs.text.change.title=Job-Trigger ändern
+ui.admintool.core.quartz.jobs.text.remove.title=Job-Trigger löschen
+
+ui.admintool.core.quartz.jobs.button.state.title=Job-Trigger aktivieren/pausieren
+ui.admintool.core.quartz.jobs.button.interruptable.title=Job-Trigger unterbrechen
+ui.admintool.core.quartz.jobs.button.change.title=Job-Trigger Daten ändern
+ui.admintool.core.quartz.jobs.button.remove.title=Job-Trigger löschen
\ No newline at end of file
diff --git a/message-properties/admintool_en.properties b/message-properties/admintool_en.properties
new file mode 100644
index 0000000..ac7cf7d
--- /dev/null
+++ b/message-properties/admintool_en.properties
@@ -0,0 +1,179 @@
+## /admintool/core-messages.properties
+ui.admintool.core.menu.headline=MAINMENU
+
+ui.admintool.core.modal.error.title=Error
+ui.admintool.core.modal.error.text=An Error has been occurred
+
+ui.admintool.core.modal.confirm.title=Confirm
+ui.admintool.core.modal.confirm.text=Do you confirm?
+
+ui.admintool.core.modal.btn.save=Save
+ui.admintool.core.modal.btn.delete=Delete
+ui.admintool.core.modal.btn.close=Close
+ui.admintool.core.modal.btn.confirm=Confirm
+
+## /admintool/security-messages.properties
+ui.admintool.core.security.userMenu.signIn=Sign in
+ui.admintool.core.security.userMenu.signOut=Sign out
+ui.admintool.core.security.login.error.headline=Error
+ui.admintool.core.security.login.error.message=User name and/or password incorrect
+
+ui.admintool.core.security.users.displayName=Users
+ui.admintool.core.security.users.headline=All Users
+ui.admintool.core.security.users.subHeadline=Users
+ui.admintool.core.security.users.tableHead.name=Name
+ui.admintool.core.security.users.tableHead.enabled=Enabled
+ui.admintool.core.security.users.tableHead.expired=Expired
+ui.admintool.core.security.users.tableHead.locked=Locked
+ui.admintool.core.security.users.tableHead.credExp=CredentialsExpired
+ui.admintool.core.security.users.tableHead.roles=Roles
+
+ui.admintool.core.security.users.modal.head=Edit User
+ui.admintool.core.security.users.modal.name=Name
+ui.admintool.core.security.users.modal.password=Password
+
+## /admintool/dbbrowser-messages.properties
+ui.admintool.core.dbbrowser.displayName=DB Browser
+
+## /admintool/filebrowser-messages.properties
+ui.admintool.core.filebrowser.displayName=Filebrowser
+
+ui.admintool.core.filebrowser.exception.headline=An Exception has been occurred!
+
+ui.admintool.core.filebrowser.text.roots=Roots:
+
+ui.admintool.core.filebrowser.tableHead.name=Name
+ui.admintool.core.filebrowser.tableHead.size=Size
+ui.admintool.core.filebrowser.tableHead.type=Type
+ui.admintool.core.filebrowser.tableHead.date=Date
+
+ui.admintool.core.filebrowser.text.up=[..]
+ui.admintool.core.filebrowser.text.dirs=[directories]
+
+ui.admintool.core.filebrowser.btn.selectAllDirs=Select all dirs
+ui.admintool.core.filebrowser.btn.selectAllFiles=Select all files
+ui.admintool.core.filebrowser.btn.downloadAsZip=Download selected files as ZIP
+
+ui.admintool.core.filebrowser.modal.createFolder.headline=Create folder
+ui.admintool.core.filebrowser.modal.createFolder.input.name=Folder name
+
+ui.admintool.core.filebrowser.modal.delete.confirm.headline=Confirm
+ui.admintool.core.filebrowser.modal.delete.confirm.text=Do you really want to delete this resource?
+
+ui.admintool.core.filebrowser.modal.upload.headline=Upload
+
+ui.admintool.core.filebrowser.modal.info.headline=FileInfo
+ui.admintool.core.filebrowser.modal.info.file.lastModified=Last modified
+ui.admintool.core.filebrowser.modal.info.file.creationTime=Creation time
+ui.admintool.core.filebrowser.modal.info.file.lastAccessTime=Last access
+ui.admintool.core.filebrowser.modal.info.file.checksumCRC32=CRC32
+ui.admintool.core.filebrowser.modal.info.file.md5Hex=MD5
+ui.admintool.core.filebrowser.modal.info.file.sha1Hex=SHA-1
+ui.admintool.core.filebrowser.modal.info.file.sha256Hex=SHA-256
+ui.admintool.core.filebrowser.modal.info.file.permissions=Permissions
+ui.admintool.core.filebrowser.modal.info.file.canRead=Readable
+ui.admintool.core.filebrowser.modal.info.file.canWrite=Writable
+ui.admintool.core.filebrowser.modal.info.file.canExecute=Executable
+ui.admintool.core.filebrowser.modal.info.file.isHidden=Hidden
+ui.admintool.core.filebrowser.modal.info.file.isArchive=Archive
+ui.admintool.core.filebrowser.modal.info.file.isSymbolicLink=Symbolic Link
+ui.admintool.core.filebrowser.modal.info.subHeadline.size=Size information
+ui.admintool.core.filebrowser.modal.info.file.size=File size
+ui.admintool.core.filebrowser.modal.info.disk.totalSpace=HDD total space
+ui.admintool.core.filebrowser.modal.info.disk.usableSpace=HDD useable space
+ui.admintool.core.filebrowser.modal.info.disk.freeSpace=HDD free space
+
+ui.admintool.core.fileviewer.link.back=back to Filebrowser
+ui.admintool.core.fileviewer.text.encoding=Encoding
+ui.admintool.core.fileviewer.btn.reload=reload
+ui.admintool.core.fileviewer.text.states=Security states:
+ui.admintool.core.fileviewer.btn.save=Save changes
+
+## /admintool/jmx-messages.properties
+ui.admintool.core.jmx.displayName=JMX
+
+## /admintool/log4j2-messages.properties
+ui.admintool.core.log4j.displayName=Log4j2 Config
+ui.admintool.core.log4j.loggers.displayName=Log4j2 Loggers
+ui.admintool.core.log4j.console.displayName=Log4j2 Console
+
+ui.admintool.core.log4j.loggers.parent.subHeadline=Parent Loggers
+ui.admintool.core.log4j.loggers.parent.btn.remove=Remove Custom Parent Loggers
+
+ui.admintool.core.log4j.loggers.all.subHeadline=All Loggers
+ui.admintool.core.log4j.loggers.all.btn.remove=Remove Custom Loggers
+
+ui.admintool.core.log4j.loggers.tableHead.name=Name
+ui.admintool.core.log4j.loggers.tableHead.level=Level
+ui.admintool.core.log4j.loggers.tableHead.action=Change Level
+
+ui.admintool.core.log4j.console.input.headline=Log4j Console Configuration
+ui.admintool.core.log4j.console.input.name=Logger Name
+ui.admintool.core.log4j.console.input.pattern=Logger Pattern
+ui.admintool.core.log4j.console.input.level=Logger Level
+ui.admintool.core.log4j.console.input.recursive=Recursive
+ui.admintool.core.log4j.console.input.override=Override log level
+ui.admintool.core.log4j.console.input.encoding=Logger Encoding
+ui.admintool.core.log4j.console.input.loggers=Logger Names
+
+ui.admintool.core.log4j.console.out.headline=Log4j Console Output
+ui.admintool.core.log4j.console.out.input.scroll=Scroll to bottom
+
+ui.admintool.core.log4j.console.btn.start=Start Console
+ui.admintool.core.log4j.console.btn.stop=Stop Console
+ui.admintool.core.log4j.console.btn.clear=Clear Console
+
+## /admintool/melody-messages.properties
+ui.admintool.core.javamelody.displayName=JavaMelody
+
+## /admintool/properties-messages.properties
+ui.admintool.core.properties.displayName=Properties
+
+## /admintool/quartz-messages.properties
+ui.admintool.core.quartz.displayName=Quartz Scheduler
+ui.admintool.core.quartz.config.displayName=Quartz-Config
+ui.admintool.core.quartz.jobs.displayName=Quartz-Jobs
+
+ui.admintool.core.quartz.config.subHeadline=Quartz Scheduler MetaData
+ui.admintool.core.quartz.config.tblHead.name=Name
+ui.admintool.core.quartz.config.tblHead.val=Value
+
+ui.admintool.core.quartz.config.tbl.isRunning=Scheduler is running
+ui.admintool.core.quartz.config.tbl.schedulerName=Scheduler name
+ui.admintool.core.quartz.config.tbl.schedulerInstance=Scheduler instance Id
+ui.admintool.core.quartz.config.tbl.schedulerVersion=Scheduler version
+ui.admintool.core.quartz.config.tbl.jobsExecuted=Number of jobs executed
+ui.admintool.core.quartz.config.tbl.isStarted=is started
+ui.admintool.core.quartz.config.tbl.inStandby=is in standby
+ui.admintool.core.quartz.config.tbl.isRemote=Scheduler is remote
+ui.admintool.core.quartz.config.tbl.runningSince=is running since
+ui.admintool.core.quartz.config.tbl.schedulerClass=Scheduler Class
+ui.admintool.core.quartz.config.tbl.threadPoolClass=Thread pool Class
+ui.admintool.core.quartz.config.tbl.threadPoolSize=Thread pool size
+ui.admintool.core.quartz.config.tbl.jobStoreClass=JobStore Class
+ui.admintool.core.quartz.config.tbl.jobStoreClustered=Job store is clustered
+ui.admintool.core.quartz.config.tbl.jobStorePersisted=Job store supports persistence
+
+ui.admintool.core.quartz.jobs.subHeadline=Quartz Scheduler Jobs
+ui.admintool.core.quartz.jobs.text.autoReload=(auto reload)
+
+ui.admintool.core.quartz.jobs.text.noDescription=-- no description --
+ui.admintool.core.quartz.jobs.text.triggerName=Trigger Name
+ui.admintool.core.quartz.jobs.text.cronExpression=Cron Expression
+ui.admintool.core.quartz.jobs.text.prevFireTime=Previous Fire Time
+ui.admintool.core.quartz.jobs.text.nextFireTime=Next Fire Time
+ui.admintool.core.quartz.jobs.text.state=State
+ui.admintool.core.quartz.jobs.text.interruptable=Interr.
+ui.admintool.core.quartz.jobs.text.change=Change
+ui.admintool.core.quartz.jobs.text.remove=Remove
+ui.admintool.core.quartz.jobs.text.notAvailable=N/A
+
+ui.admintool.core.quartz.jobs.text.state.title=Change Job-Trigger state
+ui.admintool.core.quartz.jobs.text.interruptable.title=is interruptable
+ui.admintool.core.quartz.jobs.text.change.title=Change Job-Trigger
+ui.admintool.core.quartz.jobs.text.remove.title=Remove Job-Trigger
+
+ui.admintool.core.quartz.jobs.button.state.title=Activate/Pause Job-Trigger
+ui.admintool.core.quartz.jobs.button.interruptable.title=Interrupt Job-Trigger
+ui.admintool.core.quartz.jobs.button.change.title=Change Job-Trigger data
+ui.admintool.core.quartz.jobs.button.remove.title=Remove the Job-Trigger
\ No newline at end of file