Class SapOrderManagementSwitchUIComponentsAspect
- java.lang.Object
-
- de.hybris.platform.sap.ysapordermgmtb2baddon.aspect.SapOrderManagementSwitchUIComponentsAspect
-
public class SapOrderManagementSwitchUIComponentsAspect extends java.lang.ObjectThis aspect is used to apply the UI changes when switching between synchronous order management SOM and asynchronous order management AOM.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringADDON_PREFIXstatic java.lang.StringFORWARD_PREFIXstatic org.apache.log4j.LoggerLOGstatic java.lang.StringREDIRECT_MY_ACCOUNTstatic java.lang.StringREDIRECT_PREFIXstatic java.lang.StringSAP_ERRORstatic java.lang.StringSOM_ADDON_PREFIXstatic java.lang.StringVALIDATIONS_ATTRIBUTE
-
Constructor Summary
Constructors Constructor Description SapOrderManagementSwitchUIComponentsAspect()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectapplyUIChanges(org.aspectj.lang.ProceedingJoinPoint pjp)Apply the UI changes when switching between synchronous order management SOM and asynchronous order management AOM.BaseStoreServicegetBaseStoreService()ProductFacadegetProductFacade()protected SessionServicegetSessionService()protected booleanisSapOrderMgmtEnabled()Check if synchronous order management SOM is activeprotected booleanisUIChangeRequired(java.lang.String uiComponent)static voidlogInfoMessage(java.lang.String methodSignature, java.lang.String uiComponent, boolean somEnabled)Log an information messagejava.lang.ObjectredirectToMyAccountPage(org.aspectj.lang.ProceedingJoinPoint pjp)Redirect the request to my account page since the requested page is not supported in the SOM scenariovoidsetBaseStoreService(BaseStoreService baseStoreService)voidsetProductFacade(ProductFacade productFacade)voidsetSessionService(SessionService sessionService)java.lang.ObjectswitchAddonUIComponent(org.aspectj.lang.ProceedingJoinPoint pjp)Switch the UI component definition from the b2bacceleratoraddon add-on to the ysapordermgmtb2baddon add-on
-
-
-
Field Detail
-
LOG
public static final org.apache.log4j.Logger LOG
-
SOM_ADDON_PREFIX
public static final java.lang.String SOM_ADDON_PREFIX
- See Also:
- Constant Field Values
-
REDIRECT_PREFIX
public static final java.lang.String REDIRECT_PREFIX
- See Also:
- Constant Field Values
-
FORWARD_PREFIX
public static final java.lang.String FORWARD_PREFIX
- See Also:
- Constant Field Values
-
ADDON_PREFIX
public static final java.lang.String ADDON_PREFIX
- See Also:
- Constant Field Values
-
REDIRECT_MY_ACCOUNT
public static final java.lang.String REDIRECT_MY_ACCOUNT
- See Also:
- Constant Field Values
-
VALIDATIONS_ATTRIBUTE
public static final java.lang.String VALIDATIONS_ATTRIBUTE
- See Also:
- Constant Field Values
-
SAP_ERROR
public static final java.lang.String SAP_ERROR
- See Also:
- Constant Field Values
-
-
Method Detail
-
getProductFacade
public ProductFacade getProductFacade()
- Returns:
- the productFacade
-
setProductFacade
public void setProductFacade(ProductFacade productFacade)
- Parameters:
productFacade- the productFacade to set
-
getBaseStoreService
public BaseStoreService getBaseStoreService()
- Returns:
- the baseStoreService
-
setBaseStoreService
public void setBaseStoreService(BaseStoreService baseStoreService)
- Parameters:
baseStoreService- the baseStoreService to set
-
applyUIChanges
public java.lang.Object applyUIChanges(org.aspectj.lang.ProceedingJoinPoint pjp) throws java.lang.ThrowableApply the UI changes when switching between synchronous order management SOM and asynchronous order management AOM. For the SOM scenario add the add-on prefix to the UI component.- Parameters:
pjp-- Returns:
- the UI component name
- Throws:
java.lang.Throwable
-
redirectToMyAccountPage
public java.lang.Object redirectToMyAccountPage(org.aspectj.lang.ProceedingJoinPoint pjp) throws java.lang.ThrowableRedirect the request to my account page since the requested page is not supported in the SOM scenario- Parameters:
pjp-- Returns:
- my account page
- Throws:
java.lang.Throwable
-
switchAddonUIComponent
public java.lang.Object switchAddonUIComponent(org.aspectj.lang.ProceedingJoinPoint pjp) throws java.lang.ThrowableSwitch the UI component definition from the b2bacceleratoraddon add-on to the ysapordermgmtb2baddon add-on- Parameters:
pjp-- Returns:
- the UI component name
- Throws:
java.lang.Throwable
-
logInfoMessage
public static void logInfoMessage(java.lang.String methodSignature, java.lang.String uiComponent, boolean somEnabled)Log an information message- Parameters:
methodSignature-uiComponent-somEnabled-
-
isSapOrderMgmtEnabled
protected boolean isSapOrderMgmtEnabled()
Check if synchronous order management SOM is active- Returns:
- true is SOM is active
-
isUIChangeRequired
protected boolean isUIChangeRequired(java.lang.String uiComponent)
- Parameters:
uiComponent-- Returns:
- true if the UI component switch is required
-
getSessionService
protected SessionService getSessionService()
-
setSessionService
public void setSessionService(SessionService sessionService)
-
-