Class LinkUriHelper
java.lang.Object
com.atlassian.crowd.plugin.rest.util.LinkUriHelper
Helper for creating URI links to resources.
- Since:
- v2.1
-
Method Summary
Modifier and TypeMethodDescriptionstatic URIbuildDirectChildGroupUri(URI baseURI, String groupName, String childGroupName) Returns the URI to the group direct child group resource.static URIbuildDirectParentGroupOfUserUri(URI baseURI, String userName, String parentGroupName) Returns the URI to the direct group parent of a user resource.static URIbuildDirectParentGroupUri(URI baseURI, String groupName, String parentGroupName) Returns the URI to the group direct parent group resource.static URIbuildDirectUserGroupUri(URI baseURI, String groupName, String username) Returns the URI to the group direct user group resource.static URIbuildEntityAttributeListUri(URI entityUri) Returns the URI to the entity attribute list resource.static URIbuildEntityAttributeUri(URI attributesUri, String attributeName) Returns the URI to the entity attribute resource.static com.atlassian.plugins.rest.api.model.LinkbuildGroupLink(URI baseUri, String groupName) Returns the Link to the Group resource.static URIbuildGroupUri(URI baseURI, String groupName) Returns the URI to the Group resource.static com.atlassian.plugins.rest.api.model.LinkbuildSessionLink(URI baseUri, String token) Returns the link to the session resource.static URIbuildSessionUri(URI baseUri, String token) Returns the URI to the session resource.static com.atlassian.plugins.rest.api.model.LinkbuildUserLink(URI baseUri, String username) Returns the Link to the User resource looking up by username.static URIbuildUserPasswordUri(URI userUri) Returns the URI to the user password resource.static URIbuildUserUri(URI baseUri, String username) Returns the URI to the User resource looking up by username.static com.atlassian.plugins.rest.api.model.LinkupdateGroupLink(com.atlassian.plugins.rest.api.model.Link groupLink, String groupName) Returns an updated group Link with the specified group name.static URIupdateGroupUri(URI groupUri, String groupName) Returns an updated group URI with the specified group name.static com.atlassian.plugins.rest.api.model.LinkupdateUserLink(com.atlassian.plugins.rest.api.model.Link userLink, String username) Returns an updated user Link with the specified username.static URIupdateUserUri(URI userUri, String username) Returns an updated user URI with the specified username.
-
Method Details
-
buildUserLink
Returns the Link to the User resource looking up by username.- Parameters:
baseUri- base URI of the REST serviceusername- Username- Returns:
- URI to the user resource.
-
buildUserUri
Returns the URI to the User resource looking up by username.- Parameters:
baseUri- base URI of the REST serviceusername- Username- Returns:
- URI to the user resource.
-
buildDirectUserGroupUri
Returns the URI to the group direct user group resource.- Parameters:
baseURI- base URI of the REST servicegroupName- Group nameusername- username- Returns:
- URI to the group direct user resource.
-
updateUserLink
public static com.atlassian.plugins.rest.api.model.Link updateUserLink(com.atlassian.plugins.rest.api.model.Link userLink, String username) Returns an updated user Link with the specified username.- Parameters:
userLink- current user Linkusername- new username- Returns:
- updated user Link.
-
updateUserUri
Returns an updated user URI with the specified username.- Parameters:
userUri- current user URIusername- new username- Returns:
- updated user URI.
-
buildGroupLink
public static com.atlassian.plugins.rest.api.model.Link buildGroupLink(URI baseUri, String groupName) Returns the Link to the Group resource.- Parameters:
baseUri- base URI of the REST servicegroupName- group name- Returns:
- URI to the user resource.
-
buildGroupUri
Returns the URI to the Group resource.- Parameters:
baseURI- base URI of the REST servicegroupName- Group name- Returns:
- URI to the group resource.
-
buildDirectChildGroupUri
Returns the URI to the group direct child group resource.- Parameters:
baseURI- base URI of the REST servicegroupName- group namechildGroupName- child group name- Returns:
- URI to the group direct child group resource.
-
buildDirectParentGroupUri
Returns the URI to the group direct parent group resource.- Parameters:
baseURI- base URI of the REST servicegroupName- group nameparentGroupName- parent group name- Returns:
- URI to the group direct parent group resource.
-
buildDirectParentGroupOfUserUri
public static URI buildDirectParentGroupOfUserUri(URI baseURI, String userName, String parentGroupName) Returns the URI to the direct group parent of a user resource.- Parameters:
baseURI- base URI of the REST serviceuserName- user nameparentGroupName- parent group name- Returns:
- URI to the direct parent group of a user resource.
-
updateGroupLink
public static com.atlassian.plugins.rest.api.model.Link updateGroupLink(com.atlassian.plugins.rest.api.model.Link groupLink, String groupName) Returns an updated group Link with the specified group name.- Parameters:
groupLink- current group LinkgroupName- new group name- Returns:
- updated group Link.
-
updateGroupUri
Returns an updated group URI with the specified group name.- Parameters:
groupUri- current group URIgroupName- new group name- Returns:
- updated group URI.
-
buildEntityAttributeListUri
Returns the URI to the entity attribute list resource.- Parameters:
entityUri- URI to the entity.- Returns:
- URI to the entity attributes resource.
-
buildEntityAttributeUri
Returns the URI to the entity attribute resource.- Parameters:
attributesUri- URI to the entity attributes.attributeName- name of the attribute- Returns:
- URI to the entity attributes resource.
-
buildUserPasswordUri
Returns the URI to the user password resource.- Parameters:
userUri- URI to the user.- Returns:
- URI to the user password resource.
-
buildSessionUri
Returns the URI to the session resource.- Parameters:
baseUri- base URI of the REST service- Returns:
- URI to the session resource
-
buildSessionLink
Returns the link to the session resource.- Parameters:
baseUri- base URI of the REST service- Returns:
- link to the session resource
-