FileDocCategorySizeDatePackage
AppClientName.javaAPI DocGlassfish v2 API3779Fri May 04 22:33:28 BST 2007com.sun.enterprise.tools.verifier.tests.appclient

AppClientName

public class AppClientName extends AppClientTest implements AppClientCheck
AppClient name test. The AppClient provider must assign a display-name to each AppClient module

Fields Summary
Constructors Summary
Methods Summary
public Resultcheck(ApplicationClientDescriptor descriptor)
AppClient name test. The AppClient provider must assign a display-name to each AppClient module

param
descriptor the app-client deployment descriptor
return
Result the results for this assertion

	Result result = getInitializedResult();
	ComponentNameConstructor compName = getVerifierContext().getComponentNameConstructor();
        // String clientName = descriptor.getName();
        // get client xml display-name..
        // fix for bug # 4942905 - api changed in the DOL
        String clientName = descriptor.getDisplayName();


	if (clientName !=null && clientName.length() > 0) 
	    {
		// as long as it's not blank, test should pass
		result.addGoodDetails(smh.getLocalString
				       ("tests.componentNameConstructor",
					"For [ {0} ]",
					new Object[] {compName.toString()}));	
		result.passed(smh.getLocalString(getClass().getName() + ".passed", "AppClient display name is : [ {0} ]", new Object [] {clientName}));
	    } else {
		// it's blank, test should not pass
		result.addErrorDetails(smh.getLocalString
				       ("tests.componentNameConstructor",
					"For [ {0} ]",
					new Object[] {compName.toString()}));
		result.failed(smh.getLocalString(getClass().getName() + ".failed", "Error: AppClient display name must not be blank."));
	    }
	return result;