public interface CSOSearch
CSOSearchManager
. Once a CSOSearch is
created, the CSOSearchCondition
s, the CSOSearchScope
, the result attributes and the
CSOSortSpecifier
can be added.Modifier and Type | Interface and Description |
---|---|
static class |
CSOSearch.SearchType
Enumeration that differentiates the types of searches.
|
Modifier and Type | Method and Description |
---|---|
CSOSearchResult |
execute()
Executes the search based on the given condition and scope.
|
java.util.Collection<CSOSearchCondition> |
getConditions()
Returns the search conditions attached with the search object.
|
java.util.List<CSOSearchScope> |
getEffectiveSearchScopes()
Returns the consolidated collection of search scopes based on the
specified scopes.
|
boolean |
getMatchAnySpecifier()
Returns the value of the match-any specifier.
|
java.lang.String |
getName()
Retrieve the name given for saving the search.
|
java.util.Collection<CSOParameter> |
getParameters()
Return the collection of CSOParameter which need to be set for the
predefined report search to execute.
|
java.util.Collection<java.lang.String> |
getParameterTokens()
Returns the collection of parameter tokens which need to be set for the
predefined search to execute.
|
java.util.Collection<CentraSiteObjectAttribute> |
getResultAttributes()
Returns the search attributes which is configured already with the search.
|
CSOSearchScope |
getSearchScope()
Deprecated.
This method will be removed soon. Please use
getSearchScopes() |
java.util.List<CSOSearchScope> |
getSearchScopes()
Returns the collection of specified search scopes.
|
java.util.List<CSOSortSpecifier> |
getSortSpecifier()
Returns the assigned sort specifier to the CSOSearch.
|
CSOSearch.SearchType |
getType()
Returns the type of search {Reporting/Normal/Parameterized}.
|
boolean |
isInternal()
Tells whether the current search is a system defined reporting search or not.
|
boolean |
removeResultAttribute(CentraSiteObjectAttribute attribute)
Removes the specified
CentraSiteObjectAttribute from the search result attributes. |
boolean |
removeSearchCondition(CSOSearchCondition condition)
Removes the specified condition from the search.
|
boolean |
removeSearchScope(CSOSearchScope scope)
Removes the specified scope from the search.
|
boolean |
removeSortSpecifier(CSOSortSpecifier sortSpecifier)
Removes the specified
CSOSortSpecifier from the search. |
void |
setConditions(java.util.Collection<CSOSearchCondition> conditions)
Attach the search condition with the search object.
|
void |
setMatchAnySpecifier(boolean matchAny)
Sets the match-any specifier.
|
void |
setName(java.lang.String name)
Set the given name to the search.
|
void |
setParameter(java.lang.String paramToken,
java.util.List<java.lang.Object> paramValues)
Set the parameters for the predefined search.
|
void |
setResultAttributes(java.util.Collection<CentraSiteObjectAttribute> resultAttributes)
Sets the result attributes with the search object.
|
void |
setSearchScope(CSOSearchScope searchScope)
Deprecated.
This method will be removed soon. Please use
setSearchScopes(List) |
void |
setSearchScopes(java.util.List<CSOSearchScope> searchScopes)
Sets the collection of scopes for the search.
|
void |
setSortSpecifier(java.util.List<CSOSortSpecifier> sortSpecifiers)
Assigns the given sort specifier to the CSOSearch.
|
void |
setType(CSOSearch.SearchType searchType)
This is optional, in case of user not specified any SearchType then system treat the
search as Normal Search.
|
java.util.Collection<CSOValidationInfo> |
validate()
Validate the search, return the collection of validation objects.
|
java.lang.String getName()
void setName(java.lang.String name)
name
- the search name to setCSOSearch.SearchType getType()
CSOSearch.SearchType
instancevoid setType(CSOSearch.SearchType searchType)
searchType
- The CSOSearch.SearchType
indicating the type of search to performCSOSearchResult execute() throws CLLException
CSOSearchResult
CLLException
- If an error occurs while executing the searchjava.util.Collection<CSOSearchCondition> getConditions()
Collection
of CSOSearchCondition
svoid setConditions(java.util.Collection<CSOSearchCondition> conditions)
conditions
- The Collection
of CSOSearchCondition
s to setjava.util.Collection<CentraSiteObjectAttribute> getResultAttributes()
Collection
of enabled search attributes as CentraSiteObjectAttribute
instancesvoid setResultAttributes(java.util.Collection<CentraSiteObjectAttribute> resultAttributes)
resultAttributes
- The Collection
of result attributes to set as CentraSiteObjectAttribute
instancesCSOSearchScope getSearchScope()
getSearchScopes()
CSOSearchScope
instancejava.util.List<CSOSearchScope> getSearchScopes()
List
of specified CSOSearchScope
svoid setSearchScope(CSOSearchScope searchScope)
setSearchScopes(List)
searchScope
- The CSOSearchScope
to setvoid setSearchScopes(java.util.List<CSOSearchScope> searchScopes)
searchScopes
- The List
of CSOSearchScope
s to setjava.util.List<CSOSearchScope> getEffectiveSearchScopes() throws CLLException
List
of effective CSOSearchScope
instancesCLLException
java.util.List<CSOSortSpecifier> getSortSpecifier()
List
of CSOSortSpecifier
s used in the current searchvoid setSortSpecifier(java.util.List<CSOSortSpecifier> sortSpecifiers)
sortSpecifiers
- The List
of CSOSortSpecifier
s that needs to be set for the
current searchboolean getMatchAnySpecifier()
void setMatchAnySpecifier(boolean matchAny)
matchAny
- If true, any search conditions can be met and
if false, if all search conditions have to be metvoid setParameter(java.lang.String paramToken, java.util.List<java.lang.Object> paramValues) throws CLLException
paramToken
- Parameter nameparamValues
- List
of parameter values to replace for paramTokenCLLException
- If all the list of paramValues supplied is null
or the list of paramValues contains nulljava.util.Collection<java.lang.String> getParameterTokens()
Collection
of tokens that are present as part of current
CSOSearch. Empty collection if there are no parametersjava.util.Collection<CSOParameter> getParameters()
Collection
of CSOParameter
s that are present as part of current
CSOSearch. Returns empty collection if no such parameters are setjava.util.Collection<CSOValidationInfo> validate() throws CLLException
Collection
of CSOValidationInfo
messages, empty in case no faulty
scope or conditions were found in the search.CLLException
- In case of a failure to perform the validation.boolean removeSearchScope(CSOSearchScope scope) throws CLLException
scope
- CSOSearchScope
instanceCSOSearchScope
was removed as a result of this call and false otherwiseCLLException
- In case the scope is null or failed to remove the given scope from the search.boolean removeSearchCondition(CSOSearchCondition condition) throws CLLException
condition
- CSOSearchCondition
instanceCSOSearchCondition
was removed as a result of this call and false otherwiseCLLException
- In case the condition is null or failed to remove the given condition from the search.boolean removeResultAttribute(CentraSiteObjectAttribute attribute) throws CLLException
CentraSiteObjectAttribute
from the search result attributes.attribute
- Faulty attribute specified in the result attributes CentraSiteObjectAttribute
CentraSiteObjectAttribute
was removed from the result attribute list and false otherwiseCLLException
- In case the attribute is null or an error in trying to delete from the unspecified result attributes collection.boolean removeSortSpecifier(CSOSortSpecifier sortSpecifier) throws CLLException
CSOSortSpecifier
from the search.sortSpecifier
- Faulty sort specifier which contains the attribute that does not belong to the specified scope.CSOSortSpecifier
was removed from the result attribute list and false otherwiseCLLException
- In case the attribute is null or an error in trying to delete from the unspecified CSOSortSpecifiers list.boolean isInternal() throws CLLException
CLLException
- If an error occurs while checking if the search is system defined or not.