Java Code Examples for org.apache.cxf.helpers.FileUtils#removeDir()

The following examples show how to use org.apache.cxf.helpers.FileUtils#removeDir() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TrustedAuthorityValidatorTest.java    From cxf with Apache License 2.0 6 votes vote down vote up
@Before
public void setUpCertificateRepo() throws CertificateException {
    File storageDir = new File("target/teststore_trusted_authority_validator");
    FileUtils.removeDir(storageDir);
    storageDir.mkdirs();
    certificateRepo = new FileCertificateRepo("target/teststore_trusted_authority_validator");

    UseKeyWithType rootKey = new UseKeyWithType();
    rootKey.setApplication(Applications.PKIX.getUri());
    String subjectDN = certificateRoot.getSubjectX500Principal().getName();
    rootKey.setIdentifier(subjectDN);
    certificateRepo.saveTrustedCACertificate(certificateRoot, rootKey);

    UseKeyWithType aliceKey = new UseKeyWithType();
    aliceKey.setApplication(Applications.PKIX.getUri());
    subjectDN = certificateAlice.getSubjectX500Principal().getName();
    aliceKey.setIdentifier(subjectDN);
    certificateRepo.saveCACertificate(certificateAlice, aliceKey);
}
 
Example 2
Source File: AbstractTomcatServer.java    From cxf with Apache License 2.0 5 votes vote down vote up
public void tearDown() throws Exception {
    super.tearDown();

    if (server != null) {
        server.stop();
        server.destroy();
        server = null;
        FileUtils.removeDir(base.toFile());
    }
}
 
Example 3
Source File: AbstractTomcatServer.java    From cxf with Apache License 2.0 5 votes vote down vote up
public void tearDown() throws Exception {
    super.tearDown();

    if (server != null) {
        server.stop();
        server.destroy();
        server = null;
        FileUtils.removeDir(base.toFile());
    }
}
 
Example 4
Source File: TrustedAuthorityValidatorCRLTest.java    From cxf with Apache License 2.0 5 votes vote down vote up
@Before
public void setUpCertificateRepo() throws CertificateException {
    File storageDir = new File("target/teststore_trusted_authority_validator");
    FileUtils.removeDir(storageDir);
    storageDir.mkdirs();
    certificateRepo = new FileCertificateRepo("target/teststore_trusted_authority_validator");

    UseKeyWithType rootKey = new UseKeyWithType();
    rootKey.setApplication(Applications.PKIX.getUri());
    String subjectDN = certificateRoot.getSubjectX500Principal().getName();
    rootKey.setIdentifier(subjectDN);
    certificateRepo.saveTrustedCACertificate(certificateRoot, rootKey);

    UseKeyWithType aliceKey = new UseKeyWithType();
    aliceKey.setApplication(Applications.PKIX.getUri());
    subjectDN = certificateWss40Rev.getSubjectX500Principal().getName();
    aliceKey.setIdentifier(subjectDN);
    certificateRepo.saveCACertificate(certificateWss40Rev, aliceKey);

    UseKeyWithType bobKey = new UseKeyWithType();
    bobKey.setApplication(Applications.PKIX.getUri());
    subjectDN = certificateWss40.getSubjectX500Principal().getName();
    bobKey.setIdentifier(subjectDN);
    certificateRepo.saveCACertificate(certificateWss40, bobKey);

    UseKeyWithType crlKey = new UseKeyWithType();
    crlKey.setApplication(Applications.PKIX.getUri());
    crlKey.setIdentifier(crl.getIssuerX500Principal().getName());
    certificateRepo.saveCRL(crl, crlKey);
}
 
Example 5
Source File: IDLToWSDLTest.java    From cxf with Apache License 2.0 5 votes vote down vote up
@After
public void tearDown() throws Exception {
    // super.tearDown();
    try {
        FileUtils.removeDir(output);
    } catch (Exception e) {
        //ignore
    }
    output = null;
}
 
Example 6
Source File: JavaToWSTest.java    From cxf with Apache License 2.0 5 votes vote down vote up
@After
public void tearDown() {
    super.tearDown();
    System.setProperty("java.class.path", cp);
    FileUtils.removeDir(output);
    output = null;
}
 
Example 7
Source File: AegisTest.java    From cxf with Apache License 2.0 5 votes vote down vote up
@After
public void tearDown() {
    super.tearDown();
    System.setProperty("java.class.path", cp);
    FileUtils.removeDir(output);
    output = null;
}