com.atlassian.jira.rest.client.api.domain
Class EntityHelper

java.lang.Object
  extended by com.atlassian.jira.rest.client.api.domain.EntityHelper

public class EntityHelper
extends java.lang.Object

Helper class for entities.

Since:
v1.0

Nested Class Summary
static class EntityHelper.AddressEndsWithPredicate
           
static class EntityHelper.HasFileNamePredicate<T extends Attachment>
           
static class EntityHelper.HasIdPredicate<T extends IdentifiableEntity<K>,K>
           
static class EntityHelper.HasNamePredicate<T extends NamedEntity>
           
 
Field Summary
static com.google.common.base.Function<NamedEntity,java.lang.String> GET_ENTITY_NAME_FUNCTION
           
static com.google.common.base.Function<IdentifiableEntity<java.lang.String>,java.lang.String> GET_ENTITY_STRING_ID_FUNCTION
           
 
Constructor Summary
EntityHelper()
           
 
Method Summary
static
<T extends Attachment>
T
findAttachmentByFileName(java.lang.Iterable<T> attachments, java.lang.String fileName)
           
static
<T extends IdentifiableEntity<K>,K>
T
findEntityById(java.lang.Iterable<T> entities, K id)
           
static
<T extends NamedEntity>
T
findEntityByName(java.lang.Iterable<T> entities, java.lang.String name)
           
static java.lang.Iterable<java.lang.String> toFileNamesList(java.lang.Iterable<? extends Attachment> attachments)
           
static java.lang.Iterable<java.lang.String> toNamesList(java.lang.Iterable<? extends NamedEntity> items)
           
static
<T> java.lang.Iterable<java.lang.String>
toStringIdList(java.lang.Iterable<IdentifiableEntity<T>> items)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GET_ENTITY_STRING_ID_FUNCTION

public static com.google.common.base.Function<IdentifiableEntity<java.lang.String>,java.lang.String> GET_ENTITY_STRING_ID_FUNCTION

GET_ENTITY_NAME_FUNCTION

public static com.google.common.base.Function<NamedEntity,java.lang.String> GET_ENTITY_NAME_FUNCTION
Constructor Detail

EntityHelper

public EntityHelper()
Method Detail

toNamesList

public static java.lang.Iterable<java.lang.String> toNamesList(java.lang.Iterable<? extends NamedEntity> items)

toFileNamesList

public static java.lang.Iterable<java.lang.String> toFileNamesList(java.lang.Iterable<? extends Attachment> attachments)

toStringIdList

public static <T> java.lang.Iterable<java.lang.String> toStringIdList(java.lang.Iterable<IdentifiableEntity<T>> items)

findEntityByName

public static <T extends NamedEntity> T findEntityByName(java.lang.Iterable<T> entities,
                                                         java.lang.String name)

findEntityById

public static <T extends IdentifiableEntity<K>,K> T findEntityById(java.lang.Iterable<T> entities,
                                                                   K id)

findAttachmentByFileName

public static <T extends Attachment> T findAttachmentByFileName(java.lang.Iterable<T> attachments,
                                                                java.lang.String fileName)


Copyright © 2014 Atlassian. All Rights Reserved.