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
-
-
-
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 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
public void createProperties(Locale locale, boolean withTempSavedProperties)
-
getName
public String getName()
- Specified by:
getName
in 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()
-
getPluginEntity
public E getPluginEntity()
-
setPluginEntity
public void setPluginEntity(E pluginEntity)
-
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)
-
getPluginUpdateAvailability
public <R> StageChain<org.apache.commons.lang3.tuple.Pair<EPluginUpdateAvailability,String>,R> getPluginUpdateAvailability(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
public List<FCMessage> save(IUser user) throws IOException, FCPluginException
- Throws:
IOException
FCPluginException
-
delete
public void delete(IUser user) throws IOException
- Throws:
IOException
-
deselected
public void deselected()
-
selected
public void selected()
-
isUnsaved
public boolean isUnsaved()
-
isEmpty
public boolean isEmpty()
-
finalize
protected void finalize() throws Throwable
-
getPluginKey
public String getPluginKey()
-
setPluginKey
public void setPluginKey(String pluginKey)
-
getTempFile
public File getTempFile()
-
getUpdateAvailable
public EPluginUpdateAvailability getUpdateAvailable()
-
setUpdateAvailable
public void setUpdateAvailable(EPluginUpdateAvailability updateAvailable)
-
getPluginFileKey
public String getPluginFileKey()
-
setPluginFileKey
public void setPluginFileKey(String pluginFileKey)
-
getTempRuntime
public PluginRuntime getTempRuntime()
-
setTempRuntime
public void setTempRuntime(PluginRuntime tempRuntime)
-
getTempRuntimeFile
public File getTempRuntimeFile()
-
setTempRuntimeFile
public void setTempRuntimeFile(File tempRuntimeFile)
-
getPluginRepository
public String getPluginRepository()
- Returns:
- The repository of the plugin. Defaults to
REPOSITORY_NONE
. When a repository exists, the plugin can e.g. be updated automatically.
-
setPluginRepository
public void setPluginRepository(String pluginRepository)
- Parameters:
pluginRepository
- The repository of the plugin. Defaults toREPOSITORY_NONE
. When a repository exists, the plugin can e.g. be updated automatically.
-
save
@Deprecated public List<FCMessage> save(Benutzer user) throws IOException, FCPluginException
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 public void delete(Benutzer user) throws IOException
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
public PluginID getPluginId()
- Returns:
- The ID of the plugin, a combination of the
plugin key
and thefile key
.
-
-