SearchRequestProtocolOp.java revision e8cead474d5ce2b933d931f0c4743a78e68d9cfc
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at legal-notices/CDDLv1_0.txt.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information:
* Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*
*
* Copyright 2006-2008 Sun Microsystems, Inc.
* Portions Copyright 2013-2015 ForgeRock AS
*/
/**
* This class defines the structures and methods for an LDAP search request
* protocol op, which is used to locate entries based on a set of criteria.
*/
public class SearchRequestProtocolOp
extends ProtocolOp
{
/** The typesOnly flag for this search request. */
private boolean typesOnly;
/** The alias dereferencing policy for this search request. */
/** The base DN for this search request. */
private ByteString baseDN;
/** The size limit for this search request. */
private int sizeLimit;
/** The time limit for this search request. */
private int timeLimit;
/** The filter for this search request. */
/** The set of requested attributes for this search request. */
/** The scope for this search request. */
private SearchScope scope;
/**
* Creates a new search request protocol op with the provided information.
*
* @param baseDN The base DN for this search request.
* @param scope The scope for this search request.
* @param dereferencePolicy The alias dereferencing policy for this search
* request.
* @param sizeLimit The size limit for this search request.
* @param timeLimit The time limit for this search request.
* @param typesOnly The typesOnly flag for this search request.
* @param filter The filter for this search request.
* @param attributes The set of requested attributes for this search
* request.
*/
{
this.dereferencePolicy = dereferencePolicy;
if (attributes == null)
{
}
else
{
this.attributes = attributes;
}
}
/**
* Retrieves the base DN for this search request.
*
* @return The base DN for this search request.
*/
public ByteString getBaseDN()
{
return baseDN;
}
/**
* Retrieves the scope for this search request.
*
* @return The scope for this search request.
*/
public SearchScope getScope()
{
return scope;
}
/**
* Retrieves the alias dereferencing policy for this search request.
*
* @return The alias dereferencing policy for this search request.
*/
{
return dereferencePolicy;
}
/**
* Retrieves the size limit for this search request.
*
* @return The size limit for this search request.
*/
public int getSizeLimit()
{
return sizeLimit;
}
/**
* Retrieves the time limit for this search request.
*
* @return The time limit for this search request.
*/
public int getTimeLimit()
{
return timeLimit;
}
/**
* Retrieves the value of the typesOnly flag for this search request.
*
* @return The value of tye typesOnly flag for this search request.
*/
public boolean getTypesOnly()
{
return typesOnly;
}
/**
* Retrieves the filter for this search request.
*
* @return The filter for this search request.
*/
{
return filter;
}
/**
* Retrieves the set of requested attributes for this search request. The
* returned list may be modified by the caller.
*
* @return The set of requested attributes for this search request.
*/
{
return attributes;
}
public byte getType()
{
return OP_TYPE_SEARCH_REQUEST;
}
public String getProtocolOpName()
{
return "Search Request";
}
{
{
}
}
{
{
}
}
{
for (int i=0 ; i < indent; i++)
{
}
if (attributes != null)
{
{
}
}
}
}