Package com.atlassian.bamboo.buildqueue
Class RemoteAgentAuthentications
- java.lang.Object
-
- com.atlassian.bamboo.buildqueue.RemoteAgentAuthentications
-
public final class RemoteAgentAuthentications extends Object
Utilities related to remote agent authentications.- Since:
- 3.4
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static com.google.common.base.Function<RemoteAgentAuthenticationEntity,ImmutableRemoteAgentAuthentication>
fromEntity()
static Function<RemoteAgentAuthenticationEntity,ImmutableRemoteAgentAuthentication>
fromEntityJdk()
static com.google.common.base.Function<RemoteAgentAuthentication,String>
getUuidAsString()
static @NotNull Set<String>
ipStringToSet(@NotNull 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(@NotNull String requestIps)
Predicate checking if given authentication matches the ip.static com.google.common.base.Predicate<RemoteAgentAuthentication>
matching(@NotNull UUID uuid)
Predicate checking if an authentication matches given uuid.static com.google.common.base.Predicate<RemoteAgentAuthentication>
matching(@NotNull UUID uuid, @NotNull String ip)
A combination ofmatching(String)
andmatching(java.util.UUID)
.static com.google.common.base.Predicate<RemoteAgentAuthentication>
matchingUuidOf(@NotNull Iterable<RemoteAgentAuthentication> authentications)
static com.google.common.base.Function<RemoteAgentAuthentication,RemoteAgentAuthenticationEntity>
toEntity(RemoteAgentAuthenticationDao agentAuthenticationDao)
-
-
-
Method Detail
-
getUuidAsString
public static com.google.common.base.Function<RemoteAgentAuthentication,String> getUuidAsString()
-
matching
public static com.google.common.base.Predicate<RemoteAgentAuthentication> matching(@NotNull @NotNull 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 @NotNull UUID uuid)
Predicate checking if an authentication matches given uuid. The UUID must be strictly equal for this predicate to returntrue
.- 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 @NotNull UUID uuid, @NotNull @NotNull String ip)
A combination ofmatching(String)
andmatching(java.util.UUID)
.- Parameters:
uuid
- UUID to match againstip
- 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 @NotNull 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()
-
fromEntityJdk
public static Function<RemoteAgentAuthenticationEntity,ImmutableRemoteAgentAuthentication> fromEntityJdk()
-
toEntity
public static com.google.common.base.Function<RemoteAgentAuthentication,RemoteAgentAuthenticationEntity> toEntity(RemoteAgentAuthenticationDao agentAuthenticationDao)
-
-