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 -
Method Summary
Modifier and TypeMethodDescriptionReturn the secret associated with the consumer key for contacting the friend application using OAuth 1.0a protocolfinal StringReturns the consumer key provided bygetConsumerKey().Returns the identifier of the friend.Returns the root services URL of the friend.getState()Allows to know whether a Friend is available or not.Returns the (optional) OslcError for display purposesgetTitle()Returns the title of the friend, which defaults to the host name of the root services location.Gets the read-only value.voidsetConsumerKey(String consumerKey) voidsetConsumerSecret(String consumerSecret) voidsetIdentifier(String identifier) voidsetReadOnly(Boolean readOnly) Sets the read-only value.voidsetRootServices(URI rootServices) voidvoidsetStateError(OslcError error) Sets the (optional) OslcError for display purposesvoidMethods inherited from class org.eclipse.lyo.oslc4j.core.model.AbstractResource
addType, getAbout, getExtendedProperties, getTypes, setAbout, setExtendedProperties, setTypes
-
Constructor Details
-
Friend
public Friend()
-
-
Method Details
-
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
-
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
-
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
-
getConsumerKey
@OslcPropertyDefinition("http://www.sodius.com/ns/oauth#consumerKey") public String getConsumerKey() -
setConsumerKey
-
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
-
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
-
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
Sets the (optional) OslcError for display purposes- Parameters:
error- the error- Since:
- 3.7.0
-
isReadOnly
@OslcPropertyDefinition("http://open-services.net/ns/core#readOnly") @OslcName("readOnly") public Boolean isReadOnly()Gets the read-only value. A read-only friend cannot be updated in the administration page.- Returns:
- true if the friend cannot be updated.
- Since:
- 3.14.0
-
setReadOnly
Sets the read-only value. A read-only friend cannot be updated in the administration page.- Parameters:
readOnly- true to prevent the friend from being updated in the administration page.- Since:
- 3.14.0
-