Package org.hippoecm.frontend.dialog
Class DialogServiceFactory
- java.lang.Object
-
- org.hippoecm.frontend.dialog.DialogServiceFactory
-
- All Implemented Interfaces:
Serializable
,org.apache.wicket.util.io.IClusterable
,IServiceFactory<IDialogService>
public class DialogServiceFactory extends Object implements IServiceFactory<IDialogService>
The dialog service factory wraps access to the dialog service to make sure that a dialog is closed when the plugin that opened it is stopped.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DialogServiceFactory(String wicketId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
destroy()
org.apache.wicket.Component
getComponent()
Internal method to give the home page access to the dialog window.IDialogService
getService(IPluginContext context)
Invoked when the service is requested from the service registry with the provided plugin context.Class<? extends IDialogService>
getServiceClass()
The service class to be wrapped.void
init(IPluginContext context, String serviceId)
void
releaseService(IPluginContext context, IDialogService service)
When the plugin that requested an instance of the service, is stopped, this method is invoked.void
render(PluginRequestTarget target)
-
-
-
Constructor Detail
-
DialogServiceFactory
public DialogServiceFactory(String wicketId)
-
-
Method Detail
-
init
public void init(IPluginContext context, String serviceId)
-
destroy
public void destroy()
-
getService
public IDialogService getService(IPluginContext context)
Description copied from interface:IServiceFactory
Invoked when the service is requested from the service registry with the provided plugin context.- Specified by:
getService
in interfaceIServiceFactory<IDialogService>
- Parameters:
context
- the plugin context that was used to request access- Returns:
- an instance of the service that can be used by the plugin
-
getServiceClass
public Class<? extends IDialogService> getServiceClass()
Description copied from interface:IServiceFactory
The service class to be wrapped. Needs to be be present here since the type parameter is not available at run time. (FIXME: really?)- Specified by:
getServiceClass
in interfaceIServiceFactory<IDialogService>
- Returns:
- the service interface class
-
releaseService
public void releaseService(IPluginContext context, IDialogService service)
Description copied from interface:IServiceFactory
When the plugin that requested an instance of the service, is stopped, this method is invoked. The service factory is encouraged to clean up any resources that have been allocated on behalf of the plugin.- Specified by:
releaseService
in interfaceIServiceFactory<IDialogService>
- Parameters:
context
- the plugin context for the plugin that is stoppedservice
- the instance of the service that was made available to the plugin
-
render
public void render(PluginRequestTarget target)
-
getComponent
public org.apache.wicket.Component getComponent()
Internal method to give the home page access to the dialog window.
-
-