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 String
getConsumerKey()
String
getConsumerSecret()
Return the secret associated with the consumer key for contacting the friend application using OAuth 1.0a protocolString
getConsumerToken()
Returns the consumer key provided bygetConsumerKey()
.String
getIdentifier()
Returns the identifier of the friend.URI
getRootServices()
Returns the root services URL of the friend.String
getState()
Allows to know whether a Friend is available or not.OslcError
getStateError()
Returns the (optional) OslcError for display purposesString
getTitle()
Returns the title of the friend, which defaults to the host name of the root services location.void
setConsumerKey(String consumerKey)
void
setConsumerSecret(String consumerSecret)
void
setIdentifier(String identifier)
void
setRootServices(URI rootServices)
void
setState(String state)
void
setStateError(OslcError error)
Sets the (optional) OslcError for display purposesvoid
setTitle(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:Friend
Returns 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:
getIdentifier
in 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:Friend
Returns 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:Friend
Returns the root services URL of the friend.- Specified by:
getRootServices
in 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:Friend
Return the secret associated with the consumer key for contacting the friend application using OAuth 1.0a protocol- Specified by:
getConsumerSecret
in interfaceFriend
- Returns:
- the consumer secret.
-
setConsumerSecret
public void setConsumerSecret(String consumerSecret)
-
getConsumerToken
public final String getConsumerToken()
Returns the consumer key provided bygetConsumerKey()
.- Specified by:
getConsumerToken
in 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- Since:
- 3.7.0
-
-