it.eng.spago.cms.operations
Class SearchOperation

java.lang.Object
  extended by it.eng.spago.cms.operations.SearchOperation

public class SearchOperation
extends java.lang.Object

Models a repository search operation. The operation has two attributes:

The configuration of the operation is stored into a Spago SourceBean structured like below:
 <OPERATION name="">
            <SEARCHOPERATION query="?" language="(xpath/sql)" />
 </OPERATION>
 


Constructor Summary
SearchOperation()
          Constructor of the class useful to build an empty search operation.
SearchOperation(java.lang.String query, java.lang.String language)
          Constructor of the class useful to build a search operation setting the query and language type attributes.
 
Method Summary
 SourceBean getOperationDescriptor()
          Gets the Internal SourceBean which defines the internal structure of the operation
 void setLanguage(java.lang.String language)
          Set the language type of the query
 void setQuery(java.lang.String query)
          Set the query to exec
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SearchOperation

public SearchOperation()
                throws BuildOperationException
Constructor of the class useful to build an empty search operation. Attributes which have a default value are filled with it

Throws:
BuildOperationException - Thrown if an error occurs during the creation

SearchOperation

public SearchOperation(java.lang.String query,
                       java.lang.String language)
                throws BuildOperationException
Constructor of the class useful to build a search operation setting the query and language type attributes.

Parameters:
query - The query to exec on the repository
language - The label of the query language (xpath = xPath grammar, sql = jsr170 grammar)
Throws:
BuildOperationException - Thrown if an error occurs during the setting
Method Detail

getOperationDescriptor

public SourceBean getOperationDescriptor()
Gets the Internal SourceBean which defines the internal structure of the operation

Returns:
The Internal SourceBean of the operation which defines the internal structure of the operation

setQuery

public void setQuery(java.lang.String query)
              throws BuildOperationException
Set the query to exec

Parameters:
query - String of the Query to exec written using xpath or jsr170 grammar
Throws:
BuildOperationException - Thrown if an error occurs during the setting

setLanguage

public void setLanguage(java.lang.String language)
                 throws BuildOperationException
Set the language type of the query

Parameters:
language - Grammar language used to define the query (xpath = xPath grammar, sql = jsr170 grammar)
Throws:
BuildOperationException - Thrown if an error occurs during the setting