Class PeopleImpl

  • All Implemented Interfaces:
    People

    public class PeopleImpl
    extends java.lang.Object
    implements People
    Centralises access to people services and maps between representations.
    Since:
    publicapi1.0
    Author:
    steveglover
    • Field Detail

      • nodes

        protected Nodes nodes
      • sites

        protected Sites sites
      • siteService

        protected org.alfresco.service.cmr.site.SiteService siteService
      • nodeService

        protected org.alfresco.service.cmr.repository.NodeService nodeService
      • personService

        protected org.alfresco.service.cmr.security.PersonService personService
      • authenticationService

        protected org.alfresco.service.cmr.security.AuthenticationService authenticationService
      • authorityService

        protected org.alfresco.service.cmr.security.AuthorityService authorityService
      • contentUsageService

        protected org.alfresco.service.cmr.usage.ContentUsageService contentUsageService
      • contentService

        protected org.alfresco.service.cmr.repository.ContentService contentService
      • thumbnailService

        protected org.alfresco.service.cmr.thumbnail.ThumbnailService thumbnailService
      • resetPasswordService

        protected org.alfresco.repo.security.authentication.ResetPasswordService resetPasswordService
    • Constructor Detail

      • PeopleImpl

        public PeopleImpl()
    • Method Detail

      • setSites

        public void setSites​(Sites sites)
      • setSiteService

        public void setSiteService​(org.alfresco.service.cmr.site.SiteService siteService)
      • setNodes

        public void setNodes​(Nodes nodes)
      • setNodeService

        public void setNodeService​(org.alfresco.service.cmr.repository.NodeService nodeService)
      • setPersonService

        public void setPersonService​(org.alfresco.service.cmr.security.PersonService personService)
      • setAuthenticationService

        public void setAuthenticationService​(org.alfresco.service.cmr.security.AuthenticationService authenticationService)
      • setAuthorityService

        public void setAuthorityService​(org.alfresco.service.cmr.security.AuthorityService authorityService)
      • setContentUsageService

        public void setContentUsageService​(org.alfresco.service.cmr.usage.ContentUsageService contentUsageService)
      • setContentService

        public void setContentService​(org.alfresco.service.cmr.repository.ContentService contentService)
      • setThumbnailService

        public void setThumbnailService​(org.alfresco.service.cmr.thumbnail.ThumbnailService thumbnailService)
      • setResetPasswordService

        public void setResetPasswordService​(org.alfresco.repo.security.authentication.ResetPasswordService resetPasswordService)
      • setRenditions

        public void setRenditions​(Renditions renditions)
      • validatePerson

        public java.lang.String validatePerson​(java.lang.String personId)
        Validate, perform -me- substitution and canonicalize the person ID.
        Specified by:
        validatePerson in interface People
        Parameters:
        personId -
        Returns:
        The validated and processed ID.
      • validatePerson

        public java.lang.String validatePerson​(java.lang.String requestedPersonId,
                                               boolean validateIsCurrentUser)
        Specified by:
        validatePerson in interface People
      • processPersonProperties

        protected void processPersonProperties​(java.lang.String userName,
                                               java.util.Map<org.alfresco.service.namespace.QName,​java.io.Serializable> nodeProps)
      • hasAvatar

        public boolean hasAvatar​(org.alfresco.service.cmr.repository.NodeRef personNodeRef)
      • getAvatar

        public org.alfresco.service.cmr.repository.NodeRef getAvatar​(java.lang.String personId)
        Specified by:
        getAvatar in interface People
      • deleteAvatarContent

        public void deleteAvatarContent​(java.lang.String personId)
        Specified by:
        deleteAvatarContent in interface People
      • getPerson

        public Person getPerson​(java.lang.String personId)
        Get a full representation of a person.
        Specified by:
        getPerson in interface People
        Throws:
        org.alfresco.service.cmr.security.NoSuchPersonException - if personId does not exist
      • getPerson

        public Person getPerson​(java.lang.String personId,
                                java.util.List<java.lang.String> include)
        Description copied from interface: People
        Get a person, specifying optional includes as required.
        Specified by:
        getPerson in interface People
        Returns:
      • create

        public Person create​(Person person)
        Description copied from interface: People
        Create a person.
        Specified by:
        create in interface People
        Returns:
      • update

        public Person update​(java.lang.String personId,
                             Person person)
        Description copied from interface: People
        Update the given person's details.
        Specified by:
        update in interface People
        Parameters:
        personId - The identifier of a person.
        person - The person details.
        Returns:
        The updated person details.
      • requestPasswordReset

        public void requestPasswordReset​(java.lang.String userId,
                                         java.lang.String client)
        Description copied from interface: People
        Request password reset (an email will be sent to the registered email of the given userId). The API returns a 202 response for a valid, as well as the invalid (does not exist or disabled) userId
        Specified by:
        requestPasswordReset in interface People
        Parameters:
        userId - the user id of the person requesting the password reset
        client - the client name which is registered to send emails
      • resetPassword

        public void resetPassword​(java.lang.String personId,
                                  PasswordReset passwordReset)
        Description copied from interface: People
        Performs password reset
        Specified by:
        resetPassword in interface People
        passwordReset - the password reset details