Details
-
Improvement
-
Resolution: Fixed
-
Major
-
7.4
-
None
-
Unit, Integration
-
Unknown
-
N/A
-
N/A
-
Description
Proposed interface:
@Role public interface SymbolScheme { /** * @return the character used for escaping characters in Entity Reference names */ Character getEscapeSymbol(); /** * @return the map containing all the symbols to separate Entity Types. The map's key is an Entity Type and * the value is another map who's key is the second Entity Type and its value is the character separating * the 2 Entity Types. For example you could have the {code .} character separating an * {@link EntityType#DOCUMENT} and a {@link EntityType#SPACE}. Note that a given Entity Type can have * several separator characters if it can have several different parent types (e.g. a Space reference can * have either a Space Entity Type or a Wiki Entity Type) */ Map<EntityType, Map<EntityType, Character>> getSeparatorSymbols(); /** * @param type the Entity Type for which to get the list of strings to escape. For example for a SPACE Entity type * you could want to escape {@code .}, {@code :} and {@code \}. * @return the various strings that require escaping for the passed Entity type */ String[] getSymbolsRequiringEscapes(EntityType type); /** * @param type the Entity Type for which to get the list of strings to use to replace each escape returned by * {@link #getSymbolsRequiringEscapes(EntityType)}. For example for a SPACE Entity type you could * want to replace {@code .} with {@code \.}, {@code :} with {@code \:} and {@code \} with {@code \\} * @return the various replacement strings to replace string that require escaping */ String[] getReplacementSymbols(EntityType type); }
Attachments
Issue Links
- blocks
-
XWIKI-13339 Introduce an Entity Reference Resolver/Serializer that can be used in URL parsing/generation
- Closed
- is duplicated by
-
XWIKI-8182 Entity Reference serializers should fail if the passed reference is invalid
- Closed