BEA Systems, Inc.

com.beasys.commerce.axiom.advisor.advislets
Class ContentSelectorAdviceRequestImpl

java.lang.Object
  |
  +--com.beasys.commerce.axiom.advisor.AbstractAdviceRequestImpl
        |
        +--com.beasys.commerce.axiom.advisor.advislets.ContentSelectorAdviceRequestImpl
All Implemented Interfaces:
AdviceRequest, ClassificationAdviceRequest, ContentQueryAdviceRequest, ContentSelectorAdviceRequest, RulesAdviceRequest, java.io.Serializable

public class ContentSelectorAdviceRequestImpl
extends AbstractAdviceRequestImpl
implements ContentSelectorAdviceRequest, java.io.Serializable

This is a concrete class implementation for a ContentSelector advice request. Note, all Advice Request classes must be Serializable. Make sure that all data in this object are Serializable.

Version:
$Revision: 7$, $Date: 1/4/00 3:53:37 PM$
Author:
Steve Willcox
See Also:
Serialized Form

Field Summary
protected  java.lang.String contentHome
           
protected  long max
           
protected  java.sql.Timestamp now
           
protected  java.lang.String query
           
protected  Request request
           
protected  java.lang.String rule
           
protected  java.lang.String ruleSet
           
protected  Session session
           
protected  java.lang.String sortBy
           
protected  ConfigurableEntity successor
           
protected  ConfigurableEntity user
           
 
Fields inherited from class com.beasys.commerce.axiom.advisor.AbstractAdviceRequestImpl
advislet
 
Constructor Summary
ContentSelectorAdviceRequestImpl(Advislet advislet)
          Creates a new instance of a ContentSelectorAdviceRequest object.
 
Method Summary
 java.lang.String getContentHome()
          Gets the content ejb home JNDI name for the content manager to use for the content query request.
 Request getHttpRequest()
          Returns the com.beasys.commerce.axiom.p13n.http.Request object for this request.
 Session getHttpSession()
          Returns the com.beasys.commerce.axiom.p13n.http.Session object for this request.
 long getMax()
          Gets the maximum number of content items to return from a content query request.
 java.sql.Timestamp getNow()
          Returns the Now object for this request.
 java.lang.String getQuery()
          Gets the content query string used to search for content.
 java.lang.String getRule()
          Returns the name of the rule associated with the requset.
 java.lang.String getRuleSet()
          Returns the name of the rule set associated with the request.
 java.lang.String getSortBy()
          Gets the sort string used that is used to sort the content items returned from the content query request.
 ConfigurableEntity getSuccessor()
          Returns the Successor object for this user for this request.
 ConfigurableEntity getUser()
          Returns the user ConfigurableEntity object.
 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 setHttpRequest(Request request)
          Sets the com.beasys.commerce.axiom.p13n.http.Request object for this request.
 void setHttpSession(Session session)
          Sets the com.beasys.commerce.axiom.p13n.http.Session object for this request.
 void setMax(long max)
          Sets the maximum number of content items to return from a content query request.
 void setNow(java.sql.Timestamp now)
          Sets the Now object for this request.
 void setQuery(java.lang.String query)
          Sets the content query string used to search for content.
 void setRule(java.lang.String rule)
          Sets the name of the rule associated with the request.
 void setRuleSet(java.lang.String ruleSet)
          Sets the name of the rule set associated with the request.
 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 setSuccessor(ConfigurableEntity successor)
          Sets the Successor object for this user for this request.
 void setUser(ConfigurableEntity user)
          Sets the user ConfigurableEntity object for this request.
 void validate()
          Validates the request.
 
Methods inherited from class com.beasys.commerce.axiom.advisor.AbstractAdviceRequestImpl
getAdvislet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.beasys.commerce.axiom.advisor.AdviceRequest
getAdvislet
 

Field Detail

ruleSet

protected java.lang.String ruleSet

rule

protected java.lang.String rule

user

protected ConfigurableEntity user

successor

protected ConfigurableEntity successor

now

protected java.sql.Timestamp now

request

protected Request request

session

protected Session session

max

protected long max

sortBy

protected java.lang.String sortBy

contentHome

protected java.lang.String contentHome

query

protected java.lang.String query
Constructor Detail

ContentSelectorAdviceRequestImpl

public ContentSelectorAdviceRequestImpl(Advislet advislet)
Creates a new instance of a ContentSelectorAdviceRequest 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.
Method Detail

getRuleSet

public java.lang.String getRuleSet()
Returns the name of the rule set associated with the request.
Specified by:
getRuleSet in interface RulesAdviceRequest
Returns:
String The rule set associated with this request.

setRuleSet

public void setRuleSet(java.lang.String ruleSet)
Sets the name of the rule set associated with the request.
Specified by:
setRuleSet in interface RulesAdviceRequest
Parameters:
String - The rule set associated with this request.

getRule

public java.lang.String getRule()
Returns the name of the rule associated with the requset.
Specified by:
getRule in interface RulesAdviceRequest
Returns:
String The rule associated with this request.

setRule

public void setRule(java.lang.String rule)
Sets the name of the rule associated with the request.
Specified by:
setRule in interface RulesAdviceRequest
Parameters:
String - The rule associated with this request.

getUser

public ConfigurableEntity getUser()
Returns the user ConfigurableEntity object.
Specified by:
getUser in interface ClassificationAdviceRequest
Returns:
User The User object.

setUser

public void setUser(ConfigurableEntity user)
Sets the user ConfigurableEntity object for this request.
Specified by:
setUser in interface ClassificationAdviceRequest
Parameters:
user - The User object for this request.

getSuccessor

public ConfigurableEntity getSuccessor()
Returns the Successor object for this user for this request.
Specified by:
getSuccessor in interface ClassificationAdviceRequest
Returns:
ConfigurableEntity The successor object.

setSuccessor

public void setSuccessor(ConfigurableEntity successor)
Sets the Successor object for this user for this request.
Specified by:
setSuccessor in interface ClassificationAdviceRequest
Parameters:
successor - The successor object for this user for this request.

getNow

public java.sql.Timestamp getNow()
Returns the Now object for this request.
Specified by:
getNow in interface ClassificationAdviceRequest
Returns:
java.sql.Timestamp The Now object.

setNow

public void setNow(java.sql.Timestamp now)
Sets the Now object for this request.
Specified by:
setNow in interface ClassificationAdviceRequest
Parameters:
now - The java.sql.Timestamp object for this request.

getHttpRequest

public Request getHttpRequest()
Returns the com.beasys.commerce.axiom.p13n.http.Request object for this request.
Specified by:
getHttpRequest in interface ClassificationAdviceRequest
Returns:
com.beasys.commerce.axiom.p13n.http.Request The request object.

setHttpRequest

public void setHttpRequest(Request request)
Sets the com.beasys.commerce.axiom.p13n.http.Request object for this request.
Specified by:
setHttpRequest in interface ClassificationAdviceRequest
Parameters:
now - The com.beasys.commerce.axiom.p13n.http.Request object for this request.

getHttpSession

public Session getHttpSession()
Returns the com.beasys.commerce.axiom.p13n.http.Session object for this request.
Specified by:
getHttpSession in interface ClassificationAdviceRequest
Returns:
com.beasys.commerce.axiom.p13n.http.Session The request object.

setHttpSession

public void setHttpSession(Session session)
Sets the com.beasys.commerce.axiom.p13n.http.Session object for this request.
Specified by:
setHttpSession in interface ClassificationAdviceRequest
Parameters:
now - The com.beasys.commerce.axiom.p13n.http.Session object for this request.

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 ContentSelectorAdviceRequest must have the following data in the request: ruleSet - the URI string name of the ruleset rule name - a string name of a rule input objects which include: - java.sql.Timestamp object for NOW - com.beasys.commerce.axiom.contact.User - com.beasys.commerce.axiom.advislets.Successor (optional) - com.beasys.commerce.axiom.p13n.http.Request - com.beasys.commerce.axiom.p13n.http.Session 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.
Specified by:
validate in interface AdviceRequest
Overrides:
validate in class AbstractAdviceRequestImpl
Throws:
AdviceRequestValidationException - thrown when not valid. The message in the exception indicates the validation error.

BEA Systems, Inc.

Copyright © 2000 BEA Systems, Inc. All Rights Reserved