com.beasys.commerce.axiom.advisor.advislets
Class ContentQueryAdviceRequestImpl
java.lang.Object
|
+--com.beasys.commerce.axiom.advisor.AbstractAdviceRequestImpl
|
+--com.beasys.commerce.axiom.advisor.advislets.ContentQueryAdviceRequestImpl
- public class ContentQueryAdviceRequestImpl
- extends AbstractAdviceRequestImpl
- implements ContentQueryAdviceRequest, java.io.Serializable
This is a concrete class implementation for a ContentQuery
advice request.
Note, all Advice Request classes must be Serializable. Make
sure that all data in this object are Serializable.
- See Also:
- Serialized Form
Field Summary |
protected java.lang.String |
contentHome
|
protected long |
max
|
protected java.lang.String |
query
|
protected java.lang.String |
sortBy
|
Method Summary |
java.lang.String |
getContentHome()
Gets the content ejb home JNDI name for the
content manager to use for the content query request. |
long |
getMax()
Gets the maximum number of content items to return
from a content query request. |
java.lang.String |
getQuery()
Gets the content query string used to search for content. |
java.lang.String |
getSortBy()
Gets the sort string used that is used to sort the content items
returned from the content query request. |
void |
setContentHome(java.lang.String contentHome)
Sets the content ejb home JNDI name for the
content manager to use for the content query request. |
void |
setMax(long max)
Sets the maximum number of content items to return
from a content query request. |
void |
setQuery(java.lang.String query)
Sets the content query string used to search for content. |
void |
setSortBy(java.lang.String sortBy)
Sets the sort string used that is used to sort the content items
returned from the content query request. |
void |
validate()
Validates the request. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
max
protected long max
sortBy
protected java.lang.String sortBy
contentHome
protected java.lang.String contentHome
query
protected java.lang.String query
ContentQueryAdviceRequestImpl
public ContentQueryAdviceRequestImpl(Advislet advislet)
- Creates a new instance of a ContentQueryAdviceRequest object. This
method is meant to be called by the Advisor which acts
as a factory for all AdviceRequest objects.
- Parameters:
advislet
- The default advislet to use for making
recommendations.
getMax
public long getMax()
- Gets the maximum number of content items to return
from a content query request.
- Specified by:
- getMax in interface ContentQueryAdviceRequest
- Returns:
- long The maximum number of content items to return.
setMax
public void setMax(long max)
- Sets the maximum number of content items to return
from a content query request.
- Specified by:
- setMax in interface ContentQueryAdviceRequest
- Parameters:
max
- The maximum number of content items to return.
getSortBy
public java.lang.String getSortBy()
- Gets the sort string used that is used to sort the content items
returned from the content query request.
It is list of document attributes to sort the content by. The syntax
follows the SQL 'order by' clause. The sort specification is limited to
a list of the metadata attribute names and the keywords ASC and DESC.
Examples:
sortBy="creationDate"
sortBy="creationDate ASC, title DESC"
- Specified by:
- getSortBy in interface ContentQueryAdviceRequest
- Returns:
- String The sortBy string.
setSortBy
public void setSortBy(java.lang.String sortBy)
- Sets the sort string used that is used to sort the content items
returned from the content query request.
It is list of document attributes to sort the content by. The syntax
follows the SQL 'order by' clause. The sort specification is limited to
a list of the metadata attribute names and the keywords ASC and DESC.
Examples:
sortBy="creationDate"
sortBy="creationDate ASC, title DESC"
- Specified by:
- setSortBy in interface ContentQueryAdviceRequest
- Parameters:
sortBy
- The sortBy string.
getContentHome
public java.lang.String getContentHome()
- Gets the content ejb home JNDI name for the
content manager to use for the content query request.
- Specified by:
- getContentHome in interface ContentQueryAdviceRequest
- Returns:
- String The content ejb home JNDI name.
setContentHome
public void setContentHome(java.lang.String contentHome)
- Sets the content ejb home JNDI name for the
content manager to use for the content query request.
- Specified by:
- setContentHome in interface ContentQueryAdviceRequest
- Parameters:
String
- The content ejb home JNDI name.
getQuery
public java.lang.String getQuery()
- Gets the content query string used to search for content.
Example: query="mimetype contains 'text' AND author='Proulx'"
- Specified by:
- getQuery in interface ContentQueryAdviceRequest
- Returns:
- String The query string.
setQuery
public void setQuery(java.lang.String query)
- Sets the content query string used to search for content.
Example: query="mimetype contains 'text' AND author='Proulx'"
- Specified by:
- setQuery in interface ContentQueryAdviceRequest
- Returns:
- String The query string.
validate
public void validate()
throws AdviceRequestValidationException
- Validates the request.
A ContentQueryAdviceRequest must have the following data in
the request:
max - the maximum number of content items to return.
sortBy - the sort by sting. (optional)
contentHome - the JNDI name of the content manager home.
query - the query string.
- Overrides:
- validate in class AbstractAdviceRequestImpl
- Throws:
- AdviceRequestValidationException - thrown when not valid. The
message in the exception indicates the validation error.
Copyright © 2000 BEA Systems, Inc. All Rights Reserved