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 TypeMethodDescriptionboolean
Returns true if theRepositoryPermission
is the same as the obj argument.boolean
equalVerbs
(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.int
hashCode()
Returns the hash code value for theRepositoryPermission
.boolean
Returns the id of the stored permission object.void
setGroupPermission
(boolean groupPermission) Deprecated.Do not use this for "normal" code.void
Deprecated.Do not use this for "normal" code.void
Deprecated.Do not use this for "normal" code.void
setVerbs
(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 theRepositoryPermission
is the same as the obj argument.- Overrides:
equals
in classObject
- Parameters:
obj
- the reference object with which to compare- Returns:
- true if the
RepositoryPermission
is 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:
getName
in interfacePermissionObject
-
getVerbs
Returns the verb of the permission. -
getRole
Returns the role of the permission. -
isGroupPermission
public boolean isGroupPermission()Description copied from interface:PermissionObject
Returns the id of the stored permission object.- Specified by:
isGroupPermission
in 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 anIllegalStateException
when 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 anIllegalStateException
when 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 anIllegalStateException
when 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 anIllegalStateException
when modified.- Throws:
IllegalStateException
- when modified after the value has been set once.
-