Package com.tagtraum.core.social
Class Social
- java.lang.Object
-
- com.tagtraum.core.social.Social
-
- Direct Known Subclasses:
SocialOSX
public abstract class Social extends Object
Social network service (like Twitter or Facebook) that allows sharing of messages.- Author:
- Hendrik Schreiber
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Social.Service
Available "social services".
-
Constructor Summary
Constructors Constructor Description Social()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract boolean
canShare(String message)
Returnstrue
, if the given message can be shared by the service.static Social
getInstance(Social.Service service)
Instance of the service (if available) ornull
.abstract Social.Service
getService()
Service.abstract boolean
isConfigured()
Returnstrue
, if theSocial
instance is correctly configured and ready to go.abstract void
share(String message)
Shares a message with using this service.
-
-
-
Method Detail
-
getInstance
public static Social getInstance(Social.Service service)
Instance of the service (if available) ornull
.- Parameters:
service
- desired service- Returns:
- service instance or
null
if not available
-
isConfigured
public abstract boolean isConfigured()
Returnstrue
, if theSocial
instance is correctly configured and ready to go.- Returns:
- true or false
-
canShare
public abstract boolean canShare(String message)
Returnstrue
, if the given message can be shared by the service.- Parameters:
message
- message- Returns:
- true or false
-
share
public abstract void share(String message) throws SocialException
Shares a message with using this service.- Parameters:
message
- message- Throws:
SocialException
- if the message cannot be shared.
-
getService
public abstract Social.Service getService()
Service.- Returns:
- service
-
-