@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)
PersonServicePerson instance if such person (identified by id) exists in the
application.getPerson in interface PersonServicepersonId - id of the person to findPerson instance if such person exists, otherwise null@RightsAllowed(value="Person:Read") public Person getPersonByLogin(String loginName)
PersonServicePerson instance if such person (identified by login) exists in the
application.getPersonByLogin in interface PersonServiceloginName - login of the person to findPerson instance if such person exists in the application, otherwise nullpublic boolean checkActivePersonWithLoginExists(String loginName)
PersonServicecheckActivePersonWithLoginExists in interface PersonServiceloginName - loginName of the person to find@RightsAllowed(value="Person:Read") public PersonList findPersons(PersonCriteria criteria)
PersonServicepersonCriteria argument.findPersons in interface PersonServicecriteria - 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
PersonServicegetSetting in interface PersonServicepersonId - 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
PersonServicesetSetting in interface PersonServicepersonId - 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
PersonServicedeleteSetting in interface PersonServicepersonId - 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)
PersonServicehasPersonAnyRight in interface PersonServiceloginName - 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
PersonServicegetPersonPicture in interface PersonServicePersonNotFoundExceptionPersonPictureExceptionpublic void setPersonPicture(String personId, PersonPicture picture) throws PersonNotFoundException, PersonPictureException
PersonServicesetPersonPicture in interface PersonServicePersonNotFoundExceptionPersonPictureExceptionprotected Person checkPersonWithIdExists(String personId) throws PersonNotFoundException
personId - PersonNotFoundExceptionprotected Person getPersonWithLogin(String name) throws PersonNotFoundException
name - PersonNotFoundExceptionCopyright © 2007-2020 Whitestein Technologies. All Rights Reserved.