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 Deprecated Methods 
      Modifier and Type Method Description
      protected void checkIfProfileMemberExists​(TenantServiceAccessor tenantAccessor, ProfileService profileService, java.lang.Long profileId, java.lang.Long userId, java.lang.Long groupId, java.lang.Long roleId, org.bonitasoft.engine.identity.MemberType memberType)  
      protected org.bonitasoft.engine.profile.ProfileMember convertToProfileMember​(CreateProfileMember createProfileMember)  
      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.ProfileEntry> getProfileEntries​(java.lang.String profileName)  
      org.bonitasoft.engine.profile.ProfileEntry getProfileEntry​(long id)  
      java.util.List<org.bonitasoft.engine.profile.Profile> getProfilesForUser​(long userId)
      Deprecated.
      java.util.List<org.bonitasoft.engine.profile.Profile> getProfilesForUser​(long userId, int startIndex, int maxResults, org.bonitasoft.engine.profile.ProfileCriterion criterion)  
      java.util.List<org.bonitasoft.engine.profile.Profile> getProfilesWithNavigationForUser​(long userId, int startIndex, int maxResults, org.bonitasoft.engine.profile.ProfileCriterion criterion)  
      protected TenantServiceAccessor getTenantAccessor()  
      protected long getUserIdFromSession()  
      org.bonitasoft.engine.search.SearchResult<org.bonitasoft.engine.profile.ProfileEntry> searchProfileEntries​(org.bonitasoft.engine.search.SearchOptions options)  
      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

        @Deprecated
        public java.util.List<org.bonitasoft.engine.profile.Profile> getProfilesForUser​(long userId)
        Deprecated.
        Specified by:
        getProfilesForUser in interface org.bonitasoft.engine.api.ProfileAPI
      • 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
      • getProfilesWithNavigationForUser

        public java.util.List<org.bonitasoft.engine.profile.Profile> getProfilesWithNavigationForUser​(long userId,
                                                                                                      int startIndex,
                                                                                                      int maxResults,
                                                                                                      org.bonitasoft.engine.profile.ProfileCriterion criterion)
        Specified by:
        getProfilesWithNavigationForUser 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
      • searchProfileEntries

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

        public java.util.List<org.bonitasoft.engine.profile.ProfileEntry> getProfileEntries​(java.lang.String profileName)
                                                                                     throws org.bonitasoft.engine.profile.ProfileNotFoundException
        Specified by:
        getProfileEntries in interface org.bonitasoft.engine.api.ProfileAPI
        Throws:
        org.bonitasoft.engine.profile.ProfileNotFoundException
      • getProfileEntry

        public org.bonitasoft.engine.profile.ProfileEntry getProfileEntry​(long id)
                                                                   throws org.bonitasoft.engine.profile.ProfileEntryNotFoundException
        Specified by:
        getProfileEntry in interface org.bonitasoft.engine.api.ProfileAPI
        Throws:
        org.bonitasoft.engine.profile.ProfileEntryNotFoundException
      • 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,
                                                                               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
      • convertToProfileMember

        protected org.bonitasoft.engine.profile.ProfileMember convertToProfileMember​(CreateProfileMember createProfileMember)
      • 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
      • checkIfProfileMemberExists

        protected void checkIfProfileMemberExists​(TenantServiceAccessor tenantAccessor,
                                                  ProfileService profileService,
                                                  java.lang.Long profileId,
                                                  java.lang.Long userId,
                                                  java.lang.Long groupId,
                                                  java.lang.Long roleId,
                                                  org.bonitasoft.engine.identity.MemberType memberType)
                                           throws SBonitaException
        Throws:
        SBonitaException
      • 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()