|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.core.bean.EntityObject com.atlassian.confluence.core.ConfluenceEntityObject com.atlassian.confluence.security.SpacePermission
A SpacePermission restricts access to different functions on a space. A a SpacePermission is defined for a permissionType then that permissionType is not permitted, otherwise if it's not it's permitted.
Constructor Summary | |
SpacePermission()
|
|
SpacePermission(String type)
|
|
SpacePermission(String type,
Space space)
|
|
SpacePermission(String type,
Space space,
String group)
|
|
SpacePermission(String type,
Space space,
String group,
String userName)
|
Method Summary | |
boolean |
equals(Object obj)
|
static SpacePermission |
fromFormParameterName(String formParameterName,
Space space)
Convert a form parameter name into a space permission. |
static Collection |
getGenericSpacePermissions()
|
String |
getGroup()
|
Space |
getSpace()
The space of this permission. |
long |
getSpaceId()
|
String |
getType()
|
String |
getUserName()
|
int |
hashCode()
|
boolean |
isAdministrativePermission()
Is this an administrative permission either globally or at a space level? |
boolean |
isAnonymousPermission()
|
boolean |
isDependentOn(SpacePermission otherPermission)
One permission is dependent on another if the other permission is a guard permission that applies to the same space/global scope, and to the same group or user as this permission. |
boolean |
isGlobalPermission()
|
boolean |
isGroupPermission()
|
boolean |
isGuardPermission()
Is this a guard permission, either globally or at the space level? Guard permissions are required before any more permissions can be added for a particular user/group in a particular scope. |
boolean |
isInvalidAnonymousPermission()
Some permissions are not valid as they can not be assigned to the anonymous user. |
boolean |
isSpacePermission()
|
boolean |
isUserPermission()
|
void |
setGroup(String group)
|
void |
setSpace(Space space)
|
void |
setType(String type)
|
void |
setUserName(String userName)
|
String |
toFormParameterName()
Convert the space permission into a form parameter name that can be used for form checkboxes. |
String |
toString()
|
Methods inherited from class com.atlassian.confluence.core.ConfluenceEntityObject |
getCreatorName, getLastModifierName, isPersistent, setCreatorName, setLastModifierName |
Methods inherited from class com.atlassian.core.bean.EntityObject |
clone, getCreationDate, getCurrentDate, getId, getLastModificationDate, setClock, setCreationDate, setId, setLastModificationDate |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final String FORM_PARAMETER_PREFIX
public static final String FORM_PARAMETER_SEPARATOR
public static final String FULL_FORM_PARAMETER_PREFIX
public static final String USE_CONFLUENCE_PERMISSION
public static final String ADMINISTER_CONFLUENCE_PERMISSION
public static final String PERSONAL_SPACE_PERMISSION
public static final String CREATE_SPACE_PERMISSION
public static final String PROFILE_ATTACHMENT_PERMISSION
public static final String VIEWSPACE_PERMISSION
public static final String COMMENT_PERMISSION
public static final String CREATEEDIT_PAGE_PERMISSION
public static final String ADMINISTER_SPACE_PERMISSION
public static final String REMOVE_PAGE_PERMISSION
public static final String REMOVE_COMMENT_PERMISSION
public static final String REMOVE_BLOG_PERMISSION
public static final String CREATE_ATTACHMENT_PERMISSION
public static final String REMOVE_ATTACHMENT_PERMISSION
public static final String EDITBLOG_PERMISSION
public static final String EXPORT_PAGE_PERMISSION
public static final String EXPORT_SPACE_PERMISSION
public static final String REMOVE_MAIL_PERMISSION
public static final String SET_PAGE_PERMISSIONS_PERMISSION
public static final Collection PERMISSION_TYPES
public static final Collection GENERIC_SPACE_PERMISSIONS
public static final Collection GLOBAL_PERMISSIONS
public static final Collection INVALID_ANONYMOUS_PERMISSIONS
Constructor Detail |
public SpacePermission()
public SpacePermission(String type)
public SpacePermission(String type, Space space)
public SpacePermission(String type, Space space, String group)
public SpacePermission(String type, Space space, String group, String userName)
Method Detail |
public static SpacePermission fromFormParameterName(String formParameterName, Space space) throws ParseException
toFormParameterName()
.
formParameterName
- the form parameter name to convert to a space permissionspace
- the space the permission applies to, or null if it is a global permission
ParseException
- if the form parameter name can not be converted to a permission typepublic Space getSpace()
public void setSpace(Space space)
public long getSpaceId()
public String getType()
public void setType(String type)
public String getGroup()
public void setGroup(String group)
public String getUserName()
public void setUserName(String userName)
public boolean isUserPermission()
public boolean isGroupPermission()
public boolean isAnonymousPermission()
public boolean isGlobalPermission()
public boolean isSpacePermission()
public String toString()
public boolean equals(Object obj)
public int hashCode()
public static Collection getGenericSpacePermissions()
public String toFormParameterName()
fromFormParameterName(java.lang.String, com.atlassian.confluence.spaces.Space)
The format of the parameter name is: confluence_[permissionType]_[user/group/anonymous]_[user/group name]
Note: the space is NOT encoded in the form parameter name, and must be kept separately.
public boolean isAdministrativePermission()
public boolean isGuardPermission()
public boolean isDependentOn(SpacePermission otherPermission)
otherPermission
-
public boolean isInvalidAnonymousPermission()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |