public class PeopleServiceImpl extends AbstractAppService implements PeopleService, PeopleNames
PeopleService
PEOPLE_ACCOUNT_HOLDER, PEOPLE_ACCOUNT_NB, PEOPLE_ALT_LANGS, PEOPLE_BANK_NAME, PEOPLE_BANK_NB, PEOPLE_BIC, PEOPLE_BIRTH_DATE, PEOPLE_CITY, PEOPLE_CONTACT_VALUE, PEOPLE_CONTACTS, PEOPLE_COUNTRY, PEOPLE_CURRENCY, PEOPLE_DATE_BEGIN, PEOPLE_DATE_END, PEOPLE_DEPARTMENT, PEOPLE_DISPLAY_NAME, PEOPLE_FIRST_NAME, PEOPLE_GENDER, PEOPLE_GEOPOINT, PEOPLE_HONORIFIC_TITLE, PEOPLE_IBAN, PEOPLE_IS_CURRENT, PEOPLE_IS_PRIMARY, PEOPLE_JOBS, PEOPLE_LAST_NAME, PEOPLE_LATIN_PHONETIC_SPELLING, PEOPLE_LEGAL_FORM, PEOPLE_LEGAL_NAME, PEOPLE_MAIDEN_NAME, PEOPLE_MAILING_LISTS, PEOPLE_MEMBERS, PEOPLE_MIDDLE_NAME, PEOPLE_NAME_SUFFIX, PEOPLE_NICKNAME, PEOPLE_ORG_REF_UID, PEOPLE_PAYMENT_ACCOUNTS, PEOPLE_PMAIL, PEOPLE_PMOBILE, PEOPLE_PORG, PEOPLE_POSTAL_ADDRESS_PROPS, PEOPLE_PPOSTAL_ADDRESS, PEOPLE_PRIMARY_EMAIL, PEOPLE_PTELEPHONE_NUMBER, PEOPLE_PURL, PEOPLE_REF_TITLE, PEOPLE_REF_UID, PEOPLE_ROLE, PEOPLE_SALUTATION, PEOPLE_SPOKEN_LANGUAGES, PEOPLE_STATE, PEOPLE_STREET, PEOPLE_STREET_COMPLEMENT, PEOPLE_TIME_ZONE, PEOPLE_UNSUBSCRIBED_MAILING_LISTS, PEOPLE_USE_POLITE_FORM, PEOPLE_USERNAME, PEOPLE_VAT_ID_NB, PEOPLE_ZIP_CODE
Constructor and Description |
---|
PeopleServiceImpl() |
Modifier and Type | Method and Description |
---|---|
Node |
createEntityReference(Node referencingNode,
Node referencedNode,
java.lang.String role)
Creates and returns a model specific Node to store a reference, depending on
the two object we want to link together.
|
void |
destroy()
Clean shutdown of the backend.
|
java.lang.String |
getAppBaseName()
Returns the current App name
|
java.lang.String |
getBaseRelPath(java.lang.String nodeType) |
ContactService |
getContactService()
Returns the corresponding
ContactService |
java.lang.String |
getDefaultRelPath(Node entity)
Computes the App specific relative path for a known type based on properties
of the passed node
|
java.lang.String |
getDefaultRelPath(Session session,
java.lang.String nodeType,
java.lang.String peopleUid)
Computes the App specific relative path for this known node type based on the
passed id
|
java.lang.String |
getDisplayName(Node entity)
Returns a display name that is app specific and that depends on one or more
of the entity properties.
|
Node |
getEntityFromNodeReference(Node node,
java.lang.String propName)
Returns the corresponding people entity using the People UID that is
stored under propName.
|
java.lang.String |
getMainNodeType(Node entity)
Returns the App specific main type of a node, that can be its primary type or
one of its mixin, typically for the People App.
|
PersonService |
getPersonService()
Returns the corresponding
PersonService |
java.util.List<Node> |
getRelatedEntities(Node entity,
java.lang.String linkNodeType,
java.lang.String relatedEntityType)
Returns all entities with the given NodeType related to this entity or
null if none has been found.
|
void |
init()
Deprecated.
|
boolean |
isKnownType(Node entity)
Simply checks if the passed entity has a primary or mixin type that is known
and thus can be managed by the this App
|
boolean |
isKnownType(java.lang.String nodeType)
Simply checks if the passed type is known and thus can be managed by the this
App.
|
Node |
publishEntity(Node parent,
java.lang.String nodeType,
Node srcNode,
boolean removeSrc) |
Node |
saveEntity(Node entity,
boolean publish)
Try to save and optionally publish a business object after applying context
specific rules and special behaviours (typically cache updates).
|
void |
setResourcesService(ResourcesService resourcesService) |
void |
setUserAdminService(UserAdminService userAdminService) |
void |
updatePrimaryCache(Node entity)
Simply looks for primary information and updates the primary cache if needed
|
createDraftEntity, getDraftParent, getEntityByUid
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createDraftEntity, getDraftParent, getEntityByUid, getLabel, publishEntity
public Node publishEntity(Node parent, java.lang.String nodeType, Node srcNode, boolean removeSrc) throws RepositoryException
publishEntity
in interface AppService
publishEntity
in class AbstractAppService
RepositoryException
public Node saveEntity(Node entity, boolean publish) throws PeopleException
AbstractAppService
saveEntity
in interface AppService
saveEntity
in class AbstractAppService
publish
- also publishes the corresponding nodePeopleException
- If one of the rule defined for this type is not respected. Use
getMessage to display to the user if neededpublic java.lang.String getAppBaseName()
AppService
getAppBaseName
in interface AppService
public java.lang.String getBaseRelPath(java.lang.String nodeType)
getBaseRelPath
in interface AppService
public java.lang.String getDefaultRelPath(Node entity) throws RepositoryException
AppService
getDefaultRelPath
in interface AppService
RepositoryException
public java.lang.String getDefaultRelPath(Session session, java.lang.String nodeType, java.lang.String peopleUid)
AppService
getDefaultRelPath
in interface AppService
session
- TODOpublic boolean isKnownType(Node entity)
AppService
isKnownType
in interface AppService
public boolean isKnownType(java.lang.String nodeType)
AppService
isKnownType
in interface AppService
public java.lang.String getMainNodeType(Node entity)
AppService
getMainNodeType
in interface AppService
public java.lang.String getDisplayName(Node entity)
AbstractAppService
getDisplayName
in interface AppService
getDisplayName
in class AbstractAppService
public void updatePrimaryCache(Node entity) throws PeopleException, RepositoryException
updatePrimaryCache
in interface PeopleService
PeopleException
RepositoryException
public Node getEntityFromNodeReference(Node node, java.lang.String propName)
PeopleService
getEntityFromNodeReference
in interface PeopleService
public Node createEntityReference(Node referencingNode, Node referencedNode, java.lang.String role)
createEntityReference
in interface PeopleService
public java.util.List<Node> getRelatedEntities(Node entity, java.lang.String linkNodeType, java.lang.String relatedEntityType)
PeopleService
getRelatedEntities
in interface PeopleService
relatedEntityType
- Optionally, the type of the grand-parent node typically to
choose between an organisation, a group or a person in a grouppublic PersonService getPersonService()
PeopleService
PersonService
getPersonService
in interface PeopleService
public ContactService getContactService()
PeopleService
ContactService
getContactService
in interface PeopleService
@Deprecated public void init()
public void destroy()
public void setResourcesService(ResourcesService resourcesService)
public void setUserAdminService(UserAdminService userAdminService)
Copyright © 2007–2020. All rights reserved.