Permalink
Browse files

Add new operations #3

* setRelationship(..)
* setRelationships(..)

not yet testing
  • Loading branch information...
1 parent 71162b3 commit 2c0c1191fc4dda6eb7688551675120080f04b739 Gaston Prieto committed Jun 8, 2012
@@ -32,4 +32,12 @@
<!-- BEGIN_INCLUDE(sugar:searchByModule) -->
-<!-- END_INCLUDE(sugar:searchByModule) -->
+<!-- END_INCLUDE(sugar:searchByModule) -->
+
+<!-- BEGIN_INCLUDE(sugar:setRelationship) -->
+
+<!-- END_INCLUDE(sugar:setRelationship) -->
+
+<!-- BEGIN_INCLUDE(sugar:setRelationships) -->
+
+<!-- END_INCLUDE(sugar:setRelationships) -->
@@ -25,6 +25,10 @@
import com.sugarcrm.sugarcrm.NewSetEntryResult;
import com.sugarcrm.sugarcrm.SearchByModuleRequestType;
import com.sugarcrm.sugarcrm.SearchByModuleResponseType;
+import com.sugarcrm.sugarcrm.SetRelationshipRequestType;
+import com.sugarcrm.sugarcrm.SetRelationshipResponseType;
+import com.sugarcrm.sugarcrm.SetRelationshipsRequestType;
+import com.sugarcrm.sugarcrm.SetRelationshipsResponseType;
/**
* Sugar is an affordable and easy to use customer relationship management (CRM) platform,
@@ -73,12 +77,11 @@ public void setEndpoint(String endpoint)
* {@sample.xml ../../../doc/sugar-connector.xml.sample sugar:login}
*
* @param request a bean with user_auth (username and password)
- *
* @return {@link EntryValue} with id, module and name-values list
*/
@Processor
public com.sugarcrm.sugarcrm.EntryValue login(com.sugarcrm.sugarcrm.LoginRequestType request) {
- return client.login(request).getReturn();
+ return getClient().login(request).getReturn();
}
/**
@@ -89,7 +92,6 @@ public void setEndpoint(String endpoint)
* {@sample.xml ../../../doc/sugar-connector.xml.sample sugar:getEntryList}
*
* @param request a bean with module, query, order by and offset
- *
* @return {@link GetEntryResultVersion2} with entries selected
*/
@Processor
@@ -106,7 +108,6 @@ public void setEndpoint(String endpoint)
* {@sample.xml ../../../doc/sugar-connector.xml.sample sugar:getCountEntries}
*
* @param request a bean with module, query and deleted flag
- *
* @return {@link GetEntriesCountResult} with amount of records
*/
@Processor
@@ -125,7 +126,6 @@ public void setEndpoint(String endpoint)
* {@sample.xml ../../../doc/sugar-connector.xml.sample sugar:getEntries}
*
* @param request a bean with modules, ids and selected fields
- *
* @return {@link GetEntryResultVersion2} with entries selected
*/
@Processor
@@ -142,7 +142,6 @@ public void setEndpoint(String endpoint)
* {@sample.xml ../../../doc/sugar-connector.xml.sample sugar:setEntry}
*
* @param request a bean with module and name-values for create or update SugarBean
- *
* @return {@link NewSetEntryResult} with a id
*/
@Processor
@@ -159,7 +158,6 @@ public void setEndpoint(String endpoint)
* {@sample.xml ../../../doc/sugar-connector.xml.sample sugar:setEntries}
*
* @param request a bean wit module and list of name-values for create or update a list of SugarBeans
- *
* @return {@link NewSetEntriesResult} a list of ids
*/
@Processor
@@ -177,7 +175,6 @@ public void setEndpoint(String endpoint)
* {@sample.xml ../../../doc/sugar-connector.xml.sample sugar:getModuleFields}
*
* @param request a bean with module to obtains fields
- *
* @return {@link NewModuleFields} a list of fields in module
*/
@Processor
@@ -195,7 +192,6 @@ public void setEndpoint(String endpoint)
* {@sample.xml ../../../doc/sugar-connector.xml.sample sugar:getAvailableModules}
*
* @param request a bean with parameters
- *
* @return {@link ModuleList} a list of availables modules
*/
@Processor
@@ -214,13 +210,42 @@ public void setEndpoint(String endpoint)
* {@sample.xml ../../../doc/sugar-connector.xml.sample sugar:searchByModule}
*
* @param request a bean with parameters
- *
* @return {@link ModuleList} a list of availables modules
*/
public SearchByModuleResponseType searchByModule(SearchByModuleRequestType request)
{
return getClient().searchByModule(request);
}
+
+ /**
+ * SetRelationships Processor.
+ * <p>
+ * Sets multiple relationships between two SugarBeans.
+ *
+ * {@sample.xml ../../../doc/sugar-connector.xml.sample sugar:setRelationships}
+ *
+ * @param request a bean with parameters
+ * @return {@link SetRelationshipsResponseType} a result operation
+ */
+ public SetRelationshipsResponseType setRelationships(SetRelationshipsRequestType request)
+ {
+ return getClient().setRelationships(request);
+ }
+
+ /**
+ * SetRelationship Processor.
+ * <p>
+ * Sets a single relationship between two SugarBeans.
+ *
+ * {@sample.xml ../../../doc/sugar-connector.xml.sample sugar:setRelationship}
+ *
+ * @param request a bean with parameters
+ * @return {@link SetRelationshipResponseType} a result operation
+ */
+ public SetRelationshipResponseType setRelationship(SetRelationshipRequestType request)
+ {
+ return getClient().setRelationship(request);
+ }
/**
* @return a client instance
@@ -30,6 +30,10 @@
import com.sugarcrm.sugarcrm.SetEntriesResponseType;
import com.sugarcrm.sugarcrm.SetEntryRequestType;
import com.sugarcrm.sugarcrm.SetEntryResponseType;
+import com.sugarcrm.sugarcrm.SetRelationshipRequestType;
+import com.sugarcrm.sugarcrm.SetRelationshipResponseType;
+import com.sugarcrm.sugarcrm.SetRelationshipsRequestType;
+import com.sugarcrm.sugarcrm.SetRelationshipsResponseType;
/**
* The SugarCRM Client
@@ -57,6 +61,10 @@
SearchByModuleResponseType searchByModule(SearchByModuleRequestType request);
+ SetRelationshipsResponseType setRelationships(SetRelationshipsRequestType request);
+
+ SetRelationshipResponseType setRelationship(SetRelationshipRequestType request);
+
}
@@ -33,6 +33,10 @@
import com.sugarcrm.sugarcrm.SetEntriesResponseType;
import com.sugarcrm.sugarcrm.SetEntryRequestType;
import com.sugarcrm.sugarcrm.SetEntryResponseType;
+import com.sugarcrm.sugarcrm.SetRelationshipRequestType;
+import com.sugarcrm.sugarcrm.SetRelationshipResponseType;
+import com.sugarcrm.sugarcrm.SetRelationshipsRequestType;
+import com.sugarcrm.sugarcrm.SetRelationshipsResponseType;
import com.sugarcrm.sugarcrm.Sugarsoap;
import com.sugarcrm.sugarcrm.SugarsoapPortType;
import com.zauberlabs.commons.ws.connection.ConnectionBuilder;
@@ -111,6 +115,18 @@ public LogoutResponseType logout(LogoutRequestType request)
{
return getService().logout(request);
}
+
+ @Override
+ public SetRelationshipsResponseType setRelationships(SetRelationshipsRequestType request)
+ {
+ return getService().setRelationships(request);
+ }
+
+ @Override
+ public SetRelationshipResponseType setRelationship(SetRelationshipRequestType request)
+ {
+ return getService().setRelationship(request);
+ }
protected SugarsoapPortType getService()
{
@@ -1,6 +1,6 @@
-/*
- * $Id$
- * --------------------------------------------------------------------------------------
+/**
+ * Mule Sugar CRM Connector
+ *
* Copyright (c) MuleSoft, Inc. All rights reserved. http://www.mulesoft.com
*
* The software in this package is published under the terms of the CPAL v1.0

0 comments on commit 2c0c119

Please sign in to comment.