Package de.xima.fc.gui.model
Class PluginWrapperModel<E extends IPluginEntity<?,?,?>>
- java.lang.Object
-
- de.xima.fc.gui.common.utils.msg.I18nUtils
-
- de.xima.fc.gui.model.PluginWrapperModel<E>
-
- All Implemented Interfaces:
INameProviding
public class PluginWrapperModel<E extends IPluginEntity<?,?,?>> extends I18nUtils implements INameProviding
-
-
Field Summary
-
Fields inherited from interface de.xima.fc.entities.interfaces.INameProviding
ATTR_NAME, COL_NAME
-
-
Constructor Summary
Constructors Constructor Description PluginWrapperModel(Locale locale, PluginRuntime pluginRuntime, IGenericDao<E> dao)Creates a new plugin wrapper for a given plugin runtime and database access object.PluginWrapperModel(Locale locale, E pluginEntity, IGenericDao<E> dao)Creates a new plugin wrapper for a given plugin runtime and database access object.PluginWrapperModel(Locale locale, E pluginEntity, IGenericDao<E> dao, IEntityContext ec)Creates a new plugin wrapper for a given plugin runtime and database access object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddNewProperty()voiddelete(Benutzer user)voiddeselected()booleanequals(Object obj)protected voidfinalize()List<ParameterModel>getAllProperties()EPluginCompatibilitygetCompatibility()StringgetInitErrorMsg()PluginManifestgetManifest()StringgetManifestAsString()StringgetName()EgetPluginEntity()List<ParameterModel>getPluginList()PluginRuntimegetPluginRuntime()ParameterModelgetProperty(String paramName)StringgetRuntimeKey()StringgetScopeKey()List<ParameterModel>getUnregisteredPlugins()inthashCode()voidinitPluginUpload(File sourceFile, String fileName, Locale locale, boolean install, boolean initialize)booleanisActive()booleanisEmpty()booleanisSystemManaged()booleanisUnsaved()voidremoveProperty(int idx)List<FCMessage>save(Benutzer user)voidselected()voidsetActive(boolean isActive)voidsetPluginEntity(E pluginEntity)
-
-
-
Constructor Detail
-
PluginWrapperModel
public PluginWrapperModel(Locale locale, E pluginEntity, IGenericDao<E> dao)
Creates a new plugin wrapper for a given plugin runtime and database access object.- Parameters:
locale- Locale for localizing the plugin name and description.pluginEntity- Plugin instance to wrap.dao- Database access object for the plugin.
-
PluginWrapperModel
public PluginWrapperModel(Locale locale, E pluginEntity, IGenericDao<E> dao, IEntityContext ec)
Creates a new plugin wrapper for a given plugin runtime and database access object.- Parameters:
locale- Locale for localizing the plugin name and description.pluginEntity- Plugin instance to wrap.dao- Database access object for the plugin.ec- Entity context for initializing inactive plugins. When not given, no information will be available for inactive plugins.
-
PluginWrapperModel
public PluginWrapperModel(Locale locale, PluginRuntime pluginRuntime, IGenericDao<E> dao)
Creates a new plugin wrapper for a given plugin runtime and database access object.- Parameters:
locale- Locale for localizing the plugin name and description.pluginRuntime- Runtime of the plugin to wrap.dao- Database access object for the plugin.
-
-
Method Detail
-
initPluginUpload
public void initPluginUpload(File sourceFile, String fileName, Locale locale, boolean install, boolean initialize) throws MalformedURLException
- Throws:
MalformedURLException
-
getName
public String getName()
- Specified by:
getNamein interfaceINameProviding- Returns:
- The name of this object.
-
getAllProperties
public List<ParameterModel> getAllProperties()
-
getPluginRuntime
public PluginRuntime getPluginRuntime()
-
getPluginList
public List<ParameterModel> getPluginList()
-
getUnregisteredPlugins
public List<ParameterModel> getUnregisteredPlugins()
-
getManifest
public PluginManifest getManifest()
-
getCompatibility
public EPluginCompatibility getCompatibility()
-
isSystemManaged
public boolean isSystemManaged()
-
getScopeKey
public String getScopeKey()
-
getRuntimeKey
public String getRuntimeKey()
-
setPluginEntity
public void setPluginEntity(E pluginEntity)
-
getPluginEntity
public E getPluginEntity()
-
isActive
public boolean isActive()
-
setActive
public void setActive(boolean isActive)
-
getInitErrorMsg
public String getInitErrorMsg()
-
getManifestAsString
public String getManifestAsString()
-
addNewProperty
public void addNewProperty()
-
removeProperty
public void removeProperty(int idx)
-
getProperty
public ParameterModel getProperty(String paramName)
-
save
public List<FCMessage> save(Benutzer user) throws IOException, FCPluginException
- Throws:
IOExceptionFCPluginException
-
delete
public void delete(Benutzer user) throws IOException
- Throws:
IOException
-
deselected
public void deselected()
-
selected
public void selected()
-
isUnsaved
public boolean isUnsaved()
-
isEmpty
public boolean isEmpty()
-
-