|
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.OwnedItem<D>
net.sf.basedb.core.SharedItem<D>
net.sf.basedb.core.CommonItem<PermissionTemplateData>
net.sf.basedb.core.PermissionTemplate
public class PermissionTemplate
A permission template with permissions to users, groups and
projects. The template can be assigned to a project (Project.setPermissionTemplate(PermissionTemplate)) to make new
items be shared with the permissions from the template when the
project is the active project.
| Field Summary | |
|---|---|
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 | |
|---|---|
PermissionTemplate(PermissionTemplateData data)
|
|
| Method Summary | |
|---|---|
static PermissionTemplate |
getById(DbControl dc,
int id)
Get a permission template item when you know the id. |
static PermissionTemplate |
getNew(DbControl dc)
Create a new permission template item. |
ItemQuery<Project> |
getProjects()
Get a query that returns all projects that use this permission template. |
static ItemQuery<PermissionTemplate> |
getQuery()
Get a query that returns permission templates. |
Item |
getType()
Get the type of item represented by the object. |
Set<ItemProxy> |
getUsingItems()
Get all: Project:s using this permission template
|
boolean |
isUsed()
Check if: A Project uses this template
|
| Methods inherited from class net.sf.basedb.core.CommonItem |
|---|
getDescription, getName, isRemoved, setDescription, setName, setRemoved, toTransferable |
| Methods inherited from class net.sf.basedb.core.SharedItem |
|---|
getItemKey, getProjectKey, initPermissions, isShared, onBeforeCommit, setItemKey, setProjectKey, toTransferable |
| Methods inherited from class net.sf.basedb.core.OwnedItem |
|---|
getOwner, isOwner, setOwner, takeOwnership, toTransferable |
| Methods inherited from class net.sf.basedb.core.BasicItem |
|---|
addUsingItems, addUsingItems, checkPermission, equals, getData, getDbControl, getId, getPermissions, getPluginPermissions, getSessionControl, getVersion, hashCode, hasPermission, isDetached, isInDatabase, onAfterCommit, onAfterInsert, 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 |
| Methods inherited from interface net.sf.basedb.core.Ownable |
|---|
getOwner, isOwner, setOwner, takeOwnership |
| Field Detail |
|---|
public static final Item TYPE
Item.PERMISSIONTEMPLATE,
getType()| Constructor Detail |
|---|
PermissionTemplate(PermissionTemplateData data)
| Method Detail |
|---|
public static PermissionTemplate getNew(DbControl dc)
throws BaseException
dc - The DbControl which will be used for
permission checking and database access
PermissionTemplate item
BaseException - If there is an error
public static PermissionTemplate getById(DbControl dc,
int id)
throws ItemNotFoundException,
PermissionDeniedException,
BaseException
dc - The DbControl which will be used for
permission checking and database access.id - The id of the item to load
PermissionTemplate 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<PermissionTemplate> getQuery()
ItemQuery objectpublic Item getType()
IdentifiableItem enumeration.
public boolean isUsed()
throws BaseException
Project uses this template
isUsed in class BasicItem<PermissionTemplateData>BaseException - If not able to tell if item is used or not.BasicItem.getUsingItems()public Set<ItemProxy> getUsingItems()
Project:s using this permission template
getUsingItems in class BasicItem<PermissionTemplateData>BasicItem.addUsingItems(Set, Item, org.hibernate.Query)public ItemQuery<Project> getProjects()
|
3.1.1: 2012-03-29 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||