Class RedirectRule

java.lang.Object
com.adobe.acs.commons.redirects.models.RedirectRule

@Model(adaptables={org.apache.sling.api.SlingHttpServletRequest.class,org.apache.sling.api.resource.Resource.class}, defaultInjectionStrategy=OPTIONAL) public class RedirectRule extends Object
  • Field Details

  • Constructor Details

    • RedirectRule

      public RedirectRule()
  • Method Details

    • init

      @PostConstruct protected void init()
    • getSource

      public String getSource()
    • getTarget

      public String getTarget()
    • getNote

      public String getNote()
    • getStatusCode

      public int getStatusCode()
    • getEvaluateURI

      public boolean getEvaluateURI()
    • isCaseInsensitive

      public boolean isCaseInsensitive()
    • getCreatedBy

      public String getCreatedBy()
    • getModifiedBy

      public String getModifiedBy()
    • getContextPrefixIgnored

      public boolean getContextPrefixIgnored()
    • getRegex

      public Pattern getRegex()
    • getCreated

      public Calendar getCreated()
    • getModified

      public Calendar getModified()
    • getUntilDate

      public Calendar getUntilDate()
    • getEffectiveFrom

      public Calendar getEffectiveFrom()
    • getTagIds

      public String[] getTagIds()
    • getCacheControlHeader

      public String getCacheControlHeader()
    • getDefaultCacheControlHeader

      public String getDefaultCacheControlHeader()
      Returns:
      default Cache-Control header for this redirect inherited from the parent
    • getTags

      public List<com.day.cq.tagging.Tag> getTags()
      used in the redirect-row component to print tags in HTL
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object
    • evaluate

      public String evaluate(Matcher matcher)
    • getState

      public RedirectState getState()
      Returns:
      whether the rule has expired, i.e. the 'untilDate' property is before the current time ----[effectiveFrom]---[now]---[untilDate]--->
    • isPublished

      public boolean isPublished()
      Returns:
      whether the redirect is published
    • getPreserveQueryString

      public String getPreserveQueryString()