Class HibernateApplicationDao

  • All Implemented Interfaces:
    com.atlassian.crowd.dao.application.ApplicationDAO

    public final class HibernateApplicationDao
    extends Object
    implements com.atlassian.crowd.dao.application.ApplicationDAO
    Since:
    7.20.0
    • Constructor Summary

      Constructors 
      Constructor Description
      HibernateApplicationDao​(org.hibernate.SessionFactory sessionFactory, com.atlassian.crowd.embedded.spi.DirectoryDao directoryDao)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.atlassian.crowd.model.application.Application add​(com.atlassian.crowd.model.application.Application application, com.atlassian.crowd.embedded.api.PasswordCredential passwordCredential)  
      void addDirectoryMapping​(long applicationId, long directoryId, boolean allowAllToAuthenticate, com.atlassian.crowd.embedded.api.OperationType... operationTypes)  
      void addGroupMapping​(long applicationId, long directoryId, String groupName)  
      void addRemoteAddress​(long applicationId, com.atlassian.crowd.model.application.RemoteAddress remoteAddress)  
      List<com.atlassian.crowd.model.application.Application> findAuthorisedApplications​(long directoryId, List<String> groupNames)  
      com.atlassian.crowd.model.application.ApplicationImpl findById​(long id)  
      com.atlassian.crowd.model.application.ApplicationImpl findByName​(String name)  
      com.atlassian.crowd.model.application.DirectoryMapping findDirectoryMapping​(long applicationId, long directoryId)  
      void remove​(com.atlassian.crowd.model.application.Application application)  
      void removeDirectoryMapping​(long applicationId, long directoryId)  
      void removeDirectoryMappings​(long directoryId)  
      void removeGroupMapping​(long applicationId, long directoryId, String groupName)  
      void removeGroupMappings​(long directoryId, String groupName)  
      void removeRemoteAddress​(long applicationId, com.atlassian.crowd.model.application.RemoteAddress remoteAddress)  
      List<com.atlassian.crowd.model.application.Application> search​(com.atlassian.crowd.search.query.entity.EntityQuery<com.atlassian.crowd.model.application.Application> query)  
      com.atlassian.crowd.model.application.Application update​(com.atlassian.crowd.model.application.Application application)  
      void updateCredential​(com.atlassian.crowd.model.application.Application application, com.atlassian.crowd.embedded.api.PasswordCredential passwordCredential)  
      void updateDirectoryMapping​(long applicationId, long directoryId, boolean allowAllToAuthenticate)  
      void updateDirectoryMapping​(long applicationId, long directoryId, boolean allowAllToAuthenticate, Set<com.atlassian.crowd.embedded.api.OperationType> operationTypes)  
      void updateDirectoryMapping​(long applicationId, long directoryId, int position)  
    • Constructor Detail

      • HibernateApplicationDao

        public HibernateApplicationDao​(org.hibernate.SessionFactory sessionFactory,
                                       com.atlassian.crowd.embedded.spi.DirectoryDao directoryDao)
    • Method Detail

      • findById

        public com.atlassian.crowd.model.application.ApplicationImpl findById​(long id)
                                                                       throws com.atlassian.crowd.exception.ApplicationNotFoundException
        Specified by:
        findById in interface com.atlassian.crowd.dao.application.ApplicationDAO
        Throws:
        com.atlassian.crowd.exception.ApplicationNotFoundException
      • findByName

        public com.atlassian.crowd.model.application.ApplicationImpl findByName​(String name)
                                                                         throws com.atlassian.crowd.exception.ApplicationNotFoundException
        Specified by:
        findByName in interface com.atlassian.crowd.dao.application.ApplicationDAO
        Throws:
        com.atlassian.crowd.exception.ApplicationNotFoundException
      • add

        public com.atlassian.crowd.model.application.Application add​(com.atlassian.crowd.model.application.Application application,
                                                                     com.atlassian.crowd.embedded.api.PasswordCredential passwordCredential)
        Specified by:
        add in interface com.atlassian.crowd.dao.application.ApplicationDAO
      • update

        public com.atlassian.crowd.model.application.Application update​(com.atlassian.crowd.model.application.Application application)
                                                                 throws com.atlassian.crowd.exception.ApplicationNotFoundException
        Specified by:
        update in interface com.atlassian.crowd.dao.application.ApplicationDAO
        Throws:
        com.atlassian.crowd.exception.ApplicationNotFoundException
      • updateCredential

        public void updateCredential​(com.atlassian.crowd.model.application.Application application,
                                     com.atlassian.crowd.embedded.api.PasswordCredential passwordCredential)
                              throws com.atlassian.crowd.exception.ApplicationNotFoundException
        Specified by:
        updateCredential in interface com.atlassian.crowd.dao.application.ApplicationDAO
        Throws:
        com.atlassian.crowd.exception.ApplicationNotFoundException
      • remove

        public void remove​(com.atlassian.crowd.model.application.Application application)
        Specified by:
        remove in interface com.atlassian.crowd.dao.application.ApplicationDAO
      • search

        public List<com.atlassian.crowd.model.application.Application> search​(com.atlassian.crowd.search.query.entity.EntityQuery<com.atlassian.crowd.model.application.Application> query)
        Specified by:
        search in interface com.atlassian.crowd.dao.application.ApplicationDAO
      • addDirectoryMapping

        public void addDirectoryMapping​(long applicationId,
                                        long directoryId,
                                        boolean allowAllToAuthenticate,
                                        com.atlassian.crowd.embedded.api.OperationType... operationTypes)
                                 throws com.atlassian.crowd.exception.ApplicationNotFoundException,
                                        com.atlassian.crowd.exception.DirectoryNotFoundException
        Specified by:
        addDirectoryMapping in interface com.atlassian.crowd.dao.application.ApplicationDAO
        Throws:
        com.atlassian.crowd.exception.ApplicationNotFoundException
        com.atlassian.crowd.exception.DirectoryNotFoundException
      • addRemoteAddress

        public void addRemoteAddress​(long applicationId,
                                     com.atlassian.crowd.model.application.RemoteAddress remoteAddress)
        Specified by:
        addRemoteAddress in interface com.atlassian.crowd.dao.application.ApplicationDAO
      • removeRemoteAddress

        public void removeRemoteAddress​(long applicationId,
                                        com.atlassian.crowd.model.application.RemoteAddress remoteAddress)
        Specified by:
        removeRemoteAddress in interface com.atlassian.crowd.dao.application.ApplicationDAO
      • removeDirectoryMapping

        public void removeDirectoryMapping​(long applicationId,
                                           long directoryId)
                                    throws com.atlassian.crowd.exception.ApplicationNotFoundException
        Specified by:
        removeDirectoryMapping in interface com.atlassian.crowd.dao.application.ApplicationDAO
        Throws:
        com.atlassian.crowd.exception.ApplicationNotFoundException
      • removeDirectoryMappings

        public void removeDirectoryMappings​(long directoryId)
        Specified by:
        removeDirectoryMappings in interface com.atlassian.crowd.dao.application.ApplicationDAO
      • addGroupMapping

        public void addGroupMapping​(long applicationId,
                                    long directoryId,
                                    String groupName)
        Specified by:
        addGroupMapping in interface com.atlassian.crowd.dao.application.ApplicationDAO
      • removeGroupMapping

        public void removeGroupMapping​(long applicationId,
                                       long directoryId,
                                       String groupName)
        Specified by:
        removeGroupMapping in interface com.atlassian.crowd.dao.application.ApplicationDAO
      • removeGroupMappings

        public void removeGroupMappings​(long directoryId,
                                        String groupName)
        Specified by:
        removeGroupMappings in interface com.atlassian.crowd.dao.application.ApplicationDAO
      • findAuthorisedApplications

        public List<com.atlassian.crowd.model.application.Application> findAuthorisedApplications​(long directoryId,
                                                                                                  List<String> groupNames)
        Specified by:
        findAuthorisedApplications in interface com.atlassian.crowd.dao.application.ApplicationDAO
      • updateDirectoryMapping

        public void updateDirectoryMapping​(long applicationId,
                                           long directoryId,
                                           int position)
                                    throws com.atlassian.crowd.exception.ApplicationNotFoundException
        Specified by:
        updateDirectoryMapping in interface com.atlassian.crowd.dao.application.ApplicationDAO
        Throws:
        com.atlassian.crowd.exception.ApplicationNotFoundException
      • updateDirectoryMapping

        public void updateDirectoryMapping​(long applicationId,
                                           long directoryId,
                                           boolean allowAllToAuthenticate)
                                    throws com.atlassian.crowd.exception.ApplicationNotFoundException
        Specified by:
        updateDirectoryMapping in interface com.atlassian.crowd.dao.application.ApplicationDAO
        Throws:
        com.atlassian.crowd.exception.ApplicationNotFoundException
      • updateDirectoryMapping

        public void updateDirectoryMapping​(long applicationId,
                                           long directoryId,
                                           boolean allowAllToAuthenticate,
                                           Set<com.atlassian.crowd.embedded.api.OperationType> operationTypes)
                                    throws com.atlassian.crowd.exception.ApplicationNotFoundException
        Specified by:
        updateDirectoryMapping in interface com.atlassian.crowd.dao.application.ApplicationDAO
        Throws:
        com.atlassian.crowd.exception.ApplicationNotFoundException
      • findDirectoryMapping

        public com.atlassian.crowd.model.application.DirectoryMapping findDirectoryMapping​(long applicationId,
                                                                                           long directoryId)
                                                                                    throws com.atlassian.crowd.exception.ApplicationNotFoundException,
                                                                                           com.atlassian.crowd.exception.DirectoryMappingNotFoundException
        Specified by:
        findDirectoryMapping in interface com.atlassian.crowd.dao.application.ApplicationDAO
        Throws:
        com.atlassian.crowd.exception.ApplicationNotFoundException
        com.atlassian.crowd.exception.DirectoryMappingNotFoundException