@PermitAll public abstract class PersonServiceBase extends com.whitestein.lsps.common.SecureAndLoggingService implements PersonService
PersonServiceBean
nad PersonManagementServiceBean
Modifier and Type | Field and Description |
---|---|
protected static String |
ARGUMENT_PERSON_ID |
protected static String |
ARGUMENT_SETTING_NAME |
Constructor and Description |
---|
PersonServiceBase() |
Modifier and Type | Method and Description |
---|---|
boolean |
checkActivePersonWithLoginExists(String loginName)
Answer whether active person for given loginName exists.
|
protected Person |
checkPersonWithIdExists(String personId) |
void |
deleteSetting(String personId,
String settingName)
Deletes the given personal setting.
|
PersonList |
findPersons(PersonCriteria criteria)
Returns a PersonList with Persons defined by the given
personCriteria argument. |
Person |
getPerson(String personId)
Returns a
Person instance if such person (identified by id) exists in the
application. |
Person |
getPersonByLogin(String loginName)
Returns a
Person instance if such person (identified by login) exists in the
application. |
protected abstract PersonDao |
getPersonDao()
Returns person service dao.
|
PersonPicture |
getPersonPicture(String personId)
Returns picture for person.
|
protected Person |
getPersonWithLogin(String name) |
ByteData |
getSetting(String personId,
String settingName)
Returns the personal setting with the given name.
|
boolean |
hasPersonAnyRight(String loginName,
List<String> rights)
Answer whether person is active and has any of the given rights
|
void |
setPersonPicture(String personId,
PersonPicture picture)
Sets picture for person.
|
void |
setSetting(String personId,
String settingName,
ByteData settingContent)
Sets the given personal setting.
|
protected static final String ARGUMENT_PERSON_ID
protected static final String ARGUMENT_SETTING_NAME
protected abstract PersonDao getPersonDao()
@RightsAllowed(value="Person:Read") public Person getPerson(String personId)
PersonService
Person
instance if such person (identified by id) exists in the
application.getPerson
in interface PersonService
personId
- id of the person to findPerson
instance if such person exists, otherwise null@RightsAllowed(value="Person:Read") public Person getPersonByLogin(String loginName)
PersonService
Person
instance if such person (identified by login) exists in the
application.getPersonByLogin
in interface PersonService
loginName
- login of the person to findPerson
instance if such person exists in the application, otherwise nullpublic boolean checkActivePersonWithLoginExists(String loginName)
PersonService
checkActivePersonWithLoginExists
in interface PersonService
loginName
- loginName of the person to find@RightsAllowed(value="Person:Read") public PersonList findPersons(PersonCriteria criteria)
PersonService
personCriteria
argument.findPersons
in interface PersonService
criteria
- PersonCriteria
instance that specifies a paging and filtering criteria for
querying personspersonCriteria
argument.@RightsAllowed(value="Person:Read") public ByteData getSetting(String personId, String settingName) throws PersonNotFoundException
PersonService
getSetting
in interface PersonService
personId
- id name of the person for which the setting should be returnedsettingName
- name of the settingPersonNotFoundException
- if no person is found for the personId
@RightsAllowed(value="Person:Read") public void setSetting(String personId, String settingName, ByteData settingContent) throws PersonNotFoundException
PersonService
setSetting
in interface PersonService
personId
- id of the person for which the setting should be setsettingName
- name of the settingsettingContent
- setting contentPersonNotFoundException
- if no person is found for the personId
@RightsAllowed(value="Person:Read") public void deleteSetting(String personId, String settingName) throws PersonNotFoundException
PersonService
deleteSetting
in interface PersonService
personId
- id of the person for which the setting should be deletedsettingName
- name of the settingPersonNotFoundException
- if no person is found for the personId
@RightsAllowed(value="Person:Read") public boolean hasPersonAnyRight(String loginName, List<String> rights)
PersonService
hasPersonAnyRight
in interface PersonService
loginName
- login of the person to findrights
- the rights person is required to have (at least one of them) or null if none is requiredpublic PersonPicture getPersonPicture(String personId) throws PersonNotFoundException, PersonPictureException
PersonService
getPersonPicture
in interface PersonService
PersonNotFoundException
PersonPictureException
public void setPersonPicture(String personId, PersonPicture picture) throws PersonNotFoundException, PersonPictureException
PersonService
setPersonPicture
in interface PersonService
PersonNotFoundException
PersonPictureException
protected Person checkPersonWithIdExists(String personId) throws PersonNotFoundException
personId
- PersonNotFoundException
protected Person getPersonWithLogin(String name) throws PersonNotFoundException
name
- PersonNotFoundException
Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.