|
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<PluginTypeData>
org.proteios.core.PluginType
public class PluginType
| Field Summary | |
|---|---|
static int |
MAX_INTERFACENAME_LENGTH
The maximum length of the interface name that can be stored in the database. |
static int |
MAX_JARPATH_LENGTH
The maximum length of the jar path name that can be stored in the database. |
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 | |
|---|---|
static PluginType |
getById(DbControl dc,
int id)
Get a PluginType object when you know the ID. |
static PluginType |
getByInterfaceName(DbControl dc,
String interfaceName)
Get a PluginType object when you know the interface
name it represents. |
String |
getDescription()
Get the description for the item. |
String |
getInterfaceName()
Get the class name of the Java class that implements this plugin. |
String |
getJarPath()
Get the path to the JAR file that contains the plugin class file. |
String |
getName()
Get the name of the item. |
static PluginType |
getNew(DbControl dc,
String interfaceName,
String jarPath)
Create a new PluginType item. |
ItemQuery<PluginDefinition> |
getPlugins()
Get a query that returns the plugin definitions which implements this type. |
static ItemQuery<PluginType> |
getQuery()
Get a query configured to retrieve plugin types. |
Item |
getType()
Get the type of item represented by the object. |
boolean |
isRemoved()
Check if the removed flag is set for this item. |
boolean |
isUsed()
Always FALSE. |
void |
loadInterfaceInformation(String jarPath,
String interfaceName)
|
void |
setDescription(String description)
Set the description for the item. |
void |
setName(String name)
Set the name of the item. |
void |
setRemoved(boolean removed)
Set the removed flag for this item. |
| 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 |
| Field Detail |
|---|
public static final Item TYPE
Item.PLUGINTYPE,
getType()public static final int MAX_INTERFACENAME_LENGTH
setInterfaceName(String) method to avoid exceptions.
public static final int MAX_JARPATH_LENGTH
| Method Detail |
|---|
public static PluginType getNew(DbControl dc,
String interfaceName,
String jarPath)
throws BaseException
PluginType item.
dc - The DbControl which will be used for
permission checking and database access.interfaceName - The name of an interface that a plugin
must implement to be of this typejarPath - Optional path to the jar file which contains the
interface class, if missing the interface must be in the classpath
PluginDefinition item
BaseException - If there is an error
public static PluginType getById(DbControl dc,
int id)
throws ItemNotFoundException,
PermissionDeniedException,
BaseException
PluginType object 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.
PluginType item
ItemNotFoundException - If an item with the specified
id is not found
PermissionDeniedException - If the logged in user doesn't
have read permission to the item
BaseException - If there is another error
public static PluginType getByInterfaceName(DbControl dc,
String interfaceName)
throws ItemNotFoundException,
PermissionDeniedException,
BaseException
PluginType object when you know the interface
name it represents.
dc - The DbControl which will be used for
permission checking and database access.interfaceName - The interface name of the plugin type
PluginType item
ItemNotFoundException - If an item with the specified
interface name is not found
PermissionDeniedException - If the logged in user doesn't
have read permission to the item
BaseException - If there is another errorpublic static ItemQuery<PluginType> getQuery()
ItemQuery objectpublic Item getType()
IdentifiableItem enumeration.
getType in interface Identifiablepublic String getName()
Nameable
getName in interface NameableString with the name of the item
public void setName(String name)
throws PermissionDeniedException,
InvalidDataException
NameableNameable.MAX_NAME_LENGTH constant.
setName in interface Nameablename - The new name for the item
PermissionDeniedException - If the logged in user doesn't
have write permission
InvalidDataException - If the name is null or longer
than specified by the Nameable.MAX_NAME_LENGTH constantpublic String getDescription()
Nameable
getDescription in interface NameableString with a description of the item
public void setDescription(String description)
throws PermissionDeniedException,
InvalidDataException
NameableNameable.MAX_DESCRIPTION_LENGTH constant.
setDescription in interface Nameabledescription - The new description for the item
PermissionDeniedException - If the logged in user doesn't
have write permission
InvalidDataException - If the description longer
than specified by the Nameable.MAX_DESCRIPTION_LENGTH constant
public boolean isUsed()
throws BaseException
isUsed in class BasicItem<PluginTypeData>BaseExceptionpublic boolean isRemoved()
Removable
isRemoved in interface Removable
public void setRemoved(boolean removed)
throws PermissionDeniedException
Removable
setRemoved in interface Removableremoved - TRUE if the item should be flagged as removed,
FALSE otherwise
PermissionDeniedException - If the logged in user doesn't
have Permission.DELETE permission for setting the flag
to TRUE or Permission.WRITE permission for setting the
flag to FALSEpublic String getInterfaceName()
Plugin
interface.
public String getJarPath()
public void loadInterfaceInformation(String jarPath,
String interfaceName)
throws InvalidDataException,
BaseException
InvalidDataException
BaseExceptionpublic ItemQuery<PluginDefinition> getPlugins()
PluginDefinition.getQuery()
|
Last update: 2011-06-23 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||