1 /* 2 * Copyright 2017 the original author or authors. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 package org.openehealth.ipf.commons.ihe.hpd.stub.dsmlv2; 17 18 import java.util.ArrayList; 19 import java.util.List; 20 import javax.xml.bind.annotation.XmlAccessType; 21 import javax.xml.bind.annotation.XmlAccessorType; 22 import javax.xml.bind.annotation.XmlAttribute; 23 import javax.xml.bind.annotation.XmlElement; 24 import javax.xml.bind.annotation.XmlSchemaType; 25 import javax.xml.bind.annotation.XmlSeeAlso; 26 import javax.xml.bind.annotation.XmlType; 27 28 29 /** 30 * <p>Java class for LDAPResult complex type. 31 * 32 * <p>The following schema fragment specifies the expected content contained within this class. 33 * 34 * <pre> 35 * <complexType name="LDAPResult"> 36 * <complexContent> 37 * <extension base="{urn:oasis:names:tc:DSML:2:0:core}DsmlMessage"> 38 * <sequence> 39 * <element name="resultCode" type="{urn:oasis:names:tc:DSML:2:0:core}ResultCode"/> 40 * <element name="errorMessage" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> 41 * <element name="referral" type="{http://www.w3.org/2001/XMLSchema}anyURI" maxOccurs="unbounded" minOccurs="0"/> 42 * </sequence> 43 * <attribute name="matchedDN" type="{urn:oasis:names:tc:DSML:2:0:core}DsmlDN" /> 44 * </extension> 45 * </complexContent> 46 * </complexType> 47 * </pre> 48 * 49 * 50 */ 51 @XmlAccessorType(XmlAccessType.FIELD) 52 @XmlType(name = "LDAPResult", propOrder = { 53 "resultCode", 54 "errorMessage", 55 "referral" 56 }) 57 @XmlSeeAlso({ 58 ExtendedResponse.class 59 }) 60 public class LDAPResult 61 extends DsmlMessage 62 { 63 64 @XmlElement(required = true) 65 protected ResultCode resultCode; 66 protected String errorMessage; 67 @XmlSchemaType(name = "anyURI") 68 protected List<String> referral; 69 @XmlAttribute(name = "matchedDN") 70 protected String matchedDN; 71 72 /** 73 * Gets the value of the resultCode property. 74 * 75 * @return 76 * possible object is 77 * {@link ResultCode } 78 * 79 */ 80 public ResultCode getResultCode() { 81 return resultCode; 82 } 83 84 /** 85 * Sets the value of the resultCode property. 86 * 87 * @param value 88 * allowed object is 89 * {@link ResultCode } 90 * 91 */ 92 public void setResultCode(ResultCode value) { 93 this.resultCode = value; 94 } 95 96 /** 97 * Gets the value of the errorMessage property. 98 * 99 * @return 100 * possible object is 101 * {@link String } 102 * 103 */ 104 public String getErrorMessage() { 105 return errorMessage; 106 } 107 108 /** 109 * Sets the value of the errorMessage property. 110 * 111 * @param value 112 * allowed object is 113 * {@link String } 114 * 115 */ 116 public void setErrorMessage(String value) { 117 this.errorMessage = value; 118 } 119 120 /** 121 * Gets the value of the referral property. 122 * 123 * <p> 124 * This accessor method returns a reference to the live list, 125 * not a snapshot. Therefore any modification you make to the 126 * returned list will be present inside the JAXB object. 127 * This is why there is not a <CODE>set</CODE> method for the referral property. 128 * 129 * <p> 130 * For example, to add a new item, do as follows: 131 * <pre> 132 * getReferral().add(newItem); 133 * </pre> 134 * 135 * 136 * <p> 137 * Objects of the following type(s) are allowed in the list 138 * {@link String } 139 * 140 * 141 */ 142 public List<String> getReferral() { 143 if (referral == null) { 144 referral = new ArrayList<String>(); 145 } 146 return this.referral; 147 } 148 149 /** 150 * Gets the value of the matchedDN property. 151 * 152 * @return 153 * possible object is 154 * {@link String } 155 * 156 */ 157 public String getMatchedDN() { 158 return matchedDN; 159 } 160 161 /** 162 * Sets the value of the matchedDN property. 163 * 164 * @param value 165 * allowed object is 166 * {@link String } 167 * 168 */ 169 public void setMatchedDN(String value) { 170 this.matchedDN = value; 171 } 172 173 }