Class SocialNetwork

  • All Implemented Interfaces:
    Serializable

    public class SocialNetwork
    extends Object
    implements Serializable
    Represents a social network.
    Since:
    6.1.0
    Version:
    $Revision: 16392 $ $Date: 2014-08-06 11:40:08 -0300 (Wed, 06 Aug 2014) $
    See Also:
    Serialized Form
    • Constructor Detail

      • SocialNetwork

        public SocialNetwork()
    • Method Detail

      • getId

        public String getId()
        Returns the Id of the social network.
        Since:
        6.1.0
      • getMessageMaxLength

        public int getMessageMaxLength()
        Returns the maximum size a message may have in this social network.
        Since:
        6.1.0
      • getName

        public String getName()
        Returns the name of the social network.
        Since:
        6.1.0
      • getPermissions

        public String getPermissions()
        Retrieves needed permissions when registering application to an account in this social network.
        Since:
        6.1.0
      • getApplications

        public Set<SocialNetworkApplication> getApplications()
        Returns the applications.
        Returns:
        the applications
        Since:
        6.1.0
      • retrievePermissionURL

        public String retrievePermissionURL()
        Returns the needed URL to retrieve permission tokens.
        Since:
        6.1.0
      • setMessageMaxLength

        public void setMessageMaxLength​(int maxLength)
        Sets the maximum size a message may have in this social network.
        Parameters:
        maxLength - the maximum length.
        Since:
        6.1.0
      • setName

        public void setName​(String name)
        Sets the name of the social network.
        Parameters:
        name - the name.
        Since:
        6.1.0
      • setPermissions

        public void setPermissions​(String permissions)
        Sets value of needed permissions when registering application to an account in this social network.
        Parameters:
        permissions - the permissions.
        Since:
        6.1.0
      • setApplications

        public void setApplications​(Set<SocialNetworkApplication> applications)
        Sets the applications.
        Parameters:
        applications - the applications value to set.
        Since:
        6.1.0
      • addApplication

        public SocialNetworkApplication addApplication​(String consumerKey,
                                                       String consumerSecret,
                                                       boolean enabled,
                                                       String name)
        Adds an application to this social network.
        Parameters:
        consumerKey - the consumer key.
        consumerSecret - the consumer secret.
        enabled - the application is enabled
        name - the name.
        Returns:
        the added application.
        Since:
        6.1.0