Class BaseOrderManagementWebservicesIntegrationTest

All Implemented Interfaces:
JaloSessionHolder
Direct Known Subclasses:
OrderControllerIntegrationTest, ReturnsControllerIntegrationTest, WorkflowControllerIntegrationTest

@IntegrationTest @ContextConfiguration(locations="classpath:/ordermanagementwebservices-spring-test.xml") public class BaseOrderManagementWebservicesIntegrationTest extends ServicelayerTest
  • Field Details

  • Constructor Details

    • BaseOrderManagementWebservicesIntegrationTest

      public BaseOrderManagementWebservicesIntegrationTest()
  • Method Details

    • getAllOrderByDefault

      protected OrderSearchPageWsDto getAllOrderByDefault()
    • getOrderByCode

      protected OrderWsDTO getOrderByCode(String code)
    • getOrdersByStatuses

      protected <T> T getOrdersByStatuses(String orderStatuses, Class<T> responseType)
    • getOrderEntriesForOrderCode

      protected OrderEntrySearchPageWsDTO getOrderEntriesForOrderCode(String code)
    • getOrderEntryForOrderCodeAndEntryNumber

      protected OrderEntryWsDTO getOrderEntryForOrderCodeAndEntryNumber(String code, String entryNumber)
    • getOrderStatusByDefault

      protected OrderStatusListWsDTO getOrderStatusByDefault()
    • getOrderFraudReports

      protected FraudReportListWsDTO getOrderFraudReports(String code)
    • getOrderCancellationReasons

      protected CancelReasonListWsDTO getOrderCancellationReasons()
    • getReturnCancellationReasons

      protected CancelReasonListWsDTO getReturnCancellationReasons()
    • getRefundReasons

      protected RefundReasonListWsDTO getRefundReasons()
    • getReturnActions

      protected ReturnActionListWsDTO getReturnActions()
    • getReturnStatuses

      protected ReturnStatusListWsDTO getReturnStatuses()
    • getReturns

      protected ReturnSearchPageWsDTO getReturns()
    • getReturnsByStatus

      protected <T> T getReturnsByStatus(String statuses, Class<T> responseType)
    • getReturnForReturnCode

      protected ReturnRequestWsDTO getReturnForReturnCode(String returnCode)
    • getReturnEntriesForReturnCode

      protected ReturnEntrySearchPageWsDTO getReturnEntriesForReturnCode(String returnCode)
    • postRequestManualPaymentReversalForReturnRequest

      protected javax.ws.rs.core.Response postRequestManualPaymentReversalForReturnRequest(String returnCode)
    • postRequestManualTaxReversalForReturnRequest

      protected javax.ws.rs.core.Response postRequestManualTaxReversalForReturnRequest(String returnCode)
    • postCancelReturnRequestByDefault

      protected javax.ws.rs.core.Response postCancelReturnRequestByDefault(CancelReturnRequestWsDTO cancelReturnRequestWsDTO)
    • postApproveFraudulentOrder

      protected javax.ws.rs.core.Response postApproveFraudulentOrder(String code)
    • postRejectFraudulentOrder

      protected javax.ws.rs.core.Response postRejectFraudulentOrder(String code)
    • postCancelOrder

      protected javax.ws.rs.core.Response postCancelOrder(OrderCancelRequestWsDTO orderCancelRequestWsDTO, String code)
    • postCreateOrder

      protected javax.ws.rs.core.Response postCreateOrder(OrderRequestWsDTO orderRequestWsDTO)
    • putUpdateReturnByReturnCode

      protected ReturnRequestWsDTO putUpdateReturnByReturnCode(String code, ReturnRequestModificationWsDTO returnRequestModificationWsDTO)
    • postManualPaymentVoid

      protected javax.ws.rs.core.Response postManualPaymentVoid(String code)
    • postManualTaxVoid

      protected javax.ws.rs.core.Response postManualTaxVoid(String code)
    • postManualTaxCommit

      protected javax.ws.rs.core.Response postManualTaxCommit(String code)
    • postManualTaxRequote

      protected javax.ws.rs.core.Response postManualTaxRequote(String code)
    • postManualPaymentReauth

      protected javax.ws.rs.core.Response postManualPaymentReauth(String code)
    • postManualDeliveryCostCommit

      protected javax.ws.rs.core.Response postManualDeliveryCostCommit(String code)
    • getWorkflowActions

      protected WorkflowActionListWsDto getWorkflowActions()
    • postDecideWorkflowAction

      protected javax.ws.rs.core.Response postDecideWorkflowAction(String workflowCode, String workflowDecisionCode)
    • postDecideWorkflowActions

      protected javax.ws.rs.core.Response postDecideWorkflowActions(WorkflowCodesListWsDto workflowCodesListWsDto, String decisionCode)
    • getDefaultSecuredRestCall

      protected <T> T getDefaultSecuredRestCall(String path, String username, String password, String fields, String currentPage, String pageSize, Class<T> responseType)
      Builds a secured GET rest call
      Parameters:
      path - the url for the call
      username - the username used for authentication
      password - the password used for authentication
      fields - contains pagination information
      currentPage - the current page of the request
      pageSize - total page size
      responseType - the response entity type
      Returns:
    • postDefaultSecuredRestCall

      protected <T> T postDefaultSecuredRestCall(String path, String username, String password, String fields, T requestBodyWsDTO, Class<T> responseType)
      Builds a POST rest call with the return type .
      Type Parameters:
      T - type of the body object
      Parameters:
      path - the url for the call
      username - the username used for authentication
      password - the password used for authentication
      fields - contains pagination information
      requestBodyWsDTO - the dto object sent with the request
      responseType - type of class to return
      Returns:
      the request class to return after the execution of the call
    • postDefaultSecuredRestCall

      protected <T> javax.ws.rs.core.Response postDefaultSecuredRestCall(String path, String username, String password, String fields, T requestBodyWsDTO)
      Builds a secured POST rest call.
      Type Parameters:
      T - type of the body object
      Parameters:
      path - the url for the call
      username - the username used for authentication
      password - the password used for authentication
      fields - contains pagination information
      requestBodyWsDTO - the dto object sent with the request
      Returns:
      the result of the call
    • postEmptyBodySecuredRestCall

      protected javax.ws.rs.core.Response postEmptyBodySecuredRestCall(String path, String username, String password)
      Builds a secured POST rest call with an empty body
      Parameters:
      path - the url for the call
      username - the username for authentication
      password - the password for authentication
      Returns:
      the result of the call
    • putDefaultSecuredRestCall

      protected <S, T> T putDefaultSecuredRestCall(String path, String username, String password, String fields, S requestBodyWsDTO, Class<T> responseType)
      Builds a PUT rest call
      Type Parameters:
      T -
      Parameters:
      path - the url for the call
      username - the username used for authentication
      password - the password used for authentication
      fields - contains pagination information
      requestBodyWsDTO - the current dto which is to be updated
      responseType - type of class to return
      Returns:
      the request class to return after the execution of the call
    • assertBadRequestWithContent

      protected void assertBadRequestWithContent(javax.ws.rs.core.Response response, String errorReason, String errorSubject, String ErrorSubjectType)
      Validates the first ErrorWsDTO content of the ErrorListWsDTO of the bad request
      Parameters:
      response - bad request response
      errorReason - error reason
      errorSubject - error subject
      ErrorSubjectType - error subject type
    • getWsSecuredRequestBuilder

      protected WsSecuredRequestBuilder getWsSecuredRequestBuilder()
      Retrieves a new WsSecuredRequestBuilder in order to build web requests.
      Returns:
      the WsSecuredRequestBuilder
    • getExtensionNames

      protected List<String> getExtensionNames()
      Gets a List of all extensions loaded in the current setup.
      Returns:
      populated List of all loaded extensions
    • getSetupImpexService

      protected SetupImpexService getSetupImpexService()
    • setSetupImpexService

      public void setSetupImpexService(SetupImpexService setupImpexService)
    • getEnumerationService

      public EnumerationService getEnumerationService()
    • setEnumerationService

      public void setEnumerationService(EnumerationService enumerationService)