Package sonia.scm.repository
Class RepositoryPermission
java.lang.Object
sonia.scm.repository.RepositoryPermission
- All Implemented Interfaces:
Serializable,PermissionObject
Permissions controls the access to
Repository.
This object should be immutable, but could not be due to mapstruct. Do not modify instances of this because this
would change the hash code and therefor make it undeletable in a repository.- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.Do not use this for "normal" code.RepositoryPermission(String name, String role, boolean groupPermission) RepositoryPermission(String name, Collection<String> verbs, boolean groupPermission) -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns true if theRepositoryPermissionis the same as the obj argument.booleanequalVerbs(RepositoryPermission other) getName()Returns the name of the user or group.getRole()Returns the role of the permission.getVerbs()Returns the verb of the permission.inthashCode()Returns the hash code value for theRepositoryPermission.booleanReturns the id of the stored permission object.voidsetGroupPermission(boolean groupPermission) Deprecated.Do not use this for "normal" code.voidDeprecated.Do not use this for "normal" code.voidDeprecated.Do not use this for "normal" code.voidsetVerbs(Collection<String> verbs) Deprecated.Do not use this for "normal" code.toString()
-
Field Details
-
REPOSITORY_MODIFIED_EXCEPTION_TEXT
- See Also:
-
-
Constructor Details
-
RepositoryPermission
Deprecated.Do not use this for "normal" code. UseRepositoryPermission(String, Collection, boolean)instead.This constructor exists for mapstruct and JAXB, only -- do not use this in "normal" code. -
RepositoryPermission
-
RepositoryPermission
-
-
Method Details
-
equals
Returns true if theRepositoryPermissionis the same as the obj argument.- Overrides:
equalsin classObject- Parameters:
obj- the reference object with which to compare- Returns:
- true if the
RepositoryPermissionis the same as the obj argument
-
equalVerbs
-
hashCode
public int hashCode()Returns the hash code value for theRepositoryPermission. -
toString
-
getName
Returns the name of the user or group.- Specified by:
getNamein interfacePermissionObject
-
getVerbs
Returns the verb of the permission. -
getRole
Returns the role of the permission. -
isGroupPermission
public boolean isGroupPermission()Description copied from interface:PermissionObjectReturns the id of the stored permission object.- Specified by:
isGroupPermissionin interfacePermissionObject
-
setGroupPermission
Deprecated.Do not use this for "normal" code. UseRepositoryPermission(String, Collection, boolean)orRepositoryPermission(String, String, boolean)instead.Use this for creation only. This will throw anIllegalStateExceptionwhen modified.- Throws:
IllegalStateException- when modified after the value has been set once.
-
setName
Deprecated.Do not use this for "normal" code. UseRepositoryPermission(String, Collection, boolean)orRepositoryPermission(String, String, boolean)instead.Use this for creation only. This will throw anIllegalStateExceptionwhen modified.- Throws:
IllegalStateException- when modified after the value has been set once.
-
setRole
Deprecated.Do not use this for "normal" code. UseRepositoryPermission(String, String, boolean)instead.Use this for creation only. This will throw anIllegalStateExceptionwhen modified.- Throws:
IllegalStateException- when modified after the value has been set once.
-
setVerbs
Deprecated.Do not use this for "normal" code. UseRepositoryPermission(String, Collection, boolean)instead.Use this for creation only. This will throw anIllegalStateExceptionwhen modified.- Throws:
IllegalStateException- when modified after the value has been set once.
-