java.lang.Object
org.broadleafcommerce.common.rest.api.wrapper.BaseWrapper
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

public abstract class BaseWrapper extends Object implements org.springframework.context.ApplicationContextAware
Base class for APIWrapper implementations to inject the EntityConfiguration reference.
  • Field Details

    • context

      protected org.springframework.context.ApplicationContext context
  • Constructor Details

    • BaseWrapper

      public BaseWrapper()
  • Method Details

    • setApplicationContext

      public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
      Specified by:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware
      Throws:
      org.springframework.beans.BeansException
    • createElementWrappers

      protected List<MapElementWrapper> createElementWrappers(AdditionalFields model)
      Utility method. Traverses the domain object's additional fields, and generates a list of MapElementWrappers with them
      Parameters:
      model - the domain object
    • transferAdditionalFieldsFromWrapper

      public void transferAdditionalFieldsFromWrapper(WrapperAdditionalFields from, AdditionalFields to)
      Used method, to be used by Wrappers that implement the WrapperAdditionalFields interface. Transfers the additional fields from the wrapper into the domain object
      Parameters:
      from -
      to -