public class DefaultPermalinkGenerator extends Object implements PermalinkGenerator
PERMA_ID_NOTES, PERMA_ID_TAGS, PERMA_ID_TOPICS, PERMA_ID_USERS
Constructor and Description |
---|
DefaultPermalinkGenerator() |
Modifier and Type | Method and Description |
---|---|
String |
extractPermaLinkIdentifier(String[] uriFragments)
Get the type of perma link (one of the constants
PermalinkGenerator.PERMA_ID_TOPICS etc) |
String |
getBlogLink(String blogAlias)
Calls
PermalinkGenerator.getBlogLink(String, boolean) with secure parameter set to false . |
String |
getBlogLink(String blogAlias,
boolean secure) |
String |
getDiscussionLink(String blogAlias,
Long discussionId,
boolean secure)
throws UnsupportedOperationException
|
String |
getNoteLink(String blogAlias,
Long noteId)
Calls
PermalinkGenerator.getNoteLink(String, Long, boolean) with secure parameter set to
false . |
String |
getNoteLink(String blogAlias,
Long noteId,
boolean secure)
.
|
String |
getTagLink(long tagId)
Calls
PermalinkGenerator.getTagLink(String, boolean) with secure parameter set to false . |
String |
getTagLink(long tagId,
boolean secure) |
String |
getTagLink(String tag)
Calls
PermalinkGenerator.getTagLink(String, boolean) with secure parameter set to false . |
String |
getTagLink(String tag,
boolean secure)
.
|
String |
getUserLink(String userAlias)
Calls
PermalinkGenerator.getUserLink(String,boolean) with secure parameter set to false . |
String |
getUserLink(String userAlias,
boolean secure)
.
|
public String extractPermaLinkIdentifier(String[] uriFragments)
PermalinkGenerator.PERMA_ID_TOPICS
etc).extractPermaLinkIdentifier
in interface PermalinkGenerator
uriFragments
- the splitted uri fragmentspublic final String getBlogLink(String blogAlias)
PermalinkGenerator
PermalinkGenerator.getBlogLink(String, boolean)
with secure parameter set to false
.getBlogLink
in interface PermalinkGenerator
blogAlias
- the alias of the blog to get the link forpublic String getBlogLink(String blogAlias, boolean secure)
getBlogLink
in interface PermalinkGenerator
blogAlias
- the alias of the blog to get the link forsecure
- If true https will be used.public String getDiscussionLink(String blogAlias, Long discussionId, boolean secure)
public final String getNoteLink(String blogAlias, Long noteId)
PermalinkGenerator
PermalinkGenerator.getNoteLink(String, Long, boolean)
with secure parameter set to
false
.getNoteLink
in interface PermalinkGenerator
blogAlias
- the blog alias of the note to get the link fornoteId
- the id of the note to get the link forpublic String getNoteLink(String blogAlias, Long noteId, boolean secure)
getNoteLink
in interface PermalinkGenerator
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)
PermalinkGenerator.getTagLink(String, boolean)
with secure parameter set to false
.getTagLink
in interface PermalinkGenerator
tagId
- The tag to get the link forpublic String getTagLink(long tagId, boolean secure)
getTagLink
in interface PermalinkGenerator
tagId
- the tag to get the link forsecure
- If true, https will be used.public String getTagLink(String tag)
PermalinkGenerator
PermalinkGenerator.getTagLink(String, boolean)
with secure parameter set to false
.getTagLink
in interface PermalinkGenerator
tag
- The tag to get the link forpublic String getTagLink(String tag, boolean secure)
getTagLink
in interface PermalinkGenerator
tag
- the tag to get the link forsecure
- If true, https will be used.public final String getUserLink(String userAlias)
PermalinkGenerator
PermalinkGenerator.getUserLink(String,boolean)
with secure parameter set to false
.getUserLink
in interface PermalinkGenerator
userAlias
- the alias of the user to get the link forpublic String getUserLink(String userAlias, boolean secure)
getUserLink
in interface PermalinkGenerator
userAlias
- the alias of the user to get the link forsecure
- If true, https will be used.Copyright © 2019 Communote team. All rights reserved.