com.atlassian.bamboo.buildqueue
Class RemoteAgentAuthentications

java.lang.Object
  extended by com.atlassian.bamboo.buildqueue.RemoteAgentAuthentications

public final class RemoteAgentAuthentications
extends java.lang.Object

Utilities related to remote agent authentications.

Since:
3.4

Method Summary
static com.google.common.base.Function<RemoteAgentAuthenticationEntity,ImmutableRemoteAgentAuthentication> fromEntity()
           
static com.google.common.base.Function<RemoteAgentAuthentication,java.lang.String> getUuidAsString()
           
static java.util.Set<java.lang.String> ipStringToSet(java.lang.String ip)
           
static com.google.common.base.Predicate<RemoteAgentAuthentication> isApproved()
           
static com.google.common.base.Predicate<RemoteAgentAuthentication> isPending()
           
static com.google.common.base.Predicate<RemoteAgentAuthentication> matching(java.lang.String requestIps)
          

Predicate checking if given authentication matches the ip.

static com.google.common.base.Predicate<RemoteAgentAuthentication> matching(java.util.UUID uuid)
          Predicate checking if an authentication matches given uuid.
static com.google.common.base.Predicate<RemoteAgentAuthentication> matching(java.util.UUID uuid, java.lang.String ip)
          A combination of matching(String) and matching(java.util.UUID).
static com.google.common.base.Predicate<RemoteAgentAuthentication> matchingUuidOf(java.lang.Iterable<RemoteAgentAuthentication> authentications)
           
static com.google.common.base.Function<RemoteAgentAuthentication,RemoteAgentAuthenticationEntity> toEntity(RemoteAgentAuthenticationDao agentAuthenticationDao)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getUuidAsString

public static com.google.common.base.Function<RemoteAgentAuthentication,java.lang.String> getUuidAsString()

matching

public static com.google.common.base.Predicate<RemoteAgentAuthentication> matching(@NotNull
                                                                                   java.lang.String requestIps)

Predicate checking if given authentication matches the ip.

For authentication pending approval this must be full match (equals), otherwise wildcard match will be attempted.

Parameters:
requestIps - coma separated list of IP addresses to match
Returns:
predicate returning true, if the verified authentication matches ip

matching

public static com.google.common.base.Predicate<RemoteAgentAuthentication> matching(@NotNull
                                                                                   java.util.UUID uuid)
Predicate checking if an authentication matches given uuid. The UUID must be strictly equal for this predicate to return true.

Parameters:
uuid - UUID to check against
Returns:
predicate checking if an authentication's UUID matches given uuid

matching

public static com.google.common.base.Predicate<RemoteAgentAuthentication> matching(@NotNull
                                                                                   java.util.UUID uuid,
                                                                                   @NotNull
                                                                                   java.lang.String ip)
A combination of matching(String) and matching(java.util.UUID).

Parameters:
uuid - UUID to match against
ip - coma separated list of IP addresses to match
Returns:
predicate matching remote agent authentications against given uuid and ip
See Also:
matching(java.util.UUID), matching(String)

matchingUuidOf

public static com.google.common.base.Predicate<RemoteAgentAuthentication> matchingUuidOf(@NotNull
                                                                                         java.lang.Iterable<RemoteAgentAuthentication> authentications)

isApproved

public static com.google.common.base.Predicate<RemoteAgentAuthentication> isApproved()

isPending

public static com.google.common.base.Predicate<RemoteAgentAuthentication> isPending()

fromEntity

public static com.google.common.base.Function<RemoteAgentAuthenticationEntity,ImmutableRemoteAgentAuthentication> fromEntity()

toEntity

public static com.google.common.base.Function<RemoteAgentAuthentication,RemoteAgentAuthenticationEntity> toEntity(RemoteAgentAuthenticationDao agentAuthenticationDao)

ipStringToSet

@NotNull
public static java.util.Set<java.lang.String> ipStringToSet(@NotNull
                                                                    java.lang.String ip)


Copyright © 2013 Atlassian Software Systems Pty Ltd. All Rights Reserved.