use of org.finra.herd.model.api.xml.BusinessObjectDataAttribute in project herd by FINRAOS.
the class UpdateBusinessObjectDataAttribute method executeImpl.
@Override
public void executeImpl(DelegateExecution execution) throws Exception {
String namespace = activitiHelper.getExpressionVariableAsString(this.namespace, execution);
String businessObjectDefinitionName = activitiHelper.getExpressionVariableAsString(this.businessObjectDefinitionName, execution);
String businessObjectFormatUsage = activitiHelper.getExpressionVariableAsString(this.businessObjectFormatUsage, execution);
String businessObjectFormatFileType = activitiHelper.getExpressionVariableAsString(this.businessObjectFormatFileType, execution);
Integer businessObjectFormatVersion = activitiHelper.getExpressionVariableAsInteger(this.businessObjectFormatVersion, execution, "businessObjectFormatVersion", false);
String partitionValue = activitiHelper.getExpressionVariableAsString(this.partitionValue, execution);
String subPartitionValuesString = activitiHelper.getExpressionVariableAsString(this.subPartitionValues, execution);
List<String> subPartitionValues = daoHelper.splitStringWithDefaultDelimiterEscaped(subPartitionValuesString);
Integer businessObjectDataVersion = activitiHelper.getExpressionVariableAsInteger(this.businessObjectDataVersion, execution, "businessObjectDataVersion", false);
String businessObjectDataAttributeName = activitiHelper.getExpressionVariableAsString(this.businessObjectDataAttributeName, execution);
String businessObjectDataAttributeValue = activitiHelper.getExpressionVariableAsString(this.businessObjectDataAttributeValue, execution);
BusinessObjectDataAttributeKey businessObjectDataAttributeKey = new BusinessObjectDataAttributeKey();
businessObjectDataAttributeKey.setNamespace(namespace);
businessObjectDataAttributeKey.setBusinessObjectDefinitionName(businessObjectDefinitionName);
businessObjectDataAttributeKey.setBusinessObjectFormatUsage(businessObjectFormatUsage);
businessObjectDataAttributeKey.setBusinessObjectFormatFileType(businessObjectFormatFileType);
businessObjectDataAttributeKey.setBusinessObjectFormatVersion(businessObjectFormatVersion);
businessObjectDataAttributeKey.setPartitionValue(partitionValue);
businessObjectDataAttributeKey.setSubPartitionValues(subPartitionValues);
businessObjectDataAttributeKey.setBusinessObjectDataVersion(businessObjectDataVersion);
businessObjectDataAttributeKey.setBusinessObjectDataAttributeName(businessObjectDataAttributeName);
BusinessObjectDataAttributeUpdateRequest businessObjectDataAttributeUpdateRequest = new BusinessObjectDataAttributeUpdateRequest();
businessObjectDataAttributeUpdateRequest.setBusinessObjectDataAttributeValue(businessObjectDataAttributeValue);
BusinessObjectDataAttribute businessObjectDataAttribute = businessObjectDataAttributeService.updateBusinessObjectDataAttribute(businessObjectDataAttributeKey, businessObjectDataAttributeUpdateRequest);
setJsonResponseAsWorkflowVariable(businessObjectDataAttribute, execution);
}
use of org.finra.herd.model.api.xml.BusinessObjectDataAttribute in project herd by FINRAOS.
the class GetBusinessObjectDataAttribute method executeImpl.
@Override
public void executeImpl(DelegateExecution execution) throws Exception {
String namespace = activitiHelper.getExpressionVariableAsString(this.namespace, execution);
String businessObjectDefinitionName = activitiHelper.getExpressionVariableAsString(this.businessObjectDefinitionName, execution);
String businessObjectFormatUsage = activitiHelper.getExpressionVariableAsString(this.businessObjectFormatUsage, execution);
String businessObjectFormatFileType = activitiHelper.getExpressionVariableAsString(this.businessObjectFormatFileType, execution);
Integer businessObjectFormatVersion = activitiHelper.getExpressionVariableAsInteger(this.businessObjectFormatVersion, execution, "businessObjectFormatVersion", false);
String partitionValue = activitiHelper.getExpressionVariableAsString(this.partitionValue, execution);
String subPartitionValuesString = activitiHelper.getExpressionVariableAsString(this.subPartitionValues, execution);
List<String> subPartitionValues = daoHelper.splitStringWithDefaultDelimiterEscaped(subPartitionValuesString);
Integer businessObjectDataVersion = activitiHelper.getExpressionVariableAsInteger(this.businessObjectDataVersion, execution, "businessObjectDataVersion", false);
String businessObjectDataAttributeName = activitiHelper.getExpressionVariableAsString(this.businessObjectDataAttributeName, execution);
BusinessObjectDataAttributeKey businessObjectDataAttributeKey = new BusinessObjectDataAttributeKey();
businessObjectDataAttributeKey.setNamespace(namespace);
businessObjectDataAttributeKey.setBusinessObjectDefinitionName(businessObjectDefinitionName);
businessObjectDataAttributeKey.setBusinessObjectFormatUsage(businessObjectFormatUsage);
businessObjectDataAttributeKey.setBusinessObjectFormatFileType(businessObjectFormatFileType);
businessObjectDataAttributeKey.setBusinessObjectFormatVersion(businessObjectFormatVersion);
businessObjectDataAttributeKey.setPartitionValue(partitionValue);
businessObjectDataAttributeKey.setSubPartitionValues(subPartitionValues);
businessObjectDataAttributeKey.setBusinessObjectDataVersion(businessObjectDataVersion);
businessObjectDataAttributeKey.setBusinessObjectDataAttributeName(businessObjectDataAttributeName);
BusinessObjectDataAttribute businessObjectDataAttribute = businessObjectDataAttributeService.getBusinessObjectDataAttribute(businessObjectDataAttributeKey);
setJsonResponseAsWorkflowVariable(businessObjectDataAttribute, execution);
}
use of org.finra.herd.model.api.xml.BusinessObjectDataAttribute in project herd by FINRAOS.
the class BusinessObjectDataAttributeServiceTest method testCreateBusinessObjectDataAttributeTrimParameters.
@Test
public void testCreateBusinessObjectDataAttributeTrimParameters() {
// Create and persist a business object data entity.
businessObjectDataDaoTestHelper.createBusinessObjectDataEntity(NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, PARTITION_VALUE, SUBPARTITION_VALUES, DATA_VERSION, true, BDATA_STATUS);
// Create a business object data attribute using input parameters with leading and trailing empty spaces.
BusinessObjectDataAttribute resultBusinessObjectDataAttribute = businessObjectDataAttributeService.createBusinessObjectDataAttribute(businessObjectDataAttributeServiceTestHelper.createBusinessObjectDataAttributeCreateRequest(NAMESPACE, addWhitespace(BDEF_NAME), addWhitespace(FORMAT_USAGE_CODE), addWhitespace(FORMAT_FILE_TYPE_CODE), FORMAT_VERSION, addWhitespace(PARTITION_VALUE), addWhitespace(SUBPARTITION_VALUES), DATA_VERSION, addWhitespace(ATTRIBUTE_NAME_1_MIXED_CASE), addWhitespace(ATTRIBUTE_VALUE_1)));
// Validate the returned object.
businessObjectDataAttributeServiceTestHelper.validateBusinessObjectDataAttribute(null, NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, PARTITION_VALUE, SUBPARTITION_VALUES, DATA_VERSION, ATTRIBUTE_NAME_1_MIXED_CASE, addWhitespace(ATTRIBUTE_VALUE_1), resultBusinessObjectDataAttribute);
}
use of org.finra.herd.model.api.xml.BusinessObjectDataAttribute in project herd by FINRAOS.
the class BusinessObjectDataAttributeServiceTest method testCreateBusinessObjectDataAttribute.
@Test
public void testCreateBusinessObjectDataAttribute() {
// Create and persist a business object data entity.
businessObjectDataDaoTestHelper.createBusinessObjectDataEntity(NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, PARTITION_VALUE, SUBPARTITION_VALUES, DATA_VERSION, true, BDATA_STATUS);
// Create a business object data attribute.
BusinessObjectDataAttribute resultBusinessObjectDataAttribute = businessObjectDataAttributeService.createBusinessObjectDataAttribute(businessObjectDataAttributeServiceTestHelper.createBusinessObjectDataAttributeCreateRequest(NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, PARTITION_VALUE, SUBPARTITION_VALUES, DATA_VERSION, ATTRIBUTE_NAME_1_MIXED_CASE, ATTRIBUTE_VALUE_1));
// Validate the returned object.
businessObjectDataAttributeServiceTestHelper.validateBusinessObjectDataAttribute(null, NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, PARTITION_VALUE, SUBPARTITION_VALUES, DATA_VERSION, ATTRIBUTE_NAME_1_MIXED_CASE, ATTRIBUTE_VALUE_1, resultBusinessObjectDataAttribute);
}
use of org.finra.herd.model.api.xml.BusinessObjectDataAttribute in project herd by FINRAOS.
the class BusinessObjectDataAttributeServiceTest method testCreateBusinessObjectDataAttributeLowerCaseParameters.
@Test
public void testCreateBusinessObjectDataAttributeLowerCaseParameters() {
// Create and persist a business object data entity using upper case values.
businessObjectDataDaoTestHelper.createBusinessObjectDataEntity(NAMESPACE, BDEF_NAME.toUpperCase(), FORMAT_USAGE_CODE.toUpperCase(), FORMAT_FILE_TYPE_CODE.toUpperCase(), FORMAT_VERSION, PARTITION_VALUE.toUpperCase(), convertListToUpperCase(SUBPARTITION_VALUES), DATA_VERSION, true, BDATA_STATUS);
// Create a business object data attribute using lower case input parameters (except for case-sensitive partition values).
BusinessObjectDataAttribute resultBusinessObjectDataAttribute = businessObjectDataAttributeService.createBusinessObjectDataAttribute(businessObjectDataAttributeServiceTestHelper.createBusinessObjectDataAttributeCreateRequest(NAMESPACE, BDEF_NAME.toLowerCase(), FORMAT_USAGE_CODE.toLowerCase(), FORMAT_FILE_TYPE_CODE.toLowerCase(), FORMAT_VERSION, PARTITION_VALUE.toUpperCase(), convertListToUpperCase(SUBPARTITION_VALUES), DATA_VERSION, ATTRIBUTE_NAME_1_MIXED_CASE.toLowerCase(), ATTRIBUTE_VALUE_1.toLowerCase()));
// Validate the returned object.
businessObjectDataAttributeServiceTestHelper.validateBusinessObjectDataAttribute(null, NAMESPACE, BDEF_NAME.toUpperCase(), FORMAT_USAGE_CODE.toUpperCase(), FORMAT_FILE_TYPE_CODE.toUpperCase(), FORMAT_VERSION, PARTITION_VALUE.toUpperCase(), convertListToUpperCase(SUBPARTITION_VALUES), DATA_VERSION, ATTRIBUTE_NAME_1_MIXED_CASE.toLowerCase(), ATTRIBUTE_VALUE_1.toLowerCase(), resultBusinessObjectDataAttribute);
}
Aggregations