Class DefaultUrlEncoderFacade

java.lang.Object
de.hybris.platform.acceleratorfacades.urlencoder.impl.DefaultUrlEncoderFacade
All Implemented Interfaces:
UrlEncoderFacade

public class DefaultUrlEncoderFacade extends Object implements UrlEncoderFacade
Facade implementation for UrlEncoding attributes
  • Constructor Details

    • DefaultUrlEncoderFacade

      public DefaultUrlEncoderFacade()
  • Method Details

    • isValid

      public boolean isValid(String attributeName, String value)
      Description copied from interface: UrlEncoderFacade
      Checks if the given urlEncodingAttribute holds a valid value for injection into the URL.
      Specified by:
      isValid in interface UrlEncoderFacade
      Parameters:
      attributeName - encodoing attribute name to check
      value - encoding attribute value to check
      Returns:
      boolean
    • extractEncodingPattern

      protected String extractEncodingPattern(List<UrlEncoderData> urlEncodingAttributes)
    • getCurrentUrlEncodingData

      public List<UrlEncoderData> getCurrentUrlEncodingData()
      Description copied from interface: UrlEncoderFacade
      Gets the list of attributes and it's values that has to be encoded in the url. The list of attributes for each site will be configured in CMSSiteModel and the data objects that holds the attributes and it's values will be set in SessionService attributes.
      Specified by:
      getCurrentUrlEncodingData in interface UrlEncoderFacade
      Returns:
      List of UrlEncoderData objects that holds the encoding attribute's values.
    • updateSiteFromUrlEncodingData

      public void updateSiteFromUrlEncodingData()
      Description copied from interface: UrlEncoderFacade
      Updates the Store/Site based on the change in value of the urlEncodingAttributes. Only specific encoding attributes are allowed to change the site.
      Specified by:
      updateSiteFromUrlEncodingData in interface UrlEncoderFacade
    • calculateAndUpdateUrlEncodingData

      public String calculateAndUpdateUrlEncodingData(String uri, String contextPath)
      Description copied from interface: UrlEncoderFacade
      Gets the urlEncoding pattern that has to be injected into the URL. This pattern is calculated based on the input URL and encoding attributes configured for specific site. This method will also update the url encoding values stored in the session.
      Specified by:
      calculateAndUpdateUrlEncodingData in interface UrlEncoderFacade
      Parameters:
      uri - input URL to build pattern
      contextPath - context with encoding attributes
      Returns:
      the pattern
    • writeDebugLog

      protected void writeDebugLog(String message)
    • getSessionService

      protected SessionService getSessionService()
    • setSessionService

      public void setSessionService(SessionService sessionService)
    • getUrlEncoderService

      protected UrlEncoderService getUrlEncoderService()
    • setUrlEncoderService

      public void setUrlEncoderService(UrlEncoderService urlEncoderService)