|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.nucleus.logging.VariableArgumentApplicationLoggingImpl atg.nucleus.GenericService atg.nucleus.TimedOperationService atg.nucleus.servlet.ServletService atg.nucleus.servlet.HttpServletService atg.servlet.DynamoServlet atg.projects.store.droplet.RqlDroplet
public class RqlDroplet
This droplet is used in favor of the ATG RQLQueryForEach droplet. There are two reasons for this. The first is that this droplet must be configured from outside the JSP to prevent the setting of an RQL query string in the JSP template. The second is that this droplet returns the result set (array of repository items) which allows other droplets to loop through them appropriately (Range for example). It also wraps the results in a transaction, something RQLQueryForEach does not do.
The repository, itemDescriptorName, and queryRql properties must be set on the nucleus component that uses this class. For example:
$class=com.awedirect.base.droplet.RqlDroplet transactionManager=/atg/dynamo/transaction/TransactionManager repository=/atg/commerce/catalog/ProductCatalog itemDescriptorName=promotionRelationship queryRql=contractType.code = ?0
this droplet takes the following parameters
Example
<dsp:droplet name="RqlDroplet"> <param name="numRQLParams" value="1"> <param name="param0" value="atg.com"> <dsp:oparam name="output"> <dsp:droplet name="ForEach"> <dsp:param name="array" param="items"/> <dsp:oparam name="output"> <dsp:getvalueof id="url" idtype="java.lang.string" param="element.url"> <dsp:a page="<=url>"> <dsp:valueof param="element.name"/> </dsp:a><br> </dsp:getvalueof> </dsp:oparam> </dsp:droplet> </dsp:oparam> </dsp:droplet>
Parameters:
empty- Rendered if no results found.
output- Rendered on successful query.
items- Array of RepositoryItem object
that match the query.
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string. |
static atg.nucleus.naming.ParameterName |
EMPTY
Empty parameter name. |
static java.lang.String |
ITEMS
Items name. |
static atg.nucleus.naming.ParameterName |
NUMBER_OF_RQL_PARAMS
Number of RQL parameters parameter name. |
static atg.nucleus.naming.ParameterName |
OUTPUT
Output parameter name. |
static java.lang.String |
PARAM_PREFIX
Parameter prefix. |
static atg.nucleus.naming.ParameterName |
QUERY_RQL
Query RQL parameter name. |
static java.lang.String |
XA_FAILURE
XA failure message. |
Fields inherited from class atg.servlet.DynamoServlet |
---|
mAllowCleanupRequest, mParameters |
Fields inherited from class atg.nucleus.servlet.ServletService |
---|
SERVLET_INFO_KEY |
Fields inherited from class atg.nucleus.GenericService |
---|
SERVICE_INFO_KEY |
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging |
---|
DEFAULT_LOG_TRACE_STATUS |
Fields inherited from interface atg.nucleus.logging.ApplicationLogging |
---|
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS |
Constructor Summary | |
---|---|
RqlDroplet()
|
Method Summary | |
---|---|
java.lang.String |
getItemDescriptorName()
|
protected java.lang.Object[] |
getQueryParameters(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
Get query parameters. |
java.lang.String |
getQueryRql()
|
atg.repository.Repository |
getRepository()
|
java.util.List |
getRqlParameters()
|
java.util.Map |
getStatementMap()
|
javax.transaction.TransactionManager |
getTransactionManager()
|
boolean |
isResultAsCollection()
|
protected atg.repository.RepositoryItem[] |
performQuery(atg.repository.Repository pRepository,
java.lang.String pViewName,
atg.repository.rql.RqlStatement pStatement,
java.lang.Object[] pParams)
Performs the query against the view of the particular repository. |
void |
service(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
Service method. |
void |
setItemDescriptorName(java.lang.String pItemDescriptorName)
|
void |
setQueryRql(java.lang.String pQueryRql)
|
void |
setRepository(atg.repository.Repository pRepository)
|
void |
setResultAsCollection(boolean pResultAsCollection)
|
void |
setRqlParameters(java.util.List pRqlParameters)
|
void |
setTransactionManager(javax.transaction.TransactionManager pTransactionManager)
|
Methods inherited from class atg.servlet.DynamoServlet |
---|
doDelete, doGet, doPost, doPut, getParameter, getParameters, getServletContext, service, service, setParameter |
Methods inherited from class atg.nucleus.servlet.ServletService |
---|
destroy, getServletConfig, getServletInfo, init, setServletInfo |
Methods inherited from class atg.nucleus.TimedOperationService |
---|
getAverageRequestHandlingTime, getHandledRequestCount, getRequestStartTime, getTotalRequestHandlingTime, isKeepingStatistics, notifyHandledRequest, resetStatistics, setKeepingStatistics |
Methods inherited from class atg.nucleus.GenericService |
---|
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService |
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl |
---|
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String CLASS_VERSION
public static final java.lang.String XA_FAILURE
public static final atg.nucleus.naming.ParameterName OUTPUT
public static final atg.nucleus.naming.ParameterName EMPTY
public static final atg.nucleus.naming.ParameterName QUERY_RQL
public static final atg.nucleus.naming.ParameterName NUMBER_OF_RQL_PARAMS
public static final java.lang.String PARAM_PREFIX
public static final java.lang.String ITEMS
Constructor Detail |
---|
public RqlDroplet()
Method Detail |
---|
public atg.repository.Repository getRepository()
public void setRepository(atg.repository.Repository pRepository)
pRepository
- - repository.public java.lang.String getItemDescriptorName()
public void setItemDescriptorName(java.lang.String pItemDescriptorName)
pItemDescriptorName
- - item descriptor name.public java.lang.String getQueryRql()
public void setQueryRql(java.lang.String pQueryRql)
pQueryRql
- - RQL query text.public java.util.List getRqlParameters()
public void setRqlParameters(java.util.List pRqlParameters)
pRqlParameters
- - list of RQL query parameters.public javax.transaction.TransactionManager getTransactionManager()
public void setTransactionManager(javax.transaction.TransactionManager pTransactionManager)
pTransactionManager
- - transaction manager.public java.util.Map getStatementMap()
public boolean isResultAsCollection()
public void setResultAsCollection(boolean pResultAsCollection)
pQueryRql
- - boolean that specifies whether result should be returned as collection
or as array.public void service(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
service
in class atg.servlet.DynamoServlet
pRequest
- DynamoHttpServletRequestpResponse
- DynamoHttpServletResponse
javax.servlet.ServletException
- if an error occurs
java.io.IOException
- if an error occursprotected java.lang.Object[] getQueryParameters(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- - http requestpResponse
- - http response
javax.servlet.ServletException
- if error occurs
java.io.IOException
- if an error occursprotected atg.repository.RepositoryItem[] performQuery(atg.repository.Repository pRepository, java.lang.String pViewName, atg.repository.rql.RqlStatement pStatement, java.lang.Object[] pParams) throws atg.repository.RepositoryException
Performs the query against the view of the particular repository.
pRepository
- - repositorypViewName
- - view namepStatement
- - statementpParams
- - parameters
atg.repository.RepositoryException
- if an error occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |