Search in sources :

Example 1 with AppClientDeploymentDescriptorFile

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

the class AppClientCheckMgrImpl method check.

/**
 * Check method introduced for WebServices integration
 *
 * @param descriptor appclient descriptor
 */
public void check(Descriptor descriptor) throws Exception {
    // run persistence tests first.
    checkPersistenceUnits(ApplicationClientDescriptor.class.cast(descriptor));
    // An ApplicationClient can have WebService References
    checkWebServicesClient(descriptor);
    if (verifierFrameworkContext.isPartition() && !verifierFrameworkContext.isAppClient())
        return;
    // run the ParseDD test
    if (getSchemaVersion(descriptor).compareTo("1.4") < 0) {
        // NOI18N
        AppClientDeploymentDescriptorFile ddf = new AppClientDeploymentDescriptorFile();
        File file = new File(getAbstractArchiveUri(descriptor), ddf.getDeploymentDescriptorPath());
        FileInputStream is = new FileInputStream(file);
        try {
            if (is != null) {
                Result result = new ParseDD().validateAppClientDescriptor(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 : ParseDD(com.sun.enterprise.tools.verifier.tests.dd.ParseDD) ApplicationClientDescriptor(com.sun.enterprise.deployment.ApplicationClientDescriptor) AppClientDeploymentDescriptorFile(com.sun.enterprise.deployment.io.AppClientDeploymentDescriptorFile) AppClientDeploymentDescriptorFile(com.sun.enterprise.deployment.io.AppClientDeploymentDescriptorFile) File(java.io.File) FileInputStream(java.io.FileInputStream) Result(com.sun.enterprise.tools.verifier.Result)

Aggregations

ApplicationClientDescriptor (com.sun.enterprise.deployment.ApplicationClientDescriptor)1 AppClientDeploymentDescriptorFile (com.sun.enterprise.deployment.io.AppClientDeploymentDescriptorFile)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