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
ConstructorsConstructorDescriptionPluginWrapperModel
(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
Modifier and TypeMethodDescriptionvoid
void
createProperties
(Locale locale, boolean withTempSavedProperties) void
Deprecated.void
void
boolean
protected void
finalize()
<R> StageChain<TempFile,
R> getAllUpdatedPluginFiles
(IPublicPromaInvocationContext pc, String licenseKey, Locale locale) getName()
<R> StageChain<PluginUpdateMetadata,
R> getPluginMetadata
(IPublicPromaInvocationContext pc, de.xima.proma.restclient.pub.gen.model.PublicStoreItemResource storeItem, Locale locale, String licenseKey) <R> StageChain<PluginUpdateMetadata,
R> getPluginMetadata
(IPublicPromaInvocationContext pc, Locale locale, String licenseKey) <R> StageChain<de.xima.proma.restclient.pub.gen.model.PublicStoreItemResource,
R> getPluginPromaItem
(IPublicPromaInvocationContext pc, Locale locale, String licenseKey) <R> StageChain<org.apache.commons.lang3.tuple.Pair<EPluginUpdateAvailability,
String>, R> getPluginUpdateAvailability
(IPublicPromaInvocationContext pc, Locale locale, String licenseKey) <R> StageChain<String,
R> getPromaPluginName
(IPublicPromaInvocationContext pc, Locale locale, String licenseKey) <R> StageChain<de.xima.proma.restclient.pub.gen.model.PublicStoreItemList,
R> getSameChecksumPlugins
(IPublicPromaInvocationContext pc, File pluginFile, Locale locale, String licenseKey) <R> StageChain<de.xima.proma.restclient.pub.gen.model.PublicStoreItemUpdateCheckResult,
R> getUpdatedPlugin
(IPublicPromaInvocationContext pc, Locale locale, String licenseKey) int
hashCode()
initPluginUpload
(File sourceFile, String fileName, Locale locale, boolean install, boolean initialize, boolean active) boolean
isActive()
boolean
isEmpty()
boolean
boolean
void
removeProperty
(int idx) Deprecated.Usesave(IUser)
instead.void
selected()
void
setActive
(boolean isActive) void
setPluginEntity
(E pluginEntity) void
setPluginFileKey
(String pluginFileKey) void
setPluginKey
(String pluginKey) void
setPluginRepository
(String pluginRepository) void
setServerRestrictionType
(EPluginServerRestrictionType serverRestrictionType) void
setTempRuntime
(PluginRuntime tempRuntime) void
setTempRuntimeFile
(File tempRuntimeFile) void
setUpdateAvailable
(EPluginUpdateAvailability updateAvailable) validateConfigurationData
(boolean needUpdatedPropeties, Locale locale) validateInitializeConfiguration
(File sourceFile, String fileName, Locale locale, boolean persistedValidation) Methods inherited from class de.xima.fc.gui.common.utils.msg.I18nUtils
getFacesContext, getLocale, rbValue, rbValue, rbValue, rbValueOrDefault, rbValueOrDefault
-
Constructor Details
-
PluginWrapperModel
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
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
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 Details
-
initPluginUpload
public List<IPluginInitializeValidationResult> initPluginUpload(File sourceFile, String fileName, Locale locale, boolean install, boolean initialize, boolean active) throws MalformedURLException - Throws:
MalformedURLException
-
validateConfigurationData
public List<IPluginInitializeValidationResult> validateConfigurationData(boolean needUpdatedPropeties, Locale locale) -
validateInitializeConfiguration
public List<IPluginInitializeValidationResult> validateInitializeConfiguration(File sourceFile, String fileName, Locale locale, boolean persistedValidation) -
createProperties
-
getName
- Specified by:
getName
in interfaceINameProviding
- Returns:
- The name of this object.
-
getAllProperties
-
getPluginRuntime
-
getPluginList
-
getUnregisteredPlugins
-
getManifest
-
getCompatibility
-
isSystemManaged
public boolean isSystemManaged() -
getScopeKey
-
getRuntimeKey
-
getPluginEntity
-
setPluginEntity
-
isActive
public boolean isActive() -
setActive
public void setActive(boolean isActive) -
getInitErrorMsg
-
getManifestAsString
-
addNewProperty
public void addNewProperty() -
removeProperty
public void removeProperty(int idx) -
getPluginUpdateAvailability
public <R> StageChain<org.apache.commons.lang3.tuple.Pair<EPluginUpdateAvailability,String>, getPluginUpdateAvailabilityR> (IPublicPromaInvocationContext pc, Locale locale, String licenseKey) -
getPluginPromaItem
public <R> StageChain<de.xima.proma.restclient.pub.gen.model.PublicStoreItemResource,R> getPluginPromaItem(IPublicPromaInvocationContext pc, Locale locale, String licenseKey) -
getSameChecksumPlugins
public <R> StageChain<de.xima.proma.restclient.pub.gen.model.PublicStoreItemList,R> getSameChecksumPlugins(IPublicPromaInvocationContext pc, File pluginFile, Locale locale, String licenseKey) -
getUpdatedPlugin
public <R> StageChain<de.xima.proma.restclient.pub.gen.model.PublicStoreItemUpdateCheckResult,R> getUpdatedPlugin(IPublicPromaInvocationContext pc, Locale locale, String licenseKey) -
getAllUpdatedPluginFiles
public <R> StageChain<TempFile,R> getAllUpdatedPluginFiles(IPublicPromaInvocationContext pc, String licenseKey, Locale locale) -
getPluginMetadata
public <R> StageChain<PluginUpdateMetadata,R> getPluginMetadata(IPublicPromaInvocationContext pc, Locale locale, String licenseKey) -
getPluginMetadata
public <R> StageChain<PluginUpdateMetadata,R> getPluginMetadata(IPublicPromaInvocationContext pc, de.xima.proma.restclient.pub.gen.model.PublicStoreItemResource storeItem, Locale locale, String licenseKey) -
getPromaPluginName
public <R> StageChain<String,R> getPromaPluginName(IPublicPromaInvocationContext pc, Locale locale, String licenseKey) -
save
- Throws:
IOException
FCPluginException
-
delete
- Throws:
IOException
-
deselected
public void deselected() -
selected
public void selected() -
isUnsaved
public boolean isUnsaved() -
isEmpty
public boolean isEmpty() -
hashCode
public int hashCode() -
equals
-
finalize
-
getPluginKey
-
setPluginKey
-
getTempFile
-
getUpdateAvailable
-
setUpdateAvailable
-
getPluginFileKey
-
setPluginFileKey
-
getTempRuntime
-
setTempRuntime
-
getTempRuntimeFile
-
setTempRuntimeFile
-
getPluginRepository
- Returns:
- The repository of the plugin. Defaults to
REPOSITORY_NONE
. When a repository exists, the plugin can e.g. be updated automatically.
-
setPluginRepository
- Parameters:
pluginRepository
- The repository of the plugin. Defaults toREPOSITORY_NONE
. When a repository exists, the plugin can e.g. be updated automatically.
-
save
Deprecated.Usesave(IUser)
instead.- Parameters:
user
- User who initiated the action. Ignored,VirtualUser.ANONYMOUS
is always used instead.- Returns:
- A list of warning or validation error messages.
- Throws:
IOException
- When the plugin or its files could not be saved.FCPluginException
- When the plugin threw an exception during one of its lifecycle methods.
-
delete
Deprecated.Usedelete(IUser)
instead.- Parameters:
user
- User who initiated the action. Ignored,VirtualUser.ANONYMOUS
is always used instead.- Throws:
IOException
- When the plugin or its files could not be deleted.
-
getPluginId
- Returns:
- The ID of the plugin, a combination of the
plugin key
and thefile key
.
-
getServerRestrictionType
-
setServerRestrictionType
-
delete(IUser)
instead.