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


Java DeviceContextException类代码示例

本文整理汇总了Java中org.alfresco.jlan.server.core.DeviceContextException的典型用法代码示例。如果您正苦于以下问题:Java DeviceContextException类的具体用法?Java DeviceContextException怎么用?Java DeviceContextException使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


DeviceContextException类属于org.alfresco.jlan.server.core包,在下文中一共展示了DeviceContextException类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: SmbServerConfiguration

import org.alfresco.jlan.server.core.DeviceContextException; //导入依赖的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

示例2: registerContext

import org.alfresco.jlan.server.core.DeviceContextException; //导入依赖的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

示例3: createContext

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

示例4: getDiskSharedDevice

import org.alfresco.jlan.server.core.DeviceContextException; //导入依赖的package包/类
private DiskSharedDevice getDiskSharedDevice() throws DeviceContextException
{
    
    ContentContext ctx = new ContentContext( "testContext", STORE_NAME, ROOT_PATH, repositoryHelper.getCompanyHome());
  
    DiskSharedDevice share = new DiskSharedDevice("test", driver, ctx);        
    return share;
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:9,代码来源:ContentDiskDriverTest.java

示例5: createDiskShare

import org.alfresco.jlan.server.core.DeviceContextException; //导入依赖的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

示例6: Main

import org.alfresco.jlan.server.core.DeviceContextException; //导入依赖的package包/类
public Main() throws IScsiException, DeviceContextException {
    _properties = readConfig();
    String machineIP;
    try {
        machineIP = Inet4Address.getLocalHost().getHostAddress();
    }
    catch (final Exception e) {
        LOG.error("Error determining local IP address", e);
        machineIP = "127.0.0.1";
    }
    final String serverIPAddress = _properties.getProperty("serverip", machineIP );
    final String evidenceDirectory = _properties.getProperty("evidencedirectory", EVIDENCE_DIRECTORY);
    final String initiatorName = _properties.getProperty("initiatorname", INITIATOR_NAME);

    final String vPNserverIPAddress = _properties.getProperty("vpnserveripaddress", "");
    final String vPNserversubnet = _properties.getProperty("vpnserversubnet", "");
    final String vPNclientUser = _properties.getProperty("vpnclientuser", "");
    final String vPNclientSecret = _properties.getProperty("vpnclientsecret", "");
    final String vPNserverUser = _properties.getProperty("vpnserveruser", "");
    final String vPNserverSecret = _properties.getProperty("vpnserversecret", "");

    LOG.info("Using " + serverIPAddress + " as server IP address");

    _raqetControll = new RaqetControl(initiatorName,
                                      serverIPAddress,
                                      vPNserverIPAddress,
                                      vPNserversubnet,
                                      vPNclientUser,
                                      vPNclientSecret,
                                      vPNserverUser,
                                      vPNserverSecret,
                                      new File(evidenceDirectory));
    _raqetControll.setOSPassword(_properties.getProperty("ospassword", UUID.randomUUID().toString()));
}
 
开发者ID:raqet,项目名称:acquisition-server,代码行数:35,代码来源:Main.java

示例7: createContext

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

示例8: registerContext

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

示例9: registerContext

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

示例10: registerContext

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

示例11: registerContext

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

示例12: addRemoteDevice

import org.alfresco.jlan.server.core.DeviceContextException; //导入依赖的package包/类
/**
 * discoveres LUNs on a remote ISCSI target. Each lun immediately published as
 *
 * @param targetAddress ISCSI portal address
 * @param clientInfo Meta information from registration
 * @throws IScsiException
 * @throws DeviceContextException
 */

public void addRemoteDevice(final TargetAddress targetAddress, final ClientInfo clientInfo) throws IScsiException, DeviceContextException {
    // Determine remote devices

    final List<RemoteDeviceInfo> deviceList = _remoteDeviceManager.listTargets(targetAddress);
    if (deviceList.isEmpty()) {
        LOG.warn("Failed to determine remote devices, ignoring remote device " + targetAddress);
        return;
    }

    // Log remote devices
    LOG.info("Remote devices at '" + targetAddress + "':");

    for (final RemoteDeviceInfo device : deviceList) {
        String smbMountPath = "\\";
        device.setEvidenceDirectory(new File("/tmp/"));
        device.setEvidenceBaseFileName(generateEvidenceFilename(device.getTargetName(), device.getLun()));

        LOG.info(" o  " + device.getTargetName());
        LOG.info("     - LUN:  " + device.getLun());
        LOG.info("     - Type: " + device.getDeviceType());
        LOG.info("     - URL:  " + device.getPortal());

        final IScsiLogicalUnitCapacity capacity = device.getCapacity();
        final long size = (capacity.getLogicalBlockAddress() + 1) * capacity.getBlockSize();
        LOG.info("     - Size: " + FileUtilities.toUserFriendlyByteString(size));
        LOG.info("     - Blk:  " + capacity.getBlockSize());
        if (clientInfo != null) {
            final String deviceName = clientInfo.getDeviceMapping(device.getLun()).getDevice();
            LOG.info("     - Dev   " + deviceName);
            smbMountPath = "\\" + clientInfo.getComputerDbEntry().getCaseAndComputer() + "\\";
            final List<String> disks = clientInfo.getComputerDbEntry().getDisks();

            if (!disks.contains(deviceName)) {
                disks.add(deviceName);
            }
            try {
                _investigationCaseDB.update(clientInfo.getComputerDbEntry());
            }
            catch (final Exception e) {
                LOG.error("Failed to create update computer for client " + clientInfo.getClientid(), e);
                return;
            }

            device.setEvidenceDirectory(clientInfo.getComputerDbEntry().getBaseStorageFolder());
            device.setEvidenceBaseFileName(String.format("%04d-", device.getLun()) +
                clientInfo.getClientid() + "_" + deviceName + ".dd");
        }
        LOG.info("Published on path " + smbMountPath);
        _diskInterface.addRemoteDevice(_remoteDeviceManager, smbMountPath, device);
    }
}
 
开发者ID:raqet,项目名称:acquisition-server,代码行数:61,代码来源:RaqetControl.java

示例13: startFilesystem

import org.alfresco.jlan.server.core.DeviceContextException; //导入依赖的package包/类
/**
 * Start the filesystem
 * 
 * @param share DiskSharedDevice
 * @exception DeviceContextException
 */
public void startFilesystem(DiskSharedDevice share)
    throws DeviceContextException {
    
  

    // Call the base class
    
    super.startFilesystem(share);
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:16,代码来源:AlfrescoContext.java

示例14: startFilesystem

import org.alfresco.jlan.server.core.DeviceContextException; //导入依赖的package包/类
/**
 * Start the filesystem
 * 
 * @param share DiskSharedDevice
 * @exception DeviceContextException
 */
public void startFilesystem(DiskSharedDevice share)
    throws DeviceContextException {
    

    // Call the base class
    
    super.startFilesystem(share);

    if ( getStateCache() != null)
    	getStateCache().setCaseSensitive( false);
    
    // Find the thread pool via the configuration
    
    CoreServerConfigSection coreConfig = (CoreServerConfigSection) share.getConfiguration().getConfigSection( CoreServerConfigSection.SectionName);
    if ( coreConfig != null)
        m_threadPool = coreConfig.getThreadPool();
    
    // Start the lock manager, use the thread pool if available
    
    if ( getLockManager() != null) {
                
        // Start the lock manager
        
        m_lockManager.startLockManager( "OplockExpire_" + share.getName(), m_threadPool);
    }

    // Start the node monitor, if enabled
    
    if ( m_nodeMonitor != null)
        m_nodeMonitor.startMonitor();
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:38,代码来源:ContentContext.java

示例15: registerContext

import org.alfresco.jlan.server.core.DeviceContextException; //导入依赖的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


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