Class BaseWrapper
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 Summary
FieldsModifier and TypeFieldDescriptionprotected org.springframework.context.ApplicationContext -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected List<MapElementWrapper>Utility method.voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext) voidUsed method, to be used by Wrappers that implement the WrapperAdditionalFields interface.
-
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:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-
createElementWrappers
Utility method. Traverses the domain object's additional fields, and generates a list of MapElementWrappers with them- Parameters:
model- the domain object
-
transferAdditionalFieldsFromWrapper
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-
-