|
3.1.1: 2012-03-29 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.basedb.core.BasicItem<D>
net.sf.basedb.core.ChildItem<HelpData>
net.sf.basedb.core.Help
public class Help
This class is used to represent a help text for a client application.
| Field Summary | |
|---|---|
static int |
MAX_EXTERNAL_ID_LENGTH
The maximum length of the external id variable that can be stored in the database. |
private static QueryRuntimeFilter |
RUNTIME_FILTER
This filter will only return items if the logged in user has generic read permission to clients. |
static Item |
TYPE
The type of item represented by this class. |
| Fields inherited from interface net.sf.basedb.core.Nameable |
|---|
MAX_DESCRIPTION_LENGTH, MAX_NAME_LENGTH |
| Constructor Summary | |
|---|---|
Help(HelpData data)
Creates a new help item |
|
| Method Summary | |
|---|---|
static Help |
getById(DbControl dc,
int id)
Get a Help item when you know the ID. |
Client |
getClient()
Get the client application this setting is valid for. |
String |
getDescription()
Get the description for the item. |
String |
getExternalId()
Get the external id for this Help item. |
String |
getName()
Get the name of the item. |
static Help |
getNew(DbControl dc,
Client client,
String externalId)
Create a new Help item. |
static ItemQuery<Help> |
getQuery(Client client)
Get a query configured to retrieve help texts for the specified client application. |
(package private) SharedData |
getSharedParent()
Get the shareable parent item of this child item. |
Item |
getType()
Get the type of item represented by the object. |
(package private) void |
setClient(Client client)
Set the client application this setting is valid for. |
void |
setDescription(String description)
Set the description for the item. |
void |
setExternalId(String externalId)
Set the external id for this Help item. |
void |
setName(String name)
Set the name of the item. |
| Methods inherited from class net.sf.basedb.core.ChildItem |
|---|
getPermissionForWriteDeleteAndCreate, getPluginPermissions, initPermissions |
| Methods inherited from class net.sf.basedb.core.BasicItem |
|---|
addUsingItems, addUsingItems, checkPermission, equals, getData, getDbControl, getId, getPermissions, getSessionControl, getUsingItems, getVersion, hashCode, hasPermission, isDetached, isInDatabase, isUsed, onAfterCommit, onAfterInsert, onBeforeCommit, onRollback, setDbControl, setProjectDefaults, toString, toTransferable, validate |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface net.sf.basedb.core.Identifiable |
|---|
getId, getVersion |
| Methods inherited from interface net.sf.basedb.core.AccessControlled |
|---|
checkPermission, getPermissions, hasPermission |
| Field Detail |
|---|
public static final Item TYPE
Item.HELP,
getType()public static final int MAX_EXTERNAL_ID_LENGTH
setExternalId(String) method to avoid
exceptions.
private static final QueryRuntimeFilter RUNTIME_FILTER
| Constructor Detail |
|---|
Help(HelpData data)
data - the data| Method Detail |
|---|
public static Help getNew(DbControl dc,
Client client,
String externalId)
throws BaseException
Help item.
dc - The DbControl which will be used for
permission checking and database accessclient - The Client which this help text is forexternalId - A unique string used for quick retrieval of a specific help text
ClientDefaultSetting item
BaseException - If there is an errorClient.newHelp(String)
public static Help getById(DbControl dc,
int id)
throws ItemNotFoundException,
PermissionDeniedException,
BaseException
Help 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
Help item
ItemNotFoundException - If an item with the specified
ID is not found
PermissionDeniedException - If the logged in user doesn't
have Permission.READ permission to the item
BaseException - If there is another errorpublic static ItemQuery<Help> getQuery(Client client)
client - The client to retreive help for, null is allowed if
the logged in user has generic READ permission for clients in which case
all help will be returned
ItemQuery objectClient.getHelp()public 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 constantSharedData getSharedParent()
ChildItemChildItem.initPermissions(int, int) method to calculate
the logged in user's permissions for the child item.
getSharedParent in class ChildItem<HelpData>
public Client getClient()
throws PermissionDeniedException,
BaseException
Client item
PermissionDeniedException - If the logged in user doesn't have
Permission.READ permission
BaseException - If there is another error
void setClient(Client client)
throws PermissionDeniedException,
InvalidDataException
InvalidDataException - If the client is null
PermissionDeniedExceptionpublic String getExternalId()
Help item.
public void setExternalId(String externalId)
throws PermissionDeniedException,
InvalidDataException
Help item. The value
cannot be null and must not be longer than the value specified by
the MAX_EXTERNAL_ID_LENGTH constant. It must also be a value
that is unique for the client application.
externalId - The new external id for this item
PermissionDeniedException - If the logged in user doesn't have
write permission
InvalidDataException - If the new value is null or longer than
MAX_EXTERNAL_ID_LENGTH
|
3.1.1: 2012-03-29 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||