@Service public class PermalinkGenerationManagement extends DefaultPermalinkGenerator
PermalinkGenerator
itself.PERMA_ID_NOTES, PERMA_ID_TAGS, PERMA_ID_TOPICS, PERMA_ID_USERS
Constructor and Description |
---|
PermalinkGenerationManagement() |
Modifier and Type | Method and Description |
---|---|
String |
extractPermaLinkIdentifier(String[] uriFragments)
Delegates to the last added generator or the default generator.
|
String |
getBlogLink(String blogAlias,
boolean secure)
Delegates to the last added generator or the default generator.
|
String |
getExternalObjectLink(String externalSystemId,
String externalObjectId)
Returns a link to the given object within the external system.
|
String |
getNoteLink(String blogAlias,
Long noteId,
boolean secure)
Delegates to the last added generator or the default generator.
|
String |
getTagLink(long tagId,
boolean secure)
Delegates to the last added generator or the default generator.
|
String |
getUserLink(String userAlias,
boolean secure)
Delegates to the last added generator or the default generator.
|
void |
registerPermalinkGenerator(PermalinkGenerator permalinkGenerator) |
void |
unregisterPermalinkGenerator(PermalinkGenerator permalinkGenerator) |
getBlogLink, getDiscussionLink, getNoteLink, getTagLink, getTagLink, getTagLink, getUserLink
public String extractPermaLinkIdentifier(String[] uriFragments)
PermalinkGenerator.PERMA_ID_TOPICS
etc).extractPermaLinkIdentifier
in interface PermalinkGenerator
extractPermaLinkIdentifier
in class DefaultPermalinkGenerator
uriFragments
- the splitted uri fragmentspublic String getBlogLink(String blogAlias, boolean secure)
getBlogLink
in interface PermalinkGenerator
getBlogLink
in class DefaultPermalinkGenerator
blogAlias
- the alias of the blog to get the link forsecure
- If true https will be used.public String getExternalObjectLink(String externalSystemId, String externalObjectId)
externalSystemId
- The external systems id.externalObjectId
- The external objects id.public String getNoteLink(String blogAlias, Long noteId, boolean secure)
getNoteLink
in interface PermalinkGenerator
getNoteLink
in class DefaultPermalinkGenerator
blogAlias
- the blog alias of the note to get the link fornoteId
- the id of the note to get the link forsecure
- If true, https will be used.public String getTagLink(long tagId, boolean secure)
getTagLink
in interface PermalinkGenerator
getTagLink
in class DefaultPermalinkGenerator
tagId
- the tag to get the link forsecure
- If true, https will be used.public String getUserLink(String userAlias, boolean secure)
getUserLink
in interface PermalinkGenerator
getUserLink
in class DefaultPermalinkGenerator
userAlias
- the alias of the user to get the link forsecure
- If true, https will be used.public void registerPermalinkGenerator(PermalinkGenerator permalinkGenerator)
permalinkGenerator
- Generator to register.public void unregisterPermalinkGenerator(PermalinkGenerator permalinkGenerator)
permalinkGenerator
- Generator to remove.Copyright © 2019 Communote team. All rights reserved.