diff --git a/src/org/camunda/latera/bss/connectors/hid/hydra/Account.groovy b/src/org/camunda/latera/bss/connectors/hid/hydra/Account.groovy index 2b71adcd..27723a1d 100644 --- a/src/org/camunda/latera/bss/connectors/hid/hydra/Account.groovy +++ b/src/org/camunda/latera/bss/connectors/hid/hydra/Account.groovy @@ -164,6 +164,15 @@ trait Account { } } + LinkedHashMap createCustomerAccount(LinkedHashMap input) { + input.remove('accountId') + return putCustomerAccount(input) + } + + LinkedHashMap updateCustomerAccount(def accountId, LinkedHashMap input) { + return putCustomerAccount(input + [accountId: accountId]) + } + Boolean putAdjustment(LinkedHashMap input) { LinkedHashMap params = mergeParams([ accountId : null, @@ -196,6 +205,14 @@ trait Account { } } + Boolean addAdjustment(LinkedHashMap input) { + return putAdjustment(input) + } + + Boolean addAdjustment(def accountId, LinkedHashMap input) { + return putAdjustment(input + [accountId: accountId]) + } + Boolean putPermanentOverdraft( def accountId, def sum = 0, @@ -230,6 +247,18 @@ trait Account { return putPermanentOverdraft(params.accountId, params.sum, params.reasonId) } + Boolean addPermanentOverdraft( + def accountId, + def sum = 0, + def reasonId = null + ) { + return putPermanentOverdraft(accountId, sum, reasonId) + } + + Boolean addPermanentOverdraft(LinkedHashMap input) { + return putPermanentOverdraft(input) + } + Boolean deletePermanentOverdraft(def accountId) { try { logger.info("Deleting permanent overdraft with params ${params}") @@ -282,6 +311,19 @@ trait Account { return putTemporalOverdraft(params.accountId, params.sum, params.endDate, params.reasonId) } + Boolean addTemporalOverdraft( + def accountId, + def sum = 0, + def endDate = DateTimeUtil.dayEnd(), + def reasonId = null + ) { + return putTemporalOverdraft(accountId, sum, endDate, reasonId) + } + + Boolean addTemporalOverdraft(LinkedHashMap input) { + return putTemporalOverdraft(input) + } + Boolean deleteTemporalOverdraft(def accountId) { try { logger.info("Deleting temporal overdraft with params ${params}") diff --git a/src/org/camunda/latera/bss/connectors/hid/hydra/Address.groovy b/src/org/camunda/latera/bss/connectors/hid/hydra/Address.groovy index af3082f3..18d3f1c8 100644 --- a/src/org/camunda/latera/bss/connectors/hid/hydra/Address.groovy +++ b/src/org/camunda/latera/bss/connectors/hid/hydra/Address.groovy @@ -462,6 +462,45 @@ trait Address { } } + LinkedHashMap createSubjAddress(LinkedHashMap input) { + input.remove('subjAddressId') + return putSubjAddress(input) + } + + LinkedHashMap createObjAddress(LinkedHashMap input) { + input.remove('objAddressId') + return putObjAddress(input) + } + + LinkedHashMap createEntityAddress(LinkedHashMap input) { + input.remove('entityAddressId') + return putEntityAddress(input) + } + + LinkedHashMap createSubjAddress(def subjectId, LinkedHashMap input) { + return putSubjAddress(input + [subjectId: subjectId]) + } + + LinkedHashMap createObjAddress(def objectId, LinkedHashMap input) { + return putObjAddress(input + [objectId: objectId]) + } + + LinkedHashMap createEntityAddress(def entityId, LinkedHashMap input) { + return putEntityAddress(input + [entityId: entityId]) + } + + LinkedHashMap updateSubjAddress(def subjAddressId, LinkedHashMap input) { + return putSubjAddress(input + [subjAddressId: subjAddressId]) + } + + LinkedHashMap updateObjAddress(def objAddressId, LinkedHashMap input) { + return putObjAddress(input + [objAddressId: objAddressId]) + } + + LinkedHashMap updateEntityAddress(def entityAddressId, LinkedHashMap input) { + return putEntityAddress(input + [entityAddressId: entityAddressId]) + } + List getAddressItemsValues(LinkedHashMap input) { List addressItemsValues = [] getAddressItems().each{ type, value -> diff --git a/src/org/camunda/latera/bss/connectors/hid/hydra/Company.groovy b/src/org/camunda/latera/bss/connectors/hid/hydra/Company.groovy index 7ff46582..4ffcb0b6 100644 --- a/src/org/camunda/latera/bss/connectors/hid/hydra/Company.groovy +++ b/src/org/camunda/latera/bss/connectors/hid/hydra/Company.groovy @@ -161,6 +161,15 @@ trait Company { } } + LinkedHashMap createCompany(LinkedHashMap input) { + input.remove('companyId') + return putCompany(input) + } + + LinkedHashMap updateCompany(def companyId, LinkedHashMap input) { + return putCompany(input + [companyId: companyId]) + } + def getCompanyAddParamTypeIdByCode(String code) { return getSubjectAddParamTypeIdByCode(code, getCompanyTypeId()) } @@ -188,4 +197,12 @@ trait Company { } return putSubjectAddParam(input) } + + Boolean addCompanyAddParam(LinkedHashMap input) { + return putCompanyAddParam(input) + } + + Boolean addCompanyAddParam(def companyId, LinkedHashMap input) { + return putCompanyAddParam(input + [companyId: companyId]) + } } \ No newline at end of file diff --git a/src/org/camunda/latera/bss/connectors/hid/hydra/Contract.groovy b/src/org/camunda/latera/bss/connectors/hid/hydra/Contract.groovy index af8d65b9..d666a043 100644 --- a/src/org/camunda/latera/bss/connectors/hid/hydra/Contract.groovy +++ b/src/org/camunda/latera/bss/connectors/hid/hydra/Contract.groovy @@ -121,6 +121,15 @@ trait Contract { } } + LinkedHashMap createContract(LinkedHashMap input) { + input.remove('docId') + return putContract(input) + } + + LinkedHashMap updateContract(def docId, LinkedHashMap input) { + return putContract(input + [docId: docId]) + } + Boolean dissolveContract(LinkedHashMap input) { LinkedHashMap params = mergeParams([ docId : null, diff --git a/src/org/camunda/latera/bss/connectors/hid/hydra/Customer.groovy b/src/org/camunda/latera/bss/connectors/hid/hydra/Customer.groovy index 736cc222..b1441ef2 100644 --- a/src/org/camunda/latera/bss/connectors/hid/hydra/Customer.groovy +++ b/src/org/camunda/latera/bss/connectors/hid/hydra/Customer.groovy @@ -237,6 +237,15 @@ trait Customer { } } + LinkedHashMap createCustomer(LinkedHashMap input) { + input.remove('customerId') + return putCustomer(input) + } + + LinkedHashMap updateCustomer(def customerId, LinkedHashMap input) { + return putCustomer(input + [customerId: customerId]) + } + def getCustomerAddParamTypeIdByCode(String code) { return getSubjectAddParamTypeIdByCode(code, getCustomerTypeId()) } @@ -265,6 +274,14 @@ trait Customer { return putSubjectAddParam(input) } + Boolean addCustomerAddParam(LinkedHashMap input) { + return putCustomerAddParam(input) + } + + Boolean addCustomerAddParam(def customerId, LinkedHashMap input) { + return putCustomerAddParam(input + [customerId: customerId]) + } + Boolean enableCustomer(def customerId) { enableSubject(subjectId) } @@ -309,6 +326,14 @@ trait Customer { return putSubjectGroup(input) } + LinkedHashMap addCustomerGroup(LinkedHashMap input) { + return putCustomerGroup(input) + } + + LinkedHashMap addCustomerGroup(def customerId, LinkedHashMap input) { + return putCustomerGroup(input + [customerId: customerId]) + } + Boolean deleteCustomerGroup(LinkedHashMap input) { if (input.containsKey('customerId')) { input.subjectId = input.customerId @@ -406,6 +431,14 @@ trait Customer { } } + LinkedHashMap addCustomerNetServiceAccess(LinkedHashMap input) { + return putCustomerNetServiceAccess(input) + } + + LinkedHashMap addCustomerNetServiceAccess(def customerId, LinkedHashMap input) { + return putCustomerNetServiceAccess(input + [customerId: customerId]) + } + Boolean changeNetServicePassword(LinkedHashMap input) { LinkedHashMap params = mergeParams([ subjServId : null, @@ -501,6 +534,14 @@ trait Customer { } } + LinkedHashMap addCustomerAppAccess(LinkedHashMap input) { + return putCustomerAppAccess(input) + } + + LinkedHashMap addCustomerAppAccess(def customerId, LinkedHashMap input) { + return putCustomerAppAccess(input + [customerId: customerId]) + } + Boolean changeAppPassword(LinkedHashMap input) { return changeNetServicePassword(input) } @@ -536,6 +577,14 @@ trait Customer { } } + LinkedHashMap addCustomerSelfCareAccess(LinkedHashMap input) { + return putCustomerSelfCareAccess(input) + } + + LinkedHashMap addCustomerSelfCareAccess(def customerId, LinkedHashMap input) { + return putCustomerSelfCareAccess(input + [customerId: customerId]) + } + Boolean changeSelfCarePassword(LinkedHashMap input) { return changeNetServicePassword(input) } diff --git a/src/org/camunda/latera/bss/connectors/hid/hydra/Document.groovy b/src/org/camunda/latera/bss/connectors/hid/hydra/Document.groovy index 501ad14b..f6d616d2 100644 --- a/src/org/camunda/latera/bss/connectors/hid/hydra/Document.groovy +++ b/src/org/camunda/latera/bss/connectors/hid/hydra/Document.groovy @@ -265,6 +265,14 @@ trait Document { } } + LinkedHashMap addDocumentSubject(LinkedHashMap input) { + return putDocumentSubject(input) + } + + LinkedHashMap addDocumentSubject(def docId, LinkedHashMap input) { + return putDocumentSubject(input + [docId: docId]) + } + Boolean changeDocumentState( def docId, def stateId diff --git a/src/org/camunda/latera/bss/connectors/hid/hydra/Equipment.groovy b/src/org/camunda/latera/bss/connectors/hid/hydra/Equipment.groovy index 5437833c..9126f00f 100644 --- a/src/org/camunda/latera/bss/connectors/hid/hydra/Equipment.groovy +++ b/src/org/camunda/latera/bss/connectors/hid/hydra/Equipment.groovy @@ -247,6 +247,15 @@ trait Equipment { } } + LinkedHashMap createEquipment(LinkedHashMap input) { + input.remove('equipmentId') + return putEquipment(input) + } + + LinkedHashMap updateEquipment(def equipmentId, LinkedHashMap input) { + return putEquipment(input + [equipmentId: equipmentId]) + } + LinkedHashMap putEquipmentComponent(LinkedHashMap input) { LinkedHashMap params = mergeParams([ equipmentId : null, @@ -281,6 +290,16 @@ trait Equipment { } } + LinkedHashMap createEquipmentComponent(LinkedHashMap input) { + input.remove('equipmentComponentId') + return putEquipmentComponent(input) + } + + LinkedHashMap createEquipmentComponent(def equipmentId, LinkedHashMap input) { + input.remove('equipmentComponentId') + return putEquipment(input + [equipmentId: equipmentId]) + } + Boolean deleteEquipment(def equipmentId) { try { logger.info("Deleting eqipment ${equipmentId}") @@ -378,6 +397,14 @@ trait Equipment { } } + LinkedHashMap addEquipmentAddParam(LinkedHashMap input) { + return putEquipmentAddParam(input) + } + + LinkedHashMap addEquipmentAddParam(def equipmentId, LinkedHashMap input) { + return putEquipmentAddParam(input + [equipmentId: equipmentId]) + } + LinkedHashMap putEquipmentBind(LinkedHashMap input) { LinkedHashMap params = mergeParams([ bindId : null, @@ -406,6 +433,10 @@ trait Equipment { } } + LinkedHashMap addEquipmentBind(LinkedHashMap input) { + return putEquipmentBind(input) + } + Boolean deleteEquipmentBind(def bindId) { try { logger.info("Deleting eqipment bind id ${bindId}") diff --git a/src/org/camunda/latera/bss/connectors/hid/hydra/Person.groovy b/src/org/camunda/latera/bss/connectors/hid/hydra/Person.groovy index f793ed8a..c4b3d9da 100644 --- a/src/org/camunda/latera/bss/connectors/hid/hydra/Person.groovy +++ b/src/org/camunda/latera/bss/connectors/hid/hydra/Person.groovy @@ -115,6 +115,15 @@ trait Person { return entityIdOrEntityTypeId == getPersonTypeId() || getPerson(entityIdOrEntityTypeId) != null } + LinkedHashMap createPerson(LinkedHashMap input) { + input.remove('personId') + return putPerson(input) + } + + LinkedHashMap updatePerson(def personId, LinkedHashMap input) { + return putPerson(input + [personId: personId]) + } + LinkedHashMap putPerson(LinkedHashMap input) { LinkedHashMap params = mergeParams([ personId : null, @@ -196,4 +205,12 @@ trait Person { } return putSubjectAddParam(input) } + + Boolean addPersonAddParam(LinkedHashMap input) { + return putPersonAddParam(input) + } + + Boolean addPersonAddParam(def personId, LinkedHashMap input) { + return putPersonAddParam(input + [personId: personId]) + } } \ No newline at end of file diff --git a/src/org/camunda/latera/bss/connectors/hid/hydra/Subject.groovy b/src/org/camunda/latera/bss/connectors/hid/hydra/Subject.groovy index 6bb748b5..6644c55d 100644 --- a/src/org/camunda/latera/bss/connectors/hid/hydra/Subject.groovy +++ b/src/org/camunda/latera/bss/connectors/hid/hydra/Subject.groovy @@ -285,6 +285,14 @@ trait Subject { } } + Boolean addSubjectAddParam(LinkedHashMap input) { + return putSubjectAddParam(input) + } + + Boolean addSubjectAddParam(def subjectId, LinkedHashMap input) { + return putSubjectAddParam(input + [subjectId: subjectId]) + } + List getSubjectGroupsBy(LinkedHashMap input) { LinkedHashMap params = mergeParams([ subjectId : null, @@ -343,6 +351,14 @@ trait Subject { } } + Boolean addSubjectGroup(LinkedHashMap input) { + return putSubjectGroup(input) + } + + Boolean addSubjectGroup(def subjectId, LinkedHashMap input) { + return putSubjectGroup(input + [subjectId: subjectId]) + } + Boolean deleteSubjectGroup(LinkedHashMap input) { LinkedHashMap params = mergeParams([ subjSubjectId : null,