1 23 24 29 30 package com.sun.enterprise.deployment.backend; 31 32 37 public class DeploymentCommand 38 { 39 private DeploymentCommand(String name) 40 { 41 this.name = name; 42 } 43 44 46 public static DeploymentCommand valueOf(String s) 47 { 48 if(s.equals(DEPLOY.toString())) 49 return DEPLOY; 50 if(s.equals(UNDEPLOY.toString())) 51 return UNDEPLOY; 52 if(s.equals(REDEPLOY.toString())) 53 return REDEPLOY; 54 55 return null; 56 } 57 58 59 61 public String toString() 62 { 63 return name; 64 } 65 66 68 public static DeploymentCommand DEPLOY = new DeploymentCommand("Deploy"); 69 public static DeploymentCommand UNDEPLOY = new DeploymentCommand("Undeploy"); 70 protected static DeploymentCommand REDEPLOY = new DeploymentCommand("Redeploy"); 71 private String name; 72 } 73 74 | Popular Tags |