Package com.iplanet.ums
Class SearchTemplate
- java.lang.Object
-
- com.iplanet.ums.Template
-
- com.iplanet.ums.SearchTemplate
-
- All Implemented Interfaces:
Serializable
,Cloneable
public class SearchTemplate extends Template
Represents templates for searching functionality. SearchTemplate serves the purpose of defining guidelines in a search. It defines the search filter and attributes to be returned in a search query. Reusability and flexibility are serving goals in SearchTemplate.- See Also:
Template
,CreationTemplate
, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SearchTemplate()
Default constructor for deserializationSearchTemplate(String name, AttrSet attrSet, String filter)
Creates a template with an attribute set and a search filter.SearchTemplate(String name, String[] attributeNames, String filter)
Creates a template with an array of attributes and a search filter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAttributeName(String attributeName)
Adds the attribute name to the list of attributes to be returned on a search.void
addAttributeNames(String[] attributeNames)
Adds the attribute names to the list of attributes to be returned on a search.Object
clone()
Returns a copy of the template.String[]
getAttributeNames()
Gets a list of attribute names defined in the object.String
getSearchFilter()
Gets the filter expression used to search for objects of this type.void
removeAttributeName(String attributeName)
Removes the attribute name from the list of attributes to be returned on a search.void
removeAttributeNames(String[] attributeNames)
Removes the attribute names from the list of attributes to be returned on a search.void
setAttributeNames(String[] attributeNames)
Sets the attributes to be returned on a search.void
setSearchFilter(String filter)
Sets the filter expression used to search for objects of this type, for example, "objectclass=inetorgperson" or "(&(objectclass=inetorgperson)(ou=accounting))"String
toString()
Render the object.
-
-
-
Constructor Detail
-
SearchTemplate
public SearchTemplate()
Default constructor for deserialization
-
SearchTemplate
public SearchTemplate(String name, AttrSet attrSet, String filter)
Creates a template with an attribute set and a search filter. The Attribute set contains attributes to be returned on a search. If the search filter is null, then "objectclass=*" is assumed (return all objects).- Parameters:
name
- Template nameattrSet
- set of attributesfilter
- search filter
-
SearchTemplate
public SearchTemplate(String name, String[] attributeNames, String filter)
Creates a template with an array of attributes and a search filter. The array of attributes contains attributes to be returned on a search. If the search filter is null, then "objectclass=*" is assumed (return all objects).- Parameters:
name
- Template nameattributeNames
- an array of attribute namesfilter
- search filter
-
-
Method Detail
-
setSearchFilter
public void setSearchFilter(String filter)
Sets the filter expression used to search for objects of this type, for example, "objectclass=inetorgperson" or "(&(objectclass=inetorgperson)(ou=accounting))"- Parameters:
filter
- A UMS search expression (LDAP syntax)
-
getSearchFilter
public String getSearchFilter()
Gets the filter expression used to search for objects of this type.- Returns:
- a UMS search expression (LDAP syntax)
-
setAttributeNames
public void setAttributeNames(String[] attributeNames)
Sets the attributes to be returned on a search.- Parameters:
attributeNames
- The attribute names to be returned
-
addAttributeName
public void addAttributeName(String attributeName)
Adds the attribute name to the list of attributes to be returned on a search.- Parameters:
attributeName
- The attribute name to be added
-
addAttributeNames
public void addAttributeNames(String[] attributeNames)
Adds the attribute names to the list of attributes to be returned on a search.- Parameters:
attributeNames
- The attribute names to be added
-
removeAttributeName
public void removeAttributeName(String attributeName)
Removes the attribute name from the list of attributes to be returned on a search.- Parameters:
attributeName
- The attribute name to be removed
-
removeAttributeNames
public void removeAttributeNames(String[] attributeNames)
Removes the attribute names from the list of attributes to be returned on a search.- Parameters:
attributeNames
- The attribute names to be removed
-
getAttributeNames
public String[] getAttributeNames()
Gets a list of attribute names defined in the object.- Returns:
- Names of all attributes defined
-
clone
public Object clone()
Returns a copy of the template.
-
-