Class ConfluenceCrowdDirectoryService

  • All Implemented Interfaces:
    com.atlassian.crowd.embedded.api.CrowdDirectoryService

    @Transactional
    public final class ConfluenceCrowdDirectoryService
    extends com.atlassian.crowd.embedded.core.CrowdDirectoryServiceImpl
    Overrides removal and addition of directories to make sure they're added to the single internal application, as well as making sure each operation os Transactional.
    Since:
    3.5
    • Constructor Detail

      • ConfluenceCrowdDirectoryService

        public ConfluenceCrowdDirectoryService​(com.atlassian.crowd.embedded.api.ApplicationFactory applicationFactory,
                                               com.atlassian.crowd.directory.loader.DirectoryInstanceLoader directoryInstanceLoader,
                                               com.atlassian.crowd.manager.directory.DirectoryManager directoryManager,
                                               com.atlassian.crowd.manager.application.ApplicationManager applicationManager,
                                               com.atlassian.crowd.embedded.validator.DirectoryValidatorFactory directoryValidatorFactory,
                                               com.atlassian.crowd.embedded.spi.DirectoryDao directoryDao)
    • Method Detail

      • afterPropertiesSet

        public void afterPropertiesSet()
        Overrides:
        afterPropertiesSet in class com.atlassian.crowd.embedded.core.CrowdDirectoryServiceImpl
      • addDirectory

        public com.atlassian.crowd.embedded.api.Directory addDirectory​(com.atlassian.crowd.embedded.api.Directory directory)
                                                                throws com.atlassian.crowd.exception.runtime.OperationFailedException
        Specified by:
        addDirectory in interface com.atlassian.crowd.embedded.api.CrowdDirectoryService
        Overrides:
        addDirectory in class com.atlassian.crowd.embedded.core.CrowdDirectoryServiceImpl
        Throws:
        com.atlassian.crowd.exception.runtime.OperationFailedException
      • removeDirectory

        public boolean removeDirectory​(long directoryId)
                                throws com.atlassian.crowd.exception.DirectoryCurrentlySynchronisingException,
                                       com.atlassian.crowd.exception.runtime.OperationFailedException
        Specified by:
        removeDirectory in interface com.atlassian.crowd.embedded.api.CrowdDirectoryService
        Overrides:
        removeDirectory in class com.atlassian.crowd.embedded.core.CrowdDirectoryServiceImpl
        Throws:
        com.atlassian.crowd.exception.DirectoryCurrentlySynchronisingException
        com.atlassian.crowd.exception.runtime.OperationFailedException
      • updateDirectory

        public com.atlassian.crowd.embedded.api.Directory updateDirectory​(com.atlassian.crowd.embedded.api.Directory directory)
                                                                   throws com.atlassian.crowd.exception.runtime.OperationFailedException
        Specified by:
        updateDirectory in interface com.atlassian.crowd.embedded.api.CrowdDirectoryService
        Overrides:
        updateDirectory in class com.atlassian.crowd.embedded.core.CrowdDirectoryServiceImpl
        Throws:
        com.atlassian.crowd.exception.runtime.OperationFailedException
      • validateDirectoryConfiguration

        public List<com.atlassian.crowd.validator.ValidationError> validateDirectoryConfiguration​(com.atlassian.crowd.embedded.api.Directory directory,
                                                                                                  EnumSet<com.atlassian.crowd.validator.DirectoryValidationContext> validationContexts)
        Specified by:
        validateDirectoryConfiguration in interface com.atlassian.crowd.embedded.api.CrowdDirectoryService
        Overrides:
        validateDirectoryConfiguration in class com.atlassian.crowd.embedded.core.CrowdDirectoryServiceImpl
      • findDirectoryByName

        @Transactional(readOnly=true)
        public @Nullable com.atlassian.crowd.embedded.api.Directory findDirectoryByName​(String name)
        Specified by:
        findDirectoryByName in interface com.atlassian.crowd.embedded.api.CrowdDirectoryService
        Overrides:
        findDirectoryByName in class com.atlassian.crowd.embedded.core.CrowdDirectoryServiceImpl
      • testConnection

        @Transactional(readOnly=true)
        public void testConnection​(com.atlassian.crowd.embedded.api.Directory directory)
                            throws com.atlassian.crowd.exception.runtime.OperationFailedException
        Specified by:
        testConnection in interface com.atlassian.crowd.embedded.api.CrowdDirectoryService
        Overrides:
        testConnection in class com.atlassian.crowd.embedded.core.CrowdDirectoryServiceImpl
        Throws:
        com.atlassian.crowd.exception.runtime.OperationFailedException
      • findAllDirectories

        @Transactional(readOnly=true)
        public List<com.atlassian.crowd.embedded.api.Directory> findAllDirectories()
        Specified by:
        findAllDirectories in interface com.atlassian.crowd.embedded.api.CrowdDirectoryService
        Overrides:
        findAllDirectories in class com.atlassian.crowd.embedded.core.CrowdDirectoryServiceImpl
      • findDirectoryById

        @Transactional(readOnly=true)
        public com.atlassian.crowd.embedded.api.Directory findDirectoryById​(long directoryId)
        Specified by:
        findDirectoryById in interface com.atlassian.crowd.embedded.api.CrowdDirectoryService
        Overrides:
        findDirectoryById in class com.atlassian.crowd.embedded.core.CrowdDirectoryServiceImpl
      • setDirectoryPosition

        public void setDirectoryPosition​(long directoryId,
                                         int position)
                                  throws com.atlassian.crowd.exception.runtime.OperationFailedException
        Specified by:
        setDirectoryPosition in interface com.atlassian.crowd.embedded.api.CrowdDirectoryService
        Overrides:
        setDirectoryPosition in class com.atlassian.crowd.embedded.core.CrowdDirectoryServiceImpl
        Throws:
        com.atlassian.crowd.exception.runtime.OperationFailedException
      • supportsNestedGroups

        @Transactional(readOnly=true)
        public boolean supportsNestedGroups​(long directoryId)
                                     throws com.atlassian.crowd.exception.runtime.OperationFailedException
        Specified by:
        supportsNestedGroups in interface com.atlassian.crowd.embedded.api.CrowdDirectoryService
        Overrides:
        supportsNestedGroups in class com.atlassian.crowd.embedded.core.CrowdDirectoryServiceImpl
        Throws:
        com.atlassian.crowd.exception.runtime.OperationFailedException
      • isDirectorySynchronisable

        @Transactional(readOnly=true)
        public boolean isDirectorySynchronisable​(long directoryId)
                                          throws com.atlassian.crowd.exception.runtime.OperationFailedException
        Specified by:
        isDirectorySynchronisable in interface com.atlassian.crowd.embedded.api.CrowdDirectoryService
        Overrides:
        isDirectorySynchronisable in class com.atlassian.crowd.embedded.core.CrowdDirectoryServiceImpl
        Throws:
        com.atlassian.crowd.exception.runtime.OperationFailedException
      • synchroniseDirectory

        @Transactional(propagation=NEVER)
        public void synchroniseDirectory​(long directoryId)
                                  throws com.atlassian.crowd.exception.runtime.OperationFailedException
        Specified by:
        synchroniseDirectory in interface com.atlassian.crowd.embedded.api.CrowdDirectoryService
        Overrides:
        synchroniseDirectory in class com.atlassian.crowd.embedded.core.CrowdDirectoryServiceImpl
        Throws:
        com.atlassian.crowd.exception.runtime.OperationFailedException
      • synchroniseDirectory

        @Transactional(propagation=NEVER)
        public void synchroniseDirectory​(long directoryId,
                                         boolean runInBackground)
                                  throws com.atlassian.crowd.exception.runtime.OperationFailedException
        Specified by:
        synchroniseDirectory in interface com.atlassian.crowd.embedded.api.CrowdDirectoryService
        Overrides:
        synchroniseDirectory in class com.atlassian.crowd.embedded.core.CrowdDirectoryServiceImpl
        Throws:
        com.atlassian.crowd.exception.runtime.OperationFailedException
      • isDirectorySynchronising

        @Transactional(readOnly=true)
        public boolean isDirectorySynchronising​(long directoryId)
                                         throws com.atlassian.crowd.exception.runtime.OperationFailedException
        Specified by:
        isDirectorySynchronising in interface com.atlassian.crowd.embedded.api.CrowdDirectoryService
        Overrides:
        isDirectorySynchronising in class com.atlassian.crowd.embedded.core.CrowdDirectoryServiceImpl
        Throws:
        com.atlassian.crowd.exception.runtime.OperationFailedException
      • getDirectorySynchronisationInformation

        @Transactional(readOnly=true)
        public com.atlassian.crowd.embedded.api.DirectorySynchronisationInformation getDirectorySynchronisationInformation​(long directoryId)
                                                                                                                    throws com.atlassian.crowd.exception.runtime.OperationFailedException
        Specified by:
        getDirectorySynchronisationInformation in interface com.atlassian.crowd.embedded.api.CrowdDirectoryService
        Overrides:
        getDirectorySynchronisationInformation in class com.atlassian.crowd.embedded.core.CrowdDirectoryServiceImpl
        Throws:
        com.atlassian.crowd.exception.runtime.OperationFailedException
      • setConnectionPoolProperties

        public void setConnectionPoolProperties​(com.atlassian.crowd.embedded.api.ConnectionPoolProperties poolProperties)
        Specified by:
        setConnectionPoolProperties in interface com.atlassian.crowd.embedded.api.CrowdDirectoryService
        Overrides:
        setConnectionPoolProperties in class com.atlassian.crowd.embedded.core.CrowdDirectoryServiceImpl
      • getStoredConnectionPoolProperties

        @Transactional(readOnly=true)
        public com.atlassian.crowd.embedded.api.ConnectionPoolProperties getStoredConnectionPoolProperties()
        Specified by:
        getStoredConnectionPoolProperties in interface com.atlassian.crowd.embedded.api.CrowdDirectoryService
        Overrides:
        getStoredConnectionPoolProperties in class com.atlassian.crowd.embedded.core.CrowdDirectoryServiceImpl
      • getSystemConnectionPoolProperties

        @Transactional(readOnly=true)
        public com.atlassian.crowd.embedded.api.ConnectionPoolProperties getSystemConnectionPoolProperties()
        Specified by:
        getSystemConnectionPoolProperties in interface com.atlassian.crowd.embedded.api.CrowdDirectoryService
        Overrides:
        getSystemConnectionPoolProperties in class com.atlassian.crowd.embedded.core.CrowdDirectoryServiceImpl
      • isMembershipAggregationEnabled

        @Transactional(readOnly=true)
        public boolean isMembershipAggregationEnabled()
        Specified by:
        isMembershipAggregationEnabled in interface com.atlassian.crowd.embedded.api.CrowdDirectoryService
        Overrides:
        isMembershipAggregationEnabled in class com.atlassian.crowd.embedded.core.CrowdDirectoryServiceImpl
      • setMembershipAggregationEnabled

        public void setMembershipAggregationEnabled​(boolean enabled)
        Specified by:
        setMembershipAggregationEnabled in interface com.atlassian.crowd.embedded.api.CrowdDirectoryService
        Overrides:
        setMembershipAggregationEnabled in class com.atlassian.crowd.embedded.core.CrowdDirectoryServiceImpl