com.softwareag.centrasite.api.csom.search
Interface CSOSearchCondition


public interface CSOSearchCondition

CSOSearchCondition represent the search criteria/filters in a generic way. A search condition can have an attribute that references the CSOAttribute affected by the condition, a condition operator specifies the operator of the condition and a list of parameters/values to be matched against the attributes.

There are different types of conditions like keyword condition, comparison condition, custom condition.
1. A Keyword Condition matches the name & description of the objects against the keyword
2. A Comparison Condition is used for advanced filtering based on Attributes, Lifecycle states etc.
3. A Custom Conditions is meant for the users who would directly provide the search criteria as a "query". For example, users can instantiate a custom condition and can call setPredicate("$ro/cs:key = 'XXXX'") instead of setting the "key" attribute using setAttributes(), setting the values using setValues() and then connecting them with an operation using setOperator() 4. A Classification Condition is used for searching for assets based on Internal/External Classifications


Field Summary
static java.lang.String ClassificationCondition
          Used to mark the condition to be a Classification condition
static java.lang.String ComparisonCondition
          Used to mark the condition to be a comparison condition
static java.lang.String CustomCondition
          Used to mark the condition to be a custom condition
static java.lang.String KeywordCondition
          Used to mark the condition to be a keyword condition
 
Method Summary
 java.lang.Object clone()
           
 CentraSiteObjectAttribute getAttribute()
          Returns the CSOAttribute addressed by the condition.
 java.lang.String getDisplayName()
          Retrieves the display name of the condition
 java.lang.String getName()
          Retrieves the name of the condition.
 Operator getOperator()
          Returns the condition operator.
 java.lang.String getPredicate()
          Returns a String holding the query fragment representing the condition.
 java.util.List<?> getValues()
          Returns the parameters of the condition.
 void setAttribute(CentraSiteObjectAttribute attribute)
          Sets the CSOAttribute for the condition.
 void setOperator(Operator operator)
          Sets the condition operator from predefined enum.
 void setOperator(java.lang.String operatorName)
          Sets the condition operator from a string.
 void setPredicate(java.lang.String predicate)
          Assigns a string holding the query fragment to the condition.
 void setValues(java.util.List<?> values)
          Sets the parameter of the condition.
 

Field Detail

KeywordCondition

static final java.lang.String KeywordCondition
Used to mark the condition to be a keyword condition

See Also:
Constant Field Values

ComparisonCondition

static final java.lang.String ComparisonCondition
Used to mark the condition to be a comparison condition

See Also:
Constant Field Values

CustomCondition

static final java.lang.String CustomCondition
Used to mark the condition to be a custom condition

See Also:
Constant Field Values

ClassificationCondition

static final java.lang.String ClassificationCondition
Used to mark the condition to be a Classification condition

See Also:
Constant Field Values
Method Detail

getName

java.lang.String getName()
Retrieves the name of the condition.

Returns:
name of the search condition

getDisplayName

java.lang.String getDisplayName()
Retrieves the display name of the condition

Returns:
display name of the search condition

getPredicate

java.lang.String getPredicate()
                              throws CLLException
Returns a String holding the query fragment representing the condition. The fragment depends on the syntax of the query language the CSOSearchmanager is using for querying the CSOM.

Returns:
query in string format
Throws:
CLLException

setPredicate

void setPredicate(java.lang.String predicate)
                  throws CLLException
Assigns a string holding the query fragment to the condition. This method can be used to define a custom predicate.

Parameters:
predicate - String holding the query fragment
Throws:
CLLException

getAttribute

CentraSiteObjectAttribute getAttribute()
Returns the CSOAttribute addressed by the condition.

Returns:
CentraSiteObjectAttribute on which the condition is defined

setAttribute

void setAttribute(CentraSiteObjectAttribute attribute)
                  throws CLLException
Sets the CSOAttribute for the condition.

Parameters:
attribute -
Throws:
CLLException

getOperator

Operator getOperator()
Returns the condition operator.

Returns:
the enum Operator which is used in this CSOSearchCondition

setOperator

void setOperator(Operator operator)
                 throws CLLException
Sets the condition operator from predefined enum.

Parameters:
operator - enum that specifies the Operator to be used for this CSOSearchCondition
Throws:
CLLException

setOperator

void setOperator(java.lang.String operatorName)
                 throws CLLException
Sets the condition operator from a string.

Parameters:
operatorName -
Throws:
CLLException

getValues

java.util.List<?> getValues()
Returns the parameters of the condition.

Returns:
List of values that are used in current CSOSearchCondition

setValues

void setValues(java.util.List<?> values)
               throws CLLException
Sets the parameter of the condition.

Parameters:
values - List of values that are to be used in current CSOSearchCondition
Throws:
CLLException

clone

java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Throws:
java.lang.CloneNotSupportedException