/** * {@inheritDoc} */ @Override public Referral getReferral() { return getDecorated().getReferral(); }
/** * {@inheritDoc} */ @Override public Referral getReferral() { return getDecorated().getReferral(); }
/** * {@inheritDoc} */ @Override public Referral getReferral() { return getDecorated().getReferral(); }
/** * {@inheritDoc} */ @Override public Referral getReferral() { return getDecorated().getReferral(); }
/** * Checks to see if an object is equal to this SearchResponseReference stub. * * @param obj * the object to compare to this response stub * @return true if the objects are equivalent false otherwise */ @Override public boolean equals( Object obj ) { if ( obj == this ) { return true; } if ( !super.equals( obj ) ) { return false; } SearchResultReference resp = ( SearchResultReference ) obj; if ( referral == null ) { return resp.getReferral() == null; } return referral.equals( resp.getReferral() ); }
/** * Checks to see if an object is equal to this SearchResponseReference stub. * * @param obj * the object to compare to this response stub * @return true if the objects are equivalent false otherwise */ @Override public boolean equals( Object obj ) { if ( obj == this ) { return true; } if ( !super.equals( obj ) ) { return false; } SearchResultReference resp = ( SearchResultReference ) obj; if ( referral == null ) { return resp.getReferral() == null; } return referral.equals( resp.getReferral() ); }
/** * Checks to see if an object is equal to this SearchResponseReference stub. * * @param obj * the object to compare to this response stub * @return true if the objects are equivalent false otherwise */ @Override public boolean equals( Object obj ) { if ( obj == this ) { return true; } if ( !super.equals( obj ) ) { return false; } SearchResultReference resp = ( SearchResultReference ) obj; if ( referral == null ) { return resp.getReferral() == null; } return referral.equals( resp.getReferral() ); }
/** * Get the list of references * * @return An ArrayList of SearchResultReferences */ public Collection<String> getSearchResultReferences() { return getDecorated().getReferral().getLdapUrls(); }
/** * {@inheritDoc} */ @Override public Referral getReferral() throws LdapException { if ( isReferral() ) { return ( ( SearchResultReference ) response ).getReferral(); } throw new LdapException(); }
/** * {@inheritDoc} */ @Override public Referral getReferral() throws LdapException { if ( isReferral() ) { return ( ( SearchResultReference ) response ).getReferral(); } throw new LdapException(); }
/** * {@inheritDoc} */ @Override public Referral getReferral() throws LdapException { if ( isReferral() ) { return ( ( SearchResultReference ) response ).getReferral(); } throw new LdapException(); }
/** * Add a new reference to the list. * * @param searchResultReference The search result reference */ public void addSearchResultReference( LdapUrl searchResultReference ) { getDecorated().getReferral().addLdapUrl( searchResultReference.toString() ); }
Referral referral = searchResultReference.getReferral();
/** * Processes the response controls on the supplied reference and returns a corresponding search item. * * @param ref to process * * @return search item */ protected SearchItem processSearchResultReference(final SearchResultReference ref) { logger.trace("reading search reference: {}", ref); final Referral r = ref.getReferral(); ResponseControl[] respControls = null; if (ref.getControls() != null && ref.getControls().size() > 0) { respControls = processResponseControls(config.getControlProcessor(), request.getControls(), ref); } final SearchReference sr = new SearchReference(ref.getMessageId(), respControls, r.getLdapUrls()); return new SearchItem(sr); }
/** * {@inheritDoc} */ @Override public Entry getEntry() throws LdapException { if ( isEntry() ) { return ( ( SearchResultEntry ) response ).getEntry(); } if ( isReferral() ) { Referral referral = ( ( SearchResultReference ) response ).getReferral(); throw new LdapReferralException( referral.getLdapUrls() ); } throw new LdapException(); }
/** * {@inheritDoc} */ @Override public Entry getEntry() throws LdapException { if ( isEntry() ) { return ( ( SearchResultEntry ) response ).getEntry(); } if ( isReferral() ) { Referral referral = ( ( SearchResultReference ) response ).getReferral(); throw new LdapReferralException( referral.getLdapUrls() ); } throw new LdapException(); }
/** * {@inheritDoc} */ @Override public Entry getEntry() throws LdapException { if ( isEntry() ) { return ( ( SearchResultEntry ) response ).getEntry(); } if ( isReferral() ) { Referral referral = ( ( SearchResultReference ) response ).getReferral(); throw new LdapReferralException( referral.getLdapUrls() ); } throw new LdapException(); }
/** * {@inheritDoc} */ @Override public Element toDsml( Element root ) { Element element; if ( root != null ) { element = root.addElement( SEARCH_RESULT_REFERENCE_TAG ); } else { element = new DefaultElement( SEARCH_RESULT_REFERENCE_TAG ); } // Adding References for ( String url : getDecorated().getReferral().getLdapUrls() ) { element.addElement( "ref" ).addText( url ); } return element; }
throw new LdapReferralException( ( ( SearchResultReference ) response ).getReferral().getLdapUrls() );
/** * {@inheritDoc} */ @Override public void action( Dsmlv2Container container ) throws XmlPullParserException { SearchResponse searchResponse = ( SearchResponse ) container.getBatchResponse().getCurrentResponse().getDecorated(); SearchResultReference searchResultReference = searchResponse.getCurrentSearchResultReference(); XmlPullParser xpp = container.getParser(); try { String nextText = xpp.nextText(); if ( !Strings.isEmpty( nextText ) ) { LdapUrl ldapUrl = new LdapUrl( nextText ); searchResultReference.getReferral().addLdapUrl( ldapUrl.toString() ); } } catch ( IOException ioe ) { throw new XmlPullParserException( I18n.err( I18n.ERR_03008_UNEXPECTED_ERROR, ioe.getMessage() ), xpp, ioe ); } catch ( LdapURLEncodingException luee ) { throw new XmlPullParserException( luee.getMessage(), xpp, luee ); } } };