com.ibm.commerce.seo.url.parser

Interface SEOURLParserResult

  • All Superinterfaces:
    java.io.Serializable


    public interface SEOURLParserResult
    extends java.io.Serializable
    This interface provides a single view of the results provided by a SEOURLParser implementation upon parsing an URL. Upon parsing an URL, the parser result could be one of the following:
    • A valid URL. In this case the state of the parser result would be set to valid. The token name to token values map would contain the tokens found in the URL along with their values in the order in which they were found. The URL pattern that matched would also be made available.
    • An invalid URL. In this case the state of the parser result would be set to invalid All the other data would be null.
    • A redirected URL. In this case, the state of the parser result would be set to redirect. The URL to be redirected to would be made available.
    Instances of this classes implementation would be created by the parser upon parsing an URL. Instances are also created from data cached for URLs that are already parsed. This class is serialized while saving in the cache.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT
      IBM copyright field.
      static java.lang.Integer RESULT_STATE_INVALID_URL
      The parser result state to indicate that the URL is invalid.
      static java.lang.Integer RESULT_STATE_REDIRECTED_URL
      The parser result state to indicate that the URL is redirected.
      static java.lang.Integer RESULT_STATE_VALID_URL
      The parser result state to indicate that the URL is valid.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method and Description
      java.lang.String getRedirectURL()
      Returns the URL to be redirected to in case of a redirected URL.
      int getResultState()
      Returns the state of the parser result.
      java.util.List getSEORedirectIds()
      This method returns the list of SEORedirect IDs found in an redirected URL.
      java.util.List getSEOURLKeywordIds()
      This method returns the list of URL keyword IDs found in the URL if the URL is valid or is redirected.
      java.lang.Integer getStoreId()
      Returns the store ID of the store to which the parser result belongs.
      java.util.Map<java.lang.String,java.util.List<java.lang.String>> getTokenNameTokenValuesMap()
      Returns a map of token name and token values in case of a valid URL.
      java.lang.String getURL()
      Returns the URL for which the parser result is instantiated.
      java.lang.String getURLPatternName()
      Returns the matching URL pattern name if the URL is valid.
    • Field Detail

      • COPYRIGHT

        static final java.lang.String COPYRIGHT
        IBM copyright field.
        See Also:
        Constant Field Values
      • RESULT_STATE_REDIRECTED_URL

        static final java.lang.Integer RESULT_STATE_REDIRECTED_URL
        The parser result state to indicate that the URL is redirected.
      • RESULT_STATE_VALID_URL

        static final java.lang.Integer RESULT_STATE_VALID_URL
        The parser result state to indicate that the URL is valid.
      • RESULT_STATE_INVALID_URL

        static final java.lang.Integer RESULT_STATE_INVALID_URL
        The parser result state to indicate that the URL is invalid.
    • Method Detail

      • getResultState

        int getResultState()
        Returns the state of the parser result. This indicates if the URL is valid, invalid or redirected.
        Returns:
        The state of the parser result.
      • getTokenNameTokenValuesMap

        java.util.Map<java.lang.String,java.util.List<java.lang.String>> getTokenNameTokenValuesMap()
        Returns a map of token name and token values in case of a valid URL. The token values are in the same order of occurrence of the token in the URL pattern.
        Returns:
        A map of token name and token values.
      • getRedirectURL

        java.lang.String getRedirectURL()
        Returns the URL to be redirected to in case of a redirected URL.
        Returns:
        The URL to which this URL is redirected to.
      • getStoreId

        java.lang.Integer getStoreId()
        Returns the store ID of the store to which the parser result belongs.
        Returns:
        The store ID.
      • getURLPatternName

        java.lang.String getURLPatternName()
        Returns the matching URL pattern name if the URL is valid.
        Returns:
        The matching URL pattern name.
      • getURL

        java.lang.String getURL()
        Returns the URL for which the parser result is instantiated.
        Returns:
        The URL that was parsed to generate this result.
      • getSEOURLKeywordIds

        java.util.List getSEOURLKeywordIds()
        This method returns the list of URL keyword IDs found in the URL if the URL is valid or is redirected. For an invalid URL, implementors of this method must return null.
        Returns:
        A list of URL keyword IDs.
      • getSEORedirectIds

        java.util.List getSEORedirectIds()
        This method returns the list of SEORedirect IDs found in an redirected URL.
        Returns:
        A list of SEORedirect IDs.