本文整理汇总了Java中org.alfresco.jlan.server.core.DeviceContext类的典型用法代码示例。如果您正苦于以下问题:Java DeviceContext类的具体用法?Java DeviceContext怎么用?Java DeviceContext使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
DeviceContext类属于org.alfresco.jlan.server.core包,在下文中一共展示了DeviceContext类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: registerContext
import org.alfresco.jlan.server.core.DeviceContext; //导入依赖的package包/类
/**
* Registers a device context object for this instance
* of the shared device. The same DeviceInterface implementation may be used for multiple
* shares. In this base class, we initialize all desktop actions.
*
* @param ctx the context
* @exception DeviceContextException
*/
public void registerContext(DeviceContext ctx) throws DeviceContextException
{
if (ctx instanceof AlfrescoContext)
{
// Enable a standalone state cache on the filesystem
AlfrescoContext alfCtx = (AlfrescoContext) ctx;
// Initialize the filesystem
alfCtx.initialize(this);
}
}
示例2: createContext
import org.alfresco.jlan.server.core.DeviceContext; //导入依赖的package包/类
@Override
public DeviceContext createContext(String shareName, ConfigElement args)
throws DeviceContextException
{
return diskInterface.createContext(shareName, args);
}
示例3: isReadOnly
import org.alfresco.jlan.server.core.DeviceContext; //导入依赖的package包/类
/**
* Determine if the disk device is read-only.
*
* @param sess Server session
* @param ctx Device context
* @return boolean
* @exception java.io.IOException If an error occurs.
*/
public boolean isReadOnly(SrvSession sess, DeviceContext ctx) throws IOException
{
if(logger.isDebugEnabled())
{
logger.debug("isReadOnly");
}
return !m_transactionService.getAllowWrite();
}
示例4: initializeLoader
import org.alfresco.jlan.server.core.DeviceContext; //导入依赖的package包/类
@Override
public void initializeLoader(ConfigElement params, DeviceContext ctx) throws FileLoaderException, IOException {
super.initializeLoader(params, ctx);
ConfigElement informationDispersalConfig = params.getChild("InformationDispersal");
if (informationDispersalConfig == null) {
throw new FileLoaderException("InformationDispersal not specified");
}
if (!(getContext().getDBInterface() instanceof FragmentMetaDataRepository)) {
throw new FileLoaderException("DBInterface should implement " + FragmentMetaDataRepository.class.getName());
}
if (!(getContext().getDBInterface() instanceof EncryptionKeyRepository)) {
throw new FileLoaderException("DBInterface should implement " + EncryptionKeyRepository.class.getName());
}
Context context = new Context();
context.setFragmentMetaDataRepository((FragmentMetaDataRepository) getContext().getDBInterface());
context.setEncryptionKeyRepository((EncryptionKeyRepository) getContext().getDBInterface());
setUpThreadPoolExecutor(context);
setUpFragmentRepositories(informationDispersalConfig, context);
setUpIda(informationDispersalConfig, context);
setUpEncryptionProvider(informationDispersalConfig, context);
setUpInformationDispersalPersistenceService(informationDispersalConfig, context);
}
示例5: createContext
import org.alfresco.jlan.server.core.DeviceContext; //导入依赖的package包/类
@Override
public DeviceContext createContext(String shareName, ConfigElement args)
throws DeviceContextException
{
return diskInterface.createContext(shareName, args);
}
示例6: registerContext
import org.alfresco.jlan.server.core.DeviceContext; //导入依赖的package包/类
@Override
public void registerContext(DeviceContext ctx)
throws DeviceContextException
{
diskInterface.registerContext(ctx);
}
示例7: registerContext
import org.alfresco.jlan.server.core.DeviceContext; //导入依赖的package包/类
public void registerContext(DeviceContext ctx, ServerConfigurationBean serverConfig)
throws DeviceContextException;
示例8: registerContext
import org.alfresco.jlan.server.core.DeviceContext; //导入依赖的package包/类
@Override
public void registerContext(DeviceContext ctx) throws DeviceContextException
{
diskInterface.registerContext(ctx);
}
示例9: isReadOnly
import org.alfresco.jlan.server.core.DeviceContext; //导入依赖的package包/类
@Override
public boolean isReadOnly(SrvSession sess, DeviceContext ctx)
throws IOException
{
return diskInterface.isReadOnly(sess, ctx);
}
示例10: registerContext
import org.alfresco.jlan.server.core.DeviceContext; //导入依赖的package包/类
@Override
public void registerContext(DeviceContext ctx)
throws DeviceContextException
{
diskInterface.registerContext(ctx);
}
示例11: setFilesystemContexts
import org.alfresco.jlan.server.core.DeviceContext; //导入依赖的package包/类
public void setFilesystemContexts(List<DeviceContext> filesystemContexts)
{
this.filesystemContexts = filesystemContexts;
}
示例12: registerContext
import org.alfresco.jlan.server.core.DeviceContext; //导入依赖的package包/类
/**
* Register an independently created device context object for this instance of the shared device. Useful, e.g. when
* context singleton configuration managed by a container.
*
* @param ctx
* the device context
* @exception DeviceContextException
*/
public void registerContext(DeviceContext ctx) throws DeviceContextException;
示例13: isReadOnly
import org.alfresco.jlan.server.core.DeviceContext; //导入依赖的package包/类
/**
* Determine if the disk device is read-only.
*
* @param sess Server session
* @param ctx Device context
* @return boolean
* @exception java.io.IOException If an error occurs.
*/
public boolean isReadOnly(SrvSession sess, DeviceContext ctx) throws IOException
{
return isReadOnly;
}
示例14: createContext
import org.alfresco.jlan.server.core.DeviceContext; //导入依赖的package包/类
/**
* Parse and validate the parameter string and create a device context object for this instance
* of the shared device. The same DeviceInterface implementation may be used for multiple
* shares.
* <p>
* @deprecated - no longer used. Construction of context is via spring now.
* @param deviceName The name of the device
* @param cfg ConfigElement the configuration of the device context.
* @return DeviceContext
* @exception DeviceContextException
*/
public DeviceContext createContext(String deviceName, ConfigElement cfg) throws DeviceContextException
{
logger.error("Obsolete method called");
throw new DeviceContextException("Obsolete Method called");
}