Interface ContextPathEncoder

  • All Known Implementing Classes:

    public interface ContextPathEncoder
    A service to provide utilities needed for event context encoding and decoding to and from (partial) URL paths. This is used for both component event contexts and page activation contexts.
    • Method Detail

      • encodeIntoPath

        String encodeIntoPath​(Object[] context)
        Encodes the context values into a path string. Each context value (if non-null) is first value encoded into a string via the ContextValueEncoder service. Those values are then encoded, via URLEncoder.encode(String) into URL-safe strings. The URL-safe strings are then concatenated together, separated with "/" characters.
        context - an array of objects to encode as the context (may be null)
        the path-encoded context, or the blank string if the context is empty
      • encodeIntoPath

        String encodeIntoPath​(EventContext context)
        Encodes the context into a string. Returns the empty string if the context is empty.
        context - to encode
        encoded values separated by "/" characters, or the empty string