当前位置: 首页>>代码示例>>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;未经允许,请勿转载。