|
||||||||||
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.commerce.csr.order.OrderComponentIsModifiable
public class OrderComponentIsModifiable
This is a superclass for droplets: PaymentGroupIsModifiable, ShippingGroupIsModifiable, etc. You can use an instance of this droplet to do the same operations as the droplets mentioned above, however, you would not have to pass in the type, and do type comparisons.
This droplet qualifies whether the given order component is in an "editable" state, e.g. the credit card could only be modified if it hasn't been charged yet, etc.
Example Usage:
<droplet bean="OrderComponentIsModifiable"> <param name="id" value="param:Group.id"> <param name="type" value="shippingGroup"> <oparam name="true"> <a href="edit_shipping_group.jhtml"> <param name="id" value="param:Group.id"> Edit this shipping group </a> </oparam> <oparam name="false"> You may no longer edit this shipping group </oparam> <oparam name="error"> Oh oh... A better error message? </oparam> </droplet>
(you can set order bean of the droplet in the "order" input parameter, or in the .properties file)
OrderIsCancelable
,
OrderIsModifiable
,
OrderIsReturnable
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
|
protected static java.lang.String |
COMMERCE_ITEM_TYPE
|
static atg.nucleus.naming.ParameterName |
ERROR
|
static atg.nucleus.naming.ParameterName |
FALSE
|
static atg.nucleus.naming.ParameterName |
ID
|
static atg.nucleus.naming.ParameterName |
LOCALE_PARAM
|
protected static java.lang.String |
MSG_NO_GROUP_ID
|
protected static java.lang.String |
MSG_NO_ORDER
|
protected static java.lang.String |
MSG_UNKNOWN_TYPE
|
static atg.nucleus.naming.ParameterName |
ORDER
|
static atg.nucleus.naming.ParameterName |
ORDER_ITEM
|
protected static java.lang.String |
ORDER_TYPE
|
protected static java.lang.String |
PAYMENT_GROUP_TYPE
|
protected static java.lang.String |
SHIPPING_GROUP_TYPE
|
static atg.nucleus.naming.ParameterName |
TRUE
|
static atg.nucleus.naming.ParameterName |
TYPE
|
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 | |
---|---|
OrderComponentIsModifiable()
|
Method Summary | |
---|---|
protected boolean |
commerceItemIsModifiable(atg.commerce.order.CommerceItem pCommerceItem)
This method determines whether the given commerce item is in a modifiable state |
java.lang.String |
getComponentId()
|
java.lang.String |
getComponentType()
|
java.util.Locale |
getDefaultLocale()
|
java.lang.String[] |
getNonModifiableOrderStates()
|
java.lang.String[] |
getNonModifiablePaymentGroupStates()
|
java.lang.String[] |
getNonModifiableShipItemRelationshipStates()
|
java.lang.String[] |
getNonModifiableShippingGroupStates()
|
atg.commerce.order.Order |
getOrder()
|
java.util.Locale |
getUserLocale(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
Returns the locale associated with the request. |
boolean |
isUseRequestLocale()
|
protected boolean |
orderIsModifiable(atg.commerce.order.Order pOrder)
Given an order, this method determines whether the order is in a modifiable state |
protected boolean |
paymentGroupIsModifiable(atg.commerce.order.PaymentGroup pPaymentGroup)
This method determines whether the given payment group is in a modifiable state |
void |
service(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
Determines if the given order component is modifiable. |
void |
setComponentId(java.lang.String pComponentId)
Sets the identifier of the component in question |
void |
setComponentType(java.lang.String pComponentType)
Sets The type of the component in question (CommerceItem, ShippingGroup, PaymentGroup, or Order) |
void |
setDefaultLocale(java.util.Locale pDefaultLocale)
Sets the default locale |
void |
setNonModifiableOrderStates(java.lang.String[] pNonModifiableOrderStates)
Sets array of order states that indicate that an order is not modifiable |
void |
setNonModifiablePaymentGroupStates(java.lang.String[] pNonModifiablePaymentGroupStates)
Sets array of payment group states that indicate that a payment group is not modifiable |
void |
setNonModifiableShipItemRelationshipStates(java.lang.String[] pNonModifiableShipItemRelationshipStates)
Sets array of ShippingGroupCommerceItem relationship states that indicate that a commerce item is not modifiable |
void |
setNonModifiableShippingGroupStates(java.lang.String[] pNonModifiableShippingGroupStates)
Sets array of shipping group states that indicate that a shipping group is not modifiable |
void |
setOrder(atg.commerce.order.Order pOrder)
Sets The order whose component is in question |
void |
setUseRequestLocale(boolean pUseRequestLocale)
Sets boolean indicating if the request locale should be used when finding resourced error messages. |
protected boolean |
shippingGroupIsModifiable(atg.commerce.order.ShippingGroup pShippingGroup)
This method determines whether the given shipping group is in a modifiable state |
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, 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 java.lang.String CLASS_VERSION
public static final atg.nucleus.naming.ParameterName ID
public static final atg.nucleus.naming.ParameterName TYPE
public static final atg.nucleus.naming.ParameterName ORDER
public static final atg.nucleus.naming.ParameterName ORDER_ITEM
public static final atg.nucleus.naming.ParameterName LOCALE_PARAM
public static final atg.nucleus.naming.ParameterName TRUE
public static final atg.nucleus.naming.ParameterName FALSE
public static final atg.nucleus.naming.ParameterName ERROR
protected static final java.lang.String MSG_NO_ORDER
protected static final java.lang.String MSG_NO_GROUP_ID
protected static final java.lang.String MSG_UNKNOWN_TYPE
protected static final java.lang.String SHIPPING_GROUP_TYPE
protected static final java.lang.String PAYMENT_GROUP_TYPE
protected static final java.lang.String COMMERCE_ITEM_TYPE
protected static final java.lang.String ORDER_TYPE
Constructor Detail |
---|
public OrderComponentIsModifiable()
Method Detail |
---|
public void setComponentId(java.lang.String pComponentId)
pComponentId
- the identifier of the component in questionpublic java.lang.String getComponentId()
public void setComponentType(java.lang.String pComponentType)
pComponentType
- the type of the component in question (CommerceItem,
ShippingGroup, PaymentGroup, or Order)public java.lang.String getComponentType()
public void setDefaultLocale(java.util.Locale pDefaultLocale)
pDefaultLocale
- the default localepublic java.util.Locale getDefaultLocale()
public void setNonModifiableOrderStates(java.lang.String[] pNonModifiableOrderStates)
pNonModifiableOrderStates
- an array of order statesthat indicate that
an order is not modifiablepublic java.lang.String[] getNonModifiableOrderStates()
public void setNonModifiablePaymentGroupStates(java.lang.String[] pNonModifiablePaymentGroupStates)
pNonModifiablePaymentGroupStates
- an array of payment group states
that indicate that a payment group is not modifiablepublic java.lang.String[] getNonModifiablePaymentGroupStates()
public void setNonModifiableShipItemRelationshipStates(java.lang.String[] pNonModifiableShipItemRelationshipStates)
pNonModifiableShipItemRelationshipStates
- an array of
ShippingGroupCommerceItem relationship states that indicate that a
commerce item is not modifiablepublic java.lang.String[] getNonModifiableShipItemRelationshipStates()
public void setNonModifiableShippingGroupStates(java.lang.String[] pNonModifiableShippingGroupStates)
pNonModifiableShippingGroupStates
- an array of shipping group states
that indicate that a shipping group is not modifiablepublic java.lang.String[] getNonModifiableShippingGroupStates()
public void setOrder(atg.commerce.order.Order pOrder)
pOrder
- the order whose component is in questionpublic atg.commerce.order.Order getOrder()
public void setUseRequestLocale(boolean pUseRequestLocale)
pUseRequestLocale
- boolean that determines whether to use the request
locale when finding resourced error messages.public boolean isUseRequestLocale()
protected boolean commerceItemIsModifiable(atg.commerce.order.CommerceItem pCommerceItem) throws atg.commerce.CommerceException
pCommerceItem
- the commerce item
CommerceException,
- if the commerce item is null
atg.commerce.CommerceException
public java.util.Locale getUserLocale(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
locale
. This value can be
either a java.util.Locale object or a String which represents the locale.
Next if the useRequestLocale
property is true, then the locale
of the request will be returned. Finally, if the locale cannot be determined,
the the defaultLocale
property is used.
javax.servlet.ServletException
java.io.IOException
protected boolean orderIsModifiable(atg.commerce.order.Order pOrder) throws atg.commerce.CommerceException
pOrder
- the order
CommerceException,
- if the order is null
atg.commerce.CommerceException
protected boolean paymentGroupIsModifiable(atg.commerce.order.PaymentGroup pPaymentGroup) throws atg.commerce.CommerceException
pPaymentGroup
- the payment group
CommerceException,
- if the payment group is null
atg.commerce.CommerceException
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
- the HTTP requestpResponse
- the HTTP response
javax.servlet.ServletException
java.io.IOException
protected boolean shippingGroupIsModifiable(atg.commerce.order.ShippingGroup pShippingGroup) throws atg.commerce.CommerceException
pShippingGroup
- the shipping group
CommerceException,
- if the shipping group is null
atg.commerce.CommerceException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |