Your browser does not support JavaScript and this site utilizes JavaScript to build content and provide links to additional information. You should either enable JavaScript in your browser settings or use a browser that supports JavaScript in order to take full advantage of this site.
1 20 21 package org.apache.directory.ldapstudio.dsmlv2.reponse; 22 23 24 import java.util.List ; 25 26 import org.apache.directory.ldapstudio.dsmlv2.DsmlDecorator; 27 import org.apache.directory.shared.ldap.codec.LdapMessage; 28 import org.apache.directory.shared.ldap.codec.search.SearchResultReference; 29 import org.apache.directory.shared.ldap.codec.util.LdapURL; 30 import org.dom4j.Element; 31 32 33 39 public class SearchResultReferenceDsml extends LdapResponseDecorator implements DsmlDecorator 40 { 41 47 public SearchResultReferenceDsml( LdapMessage ldapMessage ) 48 { 49 super( ldapMessage ); 50 } 51 52 53 56 public int getMessageType() 57 { 58 return instance.getMessageType(); 59 } 60 61 62 65 public Element toDsml( Element root ) 66 { 67 Element element = root.addElement( "searchResultReference" ); 68 SearchResultReference searchResultReference = ( SearchResultReference ) instance; 69 70 List <LdapURL> refsList = searchResultReference.getSearchResultReferences(); 72 for ( int i = 0; i < refsList.size(); i++ ) 73 { 74 element.addElement( "ref" ).addText( refsList.get( i ).toString() ); 75 } 76 77 return element; 78 } 79 } 80
| Popular Tags
|