1 17 package org.apache.geronimo.webservices; 18 19 import java.util.ArrayList ; 20 21 public class Handler { 22 private String handlerName; 23 private String handlerClass; 24 private ArrayList soapHeaderList = new ArrayList (); 25 private ArrayList soapRoleList = new ArrayList (); 26 27 public String getHandlerName() { 28 return handlerName; 29 } 30 31 public void setHandlerName(String handlerName) { 32 this.handlerName = handlerName; 33 } 34 35 public String getHandlerClass() { 36 return handlerClass; 37 } 38 39 public void setHandlerClass(String handlerClass) { 40 this.handlerClass = handlerClass; 41 } 42 43 44 public void addSoapHeader(String soapHeader) throws IndexOutOfBoundsException { 45 soapHeaderList.add(soapHeader); 46 } 47 48 public void addSoapHeader(int index, String soapHeader) throws IndexOutOfBoundsException { 49 soapHeaderList.add(index, soapHeader); 50 } 51 52 public boolean removeSoapHeader(String soapHeader) { 53 return soapHeaderList.remove(soapHeader); 54 } 55 56 public String getSoapHeader(int index) throws IndexOutOfBoundsException { 57 if ((index < 0) || (index > soapHeaderList.size())) { 58 throw new IndexOutOfBoundsException (); 59 } 60 return (String ) soapHeaderList.get(index); 61 } 62 63 public String [] getSoapHeader() { 64 int size = soapHeaderList.size(); 65 String [] mArray = new String [size]; 66 for (int index = 0; index < size; index++) { 67 mArray[index] = (String ) soapHeaderList.get(index); 68 } 69 return mArray; 70 } 71 72 public void setSoapHeader(int index, String soapHeader) throws IndexOutOfBoundsException { 73 if ((index < 0) || (index > soapHeaderList.size())) { 74 throw new IndexOutOfBoundsException (); 75 } 76 soapHeaderList.set(index, soapHeader); 77 } 78 79 public void setSoapHeader(String [] soapHeaderArray) { 80 soapHeaderList.clear(); 81 for (int i = 0; i < soapHeaderArray.length; i++) { 82 String soapHeader = soapHeaderArray[i]; 83 soapHeaderList.add(soapHeader); 84 } 85 } 86 87 public void clearSoapHeader() { 88 soapHeaderList.clear(); 89 } 90 91 92 public void addSoapRole(String soapRole) throws IndexOutOfBoundsException { 93 soapRoleList.add(soapRole); 94 } 95 96 public void addSoapRole(int index, String soapRole) throws IndexOutOfBoundsException { 97 soapRoleList.add(index, soapRole); 98 } 99 100 public boolean removeSoapRole(String soapRole) { 101 return soapRoleList.remove(soapRole); 102 } 103 104 public String getSoapRole(int index) throws IndexOutOfBoundsException { 105 if ((index < 0) || (index > soapRoleList.size())) { 106 throw new IndexOutOfBoundsException (); 107 } 108 return (String ) soapRoleList.get(index); 109 } 110 111 public String [] getSoapRole() { 112 int size = soapRoleList.size(); 113 String [] mArray = new String [size]; 114 for (int index = 0; index < size; index++) { 115 mArray[index] = (String ) soapRoleList.get(index); 116 } 117 return mArray; 118 } 119 120 public void setSoapRole(int index, String soapRole) throws IndexOutOfBoundsException { 121 if ((index < 0) || (index > soapRoleList.size())) { 122 throw new IndexOutOfBoundsException (); 123 } 124 soapRoleList.set(index, soapRole); 125 } 126 127 public void setSoapRole(String [] soapRoleArray) { 128 soapRoleList.clear(); 129 for (int i = 0; i < soapRoleArray.length; i++) { 130 String soapRole = soapRoleArray[i]; 131 soapRoleList.add(soapRole); 132 } 133 } 134 135 public void clearSoapRole() { 136 soapRoleList.clear(); 137 } 138 139 140 } 141 | Popular Tags |