/** * create tag tag index response dto * * @param searchResponse search response * * @return tag type index search response dto list */ public List<TagTypeIndexSearchResponseDto> getNestedTagTagIndexSearchResponseDto(SearchResponse searchResponse) { Terms tagTypeCodeAgg = getNestedAggregation(searchResponse, TAG_FACET_AGGS, TAGTYPE_CODE_AGGREGATION); return getTagTypeIndexSearchResponseDtosFromTerms(tagTypeCodeAgg); }
/** * get tag index search response dto * * @param searchResponse elastic search response * * @return list of tag type index search response dto */ public List<TagTypeIndexSearchResponseDto> getTagTagIndexSearchResponseDto(SearchResponse searchResponse) { Terms aggregation = getAggregation(searchResponse, TAG_TYPE_FACET_AGGS); return getTagTypeIndexSearchResponseDtosFromTerms(aggregation); }
/** * Returns XML representation of the object. * * @param obj the Java object to be serialized * * @return the XML representation of this object * @throws javax.xml.bind.JAXBException if a JAXB error occurred. */ public String objectToXml(Object obj) throws JAXBException { // By default, we do not ask the marshalled XML data to be formatted with line feeds and indentation. return objectToXml(obj, false); }
@Test public void testObjectToXml() throws Exception { assertEquals(getTestXml(), xmlHelper.objectToXml(getTestBuildInformation())); }
public void setJsonResponseAsWorkflowVariable(Object responseObject, String executionId, String activitiId) throws Exception { String jsonResponse = jsonHelper.objectToJson(responseObject); setTaskWorkflowVariable(executionId, activitiId, VARIABLE_JSON_RESPONSE, jsonResponse); }
@Test public void testUnmarshallXmlToObject() throws Exception { assertEquals(getTestBuildInformation(), xmlHelper.unmarshallXmlToObject(BuildInformation.class, getTestXml())); }
/** * Returns a list of values from a configuration value which are delimited by the default delimited configured by FIELD_DATA_DELIMITER. Returns an empty * list if the configuration value does not exist. * * @param configurationValue The configuration value * * @return List of values */ public List<String> getDelimitedConfigurationValue(ConfigurationValue configurationValue) { return splitStringWithDefaultDelimiter(configurationHelper.getProperty(configurationValue)); }
/** * Gets the script arguments from the DelegateExecution, delimited and escaped as a list. * * @param execution the DelegateExecution * * @return script arguments */ protected List<String> getScriptArguments(DelegateExecution execution) { String scriptArgumentsString = activitiHelper.getExpressionVariableAsString(scriptArguments, execution); return daoHelper.splitStringWithDefaultDelimiterEscaped(scriptArgumentsString); }
@Override public StepConfig getEmrStepConfig(Object step) { EmrHadoopJarStep hadoopJarStep = (EmrHadoopJarStep) step; return emrHelper.getEmrHadoopJarStepConfig(hadoopJarStep.getStepName(), hadoopJarStep.getJarLocation(), hadoopJarStep.getMainClass(), hadoopJarStep.getScriptArguments(), hadoopJarStep.isContinueOnError()); }
@Bean public JavaPropertiesHelper javaPropertiesHelper() { return new JavaPropertiesHelper(); }
@Bean public JsonHelper jsonHelper() { return new JsonHelper(); }
/** * Determines if negation terms are present in the search phrase. * * @param indexSearchRequest the {@link IndexSearchRequest} as specified * * @return true if present */ public boolean determineNegationTermsPresent(final IndexSearchRequest indexSearchRequest) { final Matcher regexMatcher = getNegationTermMatcher(indexSearchRequest); return regexMatcher.find(); }
@Bean public AwsHelper awsHelper() { return new AwsHelper(); }
@Bean public HttpClientHelper httpClientHelper() { return new HttpClientHelper(); }
@Bean public HerdStringHelper herdStringHelper() { return new HerdStringHelper(); }
/** * Returns XML representation of the object. * * @param obj the Java object to be serialized * * @return the XML representation of this object * @throws javax.xml.bind.JAXBException if a JAXB error occurred. */ public String objectToXml(Object obj) throws JAXBException { // By default, we do not ask the marshalled XML data to be formatted with line feeds and indentation. return objectToXml(obj, false); }
/** * Returns a list of values from a configuration value which are delimited by the default delimited configured by FIELD_DATA_DELIMITER. Returns an empty * list if the configuration value does not exist. * * @param configurationValue The configuration value * * @return List of values */ public List<String> getDelimitedConfigurationValue(ConfigurationValue configurationValue) { return splitStringWithDefaultDelimiter(configurationHelper.getProperty(configurationValue)); }
/** * create tag tag index response dto * * @param searchResponse search response * * @return tag type index search response dto list */ public List<TagTypeIndexSearchResponseDto> getNestedTagTagIndexSearchResponseDto(SearchResponse searchResponse) { Terms tagTypeCodeAgg = getNestedAggregation(searchResponse, TAG_FACET_AGGS, TAGTYPE_CODE_AGGREGATION); return getTagTypeIndexSearchResponseDtosFromTerms(tagTypeCodeAgg); }
/** * get tag index search response dto * * @param searchResponse elastic search response * * @return list of tag type index search response dto */ public List<TagTypeIndexSearchResponseDto> getTagTagIndexSearchResponseDto(SearchResponse searchResponse) { Terms aggregation = getAggregation(searchResponse, TAG_TYPE_FACET_AGGS); return getTagTypeIndexSearchResponseDtosFromTerms(aggregation); }
@Override public StepConfig getEmrStepConfig(Object step) { EmrHadoopJarStep hadoopJarStep = (EmrHadoopJarStep) step; return emrHelper.getEmrHadoopJarStepConfig(hadoopJarStep.getStepName(), hadoopJarStep.getJarLocation(), hadoopJarStep.getMainClass(), hadoopJarStep.getScriptArguments(), hadoopJarStep.isContinueOnError()); }