org.apache.directory.shared.ldap.codec.controls.search.pagedSearch
Class PagedResultsContainer

java.lang.Object
  extended by org.apache.directory.shared.asn1.ber.AbstractContainer
      extended by org.apache.directory.shared.ldap.codec.controls.search.pagedSearch.PagedResultsContainer
All Implemented Interfaces:
Asn1Container

public class PagedResultsContainer
extends AbstractContainer

A container for the Paged Search Control.

Author:
Apache Directory Project

Field Summary
 
Fields inherited from class org.apache.directory.shared.asn1.ber.AbstractContainer
decodeBytes, grammar, stateStack
 
Constructor Summary
PagedResultsContainer(LdapCodecService codec)
          Creates a new PagedSearchControl container object.
PagedResultsContainer(LdapCodecService codec, PagedResults control)
          Creates a new PagedSearchControl container object to contain a PagedResults Control, which is optionally decorated if is not a decorator already.
 
Method Summary
 void clean()
          Clean the container
 void decorate(PagedResults control)
           
 PagedResultsDecorator getDecorator()
           
 void setPagedSearchControl(PagedResultsDecorator control)
          Set a PagedSearchControl Object into the container.
 
Methods inherited from class org.apache.directory.shared.asn1.ber.AbstractContainer
getCurrentTLV, getDecodeBytes, getGrammar, getMaxPDUSize, getNewTlvId, getParentTLV, getState, getStream, getTlvId, getTransition, incrementDecodeBytes, isGathering, isGrammarEndAllowed, rewind, setCurrentTLV, setGathering, setGrammarEndAllowed, setMaxPDUSize, setParentTLV, setState, setStream, setTransition, updateParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PagedResultsContainer

public PagedResultsContainer(LdapCodecService codec)
Creates a new PagedSearchControl container object. We will store one grammar, it's enough ...

Parameters:
codec - The encoder decoder for this container

PagedResultsContainer

public PagedResultsContainer(LdapCodecService codec,
                             PagedResults control)
Creates a new PagedSearchControl container object to contain a PagedResults Control, which is optionally decorated if is not a decorator already. If it is a decorator then it is used as the decorator for this container.

Parameters:
codec - The encoder decoder for this container
control - A PagedResults Control to optionally be wrapped.
Method Detail

getDecorator

public PagedResultsDecorator getDecorator()
Returns:
Returns the paged search control.

decorate

public void decorate(PagedResults control)

setPagedSearchControl

public void setPagedSearchControl(PagedResultsDecorator control)
Set a PagedSearchControl Object into the container. It will be completed by the ldapDecoder.

Parameters:
control - the PagedSearchControl to set.

clean

public void clean()
Clean the container

Overrides:
clean in class AbstractContainer


Copyright © 2003-2011 The Apache Software Foundation. All Rights Reserved.