From 10e5aef037e2e450059a2777246625af22d68846 Mon Sep 17 00:00:00 2001 From: "Christian P. MOMON" Date: Thu, 15 Apr 2021 04:39:38 +0200 Subject: [PATCH] Added service.registration.load feature. --- src/fr/devinsy/statoolinfos/core/Service.java | 50 ++++++++ .../statoolinfos/htmlize/ServiceListView.java | 5 + .../statoolinfos/htmlize/ServicePage.java | 5 + .../statoolinfos/htmlize/service.xhtml | 1 + .../htmlize/serviceListView.xhtml | 47 +------- .../htmlize/stuff/circle-icons/lock-mono.svg | 78 ++++++++++++ .../htmlize/stuff/circle-icons/lock.svg | 112 ++++++++++++++++++ .../stuff/circle-icons/unlock-mono.svg | 75 ++++++++++++ .../htmlize/stuff/circle-icons/unlock.svg | 112 ++++++++++++++++++ 9 files changed, 442 insertions(+), 43 deletions(-) create mode 100644 src/fr/devinsy/statoolinfos/htmlize/stuff/circle-icons/lock-mono.svg create mode 100644 src/fr/devinsy/statoolinfos/htmlize/stuff/circle-icons/lock.svg create mode 100644 src/fr/devinsy/statoolinfos/htmlize/stuff/circle-icons/unlock-mono.svg create mode 100644 src/fr/devinsy/statoolinfos/htmlize/stuff/circle-icons/unlock.svg diff --git a/src/fr/devinsy/statoolinfos/core/Service.java b/src/fr/devinsy/statoolinfos/core/Service.java index 8c321ef..9d92ca6 100644 --- a/src/fr/devinsy/statoolinfos/core/Service.java +++ b/src/fr/devinsy/statoolinfos/core/Service.java @@ -488,6 +488,26 @@ public class Service extends PathPropertyList return result; } + /** + * Gets the registration load. + * + * @return the registration load + */ + public String getRegistrationLoad() + { + String result; + + result = get("service.registration.load"); + + if (result == null) + { + result = "open"; + } + + // + return result; + } + /** * Gets the service install type. * @@ -808,6 +828,36 @@ public class Service extends PathPropertyList return result; } + /** + * Checks if is registration load full. + * + * @return true, if is registration load full + */ + public boolean isRegistrationLoadFull() + { + boolean result; + + result = StringUtils.containsIgnoreCase(get("service.registration.load"), "full"); + + // + return result; + } + + /** + * Checks if is registration load open. + * + * @return true, if is registration load open + */ + public boolean isRegistrationLoadOpen() + { + boolean result; + + result = StringUtils.containsIgnoreCase(get("service.registration.load"), "open"); + + // + return result; + } + /** * Checks if is registration member. * diff --git a/src/fr/devinsy/statoolinfos/htmlize/ServiceListView.java b/src/fr/devinsy/statoolinfos/htmlize/ServiceListView.java index ad729a2..e180132 100644 --- a/src/fr/devinsy/statoolinfos/htmlize/ServiceListView.java +++ b/src/fr/devinsy/statoolinfos/htmlize/ServiceListView.java @@ -138,6 +138,11 @@ public class ServiceListView data.setAttribute("serviceListLine", index, "serviceListLineRegistrationClientImg", "class", ""); data.getIdData("serviceListLine", index, "serviceListLineRegistrationClientImg").getAttribute("class").setMode(DisplayMode.REPLACE); } + if (service.isRegistrationLoadFull()) + { + data.setAttribute("serviceListLine", index, "serviceListLineRegistrationLoadImg", "class", ""); + data.getIdData("serviceListLine", index, "serviceListLineRegistrationLoadImg").getAttribute("class").setMode(DisplayMode.REPLACE); + } // data.setEscapedContent("softwareName", StringUtils.defaultIfBlank(service.getSoftwareName(), "n/a")); diff --git a/src/fr/devinsy/statoolinfos/htmlize/ServicePage.java b/src/fr/devinsy/statoolinfos/htmlize/ServicePage.java index c2abd53..10a9d5a 100644 --- a/src/fr/devinsy/statoolinfos/htmlize/ServicePage.java +++ b/src/fr/devinsy/statoolinfos/htmlize/ServicePage.java @@ -193,6 +193,11 @@ public class ServicePage data.setAttribute("registrationClientImg", "class", ""); data.getIdData("registrationClientImg").getAttribute("class").setMode(DisplayMode.REPLACE); } + if (service.isRegistrationLoadFull()) + { + data.setAttribute("registrationLoadImg", "class", ""); + data.getIdData("registrationLoadImg").getAttribute("class").setMode(DisplayMode.REPLACE); + } // data.setEscapedContent("softwareName", StringUtils.defaultIfBlank(service.getSoftwareName(), "n/a")); diff --git a/src/fr/devinsy/statoolinfos/htmlize/service.xhtml b/src/fr/devinsy/statoolinfos/htmlize/service.xhtml index bafd74b..cb56ecf 100644 --- a/src/fr/devinsy/statoolinfos/htmlize/service.xhtml +++ b/src/fr/devinsy/statoolinfos/htmlize/service.xhtml @@ -30,6 +30,7 @@ +
Liens : diff --git a/src/fr/devinsy/statoolinfos/htmlize/serviceListView.xhtml b/src/fr/devinsy/statoolinfos/htmlize/serviceListView.xhtml index b9e1d9b..b74e27f 100644 --- a/src/fr/devinsy/statoolinfos/htmlize/serviceListView.xhtml +++ b/src/fr/devinsy/statoolinfos/htmlize/serviceListView.xhtml @@ -43,48 +43,6 @@
- @@ -94,7 +52,7 @@ - + @@ -136,6 +94,9 @@ +
Logiciel Utilisateurs mensuels StatutInscriptionInscription Liens Logiciel Date + + diff --git a/src/fr/devinsy/statoolinfos/htmlize/stuff/circle-icons/lock-mono.svg b/src/fr/devinsy/statoolinfos/htmlize/stuff/circle-icons/lock-mono.svg new file mode 100644 index 0000000..8b30682 --- /dev/null +++ b/src/fr/devinsy/statoolinfos/htmlize/stuff/circle-icons/lock-mono.svg @@ -0,0 +1,78 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/src/fr/devinsy/statoolinfos/htmlize/stuff/circle-icons/lock.svg b/src/fr/devinsy/statoolinfos/htmlize/stuff/circle-icons/lock.svg new file mode 100644 index 0000000..770f54b --- /dev/null +++ b/src/fr/devinsy/statoolinfos/htmlize/stuff/circle-icons/lock.svg @@ -0,0 +1,112 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/src/fr/devinsy/statoolinfos/htmlize/stuff/circle-icons/unlock-mono.svg b/src/fr/devinsy/statoolinfos/htmlize/stuff/circle-icons/unlock-mono.svg new file mode 100644 index 0000000..71e78a0 --- /dev/null +++ b/src/fr/devinsy/statoolinfos/htmlize/stuff/circle-icons/unlock-mono.svg @@ -0,0 +1,75 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/src/fr/devinsy/statoolinfos/htmlize/stuff/circle-icons/unlock.svg b/src/fr/devinsy/statoolinfos/htmlize/stuff/circle-icons/unlock.svg new file mode 100644 index 0000000..8059a54 --- /dev/null +++ b/src/fr/devinsy/statoolinfos/htmlize/stuff/circle-icons/unlock.svg @@ -0,0 +1,112 @@ + + + +image/svg+xml \ No newline at end of file