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 TypeMethodDescriptionvoidvoidcreateProperties(Locale locale, boolean withTempSavedProperties) voidDeprecated.voidvoidbooleanprotected voidfinalize()<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) inthashCode()initPluginUpload(File sourceFile, String fileName, Locale locale, boolean install, boolean initialize, boolean active) booleanisActive()booleanisEmpty()booleanbooleanvoidremoveProperty(int idx) Deprecated.Usesave(IUser)instead.voidselected()voidsetActive(boolean isActive) voidsetPluginEntity(E pluginEntity) voidsetPluginFileKey(String pluginFileKey) voidsetPluginKey(String pluginKey) voidsetPluginRepository(String pluginRepository) voidsetServerRestrictionType(EPluginServerRestrictionType serverRestrictionType) voidsetTempRuntime(PluginRuntime tempRuntime) voidsetTempRuntimeFile(File tempRuntimeFile) voidsetUpdateAvailable(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:
getNamein 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:
IOExceptionFCPluginException
-
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.ANONYMOUSis 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.ANONYMOUSis 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 keyand thefile key.
-
getServerRestrictionType
-
setServerRestrictionType
-
delete(IUser)instead.