Search in sources :

Example 1 with ConnectorDeploymentDescriptorFile

use of com.sun.enterprise.deployment.io.ConnectorDeploymentDescriptorFile in project Payara by payara.

the class ConnectorCheckMgrImpl method check.

public void check(Descriptor descriptor) throws Exception {
    // run the ParseDD test
    if (getSchemaVersion(descriptor).compareTo("1.5") < 0) {
        // NOI18N
        ConnectorDeploymentDescriptorFile ddf = new ConnectorDeploymentDescriptorFile();
        File file = new File(new File(URI.create(getAbstractArchiveUri(descriptor))), ddf.getDeploymentDescriptorPath());
        FileInputStream is = new FileInputStream(file);
        try {
            if (is != null) {
                Result result = new ParseDD().validateConnectorDescriptor(is);
                result.setComponentName(getArchiveUri(descriptor));
                setModuleName(result);
                verifierFrameworkContext.getResultManager().add(result);
            }
        } finally {
            try {
                if (is != null)
                    is.close();
            } catch (Exception e) {
            }
        }
    }
    super.check(descriptor);
}
Also used : ConnectorDeploymentDescriptorFile(com.sun.enterprise.deployment.io.ConnectorDeploymentDescriptorFile) ParseDD(com.sun.enterprise.tools.verifier.tests.dd.ParseDD) File(java.io.File) ConnectorDeploymentDescriptorFile(com.sun.enterprise.deployment.io.ConnectorDeploymentDescriptorFile) FileInputStream(java.io.FileInputStream) Result(com.sun.enterprise.tools.verifier.Result)

Aggregations

ConnectorDeploymentDescriptorFile (com.sun.enterprise.deployment.io.ConnectorDeploymentDescriptorFile)1 Result (com.sun.enterprise.tools.verifier.Result)1 ParseDD (com.sun.enterprise.tools.verifier.tests.dd.ParseDD)1 File (java.io.File)1 FileInputStream (java.io.FileInputStream)1