public class EntityTranslator extends Object
Modifier and Type | Method and Description |
---|---|
static UserWithAttributes |
fromUserEntity(UserEntity userEntity)
Translates a UserEntity to a UserWithAttributes.
|
static Map<String,Set<String>> |
toAttributes(MultiValuedAttributeEntityList attributeEntityList)
Translates MultiValuedAttributeEntityList to Attributes.
|
static MultiValuedAttributeEntityList |
toDeletedAttributeEntityList(Set<String> attributes) |
static EventEntityList |
toEventEntities(Events events,
URI baseUri) |
static AbstractEventEntity |
toEventEntity(OperationEvent event,
URI baseUri) |
static GroupTemplate |
toGroup(GroupEntity groupEntity) |
static GroupEntityList |
toGroupEntities(List<? extends Group> groups,
URI baseURI)
Translates a list of Groups to a list of GroupEntities.
|
static GroupEntity |
toGroupEntity(Group group,
Attributes attributes,
com.atlassian.plugins.rest.common.Link groupLink)
Translates a Group with Attributes to a GroupEntity.
|
static GroupEntity |
toGroupEntity(Group group,
com.atlassian.plugins.rest.common.Link groupLink)
Translates a Group to a GroupEntity.
|
static GroupEntity |
toGroupEntity(Group group,
URI baseURI)
Translates a Group to a GroupEntity.
|
static GroupEntityList |
toMinimalGroupEntities(Collection<String> groupNames,
URI baseUri)
Translates a list of group names to a GroupEntityList.
|
static UserEntityList |
toMinimalUserEntities(List<String> usernames,
URI baseUri)
Translates a list of usernames to a UserEntityList.
|
static MultiValuedAttributeEntityList |
toMultiValuedAttributeEntityList(Attributes attributes,
com.atlassian.plugins.rest.common.Link link)
Translates Attributes to MultiValuedAttributeEntityList.
|
static MultiValuedAttributeEntityList |
toMultiValuedAttributeEntityList(Map<String,Set<String>> attributes,
com.atlassian.plugins.rest.common.Link link)
Translates Attributes to MultiValuedAttributeEntityList.
|
static UserEntityList |
toUserEntities(List<? extends User> users,
URI baseUri)
Translates a list of users to a list of UserEntities.
|
static UserEntity |
toUserEntity(User user,
Attributes attributes,
com.atlassian.plugins.rest.common.Link userLink)
Translates a User with Attributes to a UserEntity.
|
static UserEntity |
toUserEntity(User user,
com.atlassian.plugins.rest.common.Link userLink)
Translates a User to a UserEntity.
|
public static UserEntity toUserEntity(User user, com.atlassian.plugins.rest.common.Link userLink)
user
- User to convertuserLink
- Link to user resourcepublic static UserEntityList toUserEntities(List<? extends User> users, URI baseUri)
users
- list of users to convertbaseUri
- base URIpublic static UserEntityList toMinimalUserEntities(List<String> usernames, URI baseUri)
usernames
- usernames to translatebaseUri
- base URIpublic static UserWithAttributes fromUserEntity(UserEntity userEntity)
userEntity
- UserEntity to convertpublic static UserEntity toUserEntity(User user, Attributes attributes, com.atlassian.plugins.rest.common.Link userLink)
user
- Userattributes
- attributes of the user.userLink
- link to the user.public static GroupEntity toGroupEntity(Group group, URI baseURI)
group
- Group to convertbaseURI
- base URIpublic static GroupEntityList toGroupEntities(List<? extends Group> groups, URI baseURI)
groups
- List of groups to convertbaseURI
- base URIpublic static GroupEntityList toMinimalGroupEntities(Collection<String> groupNames, URI baseUri)
groupNames
- group names to translatebaseUri
- base URIpublic static GroupEntity toGroupEntity(Group group, com.atlassian.plugins.rest.common.Link groupLink)
group
- Group to convertgroupLink
- Link to group resourcepublic static GroupEntity toGroupEntity(Group group, Attributes attributes, com.atlassian.plugins.rest.common.Link groupLink)
group
- Groupattributes
- attributes of the group.groupLink
- link to the group.public static GroupTemplate toGroup(GroupEntity groupEntity)
public static MultiValuedAttributeEntityList toMultiValuedAttributeEntityList(Map<String,Set<String>> attributes, com.atlassian.plugins.rest.common.Link link)
attributes
- attributes of an entitylink
- link to the attributespublic static MultiValuedAttributeEntityList toMultiValuedAttributeEntityList(Attributes attributes, com.atlassian.plugins.rest.common.Link link)
attributes
- attributes of an entitylink
- link to the attributespublic static MultiValuedAttributeEntityList toDeletedAttributeEntityList(Set<String> attributes)
public static Map<String,Set<String>> toAttributes(MultiValuedAttributeEntityList attributeEntityList)
attributeEntityList
- attributes of an entitypublic static EventEntityList toEventEntities(Events events, URI baseUri)
public static AbstractEventEntity toEventEntity(OperationEvent event, URI baseUri)
Copyright © 2020 Atlassian. All rights reserved.