本文整理汇总了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);
}
示例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);
// }
}
示例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();
}
示例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();
}
示例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);
}
示例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);
}
示例7: setRepoDiskInterface
import org.alfresco.jlan.server.filesys.DiskInterface; //导入依赖的package包/类
public void setRepoDiskInterface(DiskInterface repoDiskInterface)
{
this.repoDiskInterface = repoDiskInterface;
}
示例8: getRepoDiskInterface
import org.alfresco.jlan.server.filesys.DiskInterface; //导入依赖的package包/类
public DiskInterface getRepoDiskInterface()
{
return repoDiskInterface;
}
示例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);
}
示例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;
}
示例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;
}