1 8 9 package org.uddi4j.request; 10 11 import org.uddi4j.UDDIElement; 12 import org.uddi4j.UDDIException; 13 import org.uddi4j.response.CompletionStatus; 14 import org.uddi4j.util.AuthInfo; 15 import org.w3c.dom.Element ; 16 import org.w3c.dom.NodeList ; 17 18 44 public class GetAssertionStatusReport extends UDDIElement { 45 public static final String UDDI_TAG = "get_assertionStatusReport"; 46 47 protected Element base = null; 48 49 AuthInfo authInfo = null; 50 51 CompletionStatus completionStatus = null; 52 53 59 public GetAssertionStatusReport() { 60 } 61 62 72 public GetAssertionStatusReport(Element base) throws UDDIException { 73 super(base); 75 NodeList nl = null; 76 nl = getChildElementsByTagName(base, AuthInfo.UDDI_TAG); 77 if (nl.getLength() > 0) { 78 authInfo = new AuthInfo((Element)nl.item(0)); 79 } 80 if (nl.getLength() > 0) { 81 completionStatus = new CompletionStatus((Element)nl.item(0)); 82 } 83 } 84 85 90 public GetAssertionStatusReport(String authInfo) { 91 this.authInfo = new AuthInfo(authInfo); 92 } 93 94 100 public GetAssertionStatusReport(String authInfo, 101 String completion) { 102 this.authInfo = new AuthInfo(authInfo); 103 this.completionStatus = new CompletionStatus(); 104 this.completionStatus.setText(completion); 105 } 106 107 113 public GetAssertionStatusReport(String authInfo, 114 CompletionStatus completion) { 115 this.authInfo = new AuthInfo(authInfo); 116 this.completionStatus = completion; 117 } 118 119 public CompletionStatus getCompletionStatus() { 120 return completionStatus; 121 } 122 123 public void setCompletionStatus(CompletionStatus status) { 124 completionStatus = status; 125 } 126 127 public String getCompletionStatusString() { 128 if(completionStatus!=null) 129 return completionStatus.getText(); 130 else 131 return null; 132 } 133 134 public void setCompletionStatusString(String s) { 135 completionStatus = new CompletionStatus(); 136 completionStatus.setText(s); 137 } 138 139 public AuthInfo getAuthInfo() { 140 return authInfo; 141 } 142 143 public void setAuthInfo(AuthInfo s) { 144 authInfo = s; 145 } 146 147 public String getAuthInfoString() { 148 if(authInfo != null) 149 return authInfo.getText(); 150 else 151 return null; 152 } 153 154 public void setAuthInfo(String s) { 155 authInfo = new AuthInfo(); 156 authInfo.setText(s); 157 } 158 159 168 public void saveToXML(Element parent) { 169 base = parent.getOwnerDocument().createElement(UDDI_TAG); 170 base.setAttribute("generic", UDDIElement.GENERIC); 172 base.setAttribute("xmlns", UDDIElement.XMLNS); 173 if (authInfo!=null) { 174 authInfo.saveToXML(base); 175 } 176 if (completionStatus!=null) { 177 completionStatus.saveToXML(base); 178 } 179 180 parent.appendChild(base); 181 } 182 } 183 | Popular Tags |