public class

KindlingConnector

extends Object
java.lang.Object
   ↳ org.mule.module.kindling.KindlingConnector
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

Kindling Cloud Connector

Kindling ignites innovation by connecting people and ideas

Allows to connect to the kindling site across the Kindling Service API. Connector created with the documentation of the service for the version v3.12.0.2

Summary

Fields
private KindlingClient client
Public Constructors
KindlingConnector()
Public Methods
void connect(String username, String password, String companyName)
Connect
String connectionId()
Are we connected
KindlingCategory createCategory(KindlingCategory category)
Creates a new category in the categories collection

KindlingComment createComment(KindlingComment comment)
Creates a new comment in the comments collection

KindlingGroup createGroup(KindlingGroup group)
Create a new group in the groups collection

KindlingIdea createIdea(KindlingIdea idea)
Create a new idea in the ideas collection

KindlingPost createPost(KindlingPost post)
Creates a new post

KindlingUser createUser(KindlingUser user)
Creates a new user in the users collection

void deleteComment(String commentId)
Deletes a single comment

void deleteUser(String userId)
Deletes a single user

void disconnect()
Disconnect
boolean isConnected()
Are we connected
KindlingCollection<KindlingCategory> retrieveCategories(Integer depth, String sort, Integer page, Integer limit, KindlingCategoryState state, String query, Integer associatedWithUserId)
Gets the categories collection

KindlingCategory retrieveCategory(String categoryId, Integer depth)
Gets a single category

KindlingComment retrieveComment(String commentId, Integer depth)
Gets a single comment

KindlingCollection<KindlingComment> retrieveComments(KindlingCommentParentType parentType, Integer depth, String sort, Integer page, Integer limit, KindlingState state, Integer parentId, KindlingCommentType type)
Gets the comments collection

KindlingGroup retrieveGroup(String groupId, Integer depth)
Gets a single group

KindlingCollection<KindlingGroup> retrieveGroups(Integer depth, String sort, Integer page, Integer limit, KindlingState state, String startsWith, String query)
Gets the groups collection

KindlingIdea retrieveIdea(String ideaId, Integer depth)
Gets a single idea

KindlingCollection<KindlingIdea> retrieveIdeas(Integer depth, String sort, Integer page, Integer limit, String state, Boolean allowsVoting, String query, String authorId, String categoryId, KindlingIdeaFilter filter)
Gets the ideas collection

KindlingPost retrievePost(String postId, Integer depth)
Gets a single post

KindlingCollection<KindlingPost> retrievePosts(Integer depth, String sort, Integer page, Integer limit, KindlingPostState state, String startsWith, String query)
Gets the posts collection

KindlingUser retrieveUser(String userId, Integer depth)
Gets a single user

KindlingCollection<KindlingUser> retrieveUsers(Integer depth, String sort, Integer page, Integer limit, KindlingUserState state, Integer associatedWithCategoryId, KindlingUserDigest digest, String query, KindlingUserReputationTimeframe reputationTimeframe)
Gets the users collection

KindlingCategory updateCategory(String categoryId, KindlingCategory category)
Updates a single category

KindlingGroup updateGroup(String groupId, KindlingGroup group)
Updates a single group

KindlingIdea updateIdea(String ideaId, KindlingIdea idea)
Updates a single idea

KindlingPost updatePost(String postId, KindlingPost post)
Updates a single post

KindlingUser updateUser(String userId, KindlingUser user)
Updates a single user

[Expand]
Inherited Methods
From class java.lang.Object

Fields

private KindlingClient client

Public Constructors

public KindlingConnector ()

Public Methods

public void connect (String username, String password, String companyName)

Connect

Parameters
username A username
password A password
companyName The name of the company registered in kindling and used for access your site like https://{companyName}.kindlingapp.com
Throws
ConnectionException

public String connectionId ()

Are we connected

public KindlingCategory createCategory (KindlingCategory category)

Creates a new category in the categories collection

Parameters
category The KindlingCategory to be created
Returns
Throws
KindlingConnectorException If something goes wrong with the service API this exception is throw
KindlingConnectorUnauthorizedException If the credentials provided for the user are wrong or are expired this exception is throw

public KindlingComment createComment (KindlingComment comment)

Creates a new comment in the comments collection

Parameters
comment The KindlingComment to be created
Returns
Throws
KindlingConnectorException If something goes wrong with the service API this exception is throw
KindlingConnectorUnauthorizedException If the credentials provided for the user are wrong or are expired this exception is throw

public KindlingGroup createGroup (KindlingGroup group)

Create a new group in the groups collection

Parameters
group The KindlingGroup to be created
Returns
Throws
KindlingConnectorException If something goes wrong with the service API this exception is throw
KindlingConnectorUnauthorizedException If the credentials provided for the user are wrong or are expired this exception is throw

public KindlingIdea createIdea (KindlingIdea idea)

Create a new idea in the ideas collection

Parameters
idea The KindlingIdea to be created
Returns
  • idea.json
Throws
KindlingConnectorException If something goes wrong with the service API this exception is throw
KindlingConnectorUnauthorizedException If the credentials provided for the user are wrong or are expired this exception is throw

public KindlingPost createPost (KindlingPost post)

Creates a new post

Parameters
post The KindlingCategory to be created
Returns
Throws
KindlingConnectorException If something goes wrong with the service API this exception is throw
KindlingConnectorUnauthorizedException If the credentials provided for the user are wrong or are expired this exception is throw

public KindlingUser createUser (KindlingUser user)

Creates a new user in the users collection

Parameters
user The KindlingUser to be created
Returns
Throws
KindlingConnectorException If something goes wrong with the service API this exception is throw
KindlingConnectorUnauthorizedException If the credentials provided for the user are wrong or are expired this exception is throw

public void deleteComment (String commentId)

Deletes a single comment

Parameters
commentId The id of the comment to delete
Throws
KindlingConnectorException If something goes wrong with the service API this exception is throw
KindlingConnectorUnauthorizedException If the credentials provided for the user are wrong or are expired this exception is throw

public void deleteUser (String userId)

Deletes a single user

Parameters
userId The id of the user to delete
Throws
KindlingConnectorException If something goes wrong with the service API this exception is throw
KindlingConnectorUnauthorizedException If the credentials provided for the user are wrong or are expired this exception is throw

public void disconnect ()

Disconnect

public boolean isConnected ()

Are we connected

public KindlingCollection<KindlingCategory> retrieveCategories (Integer depth, String sort, Integer page, Integer limit, KindlingCategoryState state, String query, Integer associatedWithUserId)

Gets the categories collection

Parameters
depth Default: 0. Any object in the result can be displayed at depth, 0 = no depth, 1 = expand first relational object level, etc.
sort Default: title. How the collection output will be sorted, like 'date ASC', 'date', or 'name DESC' etc.
page Default: 1. The page requested
limit Default: 20. The limit on number of collection items to show per page
state Default: ACTIVATED. Get only items in the collection that are in the given state, either by a state ID or it's natural language name
query A general category search
associatedWithUserId If provided, will only return categories that the given user ID has access to
Throws
KindlingConnectorException If something goes wrong with the service API this exception is throw
KindlingConnectorUnauthorizedException If the credentials provided for the user are wrong or are expired this exception is throw

public KindlingCategory retrieveCategory (String categoryId, Integer depth)

Gets a single category

Parameters
categoryId The id of the category to retrieve
depth Default: 0. Any object in the result can be displayed at depth, 0 = no depth, 1 = expand first relational object level, etc.
Returns
Throws
KindlingConnectorException If something goes wrong with the service API this exception is throw
KindlingConnectorUnauthorizedException If the credentials provided for the user are wrong or are expired this exception is throw

public KindlingComment retrieveComment (String commentId, Integer depth)

Gets a single comment

Parameters
commentId The id of the comment to retrieve
depth Default: 0. Any object in the result can be displayed at depth, 0 = no depth, 1 = expand first relational object level, etc.
Throws
KindlingConnectorException If something goes wrong with the service API this exception is throw
KindlingConnectorUnauthorizedException If the credentials provided for the user are wrong or are expired this exception is throw

public KindlingCollection<KindlingComment> retrieveComments (KindlingCommentParentType parentType, Integer depth, String sort, Integer page, Integer limit, KindlingState state, Integer parentId, KindlingCommentType type)

Gets the comments collection

Parameters
parentType Retrieve only comments whose parent is of this type
depth Default: 0. Any object in the result can be displayed at depth, 0 = no depth, 1 = expand first relational object level, etc.
sort Default: title. How the collection output will be sorted, like 'date ASC', 'date', or 'name DESC' etc.
page Default: 1. The page requested
limit Default: 20 The limit on number of collection items to show per page
state Default: ACTIVATED. Get only items in the collection that are in the given state, either by a state ID or it's natural language name
parentId Retrieve only comments of a specific parent ID
type The type of comments to retrieve
Throws
KindlingConnectorException If something goes wrong with the service API this exception is throw
KindlingConnectorUnauthorizedException If the credentials provided for the user are wrong or are expired this exception is throw

public KindlingGroup retrieveGroup (String groupId, Integer depth)

Gets a single group

Parameters
groupId The id of the group to retrieve
depth Default: 0. Any object in the result can be displayed at depth, 0 = no depth, 1 = expand first relational object level, etc. group.json
Returns
Throws
KindlingConnectorException If something goes wrong with the service API this exception is throw
KindlingConnectorUnauthorizedException If the credentials provided for the user are wrong or are expired this exception is throw

public KindlingCollection<KindlingGroup> retrieveGroups (Integer depth, String sort, Integer page, Integer limit, KindlingState state, String startsWith, String query)

Gets the groups collection

Parameters
depth Default: 0. Any object in the result can be displayed at depth, 0 = no depth, 1 = expand first relational object level, etc.
sort Default: title. How the collection output will be sorted, like 'date ASC', 'date', or 'name DESC' etc.
page Default: 1. The page requested
limit Default: 20 The limit on number of collection items to show per page
state Default: ACTIVATED. Get only items in the collection that are in the given state, either by a state ID or it's natural language name
startsWith Find group titles beginning with this string
query A general group search
Throws
KindlingConnectorException If something goes wrong with the service API this exception is throw
KindlingConnectorUnauthorizedException If the credentials provided for the user are wrong or are expired this exception is throw

public KindlingIdea retrieveIdea (String ideaId, Integer depth)

Gets a single idea

Parameters
ideaId The id of the Idea to retrieve
depth Default: 0. Any object in the result can be displayed at depth, 0 = no depth, 1 = expand first relational object level, etc.
Returns
Throws
KindlingConnectorException If something goes wrong with the service API this exception is throw
KindlingConnectorUnauthorizedException If the credentials provided for the user are wrong or are expired this exception is throw

public KindlingCollection<KindlingIdea> retrieveIdeas (Integer depth, String sort, Integer page, Integer limit, String state, Boolean allowsVoting, String query, String authorId, String categoryId, KindlingIdeaFilter filter)

Gets the ideas collection

Parameters
depth Default: 0. Any object in the result can be displayed at depth, 0 = no depth, 1 = expand first relational object level, etc.
sort Default: title. How the collection output will be sorted, like 'date ASC', 'date', or 'name DESC' etc.
page Default: 1. The page requested
limit Default: 20 The limit on number of collection items to show per page
state Get only items in the collection that are in the given state, either by a state ID or it's natural language name

  • drafted
  • open
  • approved
  • completed
  • declined
  • paused
  • others depending on workflow settings
allowsVoting Only show ideas that can or cannot be voted upon
query A general idea search string
authorId Show only ideas from a particular author
categoryId Show only ideas in a particular category
filter Conceptual filters
Throws
KindlingConnectorException If something goes wrong with the service API this exception is throw
KindlingConnectorUnauthorizedException If the credentials provided for the user are wrong or are expired this exception is throw

public KindlingPost retrievePost (String postId, Integer depth)

Gets a single post

Parameters
postId The id of the post to retrieve
depth Default: 0. Any object in the result can be displayed at depth, 0 = no depth, 1 = expand first relational object level, etc.
Returns
Throws
KindlingConnectorException If something goes wrong with the service API this exception is throw
KindlingConnectorUnauthorizedException If the credentials provided for the user are wrong or are expired this exception is throw

public KindlingCollection<KindlingPost> retrievePosts (Integer depth, String sort, Integer page, Integer limit, KindlingPostState state, String startsWith, String query)

Gets the posts collection

Parameters
depth Default: 0. Any object in the result can be displayed at depth, 0 = no depth, 1 = expand first relational object level, etc.
sort Default: title. How the collection output will be sorted, like 'date ASC', 'date', or 'name DESC' etc.
page Default: 1. The page requested
limit Default: 20. The limit on number of collection items to show per page
state Default: ACTIVATED. Get only items in the collection that are in the given state, either by a state ID or it's natural language name
startsWith Find posts beginning with this string
query A general post search
Throws
KindlingConnectorException If something goes wrong with the service API this exception is throw
KindlingConnectorUnauthorizedException If the credentials provided for the user are wrong or are expired this exception is throw

public KindlingUser retrieveUser (String userId, Integer depth)

Gets a single user

Parameters
userId The id of the user to retrieve
depth Default: 0. Any object in the result can be displayed at depth, 0 = no depth, 1 = expand first relational object level, etc.
Returns
Throws
KindlingConnectorException If something goes wrong with the service API this exception is throw
KindlingConnectorUnauthorizedException If the credentials provided for the user are wrong or are expired this exception is throw

public KindlingCollection<KindlingUser> retrieveUsers (Integer depth, String sort, Integer page, Integer limit, KindlingUserState state, Integer associatedWithCategoryId, KindlingUserDigest digest, String query, KindlingUserReputationTimeframe reputationTimeframe)

Gets the users collection

Parameters
depth Default: 0. Any object in the result can be displayed at depth, 0 = no depth, 1 = expand first relational object level, etc.
sort Default: title. How the collection output will be sorted, like 'date ASC', 'date', or 'name DESC' etc.
page Default: 1. The page requested
limit Default: 20. The limit on number of collection items to show per page
state Default: ACTIVATED. Get only items in the collection that are in the given state, either by a state ID or it's natural language name
associatedWithCategoryId Only show users associated with a particular category
digest Show only users with a particular type of digest set
query General user search string
reputationTimeframe If present, will turn this request into one specifically for reputation leaders for a given timeframe, which may be combined with the associatedWithCategoryId parameter as well to return a leaderbooard for a category
Throws
KindlingConnectorException If something goes wrong with the service API this exception is throw
KindlingConnectorUnauthorizedException If the credentials provided for the user are wrong or are expired this exception is throw

public KindlingCategory updateCategory (String categoryId, KindlingCategory category)

Updates a single category

Parameters
categoryId The id of the category to update
category The KindlingCategory with the data to be updated
Returns
Throws
KindlingConnectorException If something goes wrong with the service API this exception is throw
KindlingConnectorUnauthorizedException If the credentials provided for the user are wrong or are expired this exception is throw

public KindlingGroup updateGroup (String groupId, KindlingGroup group)

Updates a single group

Parameters
groupId The id of the group to retrieve
group The KindlingGroup with the data to be updated
Returns
Throws
KindlingConnectorException If something goes wrong with the service API this exception is throw
KindlingConnectorUnauthorizedException If the credentials provided for the user are wrong or are expired this exception is throw

public KindlingIdea updateIdea (String ideaId, KindlingIdea idea)

Updates a single idea

Parameters
ideaId The id of the Idea to update
idea The KindlingIdea with the data to be updated
Returns
Throws
KindlingConnectorException If something goes wrong with the service API this exception is throw
KindlingConnectorUnauthorizedException If the credentials provided for the user are wrong or are expired this exception is throw

public KindlingPost updatePost (String postId, KindlingPost post)

Updates a single post

Parameters
postId The id of the post to update
post The KindlingPost with the data to be updated
Returns
Throws
KindlingConnectorException If something goes wrong with the service API this exception is throw
KindlingConnectorUnauthorizedException If the credentials provided for the user are wrong or are expired this exception is throw

public KindlingUser updateUser (String userId, KindlingUser user)

Updates a single user

Parameters
userId The id of the user to update
user The KindlingUser with the data to be updated
Returns
Throws
KindlingConnectorException If something goes wrong with the service API this exception is throw
KindlingConnectorUnauthorizedException If the credentials provided for the user are wrong or are expired this exception is throw