Class MediaWrapper

java.lang.Object
org.broadleafcommerce.common.rest.api.wrapper.BaseWrapper
com.broadleafcommerce.rest.api.wrapper.MediaWrapper
All Implemented Interfaces:
Serializable, org.broadleafcommerce.common.rest.api.wrapper.APIWrapper<org.broadleafcommerce.common.media.domain.Media>, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

public class MediaWrapper extends org.broadleafcommerce.common.rest.api.wrapper.BaseWrapper implements org.broadleafcommerce.common.rest.api.wrapper.APIWrapper<org.broadleafcommerce.common.media.domain.Media>
JAXB wrapper class for Media.
See Also:
  • Field Details

    • 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
    • archived

      protected Character archived
  • Constructor Details

    • MediaWrapper

      public MediaWrapper()
  • Method Details

    • wrapDetails

      public void wrapDetails(org.broadleafcommerce.common.media.domain.Media media, jakarta.servlet.http.HttpServletRequest request)
      Specified by:
      wrapDetails in interface org.broadleafcommerce.common.rest.api.wrapper.APIWrapper<org.broadleafcommerce.common.media.domain.Media>
    • wrapSummary

      public void wrapSummary(org.broadleafcommerce.common.media.domain.Media media, jakarta.servlet.http.HttpServletRequest request)
      Specified by:
      wrapSummary in interface org.broadleafcommerce.common.rest.api.wrapper.APIWrapper<org.broadleafcommerce.common.media.domain.Media>
    • isAllowOverrideUrl

      public boolean isAllowOverrideUrl()
    • setAllowOverrideUrl

      public void setAllowOverrideUrl(boolean allow)
    • getUrl

      public String getUrl()
      Returns:
      the url
    • setUrl

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

      public Long getId()
      Returns:
      the id
    • setId

      public void setId(Long id)
      Parameters:
      id - the id to set
    • getTitle

      public String getTitle()
      Returns:
      the title
    • setTitle

      public void setTitle(String title)
      Parameters:
      title - the title to set
    • getAltText

      public String getAltText()
      Returns:
      the altText
    • setAltText

      public void setAltText(String altText)
      Parameters:
      altText - the altText to set
    • getTags

      public String getTags()
      Returns:
      the tags
    • setTags

      public void setTags(String tags)
      Parameters:
      tags - the tags to set
    • getArchived

      public Character getArchived()
    • setArchived

      public void setArchived(Character archived)