org.broadleafcommerce.core.web.api.wrapper
Class MediaWrapper

java.lang.Object
  extended by org.broadleafcommerce.core.web.api.wrapper.BaseWrapper
      extended by org.broadleafcommerce.core.web.api.wrapper.MediaWrapper
All Implemented Interfaces:
APIWrapper<Media>, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

public class MediaWrapper
extends BaseWrapper
implements APIWrapper<Media>

JAXB wrapper class for Media.


Field Summary
protected  boolean allowOverrideUrl
          This allows us to control whether the URL should / can be overwritten, for example by the static asset service.
protected  String altText
           
protected  Long id
           
protected  String tags
           
protected  String title
           
protected  String url
           
 
Fields inherited from class org.broadleafcommerce.core.web.api.wrapper.BaseWrapper
context
 
Constructor Summary
MediaWrapper()
           
 
Method Summary
 boolean isAllowOverrideUrl()
           
 void setAllowOverrideUrl(boolean allow)
           
 void setUrl(String url)
          Call this only if allowOverrideUrl is true, and only AFTER you call wrap.
 void wrapDetails(Media media, javax.servlet.http.HttpServletRequest request)
           
 void wrapSummary(Media media, javax.servlet.http.HttpServletRequest request)
           
 
Methods inherited from class org.broadleafcommerce.core.web.api.wrapper.BaseWrapper
setApplicationContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

allowOverrideUrl

protected boolean allowOverrideUrl
This allows us to control whether the URL should / can be overwritten, for example by the static asset service.


id

protected Long id

title

protected String title

url

protected String url

altText

protected String altText

tags

protected String tags
Constructor Detail

MediaWrapper

public MediaWrapper()
Method Detail

wrapDetails

public void wrapDetails(Media media,
                        javax.servlet.http.HttpServletRequest request)
Specified by:
wrapDetails in interface APIWrapper<Media>

wrapSummary

public void wrapSummary(Media media,
                        javax.servlet.http.HttpServletRequest request)
Specified by:
wrapSummary in interface APIWrapper<Media>

isAllowOverrideUrl

public boolean isAllowOverrideUrl()

setAllowOverrideUrl

public void setAllowOverrideUrl(boolean allow)

setUrl

public void setUrl(String url)
Call this only if allowOverrideUrl is true, and only AFTER you call wrap.

Parameters:
url -


Copyright © 2013. All Rights Reserved.