Package org.hippoecm.repository.api
Class StringCodecFactory.UriEncoding
- java.lang.Object
-
- org.hippoecm.repository.api.StringCodecFactory.UriEncoding
-
- All Implemented Interfaces:
StringCodec
- Enclosing class:
- StringCodecFactory
public static class StringCodecFactory.UriEncoding extends Object implements StringCodec
The UriEncoding class is responsible for creating human-readable URI from a String, by either removing characters or by mapping them to characters that need not be percent-encoded.Note that the name 'UriEncoding' is not fully accurate as it does not conform to URI specs but rather creates a slug, a human-readable String.
Direct usage of this class discouraged. It should only be used by frameworks to initialize the StringCodecFactory instance.
- See Also:
- Encoding of node names
-
-
Constructor Summary
Constructors Constructor Description UriEncoding()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
decode(String encoded)
Decodes a string of characters.String
encode(String input)
Encodes a string of characters.
-
-
-
Method Detail
-
encode
public String encode(String input)
Description copied from interface:StringCodec
Encodes a string of characters.- Specified by:
encode
in interfaceStringCodec
- Parameters:
input
- the string to encode- Returns:
- the encoded string
-
decode
public String decode(String encoded)
Description copied from interface:StringCodec
Decodes a string of characters. Some encoding strategies are one-way, in which case the decoding might return null.- Specified by:
decode
in interfaceStringCodec
- Parameters:
encoded
- the previously encoded string- Returns:
- the decoded string or null if no decoding is possible
-
-