diff --git a/api-docs/apiLive.htm b/api-docs/apiLive.htm index 829bc7968..1f97a4954 100644 --- a/api-docs/apiLive.htm +++ b/api-docs/apiLive.htm @@ -2050,7 +2050,9 @@ GET https://DomainName/api/v1/clients
You can update any attribute of a client except for its association with groups. The relationship between a client and a group must be removed through the Groups API.
+Note:You can update any of the basic attributes of a client using this API but not its associations.
+Chaning the relationship between a client and its office is not supported through this API. An API specific to handling transfers of clients between offices will be introduced for this.
+The relationship between a client and a group must be removed through the Groups API.
diff --git a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/client/api/ClientApiConstants.java b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/client/api/ClientApiConstants.java
index 880478375..18b063aa8 100644
--- a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/client/api/ClientApiConstants.java
+++ b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/client/api/ClientApiConstants.java
@@ -24,7 +24,6 @@ public class ClientApiConstants {
public static final String lastnameParamName = "lastname";
public static final String fullnameParamName = "fullname";
public static final String officeIdParamName = "officeId";
- public static final String staffIdParamName = "staffId";
public static final String activeParamName = "active";
public static final String activationDateParamName = "activationDate";
@@ -33,20 +32,22 @@ public class ClientApiConstants {
public static final String hierarchyParamName = "hierarchy";
public static final String displayNameParamName = "displayName";
public static final String officeNameParamName = "officeName";
- public static final String staffNameParamName = "staffName";
public static final String imageKeyParamName = "imageKey";
public static final String imagePresentParamName = "imagePresent";
// associations related part of response
- public static final String parentGroupsParamName = "groups";
+ public static final String groupsParamName = "groups";
// template related part of response
public static final String officeOptionsParamName = "officeOptions";
- public static final String staffOptionsParamName = "staffOptions";
- public static final Set CLIENT_REQUEST_DATA_PARAMETERS = new HashSet(Arrays.asList(localeParamName,
+ public static final Set CLIENT_CREATE_REQUEST_DATA_PARAMETERS = new HashSet(Arrays.asList(localeParamName,
dateFormatParamName, groupIdParamName, accountNoParamName, externalIdParamName, firstnameParamName, middlenameParamName,
- lastnameParamName, fullnameParamName, officeIdParamName, staffIdParamName, activeParamName, activationDateParamName));
+ lastnameParamName, fullnameParamName, officeIdParamName, activeParamName, activationDateParamName));
+
+ public static final Set CLIENT_UPDATE_REQUEST_DATA_PARAMETERS = new HashSet(Arrays.asList(localeParamName,
+ dateFormatParamName, accountNoParamName, externalIdParamName, firstnameParamName, middlenameParamName,
+ lastnameParamName, fullnameParamName, activeParamName, activationDateParamName));
/**
* These parameters will match the class level parameters of
@@ -54,9 +55,9 @@ public class ClientApiConstants {
* match those of request parameters.
*/
public static final Set CLIENT_RESPONSE_DATA_PARAMETERS = new HashSet(Arrays.asList(idParamName, accountNoParamName,
- externalIdParamName, statusParamName, firstnameParamName, middlenameParamName, lastnameParamName, fullnameParamName,
- displayNameParamName, officeIdParamName, officeNameParamName, staffIdParamName, staffNameParamName, hierarchyParamName,
- officeOptionsParamName, staffOptionsParamName));
+ externalIdParamName, statusParamName, activeParamName, activationDateParamName, firstnameParamName, middlenameParamName,
+ lastnameParamName, fullnameParamName, displayNameParamName, officeIdParamName, officeNameParamName, hierarchyParamName,
+ imageKeyParamName, imagePresentParamName, groupsParamName, officeOptionsParamName));
public static final Set ACTIVATION_REQUEST_DATA_PARAMETERS = new HashSet(Arrays.asList(localeParamName,
dateFormatParamName, activationDateParamName));
diff --git a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/client/data/ClientDataValidator.java b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/client/data/ClientDataValidator.java
index aff0d51d5..23d2e90aa 100644
--- a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/client/data/ClientDataValidator.java
+++ b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/client/data/ClientDataValidator.java
@@ -42,7 +42,7 @@ public final class ClientDataValidator {
if (StringUtils.isBlank(json)) { throw new InvalidJsonException(); }
final Type typeOfMap = new TypeToken