1 23 package com.sun.enterprise.tools.verifier.tests.web; 24 25 import com.sun.enterprise.tools.verifier.tests.web.WebTest; 26 import com.sun.enterprise.deployment.*; 27 import com.sun.enterprise.tools.verifier.*; 28 import com.sun.enterprise.tools.verifier.tests.*; 29 30 35 public class WebName extends WebTest implements WebCheck { 36 37 38 47 public Result check(WebBundleDescriptor descriptor) { 48 49 Result result = getInitializedResult(); 50 ComponentNameConstructor compName = getVerifierContext().getComponentNameConstructor(); 51 String webName = descriptor.getName(); 52 53 if (webName.length() > 0) { 54 result.addGoodDetails(smh.getLocalString 56 ("tests.componentNameConstructor", 57 "For [ {0} ]", 58 new Object [] {compName.toString()})); 59 result.passed 60 (smh.getLocalString 61 (getClass().getName() + ".passed", 62 "Web-App display name is : [ {0} ]", 63 new Object [] {webName})); 64 } else { 65 result.addNaDetails(smh.getLocalString 67 ("tests.componentNameConstructor", 68 "For [ {0} ]", 69 new Object [] {compName.toString()})); 70 result.notApplicable 71 (smh.getLocalString 72 (getClass().getName() + ".failed", 73 "Not Applicable: Web-App display name is not defined.")); 74 } 75 return result; 76 } 77 } 78 | Popular Tags |