Interface IPluginCustomGUI
-
- All Superinterfaces:
IFCPlugin
,INamedUiElement
,INameProviding
,IPluginGenericCustomGUI<IPluginCustomGUIBean>
,IPluginProcessing
,ITransferable
,Serializable
public interface IPluginCustomGUI extends IPluginProcessing, IPluginGenericCustomGUI<IPluginCustomGUIBean>
Interface for a processing plugin with a custom user interface.- Author:
- XIMA MEDIA GmbH
-
-
Field Summary
-
Fields inherited from interface de.xima.fc.plugin.interfaces.IFCPlugin
CONFIG_FILENAME
-
Fields inherited from interface de.xima.fc.interfaces.INamedUiElement
ATTR_DISPLAY_NAME
-
Fields inherited from interface de.xima.fc.entities.interfaces.INameProviding
ATTR_NAME, COL_NAME
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description String
getConfigPage()
Deprecated.UsegetXhtmlView()
Class<? extends IPluginCustomGUIBean>
getManagedBean()
Deprecated.UsegetUnmanagedBeans()
, the bean will not be managed, ie. annotations such asPostConstruct
andManagedProperty
will not work.default Iterable<Class<? extends IPluginCustomGUIBean>>
getUnmanagedBeans()
This must return a list of backing bean classes that control the user interface and are required by theIPluginGenericCustomGUI.getXhtmlView()
.default URL
getXhtmlView()
This method must return the path to the XHTML page for the custom user interface.default void
initCustomGUI()
Deprecated.If you need to do initialization, do so in the managed bean viaIPluginGenericCustomGUIBean.initialize(de.xima.fc.interfaces.plugin.lifecycle.IPluginInitializeBeanData)
.-
Methods inherited from interface de.xima.fc.plugin.interfaces.IFCPlugin
getDescription, getDescription, getDisplayName, getName, initialize, initPlugin, install, shutdown, shutdown, uninstall
-
Methods inherited from interface de.xima.fc.plugin.interfaces.workflow.IPluginProcessing
execute, isReplacePlaceholders
-
-
-
-
Method Detail
-
getXhtmlView
default URL getXhtmlView()
Description copied from interface:IPluginGenericCustomGUI
This method must return the path to the XHTML page for the custom user interface. Usually the XHTML file is part of the JAR resources of the plugin. In this case, you should return an URL to a JAR file resource (jar:file:/...
) like so:@Override public URL getXhtmlView() { return getClass().getResource("/path/to/view.xhtml"); }
- Specified by:
getXhtmlView
in interfaceIPluginGenericCustomGUI<IPluginCustomGUIBean>
- Returns:
- Path to the XHTML view. Must not return
null
. If you do returnnull
, it will be treated as an error.
-
getUnmanagedBeans
default Iterable<Class<? extends IPluginCustomGUIBean>> getUnmanagedBeans()
Description copied from interface:IPluginGenericCustomGUI
This must return a list of backing bean classes that control the user interface and are required by theIPluginGenericCustomGUI.getXhtmlView()
. A new instance of the bean will be created automatically when the view is opened. Make sure each bean has got a no-argument constructor or it cannot be instantiated.Please note that the beans are unmanaged - functionality specific to managed bean is not available. This means, for example, that annotations such as
PostConstruct
andManagedProperty
are not supported and will not work:- Instead of
PostConstruct
, you can useIPluginGenericCustomGUIBean.initialize(de.xima.fc.interfaces.plugin.lifecycle.IPluginInitializeBeanData)
- Instead of
ManagedProperty
, you can access beans you need via the current FacesContext etc.
Each bean should be annotated with
ManagedBean
and specify aManagedBean.name()
. If this annotation is not present or no name is specified, the name defaults to the simple name of the bean class.Also, each bean needs to be annotated one of the following scopes:
RequestScoped
,ViewScoped
,SessionScoped
orApplicationScoped
. Note that it depends on the type of plugin which scopes are actually supported. In case you do not specify a scope, an appropriate scope will be determined automatically.Certain features of managed beans may be supported partially, depending on the type of plugin, but may work differently. This includes, but is not limited to:
- The exact timing at which
PostConstruct
andPreDestroy
are called may differ. - A
ManagedProperty
may not work with all values allowed by the Java Beans specification, and may not perform checks such as the check for circular dependencies. It will also not create new beans when those beans have not been created yet as part of the current page.
- Specified by:
getUnmanagedBeans
in interfaceIPluginGenericCustomGUI<IPluginCustomGUIBean>
- Returns:
- An
Iterable
over the unmanaged bean classes required by the view
- Instead of
-
getManagedBean
@Deprecated Class<? extends IPluginCustomGUIBean> getManagedBean()
Deprecated.UsegetUnmanagedBeans()
, the bean will not be managed, ie. annotations such asPostConstruct
andManagedProperty
will not work.
-
initCustomGUI
@Deprecated default void initCustomGUI() throws FCPluginException
Deprecated.If you need to do initialization, do so in the managed bean viaIPluginGenericCustomGUIBean.initialize(de.xima.fc.interfaces.plugin.lifecycle.IPluginInitializeBeanData)
.- Throws:
FCPluginException
-
getConfigPage
@Deprecated String getConfigPage()
Deprecated.UsegetXhtmlView()
-
-