1 23 24 package com.sun.enterprise.tools.verifier.tests.appclient; 25 26 27 import com.sun.enterprise.tools.verifier.tests.VerifierTest; 28 import com.sun.enterprise.tools.verifier.tests.VerifierCheck; 29 import com.sun.enterprise.tools.verifier.Result; 30 import com.sun.enterprise.deployment.Descriptor; 31 import com.sun.enterprise.deployment.ApplicationClientDescriptor; 32 import com.sun.enterprise.deployment.util.ModuleDescriptor; 33 import com.sun.enterprise.util.io.FileUtils; 34 35 import java.io.File ; 36 37 43 public abstract class AppClientTest extends VerifierTest implements VerifierCheck, AppClientCheck 44 { 45 46 56 public Result check(Descriptor descriptor) { 57 return check((ApplicationClientDescriptor) descriptor); 58 } 59 60 70 public abstract Result check(ApplicationClientDescriptor descriptor); 71 72 protected String getAbstractArchiveUri(ApplicationClientDescriptor desc) { 73 String archBase = getVerifierContext().getAbstractArchive(). 74 getArchiveUri(); 75 final ModuleDescriptor moduleDescriptor = desc.getModuleDescriptor(); 76 if (moduleDescriptor.isStandalone()) { 77 return archBase; } else { 79 return archBase + File.separator + 80 FileUtils.makeFriendlyFileName(moduleDescriptor.getArchiveUri()); 81 } 82 } 83 84 } 85 | Popular Tags |