public class

ClarizenConnector

extends Object
java.lang.Object
   ↳ org.mule.modules.clarizen.ClarizenConnector
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

Clarizen Cloud Connector Clarizen project management software is a leading global provider of collaborative online project management that allows businesses to easily manage all of their projects and resources in a single environment. For futher information visit http://www.clarizen.com

Summary

Fields
private String applicationId Clarizen Application ID
private ClarizenClient clarizenClient ClarizenClient client.
private String connectionPassword Password
private String connectionUser Username
private Object loginLock
private String partnerId Clarizen Partner ID
private String sessionId
Public Constructors
ClarizenConnector()
Public Methods
Boolean attachFileUrlToEntity(EntityId entityId, String attachmentUrl, String attachmentFilename)
Attaches a file to an entity, given that the file resides in an external storage and can be accessed via a URL.
void connect(String connectionUser, String connectionPassword, String applicationId, String partnerId)
Performs a connection to Clarizen by making a login call with the given credentials.
BaseClarizenEntity createEntity(BaseClarizenEntity entity)
Creates a new Clarizen entity

BaseClarizenEntity createFromTemplate(String templateName, BaseClarizenEntity entity)
Creates milestones and projects from templates

GenericEntity createGenericEntity(GenericEntity entity)
Creates a new Clarizen generic entity

Boolean deleteEntity(BaseClarizenEntity entity)
Deletes an entity

Boolean deleteEntityById(EntityId entityId)
Deletes an entity by its entity Id

List<EntityDescription> describeEntities(List<String> typeNames)
Returns the description of an entity

void disconnect()
Performs a logout call.
List<FileInformation> downloadEntityAttachments(EntityId entityId)
Given a certain Entity Id, retrieves all associated attachments.
FileInformation downloadFileInformation(BaseClarizenEntity entity)
Download file information

List<BaseClarizenEntity> entityQuery(List<String> fieldsToRetrieve, String queryTypeName, Condition condition, Integer pageSize, Integer maxNumberOfPages)
Create an entity query

String getApplicationId()
GetCalendarInfoResult getCalendarInformation(EntityId userId)
Gets calendar information for the specified user

ClarizenClient getClarizenClient()
String getConnectionPassword()
String getConnectionUser()
List<BaseClarizenEntity> getMyWorkItems(List<String> fieldsToRetrieve, WorkItemState workItemState, WorkItemType workItemType, WorkItemFilter workItemFilter, Integer pageSize, Integer maxNumberOfPages)
Returns the work items for the current user

String getPartnerId()
String getSessionId()
List<Object> getSystemSettings(List<String> settings)
Gets system settings values

BaseClarizenEntity getWorkItemById(WorkItemType workItemType, String workItemId, List<String> fieldsToRetrieve)
Retrieves a workitem by id.
List<BaseClarizenEntity> issueQuery(List<String> fieldsToRetrieve, AllIssueType issueType, Condition condition, Integer pageSize, Integer maxNumberOfPages)
Create an issues query

Boolean lifecycleChange(List<EntityId> entityIdList, String operation, Boolean recursive)
Performs lifecycle changes on an entity or a group of entities

List<String> listEntities()
Returns the list of entities

Login login(String username, String password, String applicationId, String partnerId)
Login to Clarizen
void logout()
Cleans up an authentication token that was previously created with a call to login
List<GenericEntity> retrieveWorkItemHumanResources(EntityId entityId, List<String> fieldsToRetrieve)
Given a certain Entity Id representing a work item, retrieves all associated human resources.
Boolean sendEmail(AccessType accessType, BaseClarizenEntity relatedEntity, String body, String subject, List<Recipient> recipients)
Sends an email to the specified recipients

void setApplicationId(String applicationId)
void setClarizenClient(ClarizenClient clarizenClient)
void setConnectionPassword(String connectionPassword)
void setConnectionUser(String connectionUser)
void setPartnerId(String partnerId)
void setSessionId(String sessionId)
String toString()
Returns a connection identifier.
BaseClarizenEntity updateEntity(BaseClarizenEntity entity)
Updates a new Clarizen entity

GenericEntity updateGenericEntity(GenericEntity entity)
Updates a Clarizen generic entity

boolean validateConnection()
Returns whether the current user is authenticated.
List<BaseClarizenEntity> workItemsQuery(List<String> fieldsToRetrieve, WorkItemState workItemState, WorkItemType workItemType, WorkItemFilter workItemFilter, Integer pageSize, Integer maxNumberOfPages)
Search for work items

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

Fields

private String applicationId

Clarizen Application ID

private ClarizenClient clarizenClient

ClarizenClient client. Default ClarizenClientImpl.

private String connectionPassword

Password

private String connectionUser

Username

private Object loginLock

private String partnerId

Clarizen Partner ID

private String sessionId

Public Constructors

public ClarizenConnector ()

Public Methods

public Boolean attachFileUrlToEntity (EntityId entityId, String attachmentUrl, String attachmentFilename)

Attaches a file to an entity, given that the file resides in an external storage and can be accessed via a URL.

Parameters
entityId ID of the entity to which the file URL will be attached
attachmentUrl URL pointing to the attachment
attachmentFilename Filename of the attachment
Returns
  • true if the action was successful

public void connect (String connectionUser, String connectionPassword, String applicationId, String partnerId)

Performs a connection to Clarizen by making a login call with the given credentials.

Parameters
connectionUser The user login user
connectionPassword The user login pass
applicationId The id of a specific partner application that can be used for licensing purposed
partnerId The id of a Clarizen partner
Throws
ConnectionException

public BaseClarizenEntity createEntity (BaseClarizenEntity entity)

Creates a new Clarizen entity

Parameters
entity Entity to be created
Returns
  • Created entity

public BaseClarizenEntity createFromTemplate (String templateName, BaseClarizenEntity entity)

Creates milestones and projects from templates

Parameters
templateName Template to be used
entity Entity to be created from template
Returns
  • created entity

public GenericEntity createGenericEntity (GenericEntity entity)

Creates a new Clarizen generic entity

Parameters
entity Entity to be created
Returns
  • Created entity

public Boolean deleteEntity (BaseClarizenEntity entity)

Deletes an entity

Parameters
entity The entity to be deleted
Returns
  • true if the entity was successfully deleted

public Boolean deleteEntityById (EntityId entityId)

Deletes an entity by its entity Id

Parameters
entityId The entity Id of the entity to be deleted
Returns
  • true if the entity was successfully deleted

public List<EntityDescription> describeEntities (List<String> typeNames)

Returns the description of an entity

Parameters
typeNames List of entity types to be described
Returns

public void disconnect ()

Performs a logout call.

public List<FileInformation> downloadEntityAttachments (EntityId entityId)

Given a certain Entity Id, retrieves all associated attachments.

Parameters
entityId The entity Id associated with the attachments
Returns
  • The list containing all the attachments.

public FileInformation downloadFileInformation (BaseClarizenEntity entity)

Download file information

Parameters
entity Document entity
Returns
  • entity file information

public List<BaseClarizenEntity> entityQuery (List<String> fieldsToRetrieve, String queryTypeName, Condition condition, Integer pageSize, Integer maxNumberOfPages)

Create an entity query

Parameters
fieldsToRetrieve The fields to be retrieved. The fields names are the keys of the map
queryTypeName The entity type
condition The query condition. For further information about the condition object check Condition
pageSize The number of results to be retrieved per page
maxNumberOfPages The maximum number of pages to be retrieved
Returns
  • ArrayOfEntity List of work item results

public String getApplicationId ()

public GetCalendarInfoResult getCalendarInformation (EntityId userId)

Gets calendar information for the specified user

Parameters
userId The userId entityId
Returns
  • calendar information

public ClarizenClient getClarizenClient ()

public String getConnectionPassword ()

public String getConnectionUser ()

public List<BaseClarizenEntity> getMyWorkItems (List<String> fieldsToRetrieve, WorkItemState workItemState, WorkItemType workItemType, WorkItemFilter workItemFilter, Integer pageSize, Integer maxNumberOfPages)

Returns the work items for the current user

Parameters
fieldsToRetrieve The fields to be retrieved. The fields names are the keys of the map
workItemState The work items state. For further information about the specific values check WorkItemState
workItemType The work item type. For further information about the specific values check WorkItemType
workItemFilter The work items filter. For further information about the specific values check WorkItemFilter
pageSize The number of results to be retrieved per page
maxNumberOfPages The maximum number of pages to be retrieved
Returns
  • ArrayOfEntity List of work items

public String getPartnerId ()

public String getSessionId ()

public List<Object> getSystemSettings (List<String> settings)

Gets system settings values

Parameters
settings List
Returns
  • system settings

public BaseClarizenEntity getWorkItemById (WorkItemType workItemType, String workItemId, List<String> fieldsToRetrieve)

Retrieves a workitem by id.

Parameters
workItemType The work item type. For further information about the specific values check WorkItemType
workItemId The work item id
fieldsToRetrieve The list of the work item fields to be retrieved. The fields names are the keys of the map
Returns
  • Work item with fields indicated through fieldToRetrieve

public List<BaseClarizenEntity> issueQuery (List<String> fieldsToRetrieve, AllIssueType issueType, Condition condition, Integer pageSize, Integer maxNumberOfPages)

Create an issues query

Parameters
fieldsToRetrieve The fields to be retrieved. The fields names are the keys of the map
issueType The issue type to be retrieved
condition The query condition. For further information about the condition object check Condition
pageSize The number of results to be retrieved per page.
maxNumberOfPages The maximum number of pages to be retrieved
Returns
  • ArrayOfEntity List of issues results

public Boolean lifecycleChange (List<EntityId> entityIdList, String operation, Boolean recursive)

Performs lifecycle changes on an entity or a group of entities

Parameters
entityIdList The list of entities to be updated
operation The operation to be performed
recursive If the operation will be recursived
Returns
  • true if the change was successful

public List<String> listEntities ()

Returns the list of entities

Returns
  • List of entities

public Login login (String username, String password, String applicationId, String partnerId)

Login to Clarizen

Parameters
username The login user
password The login pass
applicationId The id of a specific partner application that can be used for licensing purposed
partnerId The id of a Clarizen partner
Returns
  • Login Login result with the created user session id

public void logout ()

Cleans up an authentication token that was previously created with a call to login

public List<GenericEntity> retrieveWorkItemHumanResources (EntityId entityId, List<String> fieldsToRetrieve)

Given a certain Entity Id representing a work item, retrieves all associated human resources.

Parameters
entityId The entity Id associated with a work item
fieldsToRetrieve List of strings representing the fields to retrieve
Returns
  • The list containing all the human resources.

public Boolean sendEmail (AccessType accessType, BaseClarizenEntity relatedEntity, String body, String subject, List<Recipient> recipients)

Sends an email to the specified recipients

Parameters
accessType PUBLIC or PRIVATE
relatedEntity Entity related to the email
body Message body
subject Message subject
recipients List of recipients
Returns
  • true if the action was successful

public void setApplicationId (String applicationId)

Parameters
applicationId

public void setClarizenClient (ClarizenClient clarizenClient)

Parameters
clarizenClient

public void setConnectionPassword (String connectionPassword)

Parameters
connectionPassword

public void setConnectionUser (String connectionUser)

Parameters
connectionUser

public void setPartnerId (String partnerId)

Parameters
partnerId

public void setSessionId (String sessionId)

Parameters
sessionId

public String toString ()

Returns a connection identifier.

public BaseClarizenEntity updateEntity (BaseClarizenEntity entity)

Updates a new Clarizen entity

Parameters
entity Entity to be updated
Returns
  • Created entity

public GenericEntity updateGenericEntity (GenericEntity entity)

Updates a Clarizen generic entity

Parameters
entity Entity to be updated
Returns
  • Created entity

public boolean validateConnection ()

Returns whether the current user is authenticated. It does not mean tell anything whether the current session has expired

public List<BaseClarizenEntity> workItemsQuery (List<String> fieldsToRetrieve, WorkItemState workItemState, WorkItemType workItemType, WorkItemFilter workItemFilter, Integer pageSize, Integer maxNumberOfPages)

Search for work items

Parameters
fieldsToRetrieve The fields to be retrieved. The fields names are the keys of the map
workItemState The work items state. For further information about the specific values check WorkItemState
workItemType The work item type. For further information about the specific values check WorkItemType
workItemFilter The work items filter. For further information about the specific values check WorkItemFilter
pageSize The number of results to be retrieved per page
maxNumberOfPages The maximum number of pages to be retrieved
Returns
  • ArrayOfEntity List of work item results