當前位置: 首頁>>代碼示例>>Java>>正文


Java DiskInterface類代碼示例

本文整理匯總了Java中org.alfresco.jlan.server.filesys.DiskInterface的典型用法代碼示例。如果您正苦於以下問題:Java DiskInterface類的具體用法?Java DiskInterface怎麽用?Java DiskInterface使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


DiskInterface類屬於org.alfresco.jlan.server.filesys包,在下文中一共展示了DiskInterface類的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: createHomeDiskShare

import org.alfresco.jlan.server.filesys.DiskInterface; //導入依賴的package包/類
/**
 * Create a disk share for the home folder
 * 
 * @param homeFolderRef nodeRef
 * @param userName user name
 * @return DiskSharedDevice
 */
private final DiskSharedDevice createHomeDiskShare(NodeRef homeFolderRef, String userName)
{
    //  Create the disk driver and context
    logger.debug("create home share for user " + userName);
    
    DiskInterface diskDrv = getRepoDiskInterface();
   
    ContentContext diskCtx = new ContentContext( getHomeFolderName(), "", "", homeFolderRef);
    
    if ( getQuotaManager() != null)
    {
        diskCtx.setQuotaManager( getQuotaManager());
    }
    
    ServerConfigurationBean config = (ServerConfigurationBean)m_config;            
    config.initialiseRuntimeContext("cifs.home." + userName, diskCtx);

    //  Create a temporary shared device for the users home directory
    return new DiskSharedDevice(getHomeFolderName(), diskDrv, diskCtx, SharedDevice.Temporary);
}
 
開發者ID:Alfresco,項目名稱:alfresco-repository,代碼行數:28,代碼來源:HomeShareMapper.java

示例2: setDesktopActions

import org.alfresco.jlan.server.filesys.DiskInterface; //導入依賴的package包/類
/**
     * Set the desktop actions
     * 
     * @param desktopActions DesktopActionTable
     * @param filesysDriver DiskInterface
     */
    public final void setDesktopActions(DesktopActionTable desktopActions, DiskInterface filesysDriver)
    {
    	// Enumerate the desktop actions and add to this filesystem
    	
    	Enumeration<String> names = desktopActions.enumerateActionNames();
    	
    	while ( names.hasMoreElements())
    	{
    		addDesktopAction( desktopActions.getAction(names.nextElement()));
    	}
    	
//    	// If there are desktop actions then create the custom I/O control handler
//    	
//    	if ( numberOfDesktopActions() > 0)
//    	{
//    		// Create the custom I/O control handler
//    	
//    		m_ioHandler = createIOHandler( filesysDriver);
//    		if ( m_ioHandler != null)
//    			m_ioHandler.initialize(( AlfrescoDiskDriver) filesysDriver, this);
//    	}
    }
 
開發者ID:Alfresco,項目名稱:alfresco-repository,代碼行數:29,代碼來源:AlfrescoContext.java

示例3: startManager

import org.alfresco.jlan.server.filesys.DiskInterface; //導入依賴的package包/類
/**
    * Start the quota manager.
    * 
    * @param disk DiskInterface
    * @param ctx DiskDeviceContext
    * @exception QuotaManagerException
    */
public void startManager(DiskInterface disk, DiskDeviceContext ctx)
	throws QuotaManagerException 
{

    if(logger.isDebugEnabled())
    {
        logger.debug("Start Quota Manager");
    }
    
    // Save the filesystem driver details
    m_filesys = disk;
    
    // Allocate the live usage table
    
    m_liveUsage = new HashMap<String, UserQuotaDetails>();
    
       // Create the inactivity checker thread        
       m_thread = new Thread(this);
       m_thread.setDaemon(true);
       m_thread.setName("ContentQuotaManagerChecker");
       m_thread.start();
}
 
開發者ID:Alfresco,項目名稱:alfresco-repository,代碼行數:30,代碼來源:ContentQuotaManager.java

示例4: stopManager

import org.alfresco.jlan.server.filesys.DiskInterface; //導入依賴的package包/類
/**
    * Stop the quota manager
    * 
    * @param disk DiskInterface
    * @param ctx DiskDeviceContext
    * @exception QuotaManagerException
    */
public void stopManager(DiskInterface disk, DiskDeviceContext ctx)
	throws QuotaManagerException 
   {
    
    if(logger.isDebugEnabled())
    {
        logger.debug("Stop Quota Manager");
    }

    // Clear out the live usage details
    synchronized (m_liveUsageLock)
       {
        m_liveUsage.clear();
        m_shutdown = true;
       }
    
    // Shutdown the checker thread
    
    m_thread.interrupt();
}
 
開發者ID:Alfresco,項目名稱:alfresco-repository,代碼行數:28,代碼來源:ContentQuotaManager.java

示例5: SmbServerConfiguration

import org.alfresco.jlan.server.filesys.DiskInterface; //導入依賴的package包/類
public SmbServerConfiguration(final String hostname, final String domainName, final String localPath, final String shareName, final DiskInterface diskDriver) throws InvalidConfigurationException, DeviceContextException {
    super(hostname);

    setServerName(hostname);

    createDebugConfigSection(this);
    createCoreServerConfigSection(this);
    createGlobalConfigSection(this);
    createCifsConfigSection(this, hostname, domainName);

    final SecurityConfigSection securityConfigSection = createSecurityConfigSection(this);
    final FilesystemsConfigSection filesystemsConfigSection = createFilesystemsConfigSection(this);

    // Create and start disk share
    final DiskSharedDevice diskShare = createDiskShare(localPath, shareName, diskDriver, securityConfigSection);
    diskShare.setConfiguration(this);
    diskShare.setAccessControlList(securityConfigSection.getGlobalAccessControls());

    ((DiskDeviceContext) diskShare.getContext()).startFilesystem(diskShare);

    filesystemsConfigSection.addShare(diskShare);
}
 
開發者ID:raqet,項目名稱:acquisition-server,代碼行數:23,代碼來源:SmbServerConfiguration.java

示例6: createDiskShare

import org.alfresco.jlan.server.filesys.DiskInterface; //導入依賴的package包/類
private static DiskSharedDevice createDiskShare(final String localPath, final String shareName, final DiskInterface diskDriver, final SecurityConfigSection securityConfigSection) throws DeviceContextException {
    final GenericConfigElement args = new GenericConfigElement("args");
    final GenericConfigElement localPathConfig = new GenericConfigElement("LocalPath");
    localPathConfig.setValue(localPath);
    args.addChild(localPathConfig);

    final DiskDeviceContext diskDeviceContext = (DiskDeviceContext) diskDriver.createContext(shareName, args);
    diskDeviceContext.setShareName(shareName);
    diskDeviceContext.setConfigurationParameters(args);
    diskDeviceContext.enableChangeHandler(false);
    diskDeviceContext.setDiskInformation(new SrvDiskInfo(2560000, 64, 512, 2304000)); // Default to a 80Gb sized disk with 90% free space

    return new DiskSharedDevice(shareName, diskDriver, diskDeviceContext);
}
 
開發者ID:raqet,項目名稱:acquisition-server,代碼行數:15,代碼來源:SmbServerConfiguration.java

示例7: setRepoDiskInterface

import org.alfresco.jlan.server.filesys.DiskInterface; //導入依賴的package包/類
public void setRepoDiskInterface(DiskInterface repoDiskInterface)
{
    this.repoDiskInterface = repoDiskInterface;
}
 
開發者ID:Alfresco,項目名稱:alfresco-repository,代碼行數:5,代碼來源:HomeShareMapper.java

示例8: getRepoDiskInterface

import org.alfresco.jlan.server.filesys.DiskInterface; //導入依賴的package包/類
public DiskInterface getRepoDiskInterface()
{
    return repoDiskInterface;
}
 
開發者ID:Alfresco,項目名稱:alfresco-repository,代碼行數:5,代碼來源:HomeShareMapper.java

示例9: createTenantShare

import org.alfresco.jlan.server.filesys.DiskInterface; //導入依賴的package包/類
/**
 * Create a tenant domain specific share
 */
private final DiskSharedDevice createTenantShare(String tenantDomain)
{
    logger.debug("create tenant share for domain " + tenantDomain);
       StoreRef storeRef = new StoreRef(getStoreName());
       NodeRef rootNodeRef = new NodeRef(storeRef.getProtocol(), storeRef.getIdentifier(), "dummy"); 
       
       // Root nodeRef is required for storeRef part
       
       rootNodeRef = m_alfrescoConfig.getTenantService().getRootNode(
               m_alfrescoConfig.getNodeService(), 
               m_alfrescoConfig.getSearchService(),
       		m_alfrescoConfig.getNamespaceService(), 
       		getRootPath(), 
       		rootNodeRef);

       //  Create the disk driver and context

       DiskInterface diskDrv = getRepoDiskInterface();
       ContentContext diskCtx = new ContentContext(m_tenantShareName, getStoreName(), getRootPath(), rootNodeRef);
       
       // Set a quota manager for the share, if enabled
       
       if ( m_quotaManager != null)
       {
       	diskCtx.setQuotaManager( m_quotaManager);
       }
       
       if(m_config instanceof ServerConfigurationBean)
       {
           ServerConfigurationBean config = (ServerConfigurationBean)m_config;
           
           config.initialiseRuntimeContext("cifs.tenant." + tenantDomain, diskCtx);
       }
       else
       {
           throw new AlfrescoRuntimeException("configuration error, unknown configuration bean");
       }
       
       //  Default the filesystem to look like an 80Gb sized disk with 90% free space

       diskCtx.setDiskInformation(new SrvDiskInfo(2560, 64, 512, 2304));

       //  Create a temporary shared device for the user to access the tenant company home directory

       return new DiskSharedDevice(m_tenantShareName, diskDrv, diskCtx);
}
 
開發者ID:Alfresco,項目名稱:alfresco-repository,代碼行數:50,代碼來源:MultiTenantShareMapper.java

示例10: setDiskInterface

import org.alfresco.jlan.server.filesys.DiskInterface; //導入依賴的package包/類
/**
 * Set the filesystem driver for the node service based filesystem.
 * 
 * @param diskInterface
 *            DiskInterface
 */
public void setDiskInterface(DiskInterface diskInterface)
{
    this.diskInterface = diskInterface;
}
 
開發者ID:Alfresco,項目名稱:alfresco-repository,代碼行數:11,代碼來源:CifsAuthenticatorBase.java

示例11: getRepoDiskInterface

import org.alfresco.jlan.server.filesys.DiskInterface; //導入依賴的package包/類
/**
 * Return the repository disk interface to be used to create shares
 * 
 * @return DiskInterface
 */
public final DiskInterface getRepoDiskInterface()
{
    return m_repoDiskInterface;
}
 
開發者ID:Alfresco,項目名稱:alfresco-repository,代碼行數:10,代碼來源:AlfrescoConfigSection.java


注:本文中的org.alfresco.jlan.server.filesys.DiskInterface類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。