public class CustomFieldValueService
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected ServiceExecutor |
serviceExecutor |
Constructor and Description |
---|
CustomFieldValueService(MambuAPIService mambuAPIService)
Create a new service
|
Modifier and Type | Method and Description |
---|---|
boolean |
addGroupedFields(MambuEntityType parentEntity,
java.lang.String parentEntityId,
java.util.List<com.mambu.core.shared.model.CustomFieldValue> customFieldValues)
Add new grouped custom field values for an entity.
|
boolean |
delete(MambuEntityType parentEntity,
java.lang.String parentEntityId,
com.mambu.core.shared.model.CustomFieldValue customFieldValue)
Delete custom field value for a Mambu parent entity
|
boolean |
delete(MambuEntityType parentEntity,
java.lang.String parentEntityId,
MambuEntityType ownedEntity,
java.lang.String ownedEntityId,
com.mambu.core.shared.model.CustomFieldValue customFieldValue)
Delete custom field value for owned entity.
|
static com.mambu.core.shared.model.CustomFieldType |
getCustomFieldType(MambuEntityType mambuEntityType)
Get CustomFieldType for the corresponding MambuEntityType
|
java.util.List<com.mambu.core.shared.model.CustomFieldValue> |
getCustomFieldValue(MambuEntityType parentEntity,
java.lang.String parentEntityId,
MambuEntityType ownedEntity,
java.lang.String ownedEntityId,
java.lang.String customFieldId)
Gets a list of CustomFieldValue for the corresponding parent entity type, parentEntityId, ownedEntity type, owned
entity id and custom field id.
|
java.util.List<com.mambu.core.shared.model.CustomFieldValue> |
getCustomFieldValue(MambuEntityType parentEntity,
java.lang.String parentEntityId,
java.lang.String customFieldId)
Gets a list of CustomFieldValue for the corresponding parent entity type, parent entity id and custom field id.
|
static MambuEntityType[] |
getSupportedEntities()
Get Mambu Entities supporting Custom Field Value API
|
static boolean |
isSupported(MambuEntityType parentEntityType)
Is parent entity type supported by the Custom Field Value API
|
boolean |
update(MambuEntityType parentEntity,
java.lang.String parentEntityId,
com.mambu.core.shared.model.CustomFieldValue customFieldValue)
Update custom field value entity.
|
boolean |
update(MambuEntityType parentEntity,
java.lang.String parentEntityId,
java.util.List<com.mambu.core.shared.model.CustomFieldValue> customFieldValues)
Update a list of custom fields
|
boolean |
update(MambuEntityType parentEntity,
java.lang.String parentEntityId,
MambuEntityType ownedEntity,
java.lang.String ownedEntityId,
com.mambu.core.shared.model.CustomFieldValue customFieldValue)
Update custom field value for owned entity.
|
boolean |
updateGroupedFields(MambuEntityType parentEntity,
java.lang.String parentEntityId,
java.util.List<com.mambu.core.shared.model.CustomFieldValue> customFieldValues)
Update grouped custom field values for an entity.
|
protected ServiceExecutor serviceExecutor
@Inject public CustomFieldValueService(MambuAPIService mambuAPIService)
mambuAPIService
- the service responsible with the connection to the serverpublic boolean update(MambuEntityType parentEntity, java.lang.String parentEntityId, com.mambu.core.shared.model.CustomFieldValue customFieldValue) throws MambuApiException
parentEntity
- Mambu entity for which the custom field value is updated. Example: MambuEntity.CLIENT,
MambuEntity.BRANCHparentEntityId
- entity id or encoded key for the parent entitycustomFieldValue
- custom field value to be updatedMambuApiException
public boolean delete(MambuEntityType parentEntity, java.lang.String parentEntityId, com.mambu.core.shared.model.CustomFieldValue customFieldValue) throws MambuApiException
parentEntity
- Mambu entity for which custom field value is deleted. Example: MambuEntity.CLIENT, MambuEntity.BRANCHparentEntityId
- entity id or encoded key for the parent entitycustomFieldValue
- custom field value to be deletedMambuApiException
public boolean update(MambuEntityType parentEntity, java.lang.String parentEntityId, MambuEntityType ownedEntity, java.lang.String ownedEntityId, com.mambu.core.shared.model.CustomFieldValue customFieldValue) throws MambuApiException
parentEntity
- the parent Mambu entity for which the custom field value is updated. Example: MambuEntity.LOAN_ACCOUNTparentEntityId
- entity id or encoded key for the parent entity (e.g. loan account id)ownedEntity
- Mambu entity for which the custom field value is updated. Example: MambuEntity.LOAN_TRANSACTOIONownedEntityId
- the entity id or encoded key for the owned entity (e.g transaction id)customFieldValue
- custom field value to be updatedMambuApiException
public boolean delete(MambuEntityType parentEntity, java.lang.String parentEntityId, MambuEntityType ownedEntity, java.lang.String ownedEntityId, com.mambu.core.shared.model.CustomFieldValue customFieldValue) throws MambuApiException
parentEntity
- the parent Mambu entity for which the custom field value is deleted. Example: MambuEntity.LOAN_ACCOUNTparentEntityId
- entity id or encoded key for the parent entity (e.g. loan account id)ownedEntity
- Mambu entity for which the custom field value is deleted. Example: MambuEntity.LOAN_TRANSACTOIONownedEntityId
- the entity id or encoded key for the owned entity (e.g transaction id)customFieldValue
- custom field value to be updatedMambuApiException
public boolean addGroupedFields(MambuEntityType parentEntity, java.lang.String parentEntityId, java.util.List<com.mambu.core.shared.model.CustomFieldValue> customFieldValues) throws MambuApiException
parentEntity
- Mambu entity for which the custom field values are added. Example: MambuEntity.CLIENT,
MambuEntity.BRANCHparentEntityId
- id or encoded key for the parent entitycustomFieldValues
- custom field value to be added. Must not be null. All custom field values must belong to the same
Grouped custom field setMambuApiException
public boolean updateGroupedFields(MambuEntityType parentEntity, java.lang.String parentEntityId, java.util.List<com.mambu.core.shared.model.CustomFieldValue> customFieldValues) throws MambuApiException
parentEntity
- Mambu entity for which the custom field values are added. Example: MambuEntity.CLIENT,
MambuEntity.BRANCHparentEntityId
- id or encoded key for the parent entitycustomFieldValues
- custom field value to be added. Must not be null. All custom field values must belong to the same
Grouped custom field set. customFieldSetGroupIndex must be present in each fieldMambuApiException
public static MambuEntityType[] getSupportedEntities()
public static boolean isSupported(MambuEntityType parentEntityType)
parentEntityType
- Mambu Entity typepublic static com.mambu.core.shared.model.CustomFieldType getCustomFieldType(MambuEntityType mambuEntityType)
mambuEntityType
- Mambu Entity Typepublic boolean update(MambuEntityType parentEntity, java.lang.String parentEntityId, java.util.List<com.mambu.core.shared.model.CustomFieldValue> customFieldValues) throws MambuApiException
parentEntity
- The parent Mambu entity for which the custom field values will be updated. Must not be null. Example:
MambuEntity.CLIENT.parentEntityId
- The entity id or encoded key for the parent entity (e.g. client id). Must not be null.customFieldValues
- A list containing the custom fields values to be updated. Must not be null or empty. Existent custom
field values will be updated. If the provided custom field value was not present before - it will be
added. Existent custom field values not present in the request will remain unchanged (they will NOT be
deleted)MambuApiException
public java.util.List<com.mambu.core.shared.model.CustomFieldValue> getCustomFieldValue(MambuEntityType parentEntity, java.lang.String parentEntityId, java.lang.String customFieldId) throws MambuApiException
parentEntity
- The parent entity type. Must not be null.parentEntityId
- The id of the parent entity. Must not be null.customFieldId
- The id of the custom field. Must not be null.MambuApiException
public java.util.List<com.mambu.core.shared.model.CustomFieldValue> getCustomFieldValue(MambuEntityType parentEntity, java.lang.String parentEntityId, MambuEntityType ownedEntity, java.lang.String ownedEntityId, java.lang.String customFieldId) throws MambuApiException
parentEntity
- The parent entity type. Must not be nullparentEntityId
- The id of the parent entity. Must not be null.ownedEntity
- The owned entity type. Must not be null.ownedEntityId
- The id of the owned entity. Must not be null.customFieldId
- The id of the custom field. Must not be null.MambuApiException