|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectatg.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 |
OUTPUT
Output parameter name. |
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()
|
java.lang.String |
getQueryRql()
|
atg.repository.Repository |
getRepository()
|
java.util.Map<java.lang.String,atg.repository.rql.RqlStatement> |
getStatementMap()
|
javax.transaction.TransactionManager |
getTransactionManager()
|
protected atg.repository.RepositoryItem[] |
performQuery(atg.repository.Repository pRepository,
java.lang.String pViewName,
atg.repository.rql.RqlStatement pStatement)
Performs the query against the view of the particular repository. |
void |
service(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
Executes the RQL query and returns the results in the "items" output parameter inside the "output" open parameter. |
void |
setItemDescriptorName(java.lang.String pItemDescriptorName)
|
void |
setQueryRql(java.lang.String pQueryRql)
|
void |
setRepository(atg.repository.Repository pRepository)
|
void |
setTransactionManager(javax.transaction.TransactionManager pTransactionManager)
|
Methods inherited from class atg.servlet.DynamoServlet |
---|
doDelete, doGet, doPost, doPut, getParameter, getParameters, getServletContext, init, service, service, setParameter |
Methods inherited from class atg.nucleus.servlet.ServletService |
---|
destroy, getServletConfig, getServletInfo, 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, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, 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, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService |
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl |
---|
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, 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 final 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 java.lang.String ITEMS
Constructor Detail |
---|
public RqlDroplet()
Method Detail |
---|
public atg.repository.Repository getRepository()
public void setRepository(atg.repository.Repository pRepository)
pRepository
- Set a new 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 javax.transaction.TransactionManager getTransactionManager()
public void setTransactionManager(javax.transaction.TransactionManager pTransactionManager)
pTransactionManager
- - transaction manager.public java.util.Map<java.lang.String,atg.repository.rql.RqlStatement> getStatementMap()
public void service(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
service
in class atg.servlet.DynamoServlet
javax.servlet.ServletException
java.io.IOException
protected atg.repository.RepositoryItem[] performQuery(atg.repository.Repository pRepository, java.lang.String pViewName, atg.repository.rql.RqlStatement pStatement) 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 |