1 23 package com.sun.enterprise.deployment; 24 25 import java.util.Vector ; 26 import java.util.Iterator ; 27 import java.util.Observable ; 28 29 35 public class DeploymentExtensionDescriptor extends Observable { 36 37 String nameSpace=null; 38 boolean mustUnderstand=false; 39 Vector elements; 40 41 42 public DeploymentExtensionDescriptor() { 43 elements = new Vector (); 44 } 45 46 50 public void setNameSpace(String nameSpace) { 51 this.nameSpace = nameSpace; 52 changed(); 53 } 54 55 58 public String getNameSpace() { 59 return nameSpace; 60 } 61 62 65 public void setMustUnderstand(boolean mustUnderstand) { 66 this.mustUnderstand = mustUnderstand; 67 changed(); 68 } 69 70 73 public boolean getMustUnderstand() { 74 return mustUnderstand; 75 } 76 77 82 public void addElement(ExtensionElementDescriptor newElement) { 83 elements.add(newElement); 84 changed(); 85 } 86 87 90 public Iterator elements() { 91 return elements.iterator(); 92 } 93 94 97 public void print(StringBuffer toStringBuffer) { 98 toStringBuffer.append("namespace ").append(nameSpace); 99 toStringBuffer.append("\nmustUnderstand = ").append(mustUnderstand); 100 for(Iterator itr = elements();itr.hasNext();) { 101 toStringBuffer.append("\nelement = ").append(itr.next()); 102 } 103 } 104 105 108 private void changed() { 109 setChanged(); 110 notifyObservers(); 111 } 112 113 } 114 | Popular Tags |