Class 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
    • Constructor Detail

      • Social

        public Social()
    • Method Detail

      • getInstance

        public static Social getInstance​(Social.Service service)
        Instance of the service (if available) or null.
        Parameters:
        service - desired service
        Returns:
        service instance or null if not available
      • isConfigured

        public abstract boolean isConfigured()
        Returns true, if the Social instance is correctly configured and ready to go.
        Returns:
        true or false
      • canShare

        public abstract boolean canShare​(String message)
        Returns true, 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