|
Last update: 2011-06-23 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.proteios.core.BasicItem<D>
org.proteios.core.OwnedItem<D>
org.proteios.core.SharedItem<D>
org.proteios.core.CommonItem<PluginConfigurationData>
org.proteios.core.PluginConfiguration
public class PluginConfiguration
This class is used to configure a plugin. A plugin can have many configurations. The sequence to setup a configuration is the following
| Field Summary | |
|---|---|
static Item |
TYPE
The type of item represented by this class. |
| Fields inherited from interface org.proteios.core.Nameable |
|---|
MAX_DESCRIPTION_LENGTH, MAX_NAME_LENGTH |
| Method Summary | |
|---|---|
PluginConfigurationRequest |
configure()
Start the configuration sequence for a plugin. |
static PluginConfiguration |
getById(DbControl dc,
int id)
Get a PluginConfiguration item when you know the ID. |
ItemQuery<Job> |
getJobs()
Get a query that returns the jobs using this plugin configuration. |
static PluginConfiguration |
getNew(DbControl dc,
PluginDefinition pd)
Create a new PluginConfiguration item. |
Set<String> |
getParameterNames()
Get the names of all configuration values. |
List<?> |
getParameterValues(String name)
Get the values of a configuration parameter. |
PluginDefinition |
getPluginDefinition()
Get the plugin definition for this configuration. |
static ItemQuery<PluginConfiguration> |
getQuery()
Get a query configured to retrieve plugin configurations. |
static ItemQuery<PluginConfiguration> |
getQuery(GuiContext gc,
String interfaceName)
Get a query that returns all plugins configurations related to a specified GUI context and implementing a certain interface. |
Item |
getType()
Get the type of item represented by the object. |
boolean |
isUsed()
Check if: A Job is using this plugin configuration
|
void |
setParameterValues(String name,
ParameterType<?> parameterType,
List<?> values)
Set a configuration parameter. |
| Methods inherited from class org.proteios.core.CommonItem |
|---|
getDescription, getName, isRemoved, setDescription, setName, setRemoved |
| Methods inherited from class org.proteios.core.SharedItem |
|---|
getItemKey, getProjectKey, isShared, setItemKey, setProjectKey |
| Methods inherited from class org.proteios.core.OwnedItem |
|---|
getOwner, setOwner |
| Methods inherited from class org.proteios.core.BasicItem |
|---|
checkPermission, equals, getDbControl, getId, getPermissions, getSessionControl, getVersion, hashCode, hasPermission, isDetached, isInDatabase, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.proteios.core.Identifiable |
|---|
getId, getVersion |
| Methods inherited from interface org.proteios.core.AccessControlled |
|---|
checkPermission, hasPermission |
| Methods inherited from interface org.proteios.core.Ownable |
|---|
getOwner, setOwner |
| Field Detail |
|---|
public static final Item TYPE
Item.PLUGINCONFIGURATION,
getType()| Method Detail |
|---|
public static PluginConfiguration getNew(DbControl dc,
PluginDefinition pd)
throws PermissionDeniedException,
BaseException
PluginConfiguration item.
dc - The DbControl which will be used for permission
checking and database access.
PluginDefinition item
InvalidDataException - If the plugin definition is null
PermissionDeniedException - If the logged in user doesn't have use
permission for the plugin definition
BaseException - If there is an error
public static PluginConfiguration getById(DbControl dc,
int id)
throws ItemNotFoundException,
PermissionDeniedException,
BaseException
PluginConfiguration item when you know the ID.
dc - The DbControl which will be used for permission
checking and database access.id - The ID of the item to load
PluginConfiguration item
ItemNotFoundException - If an item with the specified ID is not
found
PermissionDeniedException - If the logged in user doesn't have
READ permission for the item
BaseException - If there is another errorpublic static ItemQuery<PluginConfiguration> getQuery()
ItemQuery object
public static ItemQuery<PluginConfiguration> getQuery(GuiContext gc,
String interfaceName)
PluginDefinition.isInContext(GuiContext) returns true for the
specified item, and PluginDefinition.supports(PluginType) returns
true for the specified interface.
gc - The item the plugin should be related to, or null if this
parameter is irrelevantinterfaceName - The complete name of the interface that the plugin
must implement, or null if this parameter is irrelevantpublic Item getType()
IdentifiableItem enumeration.
public boolean isUsed()
throws BaseException
Job is using this plugin configuration
isUsed in class BasicItem<PluginConfigurationData>BaseException
public PluginDefinition getPluginDefinition()
throws PermissionDeniedException,
BaseException
PluginDefinition object.
PermissionDeniedException - This exception is thrown if the logged
in user doesn't have READ permission to
the items.
BaseExceptionpublic Set<String> getParameterNames()
Set containing the names of the configuration
values or an empty set if no values has been defined
public List<?> getParameterValues(String name)
throws PermissionDeniedException,
BaseException
name - The name of the parameter
PermissionDeniedException - If the logged in user doesn't have read
permission to all values
BaseException - If there is another error
public void setParameterValues(String name,
ParameterType<?> parameterType,
List<?> values)
throws InvalidDataException,
PermissionDeniedException,
BaseException
name - The name of the configuration parameterparameterType - The type of the parametervalues - A list containing the new values, null or empty to remove
the configuration values
PermissionDeniedException - If the logged in user doesn't have
write permission
InvalidDataException - If name is null or the new value doesn't
validate against the parameter type
BaseException - If there is another error
public PluginConfigurationRequest configure()
throws PermissionDeniedException,
BaseException
PluginRequest object
PermissionDeniedException - If the logged in user doesn't have
write permission
BaseException - If there is another errorpublic ItemQuery<Job> getJobs()
ItemQuery object
|
Last update: 2011-06-23 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||