Class MultiTenantShareMapper

  • All Implemented Interfaces:
    org.alfresco.jlan.server.config.ConfigurationListener, org.alfresco.jlan.server.core.ShareMapper, org.springframework.beans.factory.InitializingBean

    public class MultiTenantShareMapper
    extends java.lang.Object
    implements org.alfresco.jlan.server.core.ShareMapper, org.alfresco.jlan.server.config.ConfigurationListener, org.springframework.beans.factory.InitializingBean
    Multi Tenant Share Mapper Class
    Author:
    gkspencer
    • Field Summary

      • Fields inherited from interface org.alfresco.jlan.server.config.ConfigurationListener

        StsAccepted, StsIgnored, StsNewSessionsOnly, StsRestartRequired
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void afterPropertiesSet()  
      void closeMapper()
      Close the share mapper, release any resources.
      int configurationChanged​(int id, org.alfresco.jlan.server.config.ServerConfiguration config, java.lang.Object newVal)
      Configuration changed
      void deleteShares​(org.alfresco.jlan.server.SrvSession sess)
      Delete temporary shares for the specified session
      org.alfresco.jlan.server.core.SharedDevice findShare​(java.lang.String host, java.lang.String name, int typ, org.alfresco.jlan.server.SrvSession sess, boolean create)
      Find a share using the name and type for the specified client.
      org.alfresco.jlan.server.filesys.DiskInterface getRepoDiskInterface()  
      java.lang.String getRootPath()  
      org.alfresco.jlan.server.core.SharedDeviceList getShareList​(java.lang.String host, org.alfresco.jlan.server.SrvSession sess, boolean allShares)
      Return the list of available shares.
      java.lang.String getStoreName()  
      void init()  
      void initializeMapper​(org.alfresco.jlan.server.config.ServerConfiguration config, org.springframework.extensions.config.ConfigElement params)
      Initialize the share mapper
      void setQuotaManager​(org.alfresco.jlan.server.filesys.quota.QuotaManager quotaManager)
      Set the quota manager to be used by multi-tenant shares
      void setRepoDiskInterface​(org.alfresco.jlan.server.filesys.DiskInterface repoDiskInterface)  
      void setRootPath​(java.lang.String m_rootPath)  
      void setServerConfiguration​(org.alfresco.jlan.server.config.ServerConfiguration config)  
      void setStoreName​(java.lang.String m_storeName)  
      void setTenantShareName​(java.lang.String shareName)  
      • Methods inherited from class java.lang.Object

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

      • MultiTenantShareMapper

        public MultiTenantShareMapper()
        Default constructor
    • Method Detail

      • init

        public void init()
      • initializeMapper

        public void initializeMapper​(org.alfresco.jlan.server.config.ServerConfiguration config,
                                     org.springframework.extensions.config.ConfigElement params)
                              throws org.alfresco.jlan.server.config.InvalidConfigurationException
        Initialize the share mapper
        Specified by:
        initializeMapper in interface org.alfresco.jlan.server.core.ShareMapper
        Parameters:
        config - ServerConfiguration
        params - ConfigElement
        Throws:
        org.alfresco.jlan.server.config.InvalidConfigurationException
      • afterPropertiesSet

        public void afterPropertiesSet()
        Specified by:
        afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      • findShare

        public org.alfresco.jlan.server.core.SharedDevice findShare​(java.lang.String host,
                                                                    java.lang.String name,
                                                                    int typ,
                                                                    org.alfresco.jlan.server.SrvSession sess,
                                                                    boolean create)
                                                             throws org.alfresco.jlan.server.auth.InvalidUserException
        Find a share using the name and type for the specified client.
        Specified by:
        findShare in interface org.alfresco.jlan.server.core.ShareMapper
        Parameters:
        host - String
        name - String
        typ - int
        sess - SrvSession
        create - boolean
        Returns:
        SharedDevice or null if no matching device was found
        Throws:
        org.alfresco.jlan.server.auth.InvalidUserException
      • deleteShares

        public void deleteShares​(org.alfresco.jlan.server.SrvSession sess)
        Delete temporary shares for the specified session
        Specified by:
        deleteShares in interface org.alfresco.jlan.server.core.ShareMapper
        Parameters:
        sess - SrvSession
      • getShareList

        public org.alfresco.jlan.server.core.SharedDeviceList getShareList​(java.lang.String host,
                                                                           org.alfresco.jlan.server.SrvSession sess,
                                                                           boolean allShares)
        Return the list of available shares.
        Specified by:
        getShareList in interface org.alfresco.jlan.server.core.ShareMapper
        Parameters:
        host - String
        sess - SrvSession
        allShares - boolean
        Returns:
        SharedDeviceList
      • closeMapper

        public void closeMapper()
        Close the share mapper, release any resources.
        Specified by:
        closeMapper in interface org.alfresco.jlan.server.core.ShareMapper
      • configurationChanged

        public int configurationChanged​(int id,
                                        org.alfresco.jlan.server.config.ServerConfiguration config,
                                        java.lang.Object newVal)
                                 throws org.alfresco.jlan.server.config.InvalidConfigurationException
        Configuration changed
        Specified by:
        configurationChanged in interface org.alfresco.jlan.server.config.ConfigurationListener
        Parameters:
        id - int
        config - Serverconfiguration
        newVal - Object
        Returns:
        int
        Throws:
        org.alfresco.jlan.server.config.InvalidConfigurationException
      • setServerConfiguration

        public void setServerConfiguration​(org.alfresco.jlan.server.config.ServerConfiguration config)
      • setTenantShareName

        public void setTenantShareName​(java.lang.String shareName)
      • setQuotaManager

        public void setQuotaManager​(org.alfresco.jlan.server.filesys.quota.QuotaManager quotaManager)
        Set the quota manager to be used by multi-tenant shares
        Parameters:
        quotaManager - QuotaManager
      • setRootPath

        public void setRootPath​(java.lang.String m_rootPath)
      • getRootPath

        public java.lang.String getRootPath()
      • setStoreName

        public void setStoreName​(java.lang.String m_storeName)
      • getStoreName

        public java.lang.String getStoreName()
      • setRepoDiskInterface

        public void setRepoDiskInterface​(org.alfresco.jlan.server.filesys.DiskInterface repoDiskInterface)
      • getRepoDiskInterface

        public org.alfresco.jlan.server.filesys.DiskInterface getRepoDiskInterface()