public class

SugarConnector

extends Object
java.lang.Object
   ↳ org.mule.modules.sugarcrm.SugarConnector
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

Sugar is an affordable and easy to use customer relationship management (CRM) platform, designed to help your business communicate with prospects, share sales information, close deals and keep customers happy. As an open-source, web-based CRM solution, Sugar is easy to customize and adapt to your changing needs. Ideal for small and medium-sized companies, large enterprises and government organizations, Sugar can run in the cloud or on-site.

Summary

Fields
private SugarCrmClient client Sugar's application client.
private String endpoint Use this attribute to specify endpoint URL
private String sessionId
Public Constructors
SugarConnector()
Public Methods
void connect(String username, String password)
Creates a new Sugar Connection
void disconnect()
End the current session
ModuleList getAvailableModules(GetAvailableModulesRequest request)
GetAvailableModules Processor.
GetEntriesCountResult getCountEntries(GetEntriesCountRequest request)
GetCountEntries Processor

Retrieves the specified number of records in a module.

String getEndpoint()
Setters/Getters
GetEntryResultVersion2 getEntries(GetEntriesRequest request)
GetEntries Processor.
GetEntryResultVersion2 getEntry(GetEntryRequest request)
GetEntry Processor.
GetEntryListResultVersion2 getEntryList(GetEntryListRequest request)
GetEntryList Processor.
NewModuleFields getModuleFields(GetModuleFieldsRequest request)
GetModuleFields Processor.
String getSessionId()
Returns the session id for the current connection

boolean isConnected()
Validate is active connection
ReturnSearchResult searchByModule(SearchByModuleRequest request)
SearchByModule Processor.
void setClient(SugarCrmClient client)
void setEndpoint(String endpoint)
NewSetEntriesResult setEntries(SetEntriesRequest request)
SetEntries Processor.
NewSetEntryResult setEntry(SetEntryRequest request)
SetEntry Processor.
NewSetRelationshipListResult setRelationship(SetRelationshipRequest request)
SetRelationship Processor.
NewSetRelationshipListResult setRelationships(SetRelationshipsRequest request)
SetRelationships Processor.
[Expand]
Inherited Methods
From class java.lang.Object

Fields

private SugarCrmClient client

Sugar's application client. By default uses SugarCrmClientSoap

private String endpoint

Use this attribute to specify endpoint URL

private String sessionId

Public Constructors

public SugarConnector ()

Public Methods

public void connect (String username, String password)

Creates a new Sugar Connection

Parameters
username Username used to initialize the session
password Password used to authenticate the user
Throws
ConnectionException

public void disconnect ()

End the current session

public ModuleList getAvailableModules (GetAvailableModulesRequest request)

GetAvailableModules Processor.

Retrieves the list of modules available to the current user logged into the system.

Parameters
request A bean with session id
Returns

public GetEntriesCountResult getCountEntries (GetEntriesCountRequest request)

GetCountEntries Processor

Retrieves the specified number of records in a module.

Parameters
request A bean with module, query and deleted flag
Returns

public String getEndpoint ()

Setters/Getters

public GetEntryResultVersion2 getEntries (GetEntriesRequest request)

GetEntries Processor.

Retrieves multiple SugarBeans based on IDs. This API is not applicable to the Reports module.

Parameters
request A bean with modules, ids and selected fields
Returns

public GetEntryResultVersion2 getEntry (GetEntryRequest request)

GetEntry Processor.

Retrieves a single SugarBean based on ID.

Parameters
request A bean with parameters
Returns

public GetEntryListResultVersion2 getEntryList (GetEntryListRequest request)

GetEntryList Processor.

Retrieves a list of SugarBeans.

Parameters
request A bean with module, query, order by and offset
Returns

public NewModuleFields getModuleFields (GetModuleFieldsRequest request)

GetModuleFields Processor.

Retrieves variable definitions (vardefs) for fields of the specified SugarBean.

Parameters
request A bean with module to obtains fields
Returns

public String getSessionId ()

Returns the session id for the current connection

Returns
  • the session id for the current connection

public boolean isConnected ()

Validate is active connection

public ReturnSearchResult searchByModule (SearchByModuleRequest request)

SearchByModule Processor.

Given a list of modules to search and a search string, return the id, module_name, along with the fields.
Supported modules are Accounts, Bugs, Calls, Cases, Contacts, Leads, Opportunities, Projects, Project Tasks, and Quotes.

Parameters
request A bean with parameters
Returns

public void setClient (SugarCrmClient client)

Parameters
client

public void setEndpoint (String endpoint)

Parameters
endpoint

public NewSetEntriesResult setEntries (SetEntriesRequest request)

SetEntries Processor.

Creates or updates a list of SugarBeans.

Parameters
request A bean wit module and list of name-values for create or update a list of SugarBeans
Returns

public NewSetEntryResult setEntry (SetEntryRequest request)

SetEntry Processor.

Creates or updates a single SugarBean.

Parameters
request A bean with module and name-values for create or update SugarBean
Returns

public NewSetRelationshipListResult setRelationship (SetRelationshipRequest request)

SetRelationship Processor.

Sets a single relationship between two SugarBeans.

Parameters
request A bean with parameters
Returns

public NewSetRelationshipListResult setRelationships (SetRelationshipsRequest request)

SetRelationships Processor.

Sets multiple relationships between two SugarBeans.

Parameters
request A bean with parameters
Returns