From d56364e3d6f43be1bcaf5532e1ccf77c5ad40ec6 Mon Sep 17 00:00:00 2001 From: GedMarc Date: Sat, 2 Mar 2024 21:26:50 +0200 Subject: [PATCH] Move Plugin Details to Client --- .../core/events/activate/ActivateAdapter.java | 134 ++++++------ .../beforeactivate/BeforeActivateAdapter.java | 124 ++++++----- .../beforeclose/BeforeCloseAdapter.java | 124 ++++++----- .../events/beforeload/BeforeLoadAdapter.java | 124 ++++++----- .../events/beforestop/BeforeStopAdapter.java | 122 ++++++----- .../jwebmp/core/events/blur/BlurAdapter.java | 122 ++++++----- .../buttonclick/ButtonClickAdapter.java | 130 ++++++------ .../core/events/cancel/CancelAdapter.java | 126 ++++++------ .../core/events/change/ChangeAdapter.java | 126 ++++++------ .../core/events/click/ClickAdapter.java | 149 +++++++------- .../core/events/close/CloseAdapter.java | 130 ++++++------ .../core/events/complete/CompleteAdapter.java | 130 ++++++------ .../core/events/create/CreateAdapter.java | 126 ++++++------ .../events/deactivate/DeactivateAdapter.java | 130 ++++++------ .../jwebmp/core/events/drag/DragAdapter.java | 128 ++++++------ .../events/dragstart/DragStartAdapter.java | 124 ++++++----- .../core/events/dragstop/DragStopAdapter.java | 130 ++++++------ .../jwebmp/core/events/drop/DropAdapter.java | 130 ++++++------ .../core/events/dropout/DropOutAdapter.java | 128 ++++++------ .../core/events/dropover/DropOverAdapter.java | 130 ++++++------ .../core/events/focus/FocusAdapter.java | 130 ++++++------ .../core/events/submit/SubmitAdapter.java | 138 ++++++------- .../core/plugins/ComponentInformation.java | 70 ------- .../core/plugins/FeatureInformation.java | 34 --- .../core/plugins/PluginInformation.java | 194 ------------------ .../com/jwebmp/core/plugins/PluginStatus.java | 12 -- src/main/java/module-info.java | 4 +- 27 files changed, 1354 insertions(+), 1795 deletions(-) delete mode 100644 src/main/java/com/jwebmp/core/plugins/ComponentInformation.java delete mode 100644 src/main/java/com/jwebmp/core/plugins/FeatureInformation.java delete mode 100644 src/main/java/com/jwebmp/core/plugins/PluginInformation.java delete mode 100644 src/main/java/com/jwebmp/core/plugins/PluginStatus.java diff --git a/src/main/java/com/jwebmp/core/events/activate/ActivateAdapter.java b/src/main/java/com/jwebmp/core/events/activate/ActivateAdapter.java index 3a558b2dd..4471a124c 100644 --- a/src/main/java/com/jwebmp/core/events/activate/ActivateAdapter.java +++ b/src/main/java/com/jwebmp/core/events/activate/ActivateAdapter.java @@ -17,7 +17,7 @@ package com.jwebmp.core.events.activate; -import com.guicedee.client.*; +import com.guicedee.client.IGuiceContext; import com.jwebmp.core.Event; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; @@ -25,7 +25,6 @@ import com.jwebmp.core.base.html.interfaces.events.GlobalEvents; import com.jwebmp.core.events.services.IOnActivateService; import com.jwebmp.core.htmlbuilder.javascript.events.enumerations.EventTypes; -import com.jwebmp.core.plugins.ComponentInformation; import lombok.extern.java.Log; import java.util.ServiceLoader; @@ -37,82 +36,77 @@ * * @author GedMarc */ -@ComponentInformation(name = "Activate Event", - description = "Server Side Event for Active Adapter.") @Log public abstract class ActivateAdapter> - extends Event - implements GlobalEvents + extends Event + implements GlobalEvents { - /** - * Performs a click - * - * @param component - * The component this click is going to be acting on - */ - public ActivateAdapter(com.jwebmp.core.base.interfaces.IComponentHierarchyBase component) - { - super(EventTypes.activate, component); - } + /** + * Performs a click + * + * @param component The component this click is going to be acting on + */ + public ActivateAdapter(com.jwebmp.core.base.interfaces.IComponentHierarchyBase component) + { + super(EventTypes.activate, component); + } - @Override - public void fireEvent(AjaxCall call, AjaxResponse response) - { - try - { - onActivate(call, response); - onCall(); - } - catch (Exception e) - { - ActivateAdapter.log.log(Level.WARNING, "Error In Firing Event", e); - } - } + @Override + public void fireEvent(AjaxCall call, AjaxResponse response) + { + try + { + onActivate(call, response); + onCall(); + } + catch (Exception e) + { + ActivateAdapter.log.log(Level.WARNING, "Error In Firing Event", e); + } + } - @Override - public void preConfigure() - { - if (!isConfigured()) - { - onCreate(); - } - super.preConfigure(); - } + @Override + public void preConfigure() + { + if (!isConfigured()) + { + onCreate(); + } + super.preConfigure(); + } - /** - * Occurs when the event is called - */ - @SuppressWarnings("unchecked") - private void onCreate() - { - @SuppressWarnings("rawtypes") - Set services = IGuiceContext.instance() + /** + * Occurs when the event is called + */ + @SuppressWarnings("unchecked") + private void onCreate() + { + @SuppressWarnings("rawtypes") + Set services = IGuiceContext.instance() .getLoader(IOnActivateService.class, ServiceLoader.load(IOnActivateService.class)); - services.forEach(service -> service.onCreate(this)); - } + services.forEach(service -> service.onCreate(this)); + } - /** - * Triggers on Click - *

- * - * @param call - * The physical AJAX call - * @param response - * The physical Ajax Receiver - */ - public abstract void onActivate(AjaxCall call, AjaxResponse response); + /** + * Triggers on Click + *

+ * + * @param call The physical AJAX call + * @param response The physical Ajax Receiver + */ + public abstract void onActivate(AjaxCall call, AjaxResponse response); - /** - * Occurs when the event is called - */ - @SuppressWarnings("unchecked") - private void onCall() - { - @SuppressWarnings("rawtypes") - Set services = IGuiceContext - .instance() - .getLoader(IOnActivateService.class, ServiceLoader.load(IOnActivateService.class)); - services.forEach(service -> service.onCall(this)); - } + /** + * Occurs when the event is called + */ + @SuppressWarnings("unchecked") + private void onCall() + { + @SuppressWarnings("rawtypes") + Set services = IGuiceContext + .instance() + .getLoader(IOnActivateService.class, ServiceLoader.load(IOnActivateService.class)); + services.forEach(service -> service.onCall(this)); + } } diff --git a/src/main/java/com/jwebmp/core/events/beforeactivate/BeforeActivateAdapter.java b/src/main/java/com/jwebmp/core/events/beforeactivate/BeforeActivateAdapter.java index 267f37654..706c437d9 100644 --- a/src/main/java/com/jwebmp/core/events/beforeactivate/BeforeActivateAdapter.java +++ b/src/main/java/com/jwebmp/core/events/beforeactivate/BeforeActivateAdapter.java @@ -17,7 +17,7 @@ package com.jwebmp.core.events.beforeactivate; -import com.guicedee.client.*; +import com.guicedee.client.IGuiceContext; import com.jwebmp.core.Event; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; @@ -25,7 +25,6 @@ import com.jwebmp.core.base.html.interfaces.events.GlobalEvents; import com.jwebmp.core.events.services.IOnBeforeActivateService; import com.jwebmp.core.htmlbuilder.javascript.events.enumerations.EventTypes; -import com.jwebmp.core.plugins.ComponentInformation; import lombok.extern.java.Log; import java.util.ServiceLoader; @@ -37,79 +36,74 @@ * * @author GedMarc */ -@ComponentInformation(name = "Before Activate Event", - description = "Server Side Event for Before Active Adapter.") @Log public abstract class BeforeActivateAdapter> - extends Event - implements GlobalEvents + extends Event + implements GlobalEvents { - - /** - * Performs a click - * - * @param component - * The component this click is going to be acting on - */ - public BeforeActivateAdapter(com.jwebmp.core.base.interfaces.IComponentHierarchyBase component) - { - super(EventTypes.beforeActivate, component); - } + /** + * Performs a click + * + * @param component The component this click is going to be acting on + */ + public BeforeActivateAdapter(com.jwebmp.core.base.interfaces.IComponentHierarchyBase component) + { + super(EventTypes.beforeActivate, component); + } - @Override - public void fireEvent(AjaxCall call, AjaxResponse response) - { - try - { - onBeforeActivate(call, response); - onCall(); - } - catch (Exception e) - { - BeforeActivateAdapter.log.log(Level.SEVERE, "Error In Firing Event", e); - } - } - /** - * Triggers on Click - *

- * - * @param call - * The physical AJAX call - * @param response - * The physical Ajax Receiver - */ - public abstract void onBeforeActivate(AjaxCall call, AjaxResponse response); + @Override + public void fireEvent(AjaxCall call, AjaxResponse response) + { + try + { + onBeforeActivate(call, response); + onCall(); + } + catch (Exception e) + { + BeforeActivateAdapter.log.log(Level.SEVERE, "Error In Firing Event", e); + } + } - private void onCall() - { - Set services = IGuiceContext.instance() + /** + * Triggers on Click + *

+ * + * @param call The physical AJAX call + * @param response The physical Ajax Receiver + */ + public abstract void onBeforeActivate(AjaxCall call, AjaxResponse response); + + private void onCall() + { + Set services = IGuiceContext.instance() .getLoader(IOnBeforeActivateService.class, ServiceLoader.load(IOnBeforeActivateService.class)); - services.forEach(service -> service.onCall(this)); - } + services.forEach(service -> service.onCall(this)); + } - @Override - public void preConfigure() - { - if (!isConfigured()) - { - onCreate(); - } - super.preConfigure(); - } + @Override + public void preConfigure() + { + if (!isConfigured()) + { + onCreate(); + } + super.preConfigure(); + } - /** - * Occurs when the event is called - */ - @SuppressWarnings("unchecked") - private void onCreate() - { - Set services = IGuiceContext - .instance() - .getLoader(IOnBeforeActivateService.class, ServiceLoader.load(IOnBeforeActivateService.class)); - services.forEach(service -> service.onCreate(this)); - } + /** + * Occurs when the event is called + */ + @SuppressWarnings("unchecked") + private void onCreate() + { + Set services = IGuiceContext + .instance() + .getLoader(IOnBeforeActivateService.class, ServiceLoader.load(IOnBeforeActivateService.class)); + services.forEach(service -> service.onCreate(this)); + } } diff --git a/src/main/java/com/jwebmp/core/events/beforeclose/BeforeCloseAdapter.java b/src/main/java/com/jwebmp/core/events/beforeclose/BeforeCloseAdapter.java index a4d778776..d33e7d49e 100644 --- a/src/main/java/com/jwebmp/core/events/beforeclose/BeforeCloseAdapter.java +++ b/src/main/java/com/jwebmp/core/events/beforeclose/BeforeCloseAdapter.java @@ -17,7 +17,7 @@ package com.jwebmp.core.events.beforeclose; -import com.guicedee.client.*; +import com.guicedee.client.IGuiceContext; import com.jwebmp.core.Event; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; @@ -25,7 +25,6 @@ import com.jwebmp.core.base.html.interfaces.events.GlobalEvents; import com.jwebmp.core.events.services.IOnBeforeCloseService; import com.jwebmp.core.htmlbuilder.javascript.events.enumerations.EventTypes; -import com.jwebmp.core.plugins.ComponentInformation; import lombok.extern.java.Log; import java.util.ServiceLoader; @@ -37,79 +36,74 @@ * * @author GedMarc */ -@ComponentInformation(name = "Before Close Event", - description = "Server Side Event for Before Close Adapter.") @Log public abstract class BeforeCloseAdapter> - extends Event - implements GlobalEvents + extends Event + implements GlobalEvents { - - /** - * Performs a click - * - * @param component - * The component this click is going to be acting on - */ - public BeforeCloseAdapter(com.jwebmp.core.base.interfaces.IComponentHierarchyBase component) - { - super(EventTypes.beforeClose, component); - } + /** + * Performs a click + * + * @param component The component this click is going to be acting on + */ + public BeforeCloseAdapter(com.jwebmp.core.base.interfaces.IComponentHierarchyBase component) + { + super(EventTypes.beforeClose, component); - @Override - public void fireEvent(AjaxCall call, AjaxResponse response) - { - try - { - onBeforeClose(call, response); - onCall(); - } - catch (Exception e) - { - BeforeCloseAdapter.log.log(Level.SEVERE, "Error In Firing Event", e); - } - } + } + @Override + public void fireEvent(AjaxCall call, AjaxResponse response) + { + try + { + onBeforeClose(call, response); + onCall(); + } + catch (Exception e) + { + BeforeCloseAdapter.log.log(Level.SEVERE, "Error In Firing Event", e); + } + } - /** - * Triggers on Click - *

- * - * @param call - * The physical AJAX call - * @param response - * The physical Ajax Receiver - */ - public abstract void onBeforeClose(AjaxCall call, AjaxResponse response); - private void onCall() - { - Set services = IGuiceContext.instance() + /** + * Triggers on Click + *

+ * + * @param call The physical AJAX call + * @param response The physical Ajax Receiver + */ + public abstract void onBeforeClose(AjaxCall call, AjaxResponse response); + + private void onCall() + { + Set services = IGuiceContext.instance() .getLoader(IOnBeforeCloseService.class, ServiceLoader.load(IOnBeforeCloseService.class)); - services.forEach(service -> service.onCall(this)); - } + services.forEach(service -> service.onCall(this)); + } - @Override - public void preConfigure() - { - if (!isConfigured()) - { - onCreate(); - } - super.preConfigure(); - } + @Override + public void preConfigure() + { + if (!isConfigured()) + { + onCreate(); + } + super.preConfigure(); + } - /** - * Occurs when the event is called - */ - @SuppressWarnings("unchecked") - private void onCreate() - { - Set services = IGuiceContext - .instance() - .getLoader(IOnBeforeCloseService.class, ServiceLoader.load(IOnBeforeCloseService.class)); - services.forEach(service -> service.onCreate(this)); - } + /** + * Occurs when the event is called + */ + @SuppressWarnings("unchecked") + private void onCreate() + { + Set services = IGuiceContext + .instance() + .getLoader(IOnBeforeCloseService.class, ServiceLoader.load(IOnBeforeCloseService.class)); + services.forEach(service -> service.onCreate(this)); + } } diff --git a/src/main/java/com/jwebmp/core/events/beforeload/BeforeLoadAdapter.java b/src/main/java/com/jwebmp/core/events/beforeload/BeforeLoadAdapter.java index 6bdffed83..0d1856e40 100644 --- a/src/main/java/com/jwebmp/core/events/beforeload/BeforeLoadAdapter.java +++ b/src/main/java/com/jwebmp/core/events/beforeload/BeforeLoadAdapter.java @@ -17,7 +17,7 @@ package com.jwebmp.core.events.beforeload; -import com.guicedee.client.*; +import com.guicedee.client.IGuiceContext; import com.jwebmp.core.Event; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; @@ -25,7 +25,6 @@ import com.jwebmp.core.base.html.interfaces.events.GlobalEvents; import com.jwebmp.core.events.services.IOnBeforeLoadService; import com.jwebmp.core.htmlbuilder.javascript.events.enumerations.EventTypes; -import com.jwebmp.core.plugins.ComponentInformation; import lombok.extern.java.Log; import java.util.ServiceLoader; @@ -37,78 +36,73 @@ * * @author GedMarc */ -@ComponentInformation(name = "Before Load Event", - description = "Server Side Event for Before Load Event.") @Log public abstract class BeforeLoadAdapter> - extends Event - implements GlobalEvents + extends Event + implements GlobalEvents { - - /** - * Performs a click - * - * @param component - * The component this click is going to be acting on - */ - public BeforeLoadAdapter(com.jwebmp.core.base.interfaces.IComponentHierarchyBase component) - { - super(EventTypes.beforeLoad, component); - } + /** + * Performs a click + * + * @param component The component this click is going to be acting on + */ + public BeforeLoadAdapter(com.jwebmp.core.base.interfaces.IComponentHierarchyBase component) + { + super(EventTypes.beforeLoad, component); - @Override - public void fireEvent(AjaxCall call, AjaxResponse response) - { - try - { - onBeforeLoad(call, response); - onCall(); - } - catch (Exception e) - { - BeforeLoadAdapter.log.log(Level.SEVERE, "Error In Firing Event", e); - } - } + } - /** - * Triggers on Click - *

- * - * @param call - * The physical AJAX call - * @param response - * The physical Ajax Receiver - */ - public abstract void onBeforeLoad(AjaxCall call, AjaxResponse response); + @Override + public void fireEvent(AjaxCall call, AjaxResponse response) + { + try + { + onBeforeLoad(call, response); + onCall(); + } + catch (Exception e) + { + BeforeLoadAdapter.log.log(Level.SEVERE, "Error In Firing Event", e); + } + } - private void onCall() - { - Set services = IGuiceContext.instance() + /** + * Triggers on Click + *

+ * + * @param call The physical AJAX call + * @param response The physical Ajax Receiver + */ + public abstract void onBeforeLoad(AjaxCall call, AjaxResponse response); + + private void onCall() + { + Set services = IGuiceContext.instance() .getLoader(IOnBeforeLoadService.class, ServiceLoader.load(IOnBeforeLoadService.class)); - services.forEach(service -> service.onCall(this)); - } + services.forEach(service -> service.onCall(this)); + } - @Override - public void preConfigure() - { - if (!isConfigured()) - { - onCreate(); - } - super.preConfigure(); - } + @Override + public void preConfigure() + { + if (!isConfigured()) + { + onCreate(); + } + super.preConfigure(); + } - /** - * Occurs when the event is called - */ - @SuppressWarnings("unchecked") - private void onCreate() - { - Set services = IGuiceContext - .instance() - .getLoader(IOnBeforeLoadService.class, ServiceLoader.load(IOnBeforeLoadService.class)); - services.forEach(service -> service.onCreate(this)); - } + /** + * Occurs when the event is called + */ + @SuppressWarnings("unchecked") + private void onCreate() + { + Set services = IGuiceContext + .instance() + .getLoader(IOnBeforeLoadService.class, ServiceLoader.load(IOnBeforeLoadService.class)); + services.forEach(service -> service.onCreate(this)); + } } diff --git a/src/main/java/com/jwebmp/core/events/beforestop/BeforeStopAdapter.java b/src/main/java/com/jwebmp/core/events/beforestop/BeforeStopAdapter.java index 5958ab820..1a195930f 100644 --- a/src/main/java/com/jwebmp/core/events/beforestop/BeforeStopAdapter.java +++ b/src/main/java/com/jwebmp/core/events/beforestop/BeforeStopAdapter.java @@ -17,7 +17,7 @@ package com.jwebmp.core.events.beforestop; -import com.guicedee.client.*; +import com.guicedee.client.IGuiceContext; import com.jwebmp.core.Event; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; @@ -25,7 +25,6 @@ import com.jwebmp.core.base.html.interfaces.events.GlobalEvents; import com.jwebmp.core.events.services.IOnBeforeStopService; import com.jwebmp.core.htmlbuilder.javascript.events.enumerations.EventTypes; -import com.jwebmp.core.plugins.ComponentInformation; import lombok.extern.java.Log; import java.util.ServiceLoader; @@ -37,78 +36,73 @@ * * @author GedMarc */ -@ComponentInformation(name = "Before Stop Event", - description = "Server Side Event for Before Stop Event.") @Log public abstract class BeforeStopAdapter> - extends Event - implements GlobalEvents + extends Event + implements GlobalEvents { - /** - * Performs a click - * - * @param component - * The component this click is going to be acting on - */ - public BeforeStopAdapter(com.jwebmp.core.base.interfaces.IComponentHierarchyBase component) - { - super(EventTypes.beforeStop, component); + /** + * Performs a click + * + * @param component The component this click is going to be acting on + */ + public BeforeStopAdapter(com.jwebmp.core.base.interfaces.IComponentHierarchyBase component) + { + super(EventTypes.beforeStop, component); - } + } - @Override - public void fireEvent(AjaxCall call, AjaxResponse response) - { - try - { - onBeforeStop(call, response); - onCall(); - } - catch (Exception e) - { - BeforeStopAdapter.log.log(Level.SEVERE, "Error In Firing Event", e); - } - } + @Override + public void fireEvent(AjaxCall call, AjaxResponse response) + { + try + { + onBeforeStop(call, response); + onCall(); + } + catch (Exception e) + { + BeforeStopAdapter.log.log(Level.SEVERE, "Error In Firing Event", e); + } + } - /** - * Triggers on Click - *

- * - * @param call - * The physical AJAX call - * @param response - * The physical Ajax Receiver - */ - public abstract void onBeforeStop(AjaxCall call, AjaxResponse response); + /** + * Triggers on Click + *

+ * + * @param call The physical AJAX call + * @param response The physical Ajax Receiver + */ + public abstract void onBeforeStop(AjaxCall call, AjaxResponse response); - private void onCall() - { - Set services = IGuiceContext.instance() + private void onCall() + { + Set services = IGuiceContext.instance() .getLoader(IOnBeforeStopService.class, ServiceLoader.load(IOnBeforeStopService.class)); - services.forEach(service -> service.onCall(this)); - } + services.forEach(service -> service.onCall(this)); + } - @Override - public void preConfigure() - { - if (!isConfigured()) - { - onCreate(); - } - super.preConfigure(); - } + @Override + public void preConfigure() + { + if (!isConfigured()) + { + onCreate(); + } + super.preConfigure(); + } - /** - * Occurs when the event is called - */ - @SuppressWarnings("unchecked") - private void onCreate() - { - Set services = IGuiceContext - .instance() - .getLoader(IOnBeforeStopService.class, ServiceLoader.load(IOnBeforeStopService.class)); - services.forEach(service -> service.onCreate(this)); - } + /** + * Occurs when the event is called + */ + @SuppressWarnings("unchecked") + private void onCreate() + { + Set services = IGuiceContext + .instance() + .getLoader(IOnBeforeStopService.class, ServiceLoader.load(IOnBeforeStopService.class)); + services.forEach(service -> service.onCreate(this)); + } } diff --git a/src/main/java/com/jwebmp/core/events/blur/BlurAdapter.java b/src/main/java/com/jwebmp/core/events/blur/BlurAdapter.java index 815230b5b..857a69a06 100644 --- a/src/main/java/com/jwebmp/core/events/blur/BlurAdapter.java +++ b/src/main/java/com/jwebmp/core/events/blur/BlurAdapter.java @@ -17,7 +17,7 @@ package com.jwebmp.core.events.blur; -import com.guicedee.client.*; +import com.guicedee.client.IGuiceContext; import com.jwebmp.core.Event; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; @@ -25,7 +25,6 @@ import com.jwebmp.core.base.html.interfaces.events.GlobalEvents; import com.jwebmp.core.events.services.IOnBlurService; import com.jwebmp.core.htmlbuilder.javascript.events.enumerations.EventTypes; -import com.jwebmp.core.plugins.ComponentInformation; import lombok.extern.java.Log; import java.util.ServiceLoader; @@ -37,78 +36,73 @@ * * @author GedMarc */ -@ComponentInformation(name = "Blur Event", - description = "Server Side Event for Blur Event.") @Log public abstract class BlurAdapter> - extends Event - implements GlobalEvents + extends Event + implements GlobalEvents { - /** - * Performs a click - * - * @param component - * The component this click is going to be acting on - */ - public BlurAdapter(com.jwebmp.core.base.interfaces.IComponentHierarchyBase component) - { - super(EventTypes.contextmenu, component); + /** + * Performs a click + * + * @param component The component this click is going to be acting on + */ + public BlurAdapter(com.jwebmp.core.base.interfaces.IComponentHierarchyBase component) + { + super(EventTypes.contextmenu, component); - } + } - @Override - public void fireEvent(AjaxCall call, AjaxResponse response) - { - try - { - onBlur(call, response); - onCall(); - } - catch (Exception e) - { - BlurAdapter.log.log(Level.SEVERE, "Error In Firing Event", e); - } - } + @Override + public void fireEvent(AjaxCall call, AjaxResponse response) + { + try + { + onBlur(call, response); + onCall(); + } + catch (Exception e) + { + BlurAdapter.log.log(Level.SEVERE, "Error In Firing Event", e); + } + } - /** - * Triggers on Click - *

- * - * @param call - * The physical AJAX call - * @param response - * The physical Ajax Receiver - */ - public abstract void onBlur(AjaxCall call, AjaxResponse response); + /** + * Triggers on Click + *

+ * + * @param call The physical AJAX call + * @param response The physical Ajax Receiver + */ + public abstract void onBlur(AjaxCall call, AjaxResponse response); - private void onCall() - { - Set services = IGuiceContext.instance() + private void onCall() + { + Set services = IGuiceContext.instance() .getLoader(IOnBlurService.class, ServiceLoader.load(IOnBlurService.class)); - services.forEach(service -> service.onCall(this)); - } + services.forEach(service -> service.onCall(this)); + } - @Override - public void preConfigure() - { - if (!isConfigured()) - { - onCreate(); - } - super.preConfigure(); - } + @Override + public void preConfigure() + { + if (!isConfigured()) + { + onCreate(); + } + super.preConfigure(); + } - /** - * Occurs when the event is called - */ - @SuppressWarnings("unchecked") - private void onCreate() - { - Set services = IGuiceContext - .instance() - .getLoader(IOnBlurService.class, ServiceLoader.load(IOnBlurService.class)); - services.forEach(service -> service.onCreate(this)); - } + /** + * Occurs when the event is called + */ + @SuppressWarnings("unchecked") + private void onCreate() + { + Set services = IGuiceContext + .instance() + .getLoader(IOnBlurService.class, ServiceLoader.load(IOnBlurService.class)); + services.forEach(service -> service.onCreate(this)); + } } diff --git a/src/main/java/com/jwebmp/core/events/buttonclick/ButtonClickAdapter.java b/src/main/java/com/jwebmp/core/events/buttonclick/ButtonClickAdapter.java index 452eede24..6b94cf126 100644 --- a/src/main/java/com/jwebmp/core/events/buttonclick/ButtonClickAdapter.java +++ b/src/main/java/com/jwebmp/core/events/buttonclick/ButtonClickAdapter.java @@ -17,14 +17,13 @@ package com.jwebmp.core.events.buttonclick; -import com.guicedee.client.*; +import com.guicedee.client.IGuiceContext; import com.jwebmp.core.Event; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; import com.jwebmp.core.base.html.interfaces.GlobalFeatures; import com.jwebmp.core.events.services.IOnButtonClickService; import com.jwebmp.core.htmlbuilder.javascript.events.enumerations.EventTypes; -import com.jwebmp.core.plugins.ComponentInformation; import lombok.extern.java.Log; import java.util.ServiceLoader; @@ -35,83 +34,76 @@ * * @author GedMarc */ -@ComponentInformation(name = "Button Event", - description = "Server Side Event for Button Click Event.") @Log public abstract class ButtonClickAdapter> - extends Event + extends Event { - /** - * This event is triggered when a button is clicked. - * - * @param component - * The component this click is going to be acting on - */ - public ButtonClickAdapter(com.jwebmp.core.base.interfaces.IComponentHierarchyBase component) - { - super(EventTypes.buttonClickEvent, component); - } + /** + * This event is triggered when a button is clicked. + * + * @param component The component this click is going to be acting on + */ + public ButtonClickAdapter(com.jwebmp.core.base.interfaces.IComponentHierarchyBase component) + { + super(EventTypes.buttonClickEvent, component); + } - /** - * The method that is fired on call - * - * @param ajaxObject - * The component that made the call - * @param ajaxReceiver - * The Response Object Being Returned - */ - @Override - public void fireEvent(AjaxCall ajaxObject, AjaxResponse ajaxReceiver) - { - onButtonClick(ajaxObject, ajaxReceiver); - onCall(); - } + /** + * The method that is fired on call + * + * @param ajaxObject The component that made the call + * @param ajaxReceiver The Response Object Being Returned + */ + @Override + public void fireEvent(AjaxCall ajaxObject, AjaxResponse ajaxReceiver) + { + onButtonClick(ajaxObject, ajaxReceiver); + onCall(); + } - /** - * Triggers on Activation - *

- * - * @param ajaxObject - * The physical AJAX call - * @param ajaxReceiver - * The physical Ajax Receiver - */ - public abstract void onButtonClick(AjaxCall ajaxObject, AjaxResponse ajaxReceiver); + /** + * Triggers on Activation + *

+ * + * @param ajaxObject The physical AJAX call + * @param ajaxReceiver The physical Ajax Receiver + */ + public abstract void onButtonClick(AjaxCall ajaxObject, AjaxResponse ajaxReceiver); - /** - * Method onCall ... - */ - @SuppressWarnings({"rawtypes", "unchecked"}) - private void onCall() - { - Set services = IGuiceContext.instance() + /** + * Method onCall ... + */ + @SuppressWarnings({"rawtypes", "unchecked"}) + private void onCall() + { + Set services = IGuiceContext.instance() .getLoader(IOnButtonClickService.class, ServiceLoader.load(IOnButtonClickService.class)); - services.forEach(service -> service.onCall(this)); - } + services.forEach(service -> service.onCall(this)); + } - @Override - public void preConfigure() - { - if (!isConfigured()) - { - onCreate(); - } - super.preConfigure(); - } + @Override + public void preConfigure() + { + if (!isConfigured()) + { + onCreate(); + } + super.preConfigure(); + } - /** - * Occurs when the event is called - */ - @SuppressWarnings("unchecked") - private void onCreate() - { - @SuppressWarnings("rawtypes") - Set services = IGuiceContext - .instance() - .getLoader(IOnButtonClickService.class, ServiceLoader.load(IOnButtonClickService.class)); - services.forEach(service -> service.onCreate(this)); - } + /** + * Occurs when the event is called + */ + @SuppressWarnings("unchecked") + private void onCreate() + { + @SuppressWarnings("rawtypes") + Set services = IGuiceContext + .instance() + .getLoader(IOnButtonClickService.class, ServiceLoader.load(IOnButtonClickService.class)); + services.forEach(service -> service.onCreate(this)); + } } diff --git a/src/main/java/com/jwebmp/core/events/cancel/CancelAdapter.java b/src/main/java/com/jwebmp/core/events/cancel/CancelAdapter.java index 6ce3eb7e6..fef2da09c 100644 --- a/src/main/java/com/jwebmp/core/events/cancel/CancelAdapter.java +++ b/src/main/java/com/jwebmp/core/events/cancel/CancelAdapter.java @@ -24,7 +24,6 @@ import com.jwebmp.core.base.html.interfaces.events.GlobalEvents; import com.jwebmp.core.events.services.IOnCancelService; import com.jwebmp.core.htmlbuilder.javascript.events.enumerations.EventTypes; -import com.jwebmp.core.plugins.ComponentInformation; import lombok.extern.java.Log; import java.util.ServiceLoader; @@ -36,80 +35,75 @@ * * @author GedMarc */ -@ComponentInformation(name = "Cancel Event", - description = "Server Side Event for Cancel Click Event.") @Log public abstract class CancelAdapter> - extends Event - implements GlobalEvents + extends Event + implements GlobalEvents { - - /** - * Performs a click - * - * @param component - * The component this click is going to be acting on - */ - public CancelAdapter(com.jwebmp.core.base.interfaces.IComponentHierarchyBase component) - { - super(EventTypes.cancel, component); - } - @Override - public void fireEvent(AjaxCall call, AjaxResponse response) - { - try - { - onCancel(call, response); - onCall(); - } - catch (Exception e) - { - CancelAdapter.log.log(Level.SEVERE, "Error In Firing Event", e); - } - } + /** + * Performs a click + * + * @param component The component this click is going to be acting on + */ + public CancelAdapter(com.jwebmp.core.base.interfaces.IComponentHierarchyBase component) + { + super(EventTypes.cancel, component); + } - /** - * Triggers on Cancel - *

- * - * @param call - * The physical AJAX call - * @param response - * The physical Ajax Receiver - */ - public abstract void onCancel(AjaxCall call, AjaxResponse response); + @Override + public void fireEvent(AjaxCall call, AjaxResponse response) + { + try + { + onCancel(call, response); + onCall(); + } + catch (Exception e) + { + CancelAdapter.log.log(Level.SEVERE, "Error In Firing Event", e); + } + } - /** - * Method onCall ... - */ - private void onCall() - { - Set services = com.guicedee.client.IGuiceContext.instance() + /** + * Triggers on Cancel + *

+ * + * @param call The physical AJAX call + * @param response The physical Ajax Receiver + */ + public abstract void onCancel(AjaxCall call, AjaxResponse response); + + /** + * Method onCall ... + */ + private void onCall() + { + Set services = com.guicedee.client.IGuiceContext.instance() .getLoader(IOnCancelService.class, ServiceLoader.load(IOnCancelService.class)); - services.forEach(service -> service.onCall(this)); - } + services.forEach(service -> service.onCall(this)); + } - @Override - public void preConfigure() - { - if (!isConfigured()) - { - onCreate(); - } - super.preConfigure(); - } + @Override + public void preConfigure() + { + if (!isConfigured()) + { + onCreate(); + } + super.preConfigure(); + } - /** - * Occurs when the event is called - */ - @SuppressWarnings("unchecked") - private void onCreate() - { - Set services = com.guicedee.client.IGuiceContext.instance() - .getLoader(IOnCancelService.class, ServiceLoader.load(IOnCancelService.class)); - services.forEach(service -> service.onCreate(this)); - } + /** + * Occurs when the event is called + */ + @SuppressWarnings("unchecked") + private void onCreate() + { + Set services = com.guicedee.client.IGuiceContext.instance() + .getLoader(IOnCancelService.class, ServiceLoader.load(IOnCancelService.class)); + services.forEach(service -> service.onCreate(this)); + } } diff --git a/src/main/java/com/jwebmp/core/events/change/ChangeAdapter.java b/src/main/java/com/jwebmp/core/events/change/ChangeAdapter.java index d2822ca65..d61297e2f 100644 --- a/src/main/java/com/jwebmp/core/events/change/ChangeAdapter.java +++ b/src/main/java/com/jwebmp/core/events/change/ChangeAdapter.java @@ -25,7 +25,6 @@ import com.jwebmp.core.base.interfaces.IComponentHierarchyBase; import com.jwebmp.core.events.services.IOnChangeService; import com.jwebmp.core.htmlbuilder.javascript.events.enumerations.EventTypes; -import com.jwebmp.core.plugins.ComponentInformation; import lombok.extern.java.Log; import java.util.ServiceLoader; @@ -37,81 +36,76 @@ * * @author GedMarc */ -@ComponentInformation(name = "Change Event", - description = "Server Side Event for Change.") @Log public abstract class ChangeAdapter> - extends Event - implements GlobalEvents + extends Event + implements GlobalEvents { - /** - * Performs on a change - * - * @param component - * The component that will react will a change occurs - */ - public ChangeAdapter(IComponentHierarchyBase component) - { - super(EventTypes.change, component); + /** + * Performs on a change + * + * @param component The component that will react will a change occurs + */ + public ChangeAdapter(IComponentHierarchyBase component) + { + super(EventTypes.change, component); - } + } - @Override - public void fireEvent(AjaxCall call, AjaxResponse response) - { - try - { - onChange(call, response); - onCall(); - } - catch (Exception e) - { - ChangeAdapter.log.log(Level.SEVERE, "Error In Firing Event", e); - } - } + @Override + public void fireEvent(AjaxCall call, AjaxResponse response) + { + try + { + onChange(call, response); + onCall(); + } + catch (Exception e) + { + ChangeAdapter.log.log(Level.SEVERE, "Error In Firing Event", e); + } + } - /** - * Triggers on Change - *

- * - * @param call - * The physical AJAX call - * @param response - * The physical Ajax Receiver - */ - public abstract void onChange(AjaxCall call, AjaxResponse response); + /** + * Triggers on Change + *

+ * + * @param call The physical AJAX call + * @param response The physical Ajax Receiver + */ + public abstract void onChange(AjaxCall call, AjaxResponse response); - /** - * Method onCall ... - */ - @SuppressWarnings({"unchecked", "rawtypes"}) - private void onCall() - { - Set services = com.guicedee.client.IGuiceContext.instance() + /** + * Method onCall ... + */ + @SuppressWarnings({"unchecked", "rawtypes"}) + private void onCall() + { + Set services = com.guicedee.client.IGuiceContext.instance() .getLoader(IOnChangeService.class, ServiceLoader.load(IOnChangeService.class)); - services.forEach(service -> service.onCall(this)); - } + services.forEach(service -> service.onCall(this)); + } - @Override - public void preConfigure() - { - if (!isConfigured()) - { - onCreate(); - } - super.preConfigure(); - } + @Override + public void preConfigure() + { + if (!isConfigured()) + { + onCreate(); + } + super.preConfigure(); + } - /** - * Occurs when the event is called - */ - @SuppressWarnings({"unchecked", "rawtypes"}) - private void onCreate() - { - Set services = com.guicedee.client.IGuiceContext.instance() - .getLoader(IOnChangeService.class, ServiceLoader.load(IOnChangeService.class)); - services.forEach(service -> service.onCreate(this)); - } + /** + * Occurs when the event is called + */ + @SuppressWarnings({"unchecked", "rawtypes"}) + private void onCreate() + { + Set services = com.guicedee.client.IGuiceContext.instance() + .getLoader(IOnChangeService.class, ServiceLoader.load(IOnChangeService.class)); + services.forEach(service -> service.onCreate(this)); + } } diff --git a/src/main/java/com/jwebmp/core/events/click/ClickAdapter.java b/src/main/java/com/jwebmp/core/events/click/ClickAdapter.java index 69a376a30..3638826e2 100644 --- a/src/main/java/com/jwebmp/core/events/click/ClickAdapter.java +++ b/src/main/java/com/jwebmp/core/events/click/ClickAdapter.java @@ -17,7 +17,7 @@ package com.jwebmp.core.events.click; -import com.guicedee.client.*; +import com.guicedee.client.IGuiceContext; import com.jwebmp.core.Event; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; @@ -28,7 +28,6 @@ import com.jwebmp.core.base.interfaces.IComponentHierarchyBase; import com.jwebmp.core.events.services.IOnClickService; import com.jwebmp.core.htmlbuilder.javascript.events.enumerations.EventTypes; -import com.jwebmp.core.plugins.ComponentInformation; import lombok.extern.java.Log; import java.util.ServiceLoader; @@ -40,82 +39,80 @@ * * @author GedMarc */ -@ComponentInformation(name = "Click Event", - description = "Server Side Event for Click.") @Log public abstract class ClickAdapter> - extends Event - implements ParagraphEvents, - BodyEvents, - GlobalEvents + extends Event + implements ParagraphEvents, + BodyEvents, + GlobalEvents { - protected ClickAdapter() - { - super("ClickAdapter", EventTypes.click); - } - - /** - * Performs a click - * - * @param component The component this click is going to be acting on - */ - public ClickAdapter(IComponentHierarchyBase component) - { - super(EventTypes.click, component); - } - - @Override - public void fireEvent(AjaxCall call, AjaxResponse response) - { - try - { - onClick(call, response); - onCall(); - } - catch (Exception e) - { - ClickAdapter.log.log(Level.SEVERE, "Error In Firing Event", e); - } - } - - /** - * Triggers on Click - *

- * - * @param call The physical AJAX call - * @param response The physical Ajax Receiver - */ - public abstract void onClick(AjaxCall call, AjaxResponse response); - - /** - * Method onCall ... - */ - private void onCall() - { - Set services = IGuiceContext.instance() + protected ClickAdapter() + { + super("ClickAdapter", EventTypes.click); + } + + /** + * Performs a click + * + * @param component The component this click is going to be acting on + */ + public ClickAdapter(IComponentHierarchyBase component) + { + super(EventTypes.click, component); + } + + @Override + public void fireEvent(AjaxCall call, AjaxResponse response) + { + try + { + onClick(call, response); + onCall(); + } + catch (Exception e) + { + ClickAdapter.log.log(Level.SEVERE, "Error In Firing Event", e); + } + } + + /** + * Triggers on Click + *

+ * + * @param call The physical AJAX call + * @param response The physical Ajax Receiver + */ + public abstract void onClick(AjaxCall call, AjaxResponse response); + + /** + * Method onCall ... + */ + private void onCall() + { + Set services = IGuiceContext.instance() .getLoader(IOnClickService.class, ServiceLoader.load(IOnClickService.class)); - services.forEach(service -> service.onCall(this)); - } - - @Override - public void preConfigure() - { - if (!isConfigured()) - { - onCreate(); - } - super.preConfigure(); - } - - /** - * Occurs when the event is called - */ - @SuppressWarnings("unchecked") - protected void onCreate() - { - Set services = IGuiceContext - .instance() - .getLoader(IOnClickService.class, ServiceLoader.load(IOnClickService.class)); - services.forEach(service -> service.onCreate(this)); - } + services.forEach(service -> service.onCall(this)); + } + + @Override + public void preConfigure() + { + if (!isConfigured()) + { + onCreate(); + } + super.preConfigure(); + } + + /** + * Occurs when the event is called + */ + @SuppressWarnings("unchecked") + protected void onCreate() + { + Set services = IGuiceContext + .instance() + .getLoader(IOnClickService.class, ServiceLoader.load(IOnClickService.class)); + services.forEach(service -> service.onCreate(this)); + } } diff --git a/src/main/java/com/jwebmp/core/events/close/CloseAdapter.java b/src/main/java/com/jwebmp/core/events/close/CloseAdapter.java index 6c26505ef..fa8a85edb 100644 --- a/src/main/java/com/jwebmp/core/events/close/CloseAdapter.java +++ b/src/main/java/com/jwebmp/core/events/close/CloseAdapter.java @@ -17,7 +17,7 @@ package com.jwebmp.core.events.close; -import com.guicedee.client.*; +import com.guicedee.client.IGuiceContext; import com.jwebmp.core.Event; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; @@ -25,7 +25,6 @@ import com.jwebmp.core.base.html.interfaces.events.GlobalEvents; import com.jwebmp.core.events.services.IOnCloseService; import com.jwebmp.core.htmlbuilder.javascript.events.enumerations.EventTypes; -import com.jwebmp.core.plugins.ComponentInformation; import lombok.extern.java.Log; import java.util.ServiceLoader; @@ -37,80 +36,75 @@ * * @author GedMarc */ -@ComponentInformation(name = "Close Event", - description = "Server Side Event for Close.") @Log public abstract class CloseAdapter> - extends Event - implements GlobalEvents + extends Event + implements GlobalEvents { - - /** - * Performs a click - * - * @param component - * The component this click is going to be acting on - */ - public CloseAdapter(com.jwebmp.core.base.interfaces.IComponentHierarchyBase component) - { - super(EventTypes.contextmenu, component); - } - @Override - public void fireEvent(AjaxCall call, AjaxResponse response) - { - try - { - onClose(call, response); - onCall(); - } - catch (Exception e) - { - CloseAdapter.log.log(Level.SEVERE, "Error In Firing Event", e); - } - } + /** + * Performs a click + * + * @param component The component this click is going to be acting on + */ + public CloseAdapter(com.jwebmp.core.base.interfaces.IComponentHierarchyBase component) + { + super(EventTypes.contextmenu, component); + } - /** - * Triggers on Click - *

- * - * @param call - * The physical AJAX call - * @param response - * The physical Ajax Receiver - */ - public abstract void onClose(AjaxCall call, AjaxResponse response); + @Override + public void fireEvent(AjaxCall call, AjaxResponse response) + { + try + { + onClose(call, response); + onCall(); + } + catch (Exception e) + { + CloseAdapter.log.log(Level.SEVERE, "Error In Firing Event", e); + } + } - /** - * Method onCall ... - */ - private void onCall() - { - Set services = IGuiceContext.instance() + /** + * Triggers on Click + *

+ * + * @param call The physical AJAX call + * @param response The physical Ajax Receiver + */ + public abstract void onClose(AjaxCall call, AjaxResponse response); + + /** + * Method onCall ... + */ + private void onCall() + { + Set services = IGuiceContext.instance() .getLoader(IOnCloseService.class, ServiceLoader.load(IOnCloseService.class)); - services.forEach(service -> service.onCall(this)); - } + services.forEach(service -> service.onCall(this)); + } - @Override - public void preConfigure() - { - if (!isConfigured()) - { - onCreate(); - } - super.preConfigure(); - } + @Override + public void preConfigure() + { + if (!isConfigured()) + { + onCreate(); + } + super.preConfigure(); + } - /** - * Occurs when the event is called - */ - @SuppressWarnings("unchecked") - private void onCreate() - { - Set services = IGuiceContext - .instance() - .getLoader(IOnCloseService.class, ServiceLoader.load(IOnCloseService.class)); - services.forEach(service -> service.onCreate(this)); - } + /** + * Occurs when the event is called + */ + @SuppressWarnings("unchecked") + private void onCreate() + { + Set services = IGuiceContext + .instance() + .getLoader(IOnCloseService.class, ServiceLoader.load(IOnCloseService.class)); + services.forEach(service -> service.onCreate(this)); + } } diff --git a/src/main/java/com/jwebmp/core/events/complete/CompleteAdapter.java b/src/main/java/com/jwebmp/core/events/complete/CompleteAdapter.java index 433a6ad0d..d2c4916c1 100644 --- a/src/main/java/com/jwebmp/core/events/complete/CompleteAdapter.java +++ b/src/main/java/com/jwebmp/core/events/complete/CompleteAdapter.java @@ -17,7 +17,7 @@ package com.jwebmp.core.events.complete; -import com.guicedee.client.*; +import com.guicedee.client.IGuiceContext; import com.jwebmp.core.Event; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; @@ -25,7 +25,6 @@ import com.jwebmp.core.base.html.interfaces.events.GlobalEvents; import com.jwebmp.core.events.services.IOnCompleteService; import com.jwebmp.core.htmlbuilder.javascript.events.enumerations.EventTypes; -import com.jwebmp.core.plugins.ComponentInformation; import lombok.extern.java.Log; import java.util.ServiceLoader; @@ -37,81 +36,76 @@ * * @author GedMarc */ -@ComponentInformation(name = "Complete Event", - description = "Server Side Event for Complete.") @Log public abstract class CompleteAdapter> - extends Event - implements GlobalEvents + extends Event + implements GlobalEvents { - - /** - * Performs a click - * - * @param component - * The component this click is going to be acting on - */ - public CompleteAdapter(com.jwebmp.core.base.interfaces.IComponentHierarchyBase component) - { - super(EventTypes.contextmenu, component); - } + /** + * Performs a click + * + * @param component The component this click is going to be acting on + */ + public CompleteAdapter(com.jwebmp.core.base.interfaces.IComponentHierarchyBase component) + { + super(EventTypes.contextmenu, component); - @Override - public void fireEvent(AjaxCall call, AjaxResponse response) - { - try - { - onComplete(call, response); - onCall(); - } - catch (Exception e) - { - CompleteAdapter.log.log(Level.SEVERE, "Error In Firing Event", e); - } - } + } - /** - * Triggers on Click - *

- * - * @param call - * The physical AJAX call - * @param response - * The physical Ajax Receiver - */ - public abstract void onComplete(AjaxCall call, AjaxResponse response); + @Override + public void fireEvent(AjaxCall call, AjaxResponse response) + { + try + { + onComplete(call, response); + onCall(); + } + catch (Exception e) + { + CompleteAdapter.log.log(Level.SEVERE, "Error In Firing Event", e); + } + } - /** - * Method onCall ... - */ - private void onCall() - { - Set services = IGuiceContext.instance() + /** + * Triggers on Click + *

+ * + * @param call The physical AJAX call + * @param response The physical Ajax Receiver + */ + public abstract void onComplete(AjaxCall call, AjaxResponse response); + + /** + * Method onCall ... + */ + private void onCall() + { + Set services = IGuiceContext.instance() .getLoader(IOnCompleteService.class, ServiceLoader.load(IOnCompleteService.class)); - services.forEach(service -> service.onCall(this)); - } + services.forEach(service -> service.onCall(this)); + } - @Override - public void preConfigure() - { - if (!isConfigured()) - { - onCreate(); - } - super.preConfigure(); - } + @Override + public void preConfigure() + { + if (!isConfigured()) + { + onCreate(); + } + super.preConfigure(); + } - /** - * Occurs when the event is called - */ - @SuppressWarnings("unchecked") - private void onCreate() - { - Set services = IGuiceContext - .instance() - .getLoader(IOnCompleteService.class, ServiceLoader.load(IOnCompleteService.class)); - services.forEach(service -> service.onCreate(this)); - } + /** + * Occurs when the event is called + */ + @SuppressWarnings("unchecked") + private void onCreate() + { + Set services = IGuiceContext + .instance() + .getLoader(IOnCompleteService.class, ServiceLoader.load(IOnCompleteService.class)); + services.forEach(service -> service.onCreate(this)); + } } diff --git a/src/main/java/com/jwebmp/core/events/create/CreateAdapter.java b/src/main/java/com/jwebmp/core/events/create/CreateAdapter.java index 6502fee9f..5dd82f63e 100644 --- a/src/main/java/com/jwebmp/core/events/create/CreateAdapter.java +++ b/src/main/java/com/jwebmp/core/events/create/CreateAdapter.java @@ -24,7 +24,6 @@ import com.jwebmp.core.base.html.interfaces.events.GlobalEvents; import com.jwebmp.core.events.services.IOnCreateService; import com.jwebmp.core.htmlbuilder.javascript.events.enumerations.EventTypes; -import com.jwebmp.core.plugins.ComponentInformation; import lombok.extern.java.Log; import java.util.ServiceLoader; @@ -36,81 +35,76 @@ * * @author GedMarc */ -@ComponentInformation(name = "Create Event", - description = "Server Side Event for Create.") @Log public abstract class CreateAdapter> - extends Event - implements GlobalEvents + extends Event + implements GlobalEvents { - - /** - * Performs a click - * - * @param component - * The component this click is going to be acting on - */ - public CreateAdapter(com.jwebmp.core.base.interfaces.IComponentHierarchyBase component) - { - super(EventTypes.create, component); - } + /** + * Performs a click + * + * @param component The component this click is going to be acting on + */ + public CreateAdapter(com.jwebmp.core.base.interfaces.IComponentHierarchyBase component) + { + super(EventTypes.create, component); - @Override - public void fireEvent(AjaxCall call, AjaxResponse response) - { - try - { - onCreate(call, response); - onCall(); - } - catch (Exception e) - { - CreateAdapter.log.log(Level.SEVERE, "Error In Firing Event", e); - } - } + } + @Override + public void fireEvent(AjaxCall call, AjaxResponse response) + { + try + { + onCreate(call, response); + onCall(); + } + catch (Exception e) + { + CreateAdapter.log.log(Level.SEVERE, "Error In Firing Event", e); + } + } - /** - * Triggers on Click - *

- * - * @param call - * The physical AJAX call - * @param response - * The physical Ajax Receiver - */ - public abstract void onCreate(AjaxCall call, AjaxResponse response); - /** - * Method onCall ... - */ - private void onCall() - { - Set services = com.guicedee.client.IGuiceContext.instance() + /** + * Triggers on Click + *

+ * + * @param call The physical AJAX call + * @param response The physical Ajax Receiver + */ + public abstract void onCreate(AjaxCall call, AjaxResponse response); + + /** + * Method onCall ... + */ + private void onCall() + { + Set services = com.guicedee.client.IGuiceContext.instance() .getLoader(IOnCreateService.class, ServiceLoader.load(IOnCreateService.class)); - services.forEach(service -> service.onCall(this)); - } + services.forEach(service -> service.onCall(this)); + } - @Override - public void preConfigure() - { - if (!isConfigured()) - { - onCreate(); - } - super.preConfigure(); - } + @Override + public void preConfigure() + { + if (!isConfigured()) + { + onCreate(); + } + super.preConfigure(); + } - /** - * Occurs when the event is called - */ - @SuppressWarnings("unchecked") - private void onCreate() - { - Set services = com.guicedee.client.IGuiceContext.instance() - .getLoader(IOnCreateService.class, ServiceLoader.load(IOnCreateService.class)); - services.forEach(service -> service.onCreate(this)); - } + /** + * Occurs when the event is called + */ + @SuppressWarnings("unchecked") + private void onCreate() + { + Set services = com.guicedee.client.IGuiceContext.instance() + .getLoader(IOnCreateService.class, ServiceLoader.load(IOnCreateService.class)); + services.forEach(service -> service.onCreate(this)); + } } diff --git a/src/main/java/com/jwebmp/core/events/deactivate/DeactivateAdapter.java b/src/main/java/com/jwebmp/core/events/deactivate/DeactivateAdapter.java index 19fcce22e..b1487fa4e 100644 --- a/src/main/java/com/jwebmp/core/events/deactivate/DeactivateAdapter.java +++ b/src/main/java/com/jwebmp/core/events/deactivate/DeactivateAdapter.java @@ -17,7 +17,7 @@ package com.jwebmp.core.events.deactivate; -import com.guicedee.client.*; +import com.guicedee.client.IGuiceContext; import com.jwebmp.core.Event; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; @@ -25,7 +25,6 @@ import com.jwebmp.core.base.html.interfaces.events.GlobalEvents; import com.jwebmp.core.events.services.IOnDeActivateService; import com.jwebmp.core.htmlbuilder.javascript.events.enumerations.EventTypes; -import com.jwebmp.core.plugins.ComponentInformation; import lombok.extern.java.Log; import java.util.ServiceLoader; @@ -37,82 +36,77 @@ * * @author GedMarc */ -@ComponentInformation(name = "DeActivate Event", - description = "Server Side Event for DeActivate.") @Log public abstract class DeactivateAdapter> - extends Event - implements GlobalEvents + extends Event + implements GlobalEvents { - - /** - * Performs a click - * - * @param component - * The component this click is going to be acting on - */ - public DeactivateAdapter(com.jwebmp.core.base.interfaces.IComponentHierarchyBase component) - { - super(EventTypes.deactivate, component); - } + /** + * Performs a click + * + * @param component The component this click is going to be acting on + */ + public DeactivateAdapter(com.jwebmp.core.base.interfaces.IComponentHierarchyBase component) + { + super(EventTypes.deactivate, component); - @Override - public void fireEvent(AjaxCall call, AjaxResponse response) - { - try - { - onDeactivate(call, response); - onCall(); - } - catch (Exception e) - { - DeactivateAdapter.log.log(Level.SEVERE, "Error In Firing Event", e); - } - } + } - /** - * Triggers on Click - *

- * - * @param call - * The physical AJAX call - * @param response - * The physical Ajax Receiver - */ - public abstract void onDeactivate(AjaxCall call, AjaxResponse response); + @Override + public void fireEvent(AjaxCall call, AjaxResponse response) + { + try + { + onDeactivate(call, response); + onCall(); + } + catch (Exception e) + { + DeactivateAdapter.log.log(Level.SEVERE, "Error In Firing Event", e); + } + } - /** - * Method onCall ... - */ - private void onCall() - { - Set services = IGuiceContext.instance() + /** + * Triggers on Click + *

+ * + * @param call The physical AJAX call + * @param response The physical Ajax Receiver + */ + public abstract void onDeactivate(AjaxCall call, AjaxResponse response); + + /** + * Method onCall ... + */ + private void onCall() + { + Set services = IGuiceContext.instance() .getLoader(IOnDeActivateService.class, ServiceLoader.load(IOnDeActivateService.class)); - services.forEach(service -> service.onCall(this)); - } + services.forEach(service -> service.onCall(this)); + } - @Override - public void preConfigure() - { - if (!isConfigured()) - { - onCreate(); - } - super.preConfigure(); - } + @Override + public void preConfigure() + { + if (!isConfigured()) + { + onCreate(); + } + super.preConfigure(); + } - /** - * Occurs when the event is called - */ - @SuppressWarnings("unchecked") - private void onCreate() - { - Set services = IGuiceContext - .instance() - .getLoader(IOnDeActivateService.class, ServiceLoader.load(IOnDeActivateService.class)); - services.forEach(service -> service.onCreate(this)); - } + /** + * Occurs when the event is called + */ + @SuppressWarnings("unchecked") + private void onCreate() + { + Set services = IGuiceContext + .instance() + .getLoader(IOnDeActivateService.class, ServiceLoader.load(IOnDeActivateService.class)); + services.forEach(service -> service.onCreate(this)); + } } diff --git a/src/main/java/com/jwebmp/core/events/drag/DragAdapter.java b/src/main/java/com/jwebmp/core/events/drag/DragAdapter.java index 8fadff590..1e6aba80c 100644 --- a/src/main/java/com/jwebmp/core/events/drag/DragAdapter.java +++ b/src/main/java/com/jwebmp/core/events/drag/DragAdapter.java @@ -17,7 +17,7 @@ package com.jwebmp.core.events.drag; -import com.guicedee.client.*; +import com.guicedee.client.IGuiceContext; import com.jwebmp.core.Event; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; @@ -25,7 +25,6 @@ import com.jwebmp.core.base.html.interfaces.events.GlobalEvents; import com.jwebmp.core.events.services.IOnDragService; import com.jwebmp.core.htmlbuilder.javascript.events.enumerations.EventTypes; -import com.jwebmp.core.plugins.ComponentInformation; import lombok.extern.java.Log; import java.util.ServiceLoader; @@ -37,81 +36,76 @@ * * @author GedMarc */ -@ComponentInformation(name = "Drag Event", - description = "Server Side Event for Drag.") @Log public abstract class DragAdapter> - extends Event - implements GlobalEvents + extends Event + implements GlobalEvents { - /** - * Performs a click - * - * @param component - * The component this click is going to be acting on - */ - public DragAdapter(com.jwebmp.core.base.interfaces.IComponentHierarchyBase component) - { - super(EventTypes.drag, component); + /** + * Performs a click + * + * @param component The component this click is going to be acting on + */ + public DragAdapter(com.jwebmp.core.base.interfaces.IComponentHierarchyBase component) + { + super(EventTypes.drag, component); - } + } - @Override - public void fireEvent(AjaxCall call, AjaxResponse response) - { - try - { - onDrag(call, response); - onCall(); - } - catch (Exception e) - { - DragAdapter.log.log(Level.SEVERE, "Error In Firing Event", e); - } - } + @Override + public void fireEvent(AjaxCall call, AjaxResponse response) + { + try + { + onDrag(call, response); + onCall(); + } + catch (Exception e) + { + DragAdapter.log.log(Level.SEVERE, "Error In Firing Event", e); + } + } - /** - * Triggers on Click - *

- * - * @param call - * The physical AJAX call - * @param response - * The physical Ajax Receiver - */ - public abstract void onDrag(AjaxCall call, AjaxResponse response); + /** + * Triggers on Click + *

+ * + * @param call The physical AJAX call + * @param response The physical Ajax Receiver + */ + public abstract void onDrag(AjaxCall call, AjaxResponse response); - /** - * Method onCall ... - */ - private void onCall() - { - Set services = IGuiceContext.instance() + /** + * Method onCall ... + */ + private void onCall() + { + Set services = IGuiceContext.instance() .getLoader(IOnDragService.class, ServiceLoader.load(IOnDragService.class)); - services.forEach(service -> service.onCall(this)); - } + services.forEach(service -> service.onCall(this)); + } - @Override - public void preConfigure() - { - if (!isConfigured()) - { - onCreate(); - } - super.preConfigure(); - } + @Override + public void preConfigure() + { + if (!isConfigured()) + { + onCreate(); + } + super.preConfigure(); + } - /** - * Occurs when the event is called - */ - @SuppressWarnings("unchecked") - private void onCreate() - { - Set services = IGuiceContext - .instance() - .getLoader(IOnDragService.class, ServiceLoader.load(IOnDragService.class)); - services.forEach(service -> service.onCreate(this)); - } + /** + * Occurs when the event is called + */ + @SuppressWarnings("unchecked") + private void onCreate() + { + Set services = IGuiceContext + .instance() + .getLoader(IOnDragService.class, ServiceLoader.load(IOnDragService.class)); + services.forEach(service -> service.onCreate(this)); + } } diff --git a/src/main/java/com/jwebmp/core/events/dragstart/DragStartAdapter.java b/src/main/java/com/jwebmp/core/events/dragstart/DragStartAdapter.java index b8f4d54c4..e8117bdc9 100644 --- a/src/main/java/com/jwebmp/core/events/dragstart/DragStartAdapter.java +++ b/src/main/java/com/jwebmp/core/events/dragstart/DragStartAdapter.java @@ -24,7 +24,6 @@ import com.jwebmp.core.base.html.interfaces.events.GlobalEvents; import com.jwebmp.core.events.services.IOnDragStartService; import com.jwebmp.core.htmlbuilder.javascript.events.enumerations.EventTypes; -import com.jwebmp.core.plugins.ComponentInformation; import lombok.extern.java.Log; import java.util.ServiceLoader; @@ -36,77 +35,72 @@ * * @author GedMarc */ -@ComponentInformation(name = "Drag Start Event", - description = "Server Side Event for Drag Start.") @Log public abstract class DragStartAdapter> - extends Event - implements GlobalEvents + extends Event + implements GlobalEvents { - /** - * Performs a click - * - * @param component - * The component this click is going to be acting on - */ - public DragStartAdapter(com.jwebmp.core.base.interfaces.IComponentHierarchyBase component) - { - super(EventTypes.dragStart, component); - } + /** + * Performs a click + * + * @param component The component this click is going to be acting on + */ + public DragStartAdapter(com.jwebmp.core.base.interfaces.IComponentHierarchyBase component) + { + super(EventTypes.dragStart, component); + } - @Override - public void fireEvent(AjaxCall call, AjaxResponse response) - { - try - { - onDragStart(call, response); - onCall(); - } - catch (Exception e) - { - log.log(Level.SEVERE, "Error In Firing Event", e); - } - } + @Override + public void fireEvent(AjaxCall call, AjaxResponse response) + { + try + { + onDragStart(call, response); + onCall(); + } + catch (Exception e) + { + log.log(Level.SEVERE, "Error In Firing Event", e); + } + } - /** - * Triggers on Click - *

- * - * @param call - * The physical AJAX call - * @param response - * The physical Ajax Receiver - */ - public abstract void onDragStart(AjaxCall call, AjaxResponse response); + /** + * Triggers on Click + *

+ * + * @param call The physical AJAX call + * @param response The physical Ajax Receiver + */ + public abstract void onDragStart(AjaxCall call, AjaxResponse response); - /** - * Method onCall ... - */ - private void onCall() - { - Set services = com.guicedee.client.IGuiceContext.instance() + /** + * Method onCall ... + */ + private void onCall() + { + Set services = com.guicedee.client.IGuiceContext.instance() .getLoader(IOnDragStartService.class, ServiceLoader.load(IOnDragStartService.class)); - services.forEach(service -> service.onCall(this)); - } + services.forEach(service -> service.onCall(this)); + } - @Override - public void preConfigure() - { - if (!isConfigured()) - { - onCreate(); - } - super.preConfigure(); - } + @Override + public void preConfigure() + { + if (!isConfigured()) + { + onCreate(); + } + super.preConfigure(); + } - /** - * Occurs when the event is called - */ - @SuppressWarnings("unchecked") - private void onCreate() - { - Set services = com.guicedee.client.IGuiceContext.instance() - .getLoader(IOnDragStartService.class, ServiceLoader.load(IOnDragStartService.class)); - services.forEach(service -> service.onCreate(this)); - } + /** + * Occurs when the event is called + */ + @SuppressWarnings("unchecked") + private void onCreate() + { + Set services = com.guicedee.client.IGuiceContext.instance() + .getLoader(IOnDragStartService.class, ServiceLoader.load(IOnDragStartService.class)); + services.forEach(service -> service.onCreate(this)); + } } diff --git a/src/main/java/com/jwebmp/core/events/dragstop/DragStopAdapter.java b/src/main/java/com/jwebmp/core/events/dragstop/DragStopAdapter.java index 6fcd0fb06..4b5923381 100644 --- a/src/main/java/com/jwebmp/core/events/dragstop/DragStopAdapter.java +++ b/src/main/java/com/jwebmp/core/events/dragstop/DragStopAdapter.java @@ -17,7 +17,7 @@ package com.jwebmp.core.events.dragstop; -import com.guicedee.client.*; +import com.guicedee.client.IGuiceContext; import com.jwebmp.core.Event; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; @@ -25,7 +25,6 @@ import com.jwebmp.core.base.html.interfaces.events.GlobalEvents; import com.jwebmp.core.events.services.IOnDragStopService; import com.jwebmp.core.htmlbuilder.javascript.events.enumerations.EventTypes; -import com.jwebmp.core.plugins.ComponentInformation; import lombok.extern.java.Log; import java.util.ServiceLoader; @@ -37,81 +36,76 @@ * * @author GedMarc */ -@ComponentInformation(name = "Drag Stop Event", - description = "Server Side Event for Drag Stop.") @Log public abstract class DragStopAdapter> - extends Event - implements GlobalEvents + extends Event + implements GlobalEvents { - - /** - * Performs a click - * - * @param component - * The component this click is going to be acting on - */ - public DragStopAdapter(com.jwebmp.core.base.interfaces.IComponentHierarchyBase component) - { - super(EventTypes.dragStop, component); - } + /** + * Performs a click + * + * @param component The component this click is going to be acting on + */ + public DragStopAdapter(com.jwebmp.core.base.interfaces.IComponentHierarchyBase component) + { + super(EventTypes.dragStop, component); - @Override - public void fireEvent(AjaxCall call, AjaxResponse response) - { - try - { - onDragStop(call, response); - onCall(); - } - catch (Exception e) - { - DragStopAdapter.log.log(Level.SEVERE, "Error In Firing Event", e); - } - } + } - /** - * Triggers on Drag Stop - *

- * - * @param call - * The physical AJAX call - * @param response - * The physical Ajax Receiver - */ - public abstract void onDragStop(AjaxCall call, AjaxResponse response); + @Override + public void fireEvent(AjaxCall call, AjaxResponse response) + { + try + { + onDragStop(call, response); + onCall(); + } + catch (Exception e) + { + DragStopAdapter.log.log(Level.SEVERE, "Error In Firing Event", e); + } + } - /** - * Method onCall ... - */ - private void onCall() - { - Set services = IGuiceContext.instance() + /** + * Triggers on Drag Stop + *

+ * + * @param call The physical AJAX call + * @param response The physical Ajax Receiver + */ + public abstract void onDragStop(AjaxCall call, AjaxResponse response); + + /** + * Method onCall ... + */ + private void onCall() + { + Set services = IGuiceContext.instance() .getLoader(IOnDragStopService.class, ServiceLoader.load(IOnDragStopService.class)); - services.forEach(service -> service.onCall(this)); - } + services.forEach(service -> service.onCall(this)); + } - @Override - public void preConfigure() - { - if (!isConfigured()) - { - onCreate(); - } - super.preConfigure(); - } + @Override + public void preConfigure() + { + if (!isConfigured()) + { + onCreate(); + } + super.preConfigure(); + } - /** - * Occurs when the event is called - */ - @SuppressWarnings("unchecked") - private void onCreate() - { - Set services = IGuiceContext - .instance() - .getLoader(IOnDragStopService.class, ServiceLoader.load(IOnDragStopService.class)); - services.forEach(service -> service.onCreate(this)); - } + /** + * Occurs when the event is called + */ + @SuppressWarnings("unchecked") + private void onCreate() + { + Set services = IGuiceContext + .instance() + .getLoader(IOnDragStopService.class, ServiceLoader.load(IOnDragStopService.class)); + services.forEach(service -> service.onCreate(this)); + } } diff --git a/src/main/java/com/jwebmp/core/events/drop/DropAdapter.java b/src/main/java/com/jwebmp/core/events/drop/DropAdapter.java index 8105b8ed8..009a8dc42 100644 --- a/src/main/java/com/jwebmp/core/events/drop/DropAdapter.java +++ b/src/main/java/com/jwebmp/core/events/drop/DropAdapter.java @@ -17,7 +17,7 @@ package com.jwebmp.core.events.drop; -import com.guicedee.client.*; +import com.guicedee.client.IGuiceContext; import com.jwebmp.core.Event; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; @@ -25,7 +25,6 @@ import com.jwebmp.core.base.html.interfaces.events.GlobalEvents; import com.jwebmp.core.events.services.IOnDropService; import com.jwebmp.core.htmlbuilder.javascript.events.enumerations.EventTypes; -import com.jwebmp.core.plugins.ComponentInformation; import lombok.extern.java.Log; import java.util.ServiceLoader; @@ -37,81 +36,76 @@ * * @author GedMarc */ -@ComponentInformation(name = "DropEvent", - description = "Server Side Event for Drop") @Log public abstract class DropAdapter> - extends Event - implements GlobalEvents + extends Event + implements GlobalEvents { - - /** - * Performs a click - * - * @param component - * The component this click is going to be acting on - */ - public DropAdapter(com.jwebmp.core.base.interfaces.IComponentHierarchyBase component) - { - super(EventTypes.drop, component); - } + /** + * Performs a click + * + * @param component The component this click is going to be acting on + */ + public DropAdapter(com.jwebmp.core.base.interfaces.IComponentHierarchyBase component) + { + super(EventTypes.drop, component); - @Override - public void fireEvent(AjaxCall call, AjaxResponse response) - { - try - { - onDrop(call, response); - onCall(); - } - catch (Exception e) - { - DropAdapter.log.log(Level.SEVERE, "Error In Firing Event", e); - } - } + } - /** - * Triggers on Drop - *

- * - * @param call - * The physical AJAX call - * @param response - * The physical Ajax Receiver - */ - public abstract void onDrop(AjaxCall call, AjaxResponse response); + @Override + public void fireEvent(AjaxCall call, AjaxResponse response) + { + try + { + onDrop(call, response); + onCall(); + } + catch (Exception e) + { + DropAdapter.log.log(Level.SEVERE, "Error In Firing Event", e); + } + } - /** - * Method onCall ... - */ - private void onCall() - { - Set services = IGuiceContext.instance() + /** + * Triggers on Drop + *

+ * + * @param call The physical AJAX call + * @param response The physical Ajax Receiver + */ + public abstract void onDrop(AjaxCall call, AjaxResponse response); + + /** + * Method onCall ... + */ + private void onCall() + { + Set services = IGuiceContext.instance() .getLoader(IOnDropService.class, ServiceLoader.load(IOnDropService.class)); - services.forEach(service -> service.onCall(this)); - } + services.forEach(service -> service.onCall(this)); + } - @Override - public void preConfigure() - { - if (!isConfigured()) - { - onCreate(); - } - super.preConfigure(); - } + @Override + public void preConfigure() + { + if (!isConfigured()) + { + onCreate(); + } + super.preConfigure(); + } - /** - * Occurs when the event is called - */ - @SuppressWarnings("unchecked") - private void onCreate() - { - Set services = IGuiceContext - .instance() - .getLoader(IOnDropService.class, ServiceLoader.load(IOnDropService.class)); - services.forEach(service -> service.onCreate(this)); - } + /** + * Occurs when the event is called + */ + @SuppressWarnings("unchecked") + private void onCreate() + { + Set services = IGuiceContext + .instance() + .getLoader(IOnDropService.class, ServiceLoader.load(IOnDropService.class)); + services.forEach(service -> service.onCreate(this)); + } } diff --git a/src/main/java/com/jwebmp/core/events/dropout/DropOutAdapter.java b/src/main/java/com/jwebmp/core/events/dropout/DropOutAdapter.java index 0bf65f0ea..72509cc0b 100644 --- a/src/main/java/com/jwebmp/core/events/dropout/DropOutAdapter.java +++ b/src/main/java/com/jwebmp/core/events/dropout/DropOutAdapter.java @@ -17,7 +17,7 @@ package com.jwebmp.core.events.dropout; -import com.guicedee.client.*; +import com.guicedee.client.IGuiceContext; import com.jwebmp.core.Event; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; @@ -25,7 +25,6 @@ import com.jwebmp.core.base.html.interfaces.events.GlobalEvents; import com.jwebmp.core.events.services.IOnDropOutService; import com.jwebmp.core.htmlbuilder.javascript.events.enumerations.EventTypes; -import com.jwebmp.core.plugins.ComponentInformation; import lombok.extern.java.Log; import java.util.ServiceLoader; @@ -37,82 +36,77 @@ * * @author GedMarc */ -@ComponentInformation(name = "Drop OutEvent", - description = "Server Side Event for Drop Out") @Log public abstract class DropOutAdapter> - extends Event - implements GlobalEvents + extends Event + implements GlobalEvents { - /** - * Performs a click - * - * @param component - * The component this click is going to be acting on - */ - public DropOutAdapter(com.jwebmp.core.base.interfaces.IComponentHierarchyBase component) - { - super(EventTypes.drop, component); + /** + * Performs a click + * + * @param component The component this click is going to be acting on + */ + public DropOutAdapter(com.jwebmp.core.base.interfaces.IComponentHierarchyBase component) + { + super(EventTypes.drop, component); - } + } - @Override - public void fireEvent(AjaxCall call, AjaxResponse response) - { - try - { - onDropOut(call, response); - onCall(); - } - catch (Exception e) - { - DropOutAdapter.log.log(Level.SEVERE, "Error In Firing Event", e); - } - } + @Override + public void fireEvent(AjaxCall call, AjaxResponse response) + { + try + { + onDropOut(call, response); + onCall(); + } + catch (Exception e) + { + DropOutAdapter.log.log(Level.SEVERE, "Error In Firing Event", e); + } + } - /** - * Triggers on Drop - *

- * - * @param call - * The physical AJAX call - * @param response - * The physical Ajax Receiver - */ - public abstract void onDropOut(AjaxCall call, AjaxResponse response); + /** + * Triggers on Drop + *

+ * + * @param call The physical AJAX call + * @param response The physical Ajax Receiver + */ + public abstract void onDropOut(AjaxCall call, AjaxResponse response); - /** - * Method onCall ... - */ - private void onCall() - { - Set services = IGuiceContext.instance() + /** + * Method onCall ... + */ + private void onCall() + { + Set services = IGuiceContext.instance() .getLoader(IOnDropOutService.class, ServiceLoader.load(IOnDropOutService.class)); - services.forEach(service -> service.onCall(this)); - } + services.forEach(service -> service.onCall(this)); + } - @Override - public void preConfigure() - { - if (!isConfigured()) - { - onCreate(); - } - super.preConfigure(); - } + @Override + public void preConfigure() + { + if (!isConfigured()) + { + onCreate(); + } + super.preConfigure(); + } - /** - * Occurs when the event is called - */ - @SuppressWarnings("unchecked") - private void onCreate() - { - Set services = IGuiceContext - .instance() - .getLoader(IOnDropOutService.class, ServiceLoader.load(IOnDropOutService.class)); - services.forEach(service -> service.onCreate(this)); - } + /** + * Occurs when the event is called + */ + @SuppressWarnings("unchecked") + private void onCreate() + { + Set services = IGuiceContext + .instance() + .getLoader(IOnDropOutService.class, ServiceLoader.load(IOnDropOutService.class)); + services.forEach(service -> service.onCreate(this)); + } } diff --git a/src/main/java/com/jwebmp/core/events/dropover/DropOverAdapter.java b/src/main/java/com/jwebmp/core/events/dropover/DropOverAdapter.java index 9a8d7753c..fd63412aa 100644 --- a/src/main/java/com/jwebmp/core/events/dropover/DropOverAdapter.java +++ b/src/main/java/com/jwebmp/core/events/dropover/DropOverAdapter.java @@ -17,7 +17,7 @@ package com.jwebmp.core.events.dropover; -import com.guicedee.client.*; +import com.guicedee.client.IGuiceContext; import com.jwebmp.core.Event; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; @@ -25,7 +25,6 @@ import com.jwebmp.core.base.html.interfaces.events.GlobalEvents; import com.jwebmp.core.events.services.IOnDropOverService; import com.jwebmp.core.htmlbuilder.javascript.events.enumerations.EventTypes; -import com.jwebmp.core.plugins.ComponentInformation; import lombok.extern.java.Log; import java.util.ServiceLoader; @@ -37,83 +36,78 @@ * * @author GedMarc */ -@ComponentInformation(name = "Drop Over Event", - description = "Server Side Event for Drop Out") @Log public abstract class DropOverAdapter> - extends Event - implements GlobalEvents + extends Event + implements GlobalEvents { - - /** - * Performs a click - * - * @param component - * The component this click is going to be acting on - */ - public DropOverAdapter(com.jwebmp.core.base.interfaces.IComponentHierarchyBase component) - { - super(EventTypes.drop, component); - } + /** + * Performs a click + * + * @param component The component this click is going to be acting on + */ + public DropOverAdapter(com.jwebmp.core.base.interfaces.IComponentHierarchyBase component) + { + super(EventTypes.drop, component); - @Override - public void fireEvent(AjaxCall call, AjaxResponse response) - { - try - { - onDropOver(call, response); - onCall(); - } - catch (Exception e) - { - DropOverAdapter.log.log(Level.SEVERE, "Error In Firing Event", e); - } - } + } - /** - * Triggers on Drop - *

- * - * @param call - * The physical AJAX call - * @param response - * The physical Ajax Receiver - */ - public abstract void onDropOver(AjaxCall call, AjaxResponse response); + @Override + public void fireEvent(AjaxCall call, AjaxResponse response) + { + try + { + onDropOver(call, response); + onCall(); + } + catch (Exception e) + { + DropOverAdapter.log.log(Level.SEVERE, "Error In Firing Event", e); + } + } - /** - * Method onCall ... - */ - private void onCall() - { - Set services = IGuiceContext.instance() + /** + * Triggers on Drop + *

+ * + * @param call The physical AJAX call + * @param response The physical Ajax Receiver + */ + public abstract void onDropOver(AjaxCall call, AjaxResponse response); + + /** + * Method onCall ... + */ + private void onCall() + { + Set services = IGuiceContext.instance() .getLoader(IOnDropOverService.class, ServiceLoader.load(IOnDropOverService.class)); - services.forEach(service -> service.onCall(this)); - } + services.forEach(service -> service.onCall(this)); + } - @Override - public void preConfigure() - { - if (!isConfigured()) - { - onCreate(); - } - super.preConfigure(); - } + @Override + public void preConfigure() + { + if (!isConfigured()) + { + onCreate(); + } + super.preConfigure(); + } - /** - * Occurs when the event is called - */ - @SuppressWarnings("unchecked") - private void onCreate() - { - Set services = IGuiceContext - .instance() - .getLoader(IOnDropOverService.class, ServiceLoader.load(IOnDropOverService.class)); - services.forEach(service -> service.onCreate(this)); - } + /** + * Occurs when the event is called + */ + @SuppressWarnings("unchecked") + private void onCreate() + { + Set services = IGuiceContext + .instance() + .getLoader(IOnDropOverService.class, ServiceLoader.load(IOnDropOverService.class)); + services.forEach(service -> service.onCreate(this)); + } } diff --git a/src/main/java/com/jwebmp/core/events/focus/FocusAdapter.java b/src/main/java/com/jwebmp/core/events/focus/FocusAdapter.java index 4204e1039..efc00c9d8 100644 --- a/src/main/java/com/jwebmp/core/events/focus/FocusAdapter.java +++ b/src/main/java/com/jwebmp/core/events/focus/FocusAdapter.java @@ -17,7 +17,7 @@ package com.jwebmp.core.events.focus; -import com.guicedee.client.*; +import com.guicedee.client.IGuiceContext; import com.jwebmp.core.Event; import com.jwebmp.core.base.ajax.AjaxCall; import com.jwebmp.core.base.ajax.AjaxResponse; @@ -25,7 +25,6 @@ import com.jwebmp.core.base.html.interfaces.events.GlobalEvents; import com.jwebmp.core.events.services.IOnFocusService; import com.jwebmp.core.htmlbuilder.javascript.events.enumerations.EventTypes; -import com.jwebmp.core.plugins.ComponentInformation; import lombok.extern.java.Log; import java.util.ServiceLoader; @@ -37,82 +36,77 @@ * * @author GedMarc */ -@ComponentInformation(name = "Focus Event", - description = "Server Side Event for Focus") @Log public abstract class FocusAdapter> - extends Event - implements GlobalEvents + extends Event + implements GlobalEvents { - - /** - * Performs a click - * - * @param component - * The component this click is going to be acting on - */ - public FocusAdapter(com.jwebmp.core.base.interfaces.IComponentHierarchyBase component) - { - super(EventTypes.focus, component); - } + /** + * Performs a click + * + * @param component The component this click is going to be acting on + */ + public FocusAdapter(com.jwebmp.core.base.interfaces.IComponentHierarchyBase component) + { + super(EventTypes.focus, component); - @Override - public void fireEvent(AjaxCall call, AjaxResponse response) - { - try - { - onFocus(call, response); - onCall(); - } - catch (Exception e) - { - FocusAdapter.log.log(Level.SEVERE, "Error In Firing Event", e); - } - } + } - /** - * Triggers on Focus - *

- * - * @param call - * The physical AJAX call - * @param response - * The physical Ajax Receiver - */ - public abstract void onFocus(AjaxCall call, AjaxResponse response); + @Override + public void fireEvent(AjaxCall call, AjaxResponse response) + { + try + { + onFocus(call, response); + onCall(); + } + catch (Exception e) + { + FocusAdapter.log.log(Level.SEVERE, "Error In Firing Event", e); + } + } - /** - * Method onCall ... - */ - private void onCall() - { - Set services = IGuiceContext.instance() + /** + * Triggers on Focus + *

+ * + * @param call The physical AJAX call + * @param response The physical Ajax Receiver + */ + public abstract void onFocus(AjaxCall call, AjaxResponse response); + + /** + * Method onCall ... + */ + private void onCall() + { + Set services = IGuiceContext.instance() .getLoader(IOnFocusService.class, ServiceLoader.load(IOnFocusService.class)); - services.forEach(service -> service.onCall(this)); - } + services.forEach(service -> service.onCall(this)); + } - @Override - public void preConfigure() - { - if (!isConfigured()) - { - onCreate(); - } - super.preConfigure(); - } + @Override + public void preConfigure() + { + if (!isConfigured()) + { + onCreate(); + } + super.preConfigure(); + } - /** - * Occurs when the event is called - */ - @SuppressWarnings("unchecked") - private void onCreate() - { - Set services = IGuiceContext - .instance() - .getLoader(IOnFocusService.class, ServiceLoader.load(IOnFocusService.class)); - services.forEach(service -> service.onCreate(this)); - } + /** + * Occurs when the event is called + */ + @SuppressWarnings("unchecked") + private void onCreate() + { + Set services = IGuiceContext + .instance() + .getLoader(IOnFocusService.class, ServiceLoader.load(IOnFocusService.class)); + services.forEach(service -> service.onCreate(this)); + } } diff --git a/src/main/java/com/jwebmp/core/events/submit/SubmitAdapter.java b/src/main/java/com/jwebmp/core/events/submit/SubmitAdapter.java index 1934465e4..48816671a 100644 --- a/src/main/java/com/jwebmp/core/events/submit/SubmitAdapter.java +++ b/src/main/java/com/jwebmp/core/events/submit/SubmitAdapter.java @@ -27,7 +27,6 @@ import com.jwebmp.core.base.html.interfaces.events.ParagraphEvents; import com.jwebmp.core.events.services.IOnSubmitService; import com.jwebmp.core.htmlbuilder.javascript.events.enumerations.EventTypes; -import com.jwebmp.core.plugins.ComponentInformation; import lombok.extern.java.Log; import java.util.ServiceLoader; @@ -40,86 +39,81 @@ * @author GedMarc */ @SuppressWarnings("unused") -@ComponentInformation(name = "Submit Event", - description = "Server Side Event for Submit.") @Log public abstract class SubmitAdapter> - extends Event - implements ParagraphEvents, - BodyEvents, GlobalEvents + extends Event + implements ParagraphEvents, + BodyEvents, GlobalEvents { - protected SubmitAdapter() - { - super("Submit", EventTypes.submit); - } + protected SubmitAdapter() + { + super("Submit", EventTypes.submit); + } - /** - * Performs a click - * - * @param component - * The component this click is going to be acting on - */ - public SubmitAdapter(Form component) - { - super(EventTypes.submit, component); - } + /** + * Performs a click + * + * @param component The component this click is going to be acting on + */ + public SubmitAdapter(Form component) + { + super(EventTypes.submit, component); + } - @Override - public void fireEvent(AjaxCall call, AjaxResponse response) - { - try - { - onSubmit(call, response); - onCall(); - } - catch (Exception e) - { - SubmitAdapter.log.log(Level.SEVERE, "Error In Firing Event", e); - } - } + @Override + public void fireEvent(AjaxCall call, AjaxResponse response) + { + try + { + onSubmit(call, response); + onCall(); + } + catch (Exception e) + { + SubmitAdapter.log.log(Level.SEVERE, "Error In Firing Event", e); + } + } - /** - * Triggers on Click - *

- * - * @param call - * The physical AJAX call - * @param response - * The physical Ajax Receiver - */ - public abstract void onSubmit(AjaxCall call, AjaxResponse response); + /** + * Triggers on Click + *

+ * + * @param call The physical AJAX call + * @param response The physical Ajax Receiver + */ + public abstract void onSubmit(AjaxCall call, AjaxResponse response); - /** - * Method onCall ... - */ - @SuppressWarnings({"rawtypes", "unchecked"}) - private void onCall() - { - Set services = com.guicedee.client.IGuiceContext.instance() + /** + * Method onCall ... + */ + @SuppressWarnings({"rawtypes", "unchecked"}) + private void onCall() + { + Set services = com.guicedee.client.IGuiceContext.instance() .getLoader(IOnSubmitService.class, ServiceLoader.load(IOnSubmitService.class)); - services.forEach(service -> service.onCall(this)); - } + services.forEach(service -> service.onCall(this)); + } - @Override - public void preConfigure() - { - if (!isConfigured()) - { - onCreate(); - } - super.preConfigure(); - } + @Override + public void preConfigure() + { + if (!isConfigured()) + { + onCreate(); + } + super.preConfigure(); + } - /** - * Occurs when the event is called - */ - @SuppressWarnings("unchecked") - private void onCreate() - { - @SuppressWarnings({"rawtypes", "unchecked"}) - Set services = com.guicedee.client.IGuiceContext.instance() - .getLoader(IOnSubmitService.class, ServiceLoader.load(IOnSubmitService.class)); - services.forEach(service -> service.onCreate(this)); - } + /** + * Occurs when the event is called + */ + @SuppressWarnings("unchecked") + private void onCreate() + { + @SuppressWarnings({"rawtypes", "unchecked"}) + Set services = com.guicedee.client.IGuiceContext.instance() + .getLoader(IOnSubmitService.class, ServiceLoader.load(IOnSubmitService.class)); + services.forEach(service -> service.onCreate(this)); + } } diff --git a/src/main/java/com/jwebmp/core/plugins/ComponentInformation.java b/src/main/java/com/jwebmp/core/plugins/ComponentInformation.java deleted file mode 100644 index 2927cf92d..000000000 --- a/src/main/java/com/jwebmp/core/plugins/ComponentInformation.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.plugins; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * Any specific component - * - * @author GedMarc - * @since 19 Feb 2017 - */ -@Target({ElementType.TYPE}) -@Retention(RetentionPolicy.RUNTIME) -public @interface ComponentInformation -{ - - /** - * The name of the component - * - * @return - */ - String name(); - - /** - * The description of the component - * - * @return - */ - String description(); - - /** - * The URL of the component - * - * @return - */ - String url() default "https://github.com/GedMarc/JWebMP"; - - /** - * The wiki url of the component - * - * @return - */ - String wikiUrl() default "https://github.com/GedMarc/JWebMP/wiki"; - - /** - * The icon of the component - * - * @return - */ - String icon() default ""; - -} diff --git a/src/main/java/com/jwebmp/core/plugins/FeatureInformation.java b/src/main/java/com/jwebmp/core/plugins/FeatureInformation.java deleted file mode 100644 index eebe7c613..000000000 --- a/src/main/java/com/jwebmp/core/plugins/FeatureInformation.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.plugins; - -import java.lang.annotation.*; - -/** - * Defines a plugin, attach to a Page Configurator - * - * @author GedMarc - * @since 19 Feb 2017 - */ -@Target({ElementType.TYPE}) -@Retention(RetentionPolicy.RUNTIME) -@Inherited -public @interface FeatureInformation -{ - String name() default "NotSet"; - String purpose() default "NotSet"; -} diff --git a/src/main/java/com/jwebmp/core/plugins/PluginInformation.java b/src/main/java/com/jwebmp/core/plugins/PluginInformation.java deleted file mode 100644 index 3a086c676..000000000 --- a/src/main/java/com/jwebmp/core/plugins/PluginInformation.java +++ /dev/null @@ -1,194 +0,0 @@ -/* - * Copyright (C) 2017 GedMarc - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jwebmp.core.plugins; - -import java.lang.annotation.*; - -/** - * Defines a plugin, attach to a Page Configurator - * - * @author GedMarc - * @since 19 Feb 2017 - */ -@Target({ElementType.TYPE}) -@Retention(RetentionPolicy.RUNTIME) -@Inherited -public @interface PluginInformation -{ - - /** - * Lower case unique id name - * - * @return - */ - String pluginUniqueName(); - - /** - * The actual name of the plugin - * - * @return - */ - String pluginName(); - - /** - * The version identifier for the plugin - * - * @return - */ - String pluginVersion(); - - /** - * The subtitle of the plugin - * - * @return - */ - String pluginSubtitle() default ""; - - /** - * The description of the plugin - * - * @return - */ - String pluginDescription(); - - /** - * The categories of the plugin - * - * @return - */ - String pluginCategories() default ""; - - /** - * The actual Wiki url for this plugin - * - * @return - */ - String pluginWikiUrl() default ""; - - /** - * The image for the icon of this plugin (192x192) - * - * @return - */ - String pluginIconImageUrl() default ""; - - /** - * The source url for this plugin - * - * @return - */ - String pluginIconUrl() default ""; - - /** - * The source url for this plugin (usually git) - * - * @return - */ - String pluginSourceUrl() default ""; - - /** - * The Git url for the java portion of this plugin - * - * @return - */ - String pluginGitUrl() default ""; - - /** - * The donate button for the source url of this plugin - * - * @return - */ - String pluginSourceDonateUrl() default "https://paypal.me/MarcMagon/15"; - - /** - * The default download URL for plugins - * - * @return - */ - String pluginDownloadUrl() default "https://sourceforge.net/projects/jwebswing/files/"; - - /** - * The author of this plugin - * - * @return - */ - String pluginAuthor() default "Marc Magon"; - - /** - * The date (pls yyyy/MM/dd format) for this plugin - * - * @return - */ - String pluginLastUpdatedDate() default "2017/02/19"; - - /** - * Comma separated list of unique id name for plugins - * - * @return - */ - String pluginDependancyUniqueIDs() default ""; - - /** - * The price of this plugin - * - * @return - */ - double pluginPrice() default 0.0; - - /** - * @return - */ - String pluginPayUrl() default "https://paypal.me/MarcMagon/15"; - - /** - * The default homepage of the plugin - * - * @return - */ - String pluginOriginalHomepage() default ""; - - /** - * If the plugin requires commercial for public sites - * - * @return - */ - boolean pluginCommercial() default false; - - /** - * The name of the hosting module - * @return - */ - String pluginModuleName() default "NotEntered"; - - /** - * The pom plugin group id - * @return - */ - String pluginGroupId() default "NotEntered"; - - /** - * The pom artifact id - * @return - */ - String pluginArtifactId() default "NotEntered"; - - /** - * The current status - * @return - */ - PluginStatus pluginStatus() default PluginStatus.Planned; -} diff --git a/src/main/java/com/jwebmp/core/plugins/PluginStatus.java b/src/main/java/com/jwebmp/core/plugins/PluginStatus.java deleted file mode 100644 index c0def932c..000000000 --- a/src/main/java/com/jwebmp/core/plugins/PluginStatus.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.jwebmp.core.plugins; - -public enum PluginStatus -{ - Planned, - DevelopmentStarted, - BaseCompleted, - ComponentsCreated, - TestsCompleted, - Released, - Deprecated -} diff --git a/src/main/java/module-info.java b/src/main/java/module-info.java index 6d7fcf3dc..2938dad48 100644 --- a/src/main/java/module-info.java +++ b/src/main/java/module-info.java @@ -1,7 +1,7 @@ import com.guicedee.guicedinjection.interfaces.IGuiceModule; import com.jwebmp.core.events.services.*; -import com.jwebmp.core.implementations.JWebMPSiteBinder; import com.jwebmp.core.implementations.JWebMPServicesBindings; +import com.jwebmp.core.implementations.JWebMPSiteBinder; import com.jwebmp.interception.JWebMPInterceptionBinder; module com.jwebmp.core { @@ -151,7 +151,7 @@ exports com.jwebmp.core.htmlbuilder.javascript.events.enumerations; // exports com.jwebmp.core.htmlbuilder.javascript.events.interfaces; - exports com.jwebmp.core.plugins; +// exports com.jwebmp.core.plugins; exports com.jwebmp.core.utilities; exports com.jwebmp.core.utilities.dualquickpivot;