Package com.sodius.oslc.client.oauth
Class Friends
- java.lang.Object
-
- com.sodius.oslc.client.oauth.Friends
-
public class Friends extends Object
Provides facilities to instantiate a FriendProvider and to parse root services resources.
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static FriendcreateFriend(String title, URI rootServices, String consumerToken, String consumerSecret)Creates a friend.static FriendcreateFriend(URI rootServices, String consumerToken, String consumerSecret)Creates a friend.static FriendProvidercreateFriendProvider(Friend... friends)Returns a provider for the specified friends.static FriendProvidercreateFriendProvider(Collection<? extends Friend> friends)Returns a provider for the specified friends.static RootServicesgetRootServices(URI uri)Deprecated.UseGetRootServicesto request root services orRootServicesCacheto obtain a cache version of the resource.static <T extends RootServices>
TgetRootServices(URI uri, Class<T> type)Deprecated.UseGetRootServicesto request root services.
-
-
-
Method Detail
-
createFriend
public static Friend createFriend(URI rootServices, String consumerToken, String consumerSecret)
Creates a friend.- Parameters:
rootServices- the friend's rootservicesconsumerToken- the consumer token declared on the friend to grant access to a client.consumerSecret- the consumer secret declared on the friend to grant access to a client.- Returns:
- a friend wrapping the specified information.
-
createFriend
public static Friend createFriend(String title, URI rootServices, String consumerToken, String consumerSecret)
Creates a friend.- Parameters:
title- the friend's titlerootServices- the friend's rootservicesconsumerToken- the consumer token declared on the friend to grant access to a client.consumerSecret- the consumer secret declared on the friend to grant access to a client.- Returns:
- a friend wrapping the specified information.
- Since:
- 1.14.0
-
createFriendProvider
public static FriendProvider createFriendProvider(Friend... friends)
Returns a provider for the specified friends.- Parameters:
friends- some friends.- Returns:
- a provider for those friends.
-
createFriendProvider
public static FriendProvider createFriendProvider(Collection<? extends Friend> friends)
Returns a provider for the specified friends.- Parameters:
friends- some friends.- Returns:
- a provider for those friends.
-
getRootServices
@Deprecated(since="1.11.0", forRemoval=false) public static RootServices getRootServices(URI uri)
Deprecated.UseGetRootServicesto request root services orRootServicesCacheto obtain a cache version of the resource.Parses the root services resources at the specified location.- Parameters:
uri- the root services location.- Returns:
- a RootServices instance, or
nullif the connection wasn't successful or the location does not correspond to a root services. - See Also:
GetRootServices,RootServicesCache
-
getRootServices
@Deprecated(since="1.11.0", forRemoval=false) public static <T extends RootServices> T getRootServices(URI uri, Class<T> type)
Deprecated.UseGetRootServicesto request root services.Parses the root services resources at the specified location. This method is convenient to use a subclass of RootServices, for example to provide additional getters.- Type Parameters:
T- the type of RootServices to instantiate when parsing a root services stream.- Parameters:
uri- the root services location.type- the RootServices subclass to use when binding the stream to a resource.- Returns:
- a RootServices instance, or
nullif the connection wasn't successful or the location does not correspond to a root services. - See Also:
GetRootServices
-
-