Class MultiTAdminServiceImpl

  • All Implemented Interfaces:
    TenantAdminService, org.alfresco.repo.tenant.TenantUserService, org.springframework.beans.factory.Aware, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware

    public class MultiTAdminServiceImpl
    extends java.lang.Object
    implements TenantAdminService, org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.InitializingBean
    MT Admin Service Implementation.
    • Field Detail

      • ctx

        protected org.springframework.context.ApplicationContext ctx
      • dictionaryComponent

        protected org.alfresco.repo.dictionary.DictionaryComponent dictionaryComponent
      • passwordEncoder

        protected net.sf.acegisecurity.providers.encoding.PasswordEncoder passwordEncoder
      • tenantFileContentStore

        protected org.alfresco.repo.content.ContentStore tenantFileContentStore
      • REGEX_VALID_DNS_LABEL

        protected static final java.lang.String REGEX_VALID_DNS_LABEL
        See Also:
        Constant Field Values
      • REGEX_CONTAINS_ALPHA

        protected static final java.lang.String REGEX_CONTAINS_ALPHA
        See Also:
        Constant Field Values
      • PROTOCOL_STORE_USER

        public static final java.lang.String PROTOCOL_STORE_USER
        See Also:
        Constant Field Values
      • PROTOCOL_STORE_WORKSPACE

        public static final java.lang.String PROTOCOL_STORE_WORKSPACE
        See Also:
        Constant Field Values
      • PROTOCOL_STORE_SYSTEM

        public static final java.lang.String PROTOCOL_STORE_SYSTEM
        See Also:
        Constant Field Values
      • PROTOCOL_STORE_ARCHIVE

        public static final java.lang.String PROTOCOL_STORE_ARCHIVE
        See Also:
        Constant Field Values
      • STORE_BASE_ID_USER

        public static final java.lang.String STORE_BASE_ID_USER
        See Also:
        Constant Field Values
      • STORE_BASE_ID_SYSTEM

        public static final java.lang.String STORE_BASE_ID_SYSTEM
        See Also:
        Constant Field Values
      • STORE_BASE_ID_VERSION1

        public static final java.lang.String STORE_BASE_ID_VERSION1
        See Also:
        Constant Field Values
      • STORE_BASE_ID_VERSION2

        public static final java.lang.String STORE_BASE_ID_VERSION2
        See Also:
        Constant Field Values
      • STORE_BASE_ID_SPACES

        public static final java.lang.String STORE_BASE_ID_SPACES
        See Also:
        Constant Field Values
      • TENANTS_ATTRIBUTE_PATH

        public static final java.lang.String TENANTS_ATTRIBUTE_PATH
        See Also:
        Constant Field Values
      • TENANT_ATTRIBUTE_ENABLED

        public static final java.lang.String TENANT_ATTRIBUTE_ENABLED
        See Also:
        Constant Field Values
      • TENANT_ATTRIBUTE_ROOT_CONTENT_STORE_DIR

        public static final java.lang.String TENANT_ATTRIBUTE_ROOT_CONTENT_STORE_DIR
        See Also:
        Constant Field Values
      • TENANT_ATTRIBUTE_DB_URL

        public static final java.lang.String TENANT_ATTRIBUTE_DB_URL
        See Also:
        Constant Field Values
    • Constructor Detail

      • MultiTAdminServiceImpl

        public MultiTAdminServiceImpl()
    • Method Detail

      • setDictionaryComponent

        public void setDictionaryComponent​(org.alfresco.repo.dictionary.DictionaryComponent dictionaryComponent)
      • setRepoAdminService

        public void setRepoAdminService​(RepoAdminService repoAdminService)
      • setAuthenticationContext

        public void setAuthenticationContext​(AuthenticationContext authenticationContext)
      • setTransactionService

        public void setTransactionService​(TransactionService transactionService)
      • setTenantService

        public void setTenantService​(MultiTServiceImpl tenantService)
      • setBehaviourFilter

        public void setBehaviourFilter​(BehaviourFilter behaviourFilter)
      • setTenantAdminDAO

        public void setTenantAdminDAO​(TenantAdminDAO tenantAdminDAO)
      • setPasswordEncoder

        public void setPasswordEncoder​(net.sf.acegisecurity.providers.encoding.PasswordEncoder passwordEncoder)
      • setTenantFileContentStore

        public void setTenantFileContentStore​(org.alfresco.repo.content.ContentStore tenantFileContentStore)
      • setWorkflowService

        public void setWorkflowService​(WorkflowService workflowService)
      • setRepositoryExporterService

        public void setRepositoryExporterService​(RepositoryExporterService repositoryExporterService)
      • setWorkflowDeployer

        public void setWorkflowDeployer​(WorkflowDeployer workflowDeployer)
        Deprecated.
        see setWorkflowDeployers
      • setModuleService

        public void setModuleService​(ModuleService moduleService)
      • setThumbnailRegistry

        public void setThumbnailRegistry​(ThumbnailRegistry thumbnailRegistry)
      • setBaseAdminUsername

        public void setBaseAdminUsername​(java.lang.String baseAdminUsername)
      • setContentRootContainerPath

        public void setContentRootContainerPath​(java.lang.String contentRootContainerPath)
      • afterPropertiesSet

        public void afterPropertiesSet()
                                throws java.lang.Exception
        Specified by:
        afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
        Throws:
        java.lang.Exception
      • setApplicationContext

        public void setApplicationContext​(org.springframework.context.ApplicationContext applicationContext)
                                   throws org.springframework.beans.BeansException
        Specified by:
        setApplicationContext in interface org.springframework.context.ApplicationContextAware
        Throws:
        org.springframework.beans.BeansException
      • createTenant

        public void createTenant​(java.lang.String tenantDomain,
                                 char[] tenantAdminRawPassword)
        Specified by:
        createTenant in interface TenantAdminService
      • createTenant

        public void createTenant​(java.lang.String tenantDomain,
                                 char[] tenantAdminRawPassword,
                                 java.lang.String contentRoot)
        Specified by:
        createTenant in interface TenantAdminService
      • createTenant

        public void createTenant​(java.lang.String tenantDomainIn,
                                 char[] tenantAdminRawPassword,
                                 java.lang.String contentRootPath,
                                 java.lang.String dbUrl)
        Specified by:
        createTenant in interface TenantAdminService
      • exportTenant

        public void exportTenant​(java.lang.String tenantDomainIn,
                                 java.io.File directoryDestination)
        Export tenant - equivalent to the tenant admin running a 'complete repo' export from the Web Client Admin
        Specified by:
        exportTenant in interface TenantAdminService
      • importTenant

        public void importTenant​(java.lang.String tenantDomainIn,
                                 java.io.File directorySource,
                                 java.lang.String contentRoot)
        Create tenant by restoring from a complete repository export. This is equivalent to a bootstrap import using restore-context.xml.
        Specified by:
        importTenant in interface TenantAdminService
      • notifyAfterEnableTenant

        protected void notifyAfterEnableTenant​(java.lang.String tenantDomain)
        Call all TenantDeployers as the system tenant.
      • getTenant

        public org.alfresco.repo.tenant.Tenant getTenant​(java.lang.String tenantDomain)
        Specified by:
        getTenant in interface TenantAdminService
      • getAllTenants

        @Deprecated
        public java.util.List<org.alfresco.repo.tenant.Tenant> getAllTenants()
        Deprecated.
        Specified by:
        getAllTenants in interface TenantAdminService
        Returns:
        a list of all tenants regardless of state
      • getTenants

        @Deprecated
        public java.util.List<org.alfresco.repo.tenant.Tenant> getTenants​(boolean enabledOnly)
        Deprecated.
        Description copied from interface: TenantAdminService
        Retrieve all tenants
        Specified by:
        getTenants in interface TenantAdminService
        Parameters:
        enabledOnly - true to retrieve only active tenants
        Returns:
        tenants, either active or all
      • deployTenants

        public void deployTenants​(org.alfresco.repo.tenant.TenantDeployer deployer,
                                  org.apache.commons.logging.Log logger)
        Specified by:
        deployTenants in interface TenantAdminService
      • undeployTenants

        public void undeployTenants​(org.alfresco.repo.tenant.TenantDeployer deployer,
                                    org.apache.commons.logging.Log logger)
        Specified by:
        undeployTenants in interface TenantAdminService
      • register

        public void register​(org.alfresco.repo.tenant.TenantDeployer deployer)
        Specified by:
        register in interface TenantAdminService
      • unregister

        public void unregister​(org.alfresco.repo.tenant.TenantDeployer deployer)
        Specified by:
        unregister in interface TenantAdminService
      • tenantRoutingContentStore

        protected TenantRoutingContentStore tenantRoutingContentStore​(org.alfresco.repo.content.ContentStore contentStore)
      • isTenantRoutingContentStore

        protected boolean isTenantRoutingContentStore​(org.alfresco.repo.content.ContentStore contentStore)
      • tenantDeployer

        protected org.alfresco.repo.tenant.TenantDeployer tenantDeployer​(org.alfresco.repo.content.ContentStore contentStore)
      • isTenantDeployer

        protected boolean isTenantDeployer​(org.alfresco.repo.content.ContentStore contentStore)
      • isEnabled

        public boolean isEnabled()
        Specified by:
        isEnabled in interface org.alfresco.repo.tenant.TenantUserService
      • getCurrentUserDomain

        public java.lang.String getCurrentUserDomain()
        Specified by:
        getCurrentUserDomain in interface org.alfresco.repo.tenant.TenantUserService
      • getUserDomain

        public java.lang.String getUserDomain​(java.lang.String username)
        Specified by:
        getUserDomain in interface org.alfresco.repo.tenant.TenantUserService
      • getBaseNameUser

        public java.lang.String getBaseNameUser​(java.lang.String username)
        Specified by:
        getBaseNameUser in interface org.alfresco.repo.tenant.TenantUserService
      • getDomainUser

        public java.lang.String getDomainUser​(java.lang.String baseUsername,
                                              java.lang.String tenantDomain)
        Specified by:
        getDomainUser in interface org.alfresco.repo.tenant.TenantUserService
      • getTenantDomain

        protected java.lang.String getTenantDomain​(java.lang.String tenantDomain)
        Do a null check and convert tenant domain to lowercase