|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectca.sqlpower.wabit.AbstractWabitObject
ca.sqlpower.wabit.enterprise.client.Grant
public class Grant
A Grant object represents a set of permissions on a single object, or class of objects. Due to restrictions in the JCR, Grants should remain immutable. To change a User's permissions, remove the old Grant, and create a new one.
| Constructor Summary | |
|---|---|
Grant(Grant grant)
Copy constructor |
|
Grant(java.lang.String subject,
java.lang.String type,
boolean create,
boolean modify,
boolean delete,
boolean execute,
boolean grant)
Creates a grant object. |
|
| Method Summary | |
|---|---|
boolean |
allowsChildren()
Returns true if this object may contain children. |
int |
childPositionOffset(java.lang.Class<? extends WabitObject> childType)
Returns the position in the list that would be returned by getChildren() that the first object of type childClass is, or where it would be if there were any children of that type. |
java.util.List<? extends WabitObject> |
getChildren()
Returns an unmodifiable list of the children in this WabitObject. |
java.util.List<WabitObject> |
getDependencies()
Returns a list of all WabitObjects that this Wabit object is
dependent on. |
java.lang.String |
getName()
Returns the short name for this object. |
java.lang.String |
getSubject()
|
java.lang.String |
getType()
|
boolean |
hasPermissions()
|
boolean |
isCreatePrivilege()
|
boolean |
isDeletePrivilege()
|
boolean |
isExecutePrivilege()
|
boolean |
isGrantPrivilege()
|
boolean |
isModifyPrivilege()
|
boolean |
isReadOnly()
|
protected boolean |
removeChildImpl(WabitObject child)
This is the object specific implementation of removeChild. |
void |
removeDependency(WabitObject dependency)
Removes the given object as a dependency of this object. |
void |
setName(java.lang.String name)
Sets the name for this object |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Grant(@Nonnull
Grant grant)
grant - Grant to copy
public Grant(@Nullable
java.lang.String subject,
@Nonnull
java.lang.String type,
boolean create,
boolean modify,
boolean delete,
boolean execute,
boolean grant)
subject - The object we want to grant access to. Can be null
if the type parameter is used.type - The class of wabit object to grant access to. Can be null
if the subject parameter is used.create - modify - delete - execute - grant - | Method Detail |
|---|
public void setName(java.lang.String name)
WabitObject
setName in interface WabitObjectsetName in class AbstractWabitObjectpublic java.lang.String getName()
WabitObject
getName in interface WabitObjectgetName in class AbstractWabitObjectprotected boolean removeChildImpl(WabitObject child)
AbstractWabitObject
removeChildImpl in class AbstractWabitObjectAbstractWabitObject.removeChild(WabitObject)public boolean allowsChildren()
WabitObject
WabitObject.childPositionOffset(Class)public int childPositionOffset(java.lang.Class<? extends WabitObject> childType)
WabitObject
public java.util.List<? extends WabitObject> getChildren()
WabitObject
public java.util.List<WabitObject> getDependencies()
WabitObjectWabitObjects that this Wabit object is
dependent on. Children of a WabitObject are not dependencies and will not
be returned in this list. If there are no objects this Wabit object is
dependent on an empty list should be returned. These are only the
immediate dependencies of this object. If you want to find the
dependencies of this object's dependencies as well it may be useful to
look at WorkspaceGraphModel to make a full graph of all of the
dependencies.
public void removeDependency(WabitObject dependency)
WabitObject
public boolean isCreatePrivilege()
public boolean isModifyPrivilege()
public boolean isDeletePrivilege()
public boolean isExecutePrivilege()
public boolean isGrantPrivilege()
public boolean isReadOnly()
public boolean hasPermissions()
public java.lang.String getType()
public java.lang.String getSubject()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||