Class URLHandlerDTO

java.lang.Object
org.broadleafcommerce.cms.url.domain.URLHandlerDTO
All Implemented Interfaces:
Serializable, URLHandler, MultiTenantCloneable<URLHandler>
Direct Known Subclasses:
NullURLHandler

public class URLHandlerDTO extends Object implements URLHandler
A bean representation of a URLHandler
Author:
bpolster
See Also:
  • Field Details

    • id

      protected Long id
    • incomingURL

      protected String incomingURL
    • newURL

      protected String newURL
    • urlRedirectType

      protected String urlRedirectType
    • isRegex

      protected boolean isRegex
  • Constructor Details

  • Method Details

    • getId

      public Long getId()
      Specified by:
      getId in interface URLHandler
    • setId

      public void setId(Long id)
      Specified by:
      setId in interface URLHandler
    • getIncomingURL

      public String getIncomingURL()
      Specified by:
      getIncomingURL in interface URLHandler
    • setIncomingURL

      public void setIncomingURL(String incomingURL)
      Specified by:
      setIncomingURL in interface URLHandler
    • getNewURL

      public String getNewURL()
      Specified by:
      getNewURL in interface URLHandler
    • setNewURL

      public void setNewURL(String newURL)
      Specified by:
      setNewURL in interface URLHandler
    • isRegexHandler

      public boolean isRegexHandler()
      Description copied from interface: URLHandler
      Indicates if the value returned by getIncomingURL() is a regex expression rather than a concrete URI. Default is false.
      Specified by:
      isRegexHandler in interface URLHandler
      Returns:
    • setRegexHandler

      @Deprecated public void setRegexHandler(boolean regexHandler)
      Deprecated.
      Specified by:
      setRegexHandler in interface URLHandler
    • setRegexHandler

      public void setRegexHandler(Boolean regexHandler)
      Description copied from interface: URLHandler
      Indicates if the value set by the method setIncomingURL(String) should be treated as a regex expression rather than as a concrete URI.
      Specified by:
      setRegexHandler in interface URLHandler
    • getUrlRedirectType

      public URLRedirectType getUrlRedirectType()
      Specified by:
      getUrlRedirectType in interface URLHandler
    • setUrlRedirectType

      public void setUrlRedirectType(URLRedirectType redirectType)
      Specified by:
      setUrlRedirectType in interface URLHandler
    • createOrRetrieveCopyInstance

      public <G extends URLHandler> CreateResponse<G> createOrRetrieveCopyInstance(MultiTenantCopyContext context) throws CloneNotSupportedException
      Description copied from interface: MultiTenantCloneable
      Clone this entity for the purpose of multiple tenancy. Note, extending classes should follow this pattern:

      public CreateResponse<MyClass> createOrRetrieveCopyInstance(MultiTenantCopyContext context) throws CloneNotSupportedException { CreateResponse<MyClass> createResponse = super.createOrRetrieveCopyInstance(context); if (createResponse.isAlreadyPopulated()) { return createResponse; } MyClass myClone = createResponse.getClone();

      //copy extended field values on myClone here

      return createResponse; }

      Support should also be added for @Embeddable classes that contribute fields (collections or basic) to a cloneable entity:

      public CreateResponse<G extends MyClass> createOrRetrieveCopyInstance(MultiTenantCopyContext context) throws CloneNotSupportedException { CreateResponse createResponse = context.createOrRetrieveCopyInstance(this); MyClass myClone = createResponse.getClone();

      //copy extended field values on myClone here

      return createResponse; }

      Specified by:
      createOrRetrieveCopyInstance in interface MultiTenantCloneable<URLHandler>
      Parameters:
      context - a context object providing persistence and library functionality for copying entities
      Returns:
      the resulting copy container, possibly already persisted
      Throws:
      CloneNotSupportedException - if there's a problem detected with the cloning configuration