public interface PersonManagementService extends PersonService
Modifier and Type | Method and Description |
---|---|
Person |
addPerson(Person person)
Adds new person into the application.
|
Person |
addPersonWithData(PersonData personData)
Adds new person into the application.
|
Person |
assignSecurityRolesToPerson(String personId,
List<String> securityRoleNames)
Assigns given list of security roles (specified by their names) to the user identified
by given
personId argument. |
RoleUnitNameList |
findRoles()
Returns a collection of all roles with all different combinations of parameters assigned to
persons.
|
Collection<PersonAttribute> |
getEditableAttributes()
Returns editable person attributes.
|
Collection<SecurityRole> |
getSecurityRoles(String personId)
Returns a collection of all the security roles currently assigned to the user identified by
given
personId or an empty collection if the user has no security roles assigned to
them. |
boolean |
isReadOnly()
Deprecated.
As of release 3.2, replaced by
getEditableAttributes() .
This method has been deprecated as some implementations may allow editing
of some of the person attributes and therefore finer grained control over
the attribute editability is required. |
Person |
updatePerson(Person person)
Updates the person.
|
Person |
updatePersonLogin(String personId,
String newLogin)
Updates current login of the user identified by given
personId with the content
of newLogin argument. |
Person |
updatePersonPassword(String personId,
String newPassword)
Updates current password of the user identified by given
personId with the content
of newPassword argument. |
Person |
updatePersonWithData(PersonData personData)
Updates the person.
|
void |
validatePassword(String password)
Validates the given password candidate to the actual password policy.
|
checkActivePersonWithLoginExists, deleteSetting, findPersons, getPerson, getPersonByLogin, getPersonPicture, getSetting, hasPersonAnyRight, setPersonPicture, setSetting
Person addPerson(Person person) throws PersonAlreadyExistsException, PersonNotFoundException, RoleNotFoundException, PersonValidationException
person
- person to be addedNullPointerException
- if the person
is nullPersonAlreadyExistsException
- if the person
already exists in the applicationPersonNotFoundException
- if the person
contains substitutes that do not existRoleNotFoundException
- if the person
contains roles that do not existPersonValidationException
- if the person
contains invalid dataPerson updatePersonLogin(String personId, String newLogin) throws PersonNotFoundException
personId
with the content
of newLogin
argument.
Note: The result of this method call has an effect only if the "LSPS login modules" are used for user authentication. In other cases (different JAAS-compliant LoginModule used), the calling this method has no effect for JAAS authentication process.
personId
- The id of the user. Cannot be blank.newLogin
- The new login to be set for the user identified by given personId
.
Cannot be blank.NullPointerException
- if at least one of the arguments is null
.IllegalArgumentException
- if at least one of the the arguments contains just whitespace characters.PersonNotFoundException
- if the user identified by their personId
does not exist in the
application.Person updatePersonPassword(String personId, String newPassword) throws PersonNotFoundException, InvalidPasswordException
personId
with the content
of newPassword
argument.
Note: The result of this method call has an effect only if the "LSPS login modules" are used for user authentication. In other cases (different JAAS-compliant LoginModule used), the calling this method has no effect for JAAS authentication process.
personId
- The id of the user. Cannot be blank.newPassword
- The new password to be set for the user identified by given personId
.
Cannot be blank.NullPointerException
- if at least one of the arguments is null
.IllegalArgumentException
- if at least one of the the arguments contains just whitespace characters.PersonNotFoundException
- if the user identified by their personId
does not exist in the
application.InvalidPasswordException
- if the password value does not meet the password value constraintsvoid validatePassword(String password) throws InvalidPasswordException
password
- the password candidate to be validatedInvalidPasswordException
- if the password candidate does not conform to the current
password policyPerson updatePerson(Person person) throws PersonNotFoundException, PersonStaleException, RoleNotFoundException, PersonValidationException
Person.getDirectSubstitutes()
attribute. No persons in substitutions are updated.person
- person to be updatedNullPointerException
- if the person
is nullPersonNotFoundException
- if the person
contains substitutes that do not existPersonStaleException
- if the person
object is stale (this applies only if the version is not
null)RoleNotFoundException
- if the person
contains roles that do not existPersonValidationException
- if the person
contains invalid dataRoleUnitNameList findRoles()
Person assignSecurityRolesToPerson(String personId, List<String> securityRoleNames) throws PersonNotFoundException, SecurityRoleNotFoundException
personId
argument. All the security roles currently assigned to the user
will be replaced by new collection of security roles (given as the securityRoleNames
argument).personId
- The id of the user. Cannot be blank.securityRoleNames
- The list of names of security roles to assign to given user. Cannot be
null
.NullPointerException
- if at least one of the arguments is null
.IllegalArgumentException
- if the personId
argument contains just whitespace characters.PersonNotFoundException
- if the user with personId
is not foundSecurityRoleNotFoundException
- if any of the securityRoleNames
is not foundCollection<SecurityRole> getSecurityRoles(String personId) throws PersonNotFoundException
personId
or an empty collection if the user has no security roles assigned to
them.personId
- The id name of the user.personId
.NullPointerException
- if at the personId
argument is null
.PersonNotFoundException
- if the user with personId
is not found in application@Deprecated boolean isReadOnly()
getEditableAttributes()
.
This method has been deprecated as some implementations may allow editing
of some of the person attributes and therefore finer grained control over
the attribute editability is required.Collection<PersonAttribute> getEditableAttributes()
Person addPersonWithData(PersonData personData) throws PersonAlreadyExistsException, PersonNotFoundException, RoleNotFoundException, InvalidPasswordException, SecurityRoleNotFoundException, PersonValidationException
null
then the password is set. If the provided
security roles in the person data are not null
then security
roles are set.personData
- data representing a person to be addedNullPointerException
- if the person
is nullPersonAlreadyExistsException
- if the person
already exists in the applicationPersonNotFoundException
- if the person
contains substitutes that do not existRoleNotFoundException
- if the person
contains roles that do not existInvalidPasswordException
- if the password value does not meet the password value constraintsSecurityRoleNotFoundException
- if any of the security role names is not foundPersonValidationException
- if the personData
contains invalid dataPerson updatePersonWithData(PersonData personData) throws PersonNotFoundException, PersonStaleException, RoleNotFoundException, InvalidPasswordException, SecurityRoleNotFoundException, PersonValidationException
Person.getDirectSubstitutes()
attribute. No persons in substitutions are updated.
If a non-null
password value is provided then the person's
password is updated. If security role names are provided then the
person's old security roles are replaced by the new ones.personData
- a data representing a person to be updatedNullPointerException
- if the person in the personData
is nullPersonNotFoundException
- if the person contains substitutes that do not existPersonStaleException
- if the person object is stale (this applies only if the version is not
null)RoleNotFoundException
- if the person contains roles that do not existInvalidPasswordException
- if the password value does not meet the password value constraintsSecurityRoleNotFoundException
- if any of the security role names is not foundPersonValidationException
- if the personData
contains invalid dataCopyright © 2007-2020 Whitestein Technologies. All Rights Reserved.