1 26 27 package org.objectweb.jonas_lib.deployment.xml; 28 29 33 public abstract class AbsJonasParam extends AbsElement { 34 35 38 private String paramName = null; 39 40 43 private String paramValue = null; 44 45 48 private String elementName = null; 49 50 54 protected AbsJonasParam(String ename) { 55 elementName = ename; 56 } 57 58 60 64 public void setParamName(String paramName) { 65 this.paramName = paramName; 66 } 67 68 69 73 public void setParamValue(String paramValue) { 74 this.paramValue = paramValue; 75 } 76 77 79 80 83 public String getParamName() { 84 return paramName; 85 } 86 87 88 91 public String getParamValue() { 92 return paramValue; 93 } 94 95 100 public String toXML(int indent) { 101 StringBuffer sb = new StringBuffer (); 102 sb.append(indent(indent)); 103 sb.append("<" + elementName + ">\n"); 104 105 indent += 2; 106 107 sb.append(xmlElement(paramName, "param-name", indent)); 109 110 sb.append(xmlElement(paramValue, "param-value", indent)); 112 113 indent -= 2; 114 sb.append(indent(indent)); 115 sb.append("</" + elementName + ">\n"); 116 117 return sb.toString(); 118 } 119 120 121 122 } 123 | Popular Tags |