Class ProfileAPIImpl

  • All Implemented Interfaces:
    org.bonitasoft.engine.api.ProfileAPI

    public class ProfileAPIImpl
    extends java.lang.Object
    implements org.bonitasoft.engine.api.ProfileAPI
    Author:
    Celine Souchet, Matthieu Chaffotte
    • Constructor Summary

      Constructors 
      Constructor Description
      ProfileAPIImpl()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.bonitasoft.engine.profile.ProfileMember createProfileMember​(java.lang.Long profileId, java.lang.Long userId, java.lang.Long groupId, java.lang.Long roleId)  
      org.bonitasoft.engine.profile.ProfileMember createProfileMember​(org.bonitasoft.engine.profile.ProfileMemberCreator creator)  
      void deleteProfileMember​(java.lang.Long profileMemberId)  
      org.bonitasoft.engine.identity.MemberType getMemberType​(java.lang.Long userId, java.lang.Long groupId, java.lang.Long roleId)  
      java.util.Map<java.lang.Long,​java.lang.Long> getNumberOfProfileMembers​(java.util.List<java.lang.Long> profileIds)  
      org.bonitasoft.engine.profile.Profile getProfile​(long id)  
      java.util.List<org.bonitasoft.engine.profile.Profile> getProfilesForUser​(long userId, int startIndex, int maxResults, org.bonitasoft.engine.profile.ProfileCriterion criterion)  
      protected long getUserIdFromSession()  
      org.bonitasoft.engine.search.SearchResult<org.bonitasoft.engine.profile.ProfileMember> searchProfileMembers​(java.lang.String memberType, org.bonitasoft.engine.search.SearchOptions options)  
      org.bonitasoft.engine.search.SearchResult<org.bonitasoft.engine.profile.Profile> searchProfiles​(org.bonitasoft.engine.search.SearchOptions options)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ProfileAPIImpl

        public ProfileAPIImpl()
    • Method Detail

      • getProfile

        public org.bonitasoft.engine.profile.Profile getProfile​(long id)
                                                         throws org.bonitasoft.engine.profile.ProfileNotFoundException
        Specified by:
        getProfile in interface org.bonitasoft.engine.api.ProfileAPI
        Throws:
        org.bonitasoft.engine.profile.ProfileNotFoundException
      • getProfilesForUser

        public java.util.List<org.bonitasoft.engine.profile.Profile> getProfilesForUser​(long userId,
                                                                                        int startIndex,
                                                                                        int maxResults,
                                                                                        org.bonitasoft.engine.profile.ProfileCriterion criterion)
        Specified by:
        getProfilesForUser in interface org.bonitasoft.engine.api.ProfileAPI
      • searchProfiles

        public org.bonitasoft.engine.search.SearchResult<org.bonitasoft.engine.profile.Profile> searchProfiles​(org.bonitasoft.engine.search.SearchOptions options)
                                                                                                        throws org.bonitasoft.engine.exception.SearchException
        Specified by:
        searchProfiles in interface org.bonitasoft.engine.api.ProfileAPI
        Throws:
        org.bonitasoft.engine.exception.SearchException
      • getNumberOfProfileMembers

        public java.util.Map<java.lang.Long,​java.lang.Long> getNumberOfProfileMembers​(java.util.List<java.lang.Long> profileIds)
        Specified by:
        getNumberOfProfileMembers in interface org.bonitasoft.engine.api.ProfileAPI
      • searchProfileMembers

        public org.bonitasoft.engine.search.SearchResult<org.bonitasoft.engine.profile.ProfileMember> searchProfileMembers​(java.lang.String memberType,
                                                                                                                           org.bonitasoft.engine.search.SearchOptions options)
                                                                                                                    throws org.bonitasoft.engine.exception.SearchException
        Specified by:
        searchProfileMembers in interface org.bonitasoft.engine.api.ProfileAPI
        Throws:
        org.bonitasoft.engine.exception.SearchException
      • createProfileMember

        public org.bonitasoft.engine.profile.ProfileMember createProfileMember​(java.lang.Long profileId,
                                                                               java.lang.Long userId,
                                                                               java.lang.Long groupId,
                                                                               java.lang.Long roleId)
                                                                        throws org.bonitasoft.engine.exception.CreationException
        Specified by:
        createProfileMember in interface org.bonitasoft.engine.api.ProfileAPI
        Throws:
        org.bonitasoft.engine.exception.CreationException
      • createProfileMember

        public org.bonitasoft.engine.profile.ProfileMember createProfileMember​(org.bonitasoft.engine.profile.ProfileMemberCreator creator)
                                                                        throws org.bonitasoft.engine.exception.CreationException,
                                                                               org.bonitasoft.engine.exception.AlreadyExistsException
        Specified by:
        createProfileMember in interface org.bonitasoft.engine.api.ProfileAPI
        Throws:
        org.bonitasoft.engine.exception.CreationException
        org.bonitasoft.engine.exception.AlreadyExistsException
      • getMemberType

        public org.bonitasoft.engine.identity.MemberType getMemberType​(java.lang.Long userId,
                                                                       java.lang.Long groupId,
                                                                       java.lang.Long roleId)
                                                                throws org.bonitasoft.engine.exception.CreationException
        Throws:
        org.bonitasoft.engine.exception.CreationException
      • deleteProfileMember

        public void deleteProfileMember​(java.lang.Long profileMemberId)
                                 throws org.bonitasoft.engine.exception.DeletionException
        Specified by:
        deleteProfileMember in interface org.bonitasoft.engine.api.ProfileAPI
        Throws:
        org.bonitasoft.engine.exception.DeletionException
      • getUserIdFromSession

        protected long getUserIdFromSession()