public class ReturnRequestLookup extends DynamoServlet
ReturnRequest
objects based on the input params.
The input parameters:
siteScope
property, which defaults to "all".
ReturnRequest
to return. This is useful for cycling through large amounts of
returns. On first first query start at 0 and return 10. On the second query, start at 10, etc.
If startIndex is null, it defaults to 0. (the beginning)
(optional. used to break large result sets into manageable pieces.)
ReturnRequest
to return on the query.
(optional. used to break large result sets into manageable pieces.)
ReturnRequest
objects is required. If true,
the totalCount output parameter will be rendered; the result output
parameter will not. This option can be used to improve performance.
ReturnRequest
objects in the
output parameters. If false, it will not. This option can be used to
improve performance in cases where a count is not required.
It renders the following oparams:
ReturnRequest
objects
(or the single ReturnRequest
object if the returnRequestId object was used) will
be set in the "result" param. The index of the next displayable
ReturnRequest
is in the "nextIndex" param. The index of the previous set
of ReturnRequest
s (allowing the user to cycle back and forth) is in the
"previousIndex" param.
ReturnRequest
objects. If the returnRequestId
input param was used, then it will contain a single ReturnRequest
object.
ReturnRequest
objects.
ReturnRequest
objects which satisfy the criteria
ReturnRequest
in the next set of results. If startIndex
or numReturns was null, this will also be null.
ReturnRequest
in the previous set of results. If startIndex
or numReturns was null, this will also be null.
ReturnRequest
in the set of results.
ReturnRequest
in the set of results.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ALL |
static java.lang.String |
CLASS_VERSION
Class version string
|
static java.lang.String |
CLOSED |
static ParameterName |
CLOSEDSTATES
The input parameter that indicates which are the states that correspond to closed states.
|
static java.lang.String |
COUNT
The number of returns in the result object
|
static java.lang.String |
CURRENT |
protected static int |
DEFAULT_NUM_RETURNREQUESTS |
static java.lang.String |
EMPTY
The open parameter that indicates that there were no results
|
static java.lang.String |
ENDRANGE
The output parameter that indicates the end value of the current batch
|
static java.lang.String |
ERROR
The open parameter that indicates that there was an error
|
static java.lang.String |
ERRORMESSAGE
The output parameter that includes the error message.
|
protected ComponentName |
mProfilePath |
protected static java.lang.String |
MSG_GENERAL_ERROR |
protected static java.lang.String |
MSG_NO_PARAM_SPECIFIED |
protected static java.lang.String |
MSG_NO_PERMISSION_FOR_RETURNREQUEST |
protected static java.lang.String |
MSG_NO_PERMISSION_FOR_USERS_RETURNREQUESTS |
protected static java.lang.String |
MSG_NO_SUCH_RETURNREQUEST |
static java.lang.String |
NEXTINDEX
The output parameter that indicates the first index of the next batch
|
static ParameterName |
NUMRETURNREQUESTS
The input parameter that indicates the number (count) of return requests that need to be returned.
|
static java.lang.String |
OPEN |
static ParameterName |
OPENSTATES
The optional input parameter that indicates which are the states that correspond
to open states.
|
static java.lang.String |
OUTPUT
The open parameter that indicates that there is a result
|
static java.lang.String |
PREVIOUSINDEX
The output parameter that indicates the first index of the previous batch
|
static ParameterName |
QUERYTOTAL
The input parameter that indicates whether a count of returns should be returned
in the totalCount output parameter.
|
static ParameterName |
QUERYTOTALONLY
The input parameter that indicates that only a count of returns should be returned
in the totalCount and total_count output parameters, and that the return requests themselves
should not be returned
|
static java.lang.String |
RESULT
The output parameter that includes the return request object or list of return request objects that were found in
response to the input parameters.
|
static ParameterName |
RETURNREQUESTID
The input parameter that indicates which return to get
|
static ParameterName |
SITEIDS
The input parameter that indicates which sites' returns to get
|
static ParameterName |
SITESCOPE
The input parameter that indicates which shareable type's sites' returns to get
|
static ParameterName |
SORTASCENDING
The input parameter that indicates the sorting order - it is true for ascending.
|
static ParameterName |
SORTBY
The input parameter that indicates the column that should be used to sorting.
|
static ParameterName |
STARTINDEX
The input parameter that indicates the index of the first return request to return.
|
static java.lang.String |
STARTRANGE
The output parameter that indicates the start value of the current batch
|
static ParameterName |
STATE
The input parameter to indicate how to further narrow the result set when we search
for a user's returns.
|
static java.lang.String |
TOTALCOUNT
The total number of returns that match the criteria, this is unset if queryTotal is set to
false
|
static ParameterName |
USERID
The input parameter that indicates whose list of returns to get
|
mAllowCleanupRequest, mParameters
SERVLET_INFO_KEY
SERVICE_INFO_KEY
DEFAULT_LOG_TRACE_STATUS
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
Constructor and Description |
---|
ReturnRequestLookup() |
Modifier and Type | Method and Description |
---|---|
java.lang.String[] |
getClosedStates()
gets the property closedStates.
|
protected java.lang.String |
getCurrentProfileId(DynamoHttpServletRequest pReq)
get the profile id of the current user
|
java.util.Locale |
getDefaultLocale()
Returns property DefaultLocale.
|
int |
getDefaultNumReturnRequests()
The default number of return requests returned with each call.
|
java.lang.String[] |
getOpenStates()
gets the property openStates.
|
java.lang.String |
getProfilePath()
Returns property ProfilePath
|
ReturnTools |
getReturnTools()
The service that is used to find the desired return
|
SiteGroupManager |
getSiteGroupManager()
Returns the SiteGroupManager component
|
java.lang.String |
getSiteScope()
gets the property siteScope
|
java.util.Locale |
getUserLocale(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Returns the locale associated with the request.
|
boolean |
isEnableSecurity()
gets the property enableSecurity.
|
boolean |
isQueryTotal() |
boolean |
isSearchByReturnRequestId()
gets the property searchByReturnRequestId.
|
boolean |
isSearchByUserId()
gets the property searchByUserId.
|
boolean |
isUseRequestLocale()
Returns property UseRequestLocale
|
protected void |
searchByReturnRequestId(DynamoHttpServletRequest pReq,
DynamoHttpServletResponse pRes,
java.lang.String pReturnRequestId)
This method loads the return with the given id.
|
protected void |
searchByUserId(DynamoHttpServletRequest pReq,
DynamoHttpServletResponse pRes,
java.lang.String userId)
This method will find the
ReturnRequest objects for the
states corresponding to the request parameter "state" that are owned
by the given user (userId). |
void |
service(DynamoHttpServletRequest pReq,
DynamoHttpServletResponse pRes)
service the request
|
void |
setClosedStates(java.lang.String[] pClosedStates)
sets the property closedStates.
|
void |
setDefaultLocale(java.util.Locale pDefaultLocale)
Sets property DefaultLocale
|
void |
setDefaultNumReturnRequests(int pDefaultNumReturnRequests) |
void |
setEnableSecurity(boolean pEnableSecurity)
sets the property enableSecurity.
|
void |
setOpenStates(java.lang.String[] pOpenStates)
sets the property openStates.
|
void |
setProfilePath(java.lang.String pProfilePath)
Sets property ProfilePath
|
void |
setQueryTotal(boolean pQueryTotal)
True if the total return count should be retrieved when any return lookup is done.
|
void |
setReturnTools(ReturnTools pReturnTools)
The service that is used to find the desired returns
|
void |
setSearchByReturnRequestId(boolean pSearchByReturnRequestId)
sets the property searchByReturnRequestId.
|
void |
setSearchByUserId(boolean pSearchByUserId)
sets the property searchByUserId.
|
void |
setSiteGroupManager(SiteGroupManager pSiteGroupManager)
Sets the SiteGroupManager component
|
void |
setSiteScope(java.lang.String pSiteScope)
sets the property siteScope.
|
void |
setUseRequestLocale(boolean pUseRequestLocale)
Sets property UseRequestLocale
|
doDelete, doGet, doPost, doPut, getParameter, getParameters, getServletContext, init, service, service, setParameter
destroy, getServletConfig, getServletInfo, setServletInfo
getAverageRequestHandlingTime, getHandledRequestCount, getRequestStartTime, getTotalRequestHandlingTime, isKeepingStatistics, notifyHandledRequest, resetStatistics, setKeepingStatistics
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, toString
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
public static final java.lang.String CLASS_VERSION
public static final ParameterName RETURNREQUESTID
public static final ParameterName USERID
public static final ParameterName OPENSTATES
public static final ParameterName SORTBY
public static final ParameterName SORTASCENDING
public static final ParameterName QUERYTOTALONLY
public static final ParameterName QUERYTOTAL
public static final ParameterName CLOSEDSTATES
public static final ParameterName STARTINDEX
public static final ParameterName NUMRETURNREQUESTS
public static final ParameterName STATE
public static final ParameterName SITEIDS
public static final ParameterName SITESCOPE
public static final java.lang.String ERRORMESSAGE
public static final java.lang.String RESULT
public static final java.lang.String COUNT
public static final java.lang.String TOTALCOUNT
public static final java.lang.String NEXTINDEX
public static final java.lang.String PREVIOUSINDEX
public static final java.lang.String STARTRANGE
public static final java.lang.String ENDRANGE
public static final java.lang.String ERROR
public static final java.lang.String OUTPUT
public static final java.lang.String EMPTY
public static final java.lang.String CLOSED
public static final java.lang.String OPEN
public static final java.lang.String ALL
public static final java.lang.String CURRENT
protected static final java.lang.String MSG_GENERAL_ERROR
protected static final java.lang.String MSG_NO_SUCH_RETURNREQUEST
protected static final java.lang.String MSG_NO_PARAM_SPECIFIED
protected static final java.lang.String MSG_NO_PERMISSION_FOR_RETURNREQUEST
protected static final java.lang.String MSG_NO_PERMISSION_FOR_USERS_RETURNREQUESTS
protected static int DEFAULT_NUM_RETURNREQUESTS
protected ComponentName mProfilePath
public void setEnableSecurity(boolean pEnableSecurity)
public boolean isEnableSecurity()
public void setDefaultNumReturnRequests(int pDefaultNumReturnRequests)
public int getDefaultNumReturnRequests()
public void setReturnTools(ReturnTools pReturnTools)
pReturnTools
- the ReturnTools component.public ReturnTools getReturnTools()
public void setSiteGroupManager(SiteGroupManager pSiteGroupManager)
pSiteGroupManager
- the SiteGroupManager component. Usually /atg/multisite/SiteGroupManagerpublic SiteGroupManager getSiteGroupManager()
public void setProfilePath(java.lang.String pProfilePath)
pProfilePath
- path to the profile nucleus component. Usually atg/userprofiling/Profilepublic java.lang.String getProfilePath()
public void setOpenStates(java.lang.String[] pOpenStates)
public java.lang.String[] getOpenStates()
public void setClosedStates(java.lang.String[] pClosedStates)
public java.lang.String[] getClosedStates()
public void setSearchByReturnRequestId(boolean pSearchByReturnRequestId)
public boolean isSearchByReturnRequestId()
public void setSearchByUserId(boolean pSearchByUserId)
public boolean isSearchByUserId()
public void setSiteScope(java.lang.String pSiteScope)
public java.lang.String getSiteScope()
public void service(DynamoHttpServletRequest pReq, DynamoHttpServletResponse pRes) throws javax.servlet.ServletException, java.io.IOException
service
in class DynamoServlet
pReq
- the request to be processedpRes
- the response object for this requestjavax.servlet.ServletException
- an application specific error occurred
processing this requestjava.io.IOException
- an error occurred reading data from the request
or writing data to the response.protected void searchByReturnRequestId(DynamoHttpServletRequest pReq, DynamoHttpServletResponse pRes, java.lang.String pReturnRequestId) throws javax.servlet.ServletException, java.io.IOException
pReq
- The http request objectpRes
- The http response objectpReturnRequestId
- The return id being retrievedjavax.servlet.ServletException
java.io.IOException
protected void searchByUserId(DynamoHttpServletRequest pReq, DynamoHttpServletResponse pRes, java.lang.String userId) throws javax.servlet.ServletException, java.io.IOException
ReturnRequest
objects for the
states corresponding to the request parameter "state" that are owned
by the given user (userId). If the "state" parameter is "open" or
"closed" then states used to narrow the search are either passed
in through the "openStates" or "closedStates" parameters
or (if those are not set) configured as properties on this class. If the
"state" parameter is a different value, it is assumed to be a specific
state value.pReq
- The http request objectpRes
- The http response objectuserId
- The user whose returns are being retrievedjavax.servlet.ServletException
java.io.IOException
getOpenStates()
,
getClosedStates()
protected java.lang.String getCurrentProfileId(DynamoHttpServletRequest pReq)
public void setDefaultLocale(java.util.Locale pDefaultLocale)
public java.util.Locale getDefaultLocale()
public void setUseRequestLocale(boolean pUseRequestLocale)
public boolean isUseRequestLocale()
public void setQueryTotal(boolean pQueryTotal)
public boolean isQueryTotal()
public java.util.Locale getUserLocale(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
javax.servlet.ServletException
java.io.IOException
LocaleTools.LocaleHelper.getLocale()