当前位置: 首页>>代码示例>>Java>>正文


Java DeviceContext类代码示例

本文整理汇总了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);
    }
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:22,代码来源:AlfrescoDiskDriver.java

示例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);
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:8,代码来源:LegacyFileStateDriver.java

示例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();
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:17,代码来源:ContentDiskDriver2.java

示例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);
}
 
开发者ID:avasquez614,项目名称:cloud-raid,代码行数:28,代码来源:CloudRaidObjectIdLoader.java

示例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);
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:7,代码来源:NonTransactionalRuleContentDiskDriver.java

示例6: registerContext

import org.alfresco.jlan.server.core.DeviceContext; //导入依赖的package包/类
@Override
public void registerContext(DeviceContext ctx)
        throws DeviceContextException
{
    diskInterface.registerContext(ctx); 
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:7,代码来源:NonTransactionalRuleContentDiskDriver.java

示例7: registerContext

import org.alfresco.jlan.server.core.DeviceContext; //导入依赖的package包/类
public void registerContext(DeviceContext ctx, ServerConfigurationBean serverConfig)
throws DeviceContextException;
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:3,代码来源:ContentDiskCallback.java

示例8: registerContext

import org.alfresco.jlan.server.core.DeviceContext; //导入依赖的package包/类
@Override
public void registerContext(DeviceContext ctx) throws DeviceContextException
{
    diskInterface.registerContext(ctx);
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:6,代码来源:LegacyFileStateDriver.java

示例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);
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:7,代码来源:LegacyFileStateDriver.java

示例10: registerContext

import org.alfresco.jlan.server.core.DeviceContext; //导入依赖的package包/类
@Override
public void registerContext(DeviceContext ctx)
        throws DeviceContextException
{
    diskInterface.registerContext(ctx);        
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:7,代码来源:BufferedContentDiskDriver.java

示例11: setFilesystemContexts

import org.alfresco.jlan.server.core.DeviceContext; //导入依赖的package包/类
public void setFilesystemContexts(List<DeviceContext> filesystemContexts)
{
    this.filesystemContexts = filesystemContexts;
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:5,代码来源:ServerConfigurationBean.java

示例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;
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:10,代码来源:ExtendedDiskInterface.java

示例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;
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:13,代码来源:ContentDiskDriver.java

示例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");
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:17,代码来源:ContentDiskDriver2.java


注:本文中的org.alfresco.jlan.server.core.DeviceContext类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。