Class Friend
- java.lang.Object
-
- org.eclipse.lyo.oslc4j.core.model.AbstractResource
-
- com.sodius.oslc.server.oauth.model.Friend
-
- All Implemented Interfaces:
Friend,IExtendedResource,IResource
@OslcNamespace("http://www.sodius.com/ns/oauth#") @OslcResourceShape(title="Friend Resource Shape", describes="http://www.sodius.com/ns/oauth#Friend") public class Friend extends AbstractResource implements Friend
Describes a friend registered in an OSLC application.- Since:
- 1.3.0
-
-
Constructor Summary
Constructors Constructor Description Friend()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetConsumerKey()StringgetConsumerSecret()Return the secret associated with the consumer key for contacting the friend application using OAuth 1.0a protocolStringgetConsumerToken()Returns the consumer key provided bygetConsumerKey().StringgetIdentifier()Returns the identifier of the friend.URIgetRootServices()Returns the root services URL of the friend.StringgetState()Allows to know whether a Friend is available or not.OslcErrorgetStateError()Returns the (optional) OslcError for display purposesStringgetTitle()Returns the title of the friend, which defaults to the host name of the root services location.voidsetConsumerKey(String consumerKey)voidsetConsumerSecret(String consumerSecret)voidsetIdentifier(String identifier)voidsetRootServices(URI rootServices)voidsetState(String state)voidsetStateError(OslcError error)Sets the (optional) OslcError for display purposesvoidsetTitle(String title)-
Methods inherited from class org.eclipse.lyo.oslc4j.core.model.AbstractResource
addType, getAbout, getExtendedProperties, getTypes, setAbout, setExtendedProperties, setTypes
-
-
-
-
Method Detail
-
getIdentifier
@OslcDescription("A unique identifier for a resource. Assigned by the service provider when a resource is created. Not intended for end-user display.") @OslcOccurs(ExactlyOne) @OslcPropertyDefinition("http://purl.org/dc/terms/identifier") @OslcTitle("Identifier") public String getIdentifier()
Description copied from interface:FriendReturns the identifier of the friend. Default implementation is to return the root services URL. Callers should not assume anything about the actual format of the identifier, and rather callFriend.getRootServices()if that URL is specifically needed.- Specified by:
getIdentifierin interfaceFriend- Returns:
- the identifier of the friend
-
setIdentifier
public void setIdentifier(String identifier)
-
getTitle
@OslcDescription("Title (reference: Dublin Core) or often a single line summary of the resource represented as rich text in XHTML content.") @OslcOccurs(ExactlyOne) @OslcPropertyDefinition("http://purl.org/dc/terms/title") @OslcTitle("Title") @OslcValueType(XMLLiteral) public String getTitle()
Description copied from interface:FriendReturns the title of the friend, which defaults to the host name of the root services location.
-
setTitle
public void setTitle(String title)
-
getRootServices
@OslcPropertyDefinition("http://www.sodius.com/ns/oauth#rootServices") public URI getRootServices()
Description copied from interface:FriendReturns the root services URL of the friend.- Specified by:
getRootServicesin interfaceFriend- Returns:
- the root services URL of the friend.
-
setRootServices
public void setRootServices(URI rootServices)
-
getConsumerKey
@OslcPropertyDefinition("http://www.sodius.com/ns/oauth#consumerKey") public String getConsumerKey()
-
setConsumerKey
public void setConsumerKey(String consumerKey)
-
getConsumerSecret
@OslcPropertyDefinition("http://www.sodius.com/ns/oauth#consumerSecret") public String getConsumerSecret()
Description copied from interface:FriendReturn the secret associated with the consumer key for contacting the friend application using OAuth 1.0a protocol- Specified by:
getConsumerSecretin interfaceFriend- Returns:
- the consumer secret.
-
setConsumerSecret
public void setConsumerSecret(String consumerSecret)
-
getConsumerToken
public final String getConsumerToken()
Returns the consumer key provided bygetConsumerKey().- Specified by:
getConsumerTokenin interfaceFriend- Returns:
- the consumer key.
- Since:
- 3.5.0
-
getState
@OslcName("friendState") @OslcPropertyDefinition("http://www.sodius.com/ns/oauth#friendState") public String getState()
Allows to know whether a Friend is available or not.- Returns:
- the friend's state
- Since:
- 2.0
-
setState
public void setState(String state)
-
getStateError
@OslcPropertyDefinition("http://www.sodius.com/ns/oauth#stateError") @OslcValueType(LocalResource) public OslcError getStateError()
Returns the (optional) OslcError for display purposes- Returns:
- the OslcError
- Since:
- 3.7.0
-
setStateError
public void setStateError(OslcError error)
Sets the (optional) OslcError for display purposes- Parameters:
error- the error- Since:
- 3.7.0
-
-