1 23 package com.sun.enterprise.tools.verifier.tests.appclient; 24 25 import com.sun.enterprise.deployment.*; 26 import com.sun.enterprise.tools.verifier.*; 27 import com.sun.enterprise.tools.verifier.tests.*; 28 29 33 public class AppClientName extends AppClientTest implements AppClientCheck { 34 35 36 37 46 public Result check(ApplicationClientDescriptor descriptor) { 47 Result result = getInitializedResult(); 48 ComponentNameConstructor compName = getVerifierContext().getComponentNameConstructor(); 49 String clientName = descriptor.getDisplayName(); 53 54 55 if (clientName !=null && clientName.length() > 0) 56 { 57 result.addGoodDetails(smh.getLocalString 59 ("tests.componentNameConstructor", 60 "For [ {0} ]", 61 new Object [] {compName.toString()})); 62 result.passed(smh.getLocalString(getClass().getName() + ".passed", "AppClient display name is : [ {0} ]", new Object [] {clientName})); 63 } else { 64 result.addErrorDetails(smh.getLocalString 66 ("tests.componentNameConstructor", 67 "For [ {0} ]", 68 new Object [] {compName.toString()})); 69 result.failed(smh.getLocalString(getClass().getName() + ".failed", "Error: AppClient display name must not be blank.")); 70 } 71 return result; 72 } 73 } 74 | Popular Tags |