Example usage for org.apache.commons.vfs.impl StandardFileSystemManager StandardFileSystemManager

List of usage examples for org.apache.commons.vfs.impl StandardFileSystemManager StandardFileSystemManager

Introduction

In this page you can find the example usage for org.apache.commons.vfs.impl StandardFileSystemManager StandardFileSystemManager.

Prototype

StandardFileSystemManager

Source Link

Usage

From source file:org.codehaus.cargo.container.weblogic.WebLogic12xStandaloneLocalConfigurationTest.java

/**
 * Creates the test file system manager and the container. {@inheritDoc}
 * @throws Exception If anything goes wrong.
 *///from   w w w  . j  av a 2 s.co  m
@Override
protected void setUp() throws Exception {
    super.setUp();

    // setup the namespace of the weblogic config.xml file
    Map<String, String> m = new HashMap<String, String>();
    m.put("weblogic", "http://xmlns.oracle.com/weblogic/domain");
    NamespaceContext ctx = new SimpleNamespaceContext(m);
    XMLUnit.setXpathNamespaceContext(ctx);

    this.fsManager = new StandardFileSystemManager();
    this.fsManager.init();
    this.fileHandler = new VFSFileHandler(this.fsManager);
    this.fileHandler.mkdirs(DOMAIN_HOME);
    this.fileHandler.mkdirs(WL_HOME);
    this.configuration = new WebLogic12xStandaloneLocalConfiguration(DOMAIN_HOME);
    this.configuration.setFileHandler(this.fileHandler);

    this.container = new WebLogic12xInstalledLocalContainer(configuration);
    this.container.setHome(WL_HOME);
    this.container.setFileHandler(this.fileHandler);
}

From source file:org.codehaus.cargo.container.weblogic.WebLogic8xConfigXmlInstalledLocalDeployerTest.java

/**
 * Creates the test file system manager and the container. {@inheritDoc}
 * @throws Exception If anything goes wrong.
 *///from w  w w . ja  v a 2 s.  c  o m
@Override
protected void setUp() throws Exception {
    super.setUp();
    this.fsManager = new StandardFileSystemManager();
    this.fsManager.init();
    this.fileHandler = new VFSFileHandler(this.fsManager);
    this.fileHandler.delete(BEA_HOME);
    this.fileHandler.createDirectory(DOMAIN_HOME, "");
    this.xmlUtil = new XmlUtils(this.fileHandler);

    LocalConfiguration configuration = new WebLogic8xStandaloneLocalConfiguration(DOMAIN_HOME);
    this.container = new WebLogic8xInstalledLocalContainer(configuration);
    this.container.setHome(WL_HOME);
    this.container.setFileHandler(this.fileHandler);
    this.deployer = new WebLogic8xConfigXmlInstalledLocalDeployer(container);
    this.resourceUtils = new ResourceUtils();
    this.domain = xmlUtil.createDocument().createElement("Domain");
}

From source file:org.codehaus.cargo.container.weblogic.WebLogic9x10x103x12xConfigXmlInstalledLocalDeployerTest.java

/**
 * Creates the test file system manager and the container. {@inheritDoc}
 * @throws Exception If anything goes wrong.
 */// w  w w .j ava2 s. c  o m
@Override
protected void setUp() throws Exception {
    super.setUp();
    // setup the namespace of the weblogic config.xml file
    Map<String, String> m = new HashMap<String, String>();
    m.put("weblogic", "http://www.bea.com/ns/weblogic/920/domain");
    m.put("jdbc", "http://www.bea.com/ns/weblogic/90");
    NamespaceContext ctx = new SimpleNamespaceContext(m);
    XMLUnit.setXpathNamespaceContext(ctx);

    this.fsManager = new StandardFileSystemManager();
    this.fsManager.init();
    this.fileHandler = new VFSFileHandler(this.fsManager);
    this.fileHandler.delete(BEA_HOME);
    this.fileHandler.createDirectory(DOMAIN_HOME, "");
    this.xmlUtil = new XmlUtils(this.fileHandler);

    LocalConfiguration configuration = new WebLogic9xStandaloneLocalConfiguration(DOMAIN_HOME);
    this.container = new WebLogic9xInstalledLocalContainer(configuration);
    this.container.setHome(WL_HOME);
    this.container.setFileHandler(this.fileHandler);
    this.deployer = new WebLogic9x10x103x12xConfigXmlInstalledLocalDeployer(container);
    this.resourceUtils = new ResourceUtils();
    this.document = xmlUtil.createDocument();
    this.domain = document.createElement("domain");
    domain.setAttribute("xmlns", "http://www.bea.com/ns/weblogic/920/domain");
    domain.setAttribute("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance");
    domain.setAttribute("xsi:schemaLocation",
            "http://www.bea.com/ns/weblogic/920/domain " + "http://www.bea.com/ns/weblogic/920/domain.xsd");
    this.document.appendChild(this.domain);
    Element configurationVersion = document.createElement("configuration-version");
    this.domain.appendChild(configurationVersion);
    Element adminServerName = document.createElement("admin-server-name");
    this.domain.appendChild(adminServerName);
}

From source file:org.codehaus.cargo.container.weblogic.WebLogic9x10x103x12xCopyingInstalledLocalDeployerTest.java

/**
 * Creates the test file system manager and the container. {@inheritDoc}
 * @throws Exception If anything goes wrong.
 *//*from   ww  w. ja v  a2  s  . co  m*/
@Override
protected void setUp() throws Exception {
    super.setUp();

    this.fsManager = new StandardFileSystemManager();
    this.fsManager.init();
    this.fileHandler = new VFSFileHandler(this.fsManager);
    this.fileHandler.delete(BEA_HOME);
    this.fileHandler.createDirectory(DOMAIN_HOME, "");

    LocalConfiguration configuration = new WebLogic9xStandaloneLocalConfiguration(DOMAIN_HOME);
    this.container = new WebLogic9xInstalledLocalContainer(configuration);
    this.container.setHome(WL_HOME);
    this.container.setFileHandler(this.fileHandler);
    this.deployer = new WebLogic9x10x103x12xCopyingInstalledLocalDeployer(container);
}

From source file:org.codehaus.cargo.container.weblogic.WebLogic9xConfigXmlInstalledLocalDeployerTest.java

/**
 * {@inheritDoc}/*from w w  w  . j a v  a 2 s  .c  o  m*/
 * 
 * @see junit.framework.TestCase#setUp()
 */
protected void setUp() throws Exception {
    super.setUp();
    // setup the namespace of the weblogic config.xml file
    Map m = new HashMap();
    m.put("weblogic", "http://www.bea.com/ns/weblogic/920/domain");
    m.put("jdbc", "http://www.bea.com/ns/weblogic/90");
    NamespaceContext ctx = new SimpleNamespaceContext(m);
    XMLUnit.setXpathNamespaceContext(ctx);

    this.fsManager = new StandardFileSystemManager();
    this.fsManager.init();
    this.fileHandler = new VFSFileHandler(this.fsManager);
    this.fileHandler.delete(BEA_HOME);

    LocalConfiguration configuration = new WebLogic9xStandaloneLocalConfiguration(DOMAIN_HOME);
    this.container = new WebLogic9xInstalledLocalContainer(configuration);
    this.container.setHome(WL_HOME);
    this.container.setFileHandler(this.fileHandler);
    this.deployer = new WebLogic9xConfigXmlInstalledLocalDeployer(container);
    resourceUtils = new ResourceUtils();
    this.document = DocumentHelper.createDocument();
    this.domain = document.addElement("domain");
    document.setRootElement(domain);
    domain.addNamespace("", "http://www.bea.com/ns/weblogic/920/domain");
    QName configurationVersionQ = new QName("configuration-version",
            new Namespace("", "http://www.bea.com/ns/weblogic/920/domain"));
    domain.addElement(configurationVersionQ);
    QName adminServerNameQ = new QName("admin-server-name",
            new Namespace("", "http://www.bea.com/ns/weblogic/920/domain"));
    domain.addElement(adminServerNameQ);

}

From source file:org.codehaus.cargo.container.weblogic.WebLogicCopyingInstalledLocalDeployerTest.java

/**
 * {@inheritDoc}// w  ww. j  a va2 s  .com
 * 
 * @see junit.framework.TestCase#setUp()
 */
protected void setUp() throws Exception {
    super.setUp();

    this.fsManager = new StandardFileSystemManager();
    this.fsManager.init();
    this.fileHandler = new VFSFileHandler(this.fsManager);
    this.fileHandler.delete(BEA_HOME);

    LocalConfiguration configuration = new WebLogic9xStandaloneLocalConfiguration(DOMAIN_HOME);
    this.container = new WebLogic9xInstalledLocalContainer(configuration);
    this.container.setHome(WL_HOME);
    this.deployer = new WebLogicCopyingInstalledLocalDeployer(container);
}

From source file:org.codehaus.cargo.container.wildfly.internal.configuration.commands.wildfly9.domain.SystemPropertyScriptCommandTest.java

/**
 * Creates the test file system manager and the container. {@inheritDoc}
 * @throws Exception If anything goes wrong.
 *///from www  .  ja  v  a 2s . com
@Override
protected void setUp() throws Exception {
    super.setUp();

    this.fsManager = new StandardFileSystemManager();
    this.fsManager.init();
    this.fileHandler = new VFSFileHandler(this.fsManager);
    this.fileHandler.createDirectory(CONTAINER_HOME + "/server", SERVER_CONFIG);

    configuration = new WildFly9xStandaloneLocalConfiguration(CONFIGURATION_HOME);
}

From source file:org.codehaus.cargo.module.JarArchiveTest.java

/**
 * Creates the file system manager. {@inheritDoc}
 * @throws Exception If anything goes wrong.
 *//*from   w  ww.j a  v  a  2  s. c o  m*/
@Override
protected void setUp() throws Exception {
    super.setUp();

    this.fsManager = new StandardFileSystemManager();
    ((StandardFileSystemManager) this.fsManager).init();
}

From source file:org.codehaus.cargo.util.DefaultXmlFileBuilderTest.java

/**
 * Creates the various XML test elements. {@inheritDoc}
 * @throws Exception If anything goes wrong.
 *///from  ww w . j a  v a  2  s  .c o  m
@Override
public void setUp() throws Exception {
    this.fsManager = new StandardFileSystemManager();
    ((StandardFileSystemManager) this.fsManager).init();
    this.fileHandler = new VFSFileHandler(this.fsManager);
    util = new XmlUtils(fileHandler);
    manager = new DefaultXmlFileBuilder(fileHandler);
    namespaces = new HashMap<String, String>();
    namespaces.put("weblogic", "http://www.bea.com/ns/weblogic/920/domain");
    NamespaceContext ctx = new SimpleNamespaceContext(namespaces);
    XMLUnit.setXpathNamespaceContext(ctx);
    DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();
    builder = domFactory.newDocumentBuilder();
}

From source file:org.codehaus.cargo.util.Dom4JXmlFileBuilderTest.java

/**
 * Creates the various XML test elements. {@inheritDoc}
 * @throws Exception If anything goes wrong.
 */// ww w. ja va 2s  .  co  m
@Override
public void setUp() throws Exception {
    this.fsManager = new StandardFileSystemManager();
    ((StandardFileSystemManager) this.fsManager).init();
    this.fileHandler = new VFSFileHandler(this.fsManager);
    util = new Dom4JUtil(fileHandler);
    manager = new Dom4JXmlFileBuilder(fileHandler);
    namespaces = new HashMap<String, String>();
    namespaces.put("weblogic", "http://www.bea.com/ns/weblogic/920/domain");
    NamespaceContext ctx = new SimpleNamespaceContext(namespaces);
    XMLUnit.setXpathNamespaceContext(ctx);
}