public final class Services extends Object
Provides useful constants for PageSeeder services.
As a convention, most parameters in this class are strings that correspond to the identifier for the entity been searched, for example:
The order of the parameters is generally the order in which they appear in the URL of the underlying service.
There is generally no reason to access this class directly, higher-level class should be accessed instead.
Modifier and Type | Method and Description |
---|---|
static String |
prefixGroup(String group)
If group is not a number then add "~" prefix.
|
static String |
prefixMember(String member)
If member is not a number then add "~" prefix and URL encode it.
|
static String |
toAbout()
Returns the URL toe get information about PageSeeder.
|
protected static String |
toActivateMember(String member)
Returns the URL to activate a member.
|
static String |
toAddSubGroup(String group)
Returns the URL to add a subgroup.
|
static String |
toArchiveComment(String member,
String comment)
Returns the URL to archive to a comment.
|
static String |
toArchiveGroup(String member,
String group)
Returns the URL to archive a group.
|
static String |
toArchiveProject(String member,
String project)
Returns the URL to archive a project.
|
static String |
toComment(String member,
String comment)
Returns the URL to a comment.
|
static String |
toCreate(String member)
Returns the URL to create a member's personal group.
|
static String |
toCreateCommentService(PSMember creator,
PSComment.Context context)
Shorthand method to return the service to use to create a comment.
|
static String |
toCreateDocumentForURL(String member,
String group)
Returns the URL to create a document for a given URL.
|
static String |
toCreateExternalURIService(String member,
String group)
Returns the URL to create an external URI.
|
static String |
toCreateGroup(String member)
Returns the URL to create a group.
|
static String |
toCreateGroupFolder(String group)
Deprecated.
Use
toCreateGroupFolder2(String) instead |
static String |
toCreateGroupFolder2(String group)
Returns the URL to create a new group folder in a group.
|
static String |
toCreateMember()
Returns the URL to create a member.
|
static String |
toCreateMembership(String group)
Returns the URL to create a group member.
|
static String |
toCreateProject(String member)
Returns the URL to create a project.
|
static String |
toCreateResource(String project)
Returns the URL to create a resource.
|
protected static String |
toDeclineInvitation(String member)
Returns the URL for a member to decline the invitation to a group.
|
static String |
toDeleteMembership(String group,
String member)
Deprecated.
Use
toMembership(String, String) with DELETE |
static String |
toDeleteResource(String project)
Deprecated.
Use
toResource(String) with DELETE |
static String |
toDeregisterMember(String group,
String member)
Returns the URL to deregister a member from a group.
|
static String |
toDiscussionsForFragment(String member,
String uri,
String fragment)
Returns the URL to reply to a comment.
|
static String |
toDiscussionsForGroup(String group)
Returns the URL to get the list of discussions on the group.
|
static String |
toDiscussionsForURI(String member,
String uri)
Returns the URL to reply to a comment.
|
static String |
toEditComment(String member,
String comment)
Deprecated.
Use
toComment(String, String) with PATCH |
static String |
toEditGroup(String member,
String group)
Deprecated.
Use
toGroup(String, String) with PATCH |
static String |
toEditMembership(String group,
String member)
Deprecated.
Use
toMembership(String, String) with PATCH |
static String |
toEditProject(String member,
String project)
Deprecated.
Use
toProject(String, String) with PATCH |
static String |
toEditSubGroup(String group,
String sub)
Deprecated.
Use
toSubGroup(String, String) with PATCH |
static String |
toEditURI(String member,
String group,
String uri)
Returns the URL to edit the URI.
|
static String |
toFindComments(String member)
Returns the URL to find comments.
|
static String |
toFindGroupMember(String group)
Returns the URL to invoke the group member search service.
|
static String |
toForceResetPassword()
Returns the URL to reset the password of the current user.
|
static String |
toForceResetPassword(String group)
Returns the URL to force the password to be reset.
|
static String |
toGetComment(String member,
String comment)
Returns the URL to load a comment.
|
static String |
toGetFragment(String member,
String group,
String uri,
String fragment)
Returns the URL to get/put a fragment from a document.
|
static String |
toGetGroup(String group)
Returns the URL to get a group.
|
static String |
toGetGroup(String member,
String group)
Deprecated.
|
static String |
toGetGroupFolderForURL(String group)
Deprecated.
Use
toGetGroupFolderForURL2(String) instead |
static String |
toGetGroupFolderForURL2(String group)
Returns the URL to get a group folder for a given url.
|
static String |
toGetProject(String project)
Returns the URL to get a project.
|
static String |
toGetProject(String member,
String project)
Deprecated.
|
static String |
toGetResource(String project)
Returns the URL to put a resource.
|
static String |
toGetURIForID(String group,
String uri)
Returns the URL to get a URI for a given ID.
|
static String |
toGetURIForURL(String group)
Returns the URL to get a URI for a given URL.
|
static String |
toGroup(String member,
String group)
Returns the URL to a group.
|
static String |
toGroupMemberManage(String group,
String member)
Returns the URL to invoke the group member registration service.
|
static String |
toInviteMember(String group)
Returns the URL to invite a member to a group.
|
static String |
toInviteSelf(String group)
Returns the URL for a member to ivite himself to a group.
|
static String |
toInviteSelf(String group,
String member)
Deprecated.
Use
toInviteSelf(String) instead |
static String |
toListAlldetailsMembers(String group)
Returns the URL to list the members of a group including all their details.
|
static String |
toListGroupFolders(String group)
Returns the URL to list the group folders for a group.
|
static String |
toListLabels(String group)
Returns the URL to return the list of labels in a group.
|
static String |
toListMembers(String group)
Returns the URL to list the members of a group.
|
protected static String |
toListMemberships(String member)
Returns the URL to list the memberships of a user.
|
static String |
toListProjects(String member)
Returns the URL to list the top-level projects a member belongs to.
|
static String |
toListSubGroups(String group)
Returns the URL to list the subgroups of a group.
|
static String |
toListSubProjects(String member,
String project)
Returns the URL to list the subprojects of a project.
|
static String |
tolistURIsForURL(String group)
Returns the URL to list URIs for a given URL.
|
static String |
toListXRefs(String group,
Long uriid)
Returns the URL to list XRefs.
|
protected static String |
toMember(String member)
Returns the URL to edit the details of a member.
|
static String |
toMemberDetails(String member)
Returns the URL to return the details of a member.
|
protected static String |
toMemberEdit(String member)
Deprecated.
Use
toMember(String) with PATCH |
static String |
toMembership(String group,
String member)
Returns the URL to invoke the group member edit service.
|
static String |
toMembershipDetails(String group,
String member)
Returns the URL to invoke the group member details service.
|
static String |
toPasswordMeter()
Returns the URL to check the password strength.
|
static String |
toProject(String member,
String project)
Returns the URL to a project.
|
static String |
toProjectsFind(String member)
Returns the URL to return the results for a projects/groups search.
|
static String |
toProjectsTree(String member)
Returns the URL to return the tree of projects a member belongs to.
|
static String |
toPutResource(String project)
Deprecated.
Use
toResource(String) with PUT |
static String |
toRegisterMember()
Returns the URL to self-register a member.
|
static String |
toRemoveSubGroup(String group,
String sub)
Returns the URL to remove a subgroup from a group.
|
static String |
toRenameGroup(String member,
String group)
Returns the URL to rename a group.
|
static String |
toRenameProject(String member,
String project)
Returns the URL to rename a project.
|
protected static String |
toReplyComment(String member,
String xlink)
Returns the URL to reply to a comment.
|
static String |
toReplyCommentService(PSComment.Author author,
long xlinkid,
PSGroup group)
Shorthand method to return the service to use to reply to a comment.
|
static String |
toReportError()
Returns the URL to report an error.
|
static String |
toResetPassword()
Returns the URL to reset the password of the current user.
|
static String |
toResetPassword(String group)
Returns the URL to reset the password of the current user.
|
static String |
toResetSession()
Returns the URL to reset the current session.
|
static String |
toResource(String project)
Returns the URL to a resource.
|
static String |
toSaveURIProperties(String member,
String group,
String uri)
Deprecated.
Use
toEditURI(String, String, String) with PATCH |
static String |
toSendMail(String member,
String group)
Returns the URL to send an email.
|
static String |
toSubGroup(String group,
String sub)
Returns the URL to a subgroup.
|
static String |
toSubProjects(String member,
String project)
Deprecated.
|
static String |
toSubProjectsTree(String member,
String project)
Returns the URL to return the sub-tree of projects a member belongs to.
|
static String |
toThreadProgress(String threadid)
Returns the URL to check the progress of a thread.
|
static String |
toUnarchiveComment(String member,
String comment)
Returns the URL to unarchive to a comment.
|
static String |
toUnarchiveProject(String member,
String project)
Returns the URL to unarchive a project.
|
protected static String |
toUnlockMember(String member)
Returns the URL to unlock a member (Administrator only).
|
static String |
toVersion()
Returns the URL to get the PageSeeder version.
|
protected static String |
toVisibleGroups(String member)
Returns the URL to return the groups visible to a member.
|
public static String prefixMember(String member)
member
- the member id or usernamepublic static String prefixGroup(String group)
group
- the group id or namepublic static String toVersion()
/version
.public static String toAbout()
/about
.public static String toReportError()
/error/report
.public static String toCreateMember()
To create a group member, use toCreateMembership(String)
instead.
/members
.public static String toRegisterMember()
/members/register
.public static String toCreateMembership(String group)
group
- the group name or id/groups/[group]/members
.@Deprecated public static String toDeleteMembership(String group, String member)
toMembership(String, String)
with DELETEgroup
- the group name or idmember
- the member username or id/groups/[group]/members/[member]/delete
.public static String toInviteMember(String group)
group
- the group name or id/groups/[group]/members/invite
.public static String toInviteSelf(String group)
group
- the group name or id/groups/[group]/members/[member]/inviteself
.@Deprecated public static String toInviteSelf(String group, String member)
toInviteSelf(String)
insteadgroup
- the group name or idmember
- the member username or id/groups/[group]/members/[member]/inviteself
.public static String toCreate(String member)
The personal group is the home group on the personal project.
member
- the member username or id/members/[group]/creategroup
.public static String toResetSession()
/resetsession
.protected static String toActivateMember(String member)
member
- the member username or id/members/[member]/activate
.protected static String toUnlockMember(String member)
member
- the member username or id/members/[member]/unlock
.protected static String toMember(String member)
member
- the member username or id/members/[member]/edit
.@Deprecated protected static String toMemberEdit(String member)
toMember(String)
with PATCHmember
- the member username or id/members/[member]/edit
.protected static String toDeclineInvitation(String member)
member
- the member username or id/members/[member]/declineinvitation
.protected static String toVisibleGroups(String member)
member
- the member username or id/members/[member]/visiblegroups
.protected static String toListMemberships(String member)
member
- the member username or id/members/[member]/memberships
.public static String toMemberDetails(String member)
member
- the member username or id/members/[member]
.public static String toResetPassword()
To use the email templates for a specific group, use toResetPassword(String)
instead.
/members/resetpassword
.public static String toResetPassword(String group)
group
- the group name or id/groups/[group]/members/resetpassword
.public static String toForceResetPassword()
To use the email templates for a specific group, use toForceResetPassword(String)
instead.
/members/resetpassword
.public static String toForceResetPassword(String group)
group
- the group name or id/groups/[group]/members/forceresetpassword
.public static String toPasswordMeter()
/password/meter
.public static String toListLabels(String group)
group
- the group name or id/groups/[group]/labels
.public static String toListSubGroups(String group)
group
- the group name or id./groups/[group]/subgroups
.public static String toAddSubGroup(String group)
group
- the group name or id the subgroup is added to./groups/[group]/subgroups/add
.public static String toSubGroup(String group, String sub)
group
- the group name or id.sub
- the name or id of the subgroup/groups/[group]/subgroups/[sub]
.@Deprecated public static String toEditSubGroup(String group, String sub)
toSubGroup(String, String)
with PATCHgroup
- the group name or id.sub
- the name or id of the subgroup/groups/[group]/subgroups/[sub]/edit
.public static String toRemoveSubGroup(String group, String sub)
group
- the group name or id.sub
- the name or id of the subgroup/groups/[group]/subgroups/[sub]/remove
.public static String toSendMail(String member, String group)
member
- the username or id of the member on behalf of whom the mail is sentgroup
- the group name or id, the member belongs to./members/[member]/groups/[group]/mail/send
public static String toCreateProject(String member)
member
- the member username or id/members/[member]/projects
.public static String toProject(String member, String project)
member
- the member username or idproject
- the project name or id/members/[member]/projects/[project]
.@Deprecated public static String toEditProject(String member, String project)
toProject(String, String)
with PATCHmember
- the member username or idproject
- the project name or id/members/[member]/projects/[project]/edit
.public static String toGetProject(String project)
project
- the project name or id/members/[member]/projects/[project]
.@Deprecated public static String toGetProject(String member, String project)
toGetProject(String)
member
- the member username or idproject
- the project name or id/members/[member]/projects/[project]
.public static String toListSubProjects(String member, String project)
member
- the member username or idproject
- the project name or id/members/[member]/projects/[project]/subprojectlist
.public static String toListProjects(String member)
member
- the member username or id/members/[member]/projectlist
.public static String toProjectsFind(String member)
member
- the member username or id/members/[member]/projects/find
.@Deprecated public static String toSubProjects(String member, String project)
member
- the member username or idproject
- the project name or id/members/[member]/projects/[project]/subprojects
.public static String toProjectsTree(String member)
member
- the member username or id/members/[member]/projects
.public static String toSubProjectsTree(String member, String project)
member
- the member username or idproject
- the project name or id/members/[member]/projects/[project]/subprojecttree
.public static String toArchiveProject(String member, String project)
member
- the member username or idproject
- the project name or id/members/[member]/projects/[project]/archive
.public static String toRenameProject(String member, String project)
member
- the member username or idproject
- the project name or id/members/[member]/projects/[project]/rename
.public static String toUnarchiveProject(String member, String project)
member
- the member username or idproject
- the project name or id/members/[member]/projects/[project]/unarchive
.public static String toListGroupFolders(String group)
group
- the group name or id/groups/[group]/groupfolders
.public static String toCreateGroupFolder2(String group)
group
- the group name or id/groups/[group]/groupfolders/create
.public static String toGetGroupFolderForURL2(String group)
group
- the group name or id/groups/[group]/folders/forurl
.@Deprecated public static String toCreateGroupFolder(String group)
toCreateGroupFolder2(String)
insteadgroup
- the group name or id/groups/[group]/folders/create
.@Deprecated public static String toGetGroupFolderForURL(String group)
toGetGroupFolderForURL2(String)
insteadgroup
- the group name or id/groups/[group]/folders/forurl
.public static String toCreateGroup(String member)
member
- the member username or id/members/[member]/groups
.public static String toGroup(String member, String group)
member
- the member name or idgroup
- the group name or id/members/[member]/groups/[group]
.@Deprecated public static String toEditGroup(String member, String group)
toGroup(String, String)
with PATCHmember
- the member name or idgroup
- the group name or id/members/[member]/groups/[group]
.public static String toGetGroup(String group)
group
- the group name or id/groups/[group]
.@Deprecated public static String toGetGroup(String member, String group)
toGetGroup(String)
member
- the member name or idgroup
- the group name or id/members/[member]/groups/[group]
.public static String toListMembers(String group)
group
- the group name or id/groups/[group]/members
.public static String toFindGroupMember(String group)
group
- the group name or id/groups/[group]/members/find
.public static String toListAlldetailsMembers(String group)
group
- the group name or id/groups/[group]/members
.public static String toMembershipDetails(String group, String member)
group
- the group name or idmember
- the member username or id/groups/[groupname]/members/[username]
.public static String toMembership(String group, String member)
group
- the group name or idmember
- the member username or id/groups/[group]/members/[member]
.@Deprecated public static String toEditMembership(String group, String member)
toMembership(String, String)
with PATCHgroup
- the group name or idmember
- the member username or id/groups/[group]/members/[member]/edit
.public static String toDeregisterMember(String group, String member)
group
- the group name or idmember
- the member username or id/groups/[group]/members/[member]/deregister
.public static String toGroupMemberManage(String group, String member)
group
- the group name or idmember
- the member username or id/groups/[group]/members/[member]/manage
.public static String toArchiveGroup(String member, String group)
member
- the member username or idgroup
- the group to archive/members/[member]/groups/[groups]/archive
.public static String toRenameGroup(String member, String group)
member
- the member username or idgroup
- the project's old name or id/members/[member]/groups/[groups]/rename
.public static String tolistURIsForURL(String group)
group
- the group name or id/groups/[group]/uris/forurl/uris
.public static String toGetURIForURL(String group)
group
- the group name or id/groups/[group]/uris/forurl
.public static String toGetURIForID(String group, String uri)
group
- the group name or iduri
- the URI id./groups/[group]/uris/[uri]
.public static String toCreateExternalURIService(String member, String group)
member
- the member idgroup
- the group name or id/members/[member]/groups/[group]/uris/[uri]
.public static String toListXRefs(String group, Long uriid)
group
- the group name or iduriid
- the URI id/groups/[group]/uris/[uri]/xrefs
.public static String toCreateDocumentForURL(String member, String group)
member
- the member username or idgroup
- the group name or id/members/[member]/groups/[group]/documents/forurl
.public static String toEditURI(String member, String group, String uri)
member
- the member username or idgroup
- the group name or iduri
- the id of uri/members/[member]/groups/[group]/uris/{uri}
.@Deprecated public static String toSaveURIProperties(String member, String group, String uri)
toEditURI(String, String, String)
with PATCHmember
- the member username or idgroup
- the group name or iduri
- the id of uri/members/[member]/groups/[group]/uris/{uri}/properties
.public static String toGetFragment(String member, String group, String uri, String fragment)
member
- the username or id of the editorgroup
- the group name or id, the document belongs to.uri
- the uri ID of the documentfragment
- the fragment ID to retrieve/members/[member]/groups/[group]/uris/[uri]/fragments/[fragment]
public static String toDiscussionsForGroup(String group)
group
- the group name or ID/members/[userid]/comments/[xlinkid]/reply
.public static String toDiscussionsForURI(String member, String uri)
member
- the username or ID of the memberuri
- the uri ID/members/[userid]/comments/[xlinkid]/reply
.public static String toDiscussionsForFragment(String member, String uri, String fragment)
member
- the username or ID of the memberuri
- the uri IDfragment
- the fragment ID/members/[userid]/comments/[xlinkid]/reply
.public static String toGetComment(String member, String comment)
member
- the username or ID of the membercomment
- the comment ID/members/[userid]/comments/[xlinkid]
.public static String toFindComments(String member)
/member/[userid]/comments/find
.protected static String toReplyComment(String member, String xlink)
member
- the username or ID of the memberxlink
- the xlink id of the comment to reply to/members/[userid]/comments/[xlinkid]/reply
.public static String toComment(String member, String comment)
member
- the username or ID of the membercomment
- the xlink ID of the comment to archive/members/[member]/comments/[comment]
.@Deprecated public static String toEditComment(String member, String comment)
toComment(String, String)
with PATCHmember
- the username or ID of the membercomment
- the xlink ID of the comment to archive/members/[member]/comments/[comment]/edit
.public static String toArchiveComment(String member, String comment)
member
- the username or ID of the membercomment
- the xlink ID of the comment to archive/members/[member]/comments/[comment]/archive
.public static String toUnarchiveComment(String member, String comment)
member
- the username or ID of the membercomment
- the xlink ID of the comment to archive/members/[member]/comments/[comment]/unarchive
.public static String toCreateCommentService(PSMember creator, PSComment.Context context)
creator
- The creator of the comment.context
- The context of the comment.public static String toReplyCommentService(PSComment.Author author, long xlinkid, PSGroup group)
author
- The author of the comment.xlinkid
- The comment to reply to.group
- The group the user ispublic static String toThreadProgress(String threadid)
threadid
- the ID of the thread/threads/[threadid]/progress
.public static String toResource(String project)
project
- the project name or id where the resource should be put./groups/[project]/resources
.public static String toCreateResource(String project)
project
- the project name or id where the resource should be put./groups/[project]/resources
.public static String toGetResource(String project)
project
- the project name or id where the resource should be put./groups/[project]/resources/get
.@Deprecated public static String toPutResource(String project)
toResource(String)
with PUTproject
- the project name or id where the resource should be put./groups/[project]/resources
.@Deprecated public static String toDeleteResource(String project)
toResource(String)
with DELETEproject
- the project name or id where the resource should be put./groups/[project]/resources/delete
.Copyright © 2016 Allette Systems. All rights reserved.