|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.basedb.core.BasicItem<D> net.sf.basedb.core.BasicChildItem<D>
abstract class BasicChildItem<D extends BasicData>
An abstract base class for all items which are child items to
a BasicItem
parent item. This class implements the initPermissions(int, int)
method and sets the permissions for the child
item based on the permissions for type of the parent item.
If the logged in user has read/use permission for the parent, READ/USE permission is granted. If the logged in user has write permission for the parent, WRITE, DELETE and CREATE permission is granted.
This class should only be used if the parent item itself hasn't
overridden the initPermissions
method, since that method
is never called.
Constructor Summary | |
---|---|
BasicChildItem(D data)
|
Method Summary | |
---|---|
(package private) abstract Item |
getParentType()
Get the type of item that is the parent of this item. |
(package private) Permission |
getPermissionForWriteDeleteAndCreate()
Get the permission that is required on the parent item that gives write, delete and create permission on the child item. |
(package private) PluginPermission |
getPluginPermissions()
|
(package private) void |
initPermissions(int granted,
int denied)
If the logged in user has read permission for the parent, read permission is granted. |
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 |
---|
getType |
Constructor Detail |
---|
BasicChildItem(D data)
Method Detail |
---|
void initPermissions(int granted, int denied) throws BaseException
getPermissionForWriteDeleteAndCreate()
method
for the parent, WRITE, DELETE and CREATE permission
is granted.
initPermissions
in class BasicItem<D extends BasicData>
granted
- Permissions that have been granted by the subclassdenied
- Permissions that have been denied by the subclass
BaseException
- If the permissions couldn't be initialisedPluginPermission getPluginPermissions()
getPluginPermissions
in class BasicItem<D extends BasicData>
Permission getPermissionForWriteDeleteAndCreate()
abstract Item getParentType()
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |