Package ch.ivyteam.ivy.security
Interface IUserSubstitute
-
public interface IUserSubstitute
A substitute defines a user which substitutes an other user for a certain role or personally- Since:
- 17.05.2006
- API:
- This is a public API.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
getDescription()
Gets the description of the substitutelong
getId()
Gets the user substitute identifierIUser
getSubstituteUser()
Gets the substitute userIRole
getSubstitutionRole()
Gets the substitution roleSubstitutionType
getSubstitutionType()
Gets thesubstitution type
of the substituteIUser
getUser()
Gets the user the substitute belongs toboolean
isActive()
boolean
isPersonallyOnly()
Returns true if the substitution is personally onlyboolean
isValid()
void
setSubstitutionType(SubstitutionType type)
Sets thesubstitution type
of the substitute
-
-
-
Method Detail
-
getId
long getId()
Gets the user substitute identifier- Returns:
- user substitute identifier
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
getSubstituteUser
IUser getSubstituteUser()
Gets the substitute user- Returns:
- substitute user
- Throws:
PersistencyException
- if persistency access fails- API:
- This public API is available in IvyScript and Java. It has the visibility ADVANCED.
-
getSubstitutionRole
IRole getSubstitutionRole()
Gets the substitution role- Returns:
- substitution role
- Throws:
PersistencyException
- if persistency access fails- API:
- This public API is available in IvyScript and Java. It has the visibility ADVANCED.
-
isPersonallyOnly
boolean isPersonallyOnly()
Returns true if the substitution is personally only- Returns:
- true if personally only, otherwise false
- Throws:
PersistencyException
- if persistency access fails- API:
- This public API is available in IvyScript and Java. It has the visibility ADVANCED.
-
getDescription
String getDescription()
Gets the description of the substitute- Returns:
- description
- Throws:
PersistencyException
- if persistency access fails- API:
- This public API is available in IvyScript and Java. It has the visibility ADVANCED.
-
getUser
IUser getUser()
Gets the user the substitute belongs to- Returns:
- user
- Throws:
PersistencyException
- if persistency access fails- API:
- This public API is available in IvyScript and Java. It has the visibility ADVANCED.
-
getSubstitutionType
SubstitutionType getSubstitutionType()
Gets thesubstitution type
of the substitute- Returns:
substitution type
- Throws:
PersistencyException
- if persistency access fails- API:
- This public API is available in IvyScript and Java. It has the visibility ADVANCED.
-
setSubstitutionType
void setSubstitutionType(SubstitutionType type)
Sets thesubstitution type
of the substitute- Throws:
PersistencyException
- if persistency access failsIllegalArgumentException
- iftype
isSubstitutionType.PERMANENT
and this substitute is notpersonal
.- API:
- This public API is available in IvyScript and Java. It has the visibility ADVANCED.
- Security:
- SESSION (MATCHES THIS AND OWNS UserCreateOwnSubstitute PERMISSION) OR OWNS UserCreateSubstitute PERMISSION OR OWNS UserCreateSubstitute@SYSTEM PERMISSION
-
isActive
boolean isActive()
- Returns:
true
if this substitute is currently active. Either if this a permanent substitute or if the substituted user is absent (seeIUser.isAbsent()
). The substitute needs to be valid (seeisValid()
) to have a chance to be active.- API:
- This public API is available in IvyScript and Java. It has the visibility ADVANCED.
-
isValid
boolean isValid()
- Returns:
true
if this substitute is valid. Generally all personal substitute are valid.false
if the substituted user does not have the substitution role or if the substituted user has the role only because another substitute.- API:
- This public API is available in IvyScript and Java. It has the visibility ADVANCED.
-
-