Class URLHandlerImpl

java.lang.Object
org.broadleafcommerce.cms.url.domain.URLHandlerImpl
All Implemented Interfaces:
Serializable, URLHandler, URLHandlerAdminPresentation, org.broadleafcommerce.common.admin.domain.AdminMainEntity, org.broadleafcommerce.common.copy.MultiTenantCloneable<URLHandler>, org.broadleafcommerce.common.extensibility.jpa.copy.ProfileEntity, org.broadleafcommerce.common.web.Locatable

@Entity public class URLHandlerImpl extends Object implements URLHandler, org.broadleafcommerce.common.web.Locatable, org.broadleafcommerce.common.admin.domain.AdminMainEntity, org.broadleafcommerce.common.extensibility.jpa.copy.ProfileEntity, URLHandlerAdminPresentation
Author:
priyeshpatel
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

    • URLHandlerImpl

      public URLHandlerImpl()
  • 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
    • getUrlRedirectType

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

      public void setUrlRedirectType(URLRedirectType redirectType)
      Specified by:
      setUrlRedirectType 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
    • getMainEntityName

      public String getMainEntityName()
      Specified by:
      getMainEntityName in interface org.broadleafcommerce.common.admin.domain.AdminMainEntity
    • getLocation

      public String getLocation()
      Specified by:
      getLocation in interface org.broadleafcommerce.common.web.Locatable
    • hasRegExCharacters

      protected boolean hasRegExCharacters(String location)
      In a preview environment, getLocation() attempts to navigate to the provided URL. If the URL contains a Regular Expression, then we can't navigate to it.
      Parameters:
      location -
      Returns:
    • createOrRetrieveCopyInstance

      public <G extends URLHandler> org.broadleafcommerce.common.copy.CreateResponse<G> createOrRetrieveCopyInstance(org.broadleafcommerce.common.copy.MultiTenantCopyContext context) throws CloneNotSupportedException
      Specified by:
      createOrRetrieveCopyInstance in interface org.broadleafcommerce.common.copy.MultiTenantCloneable<URLHandler>
      Throws:
      CloneNotSupportedException
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object