@Test public void testInsertBefore() { String xPathQuery = " String xmlElement = "<element0>Zero</element0>"; Map<String, String> result = insertBefore.execute(xml, EMPTY, xPathQuery, xmlElement, FALSE); assertEquals(ResponseNames.SUCCESS, result.get(RESULT_TEXT)); assertEquals(SUCCESS, result.get(RETURN_CODE)); assertEquals(INSERT_BEFORE_SUCCESS, result.get(RETURN_RESULT)); }
@Action(name = "Insert Before", outputs = { @Output(RETURN_CODE), @Output(RETURN_RESULT), @Output(RESULT_XML), @Output(ERROR_MESSAGE)}, responses = { @Response(text = ResponseNames.SUCCESS, field = RETURN_CODE, value = SUCCESS, matchType = COMPARE_EQUAL), @Response(text = ResponseNames.FAILURE, field = RETURN_CODE, value = FAILURE, matchType = COMPARE_EQUAL, isDefault = true, isOnFail = true)}) public Map<String, String> execute( @Param(value = XML_DOCUMENT, required = true) String xmlDocument, @Param(value = XML_DOCUMENT_SOURCE) String xmlDocumentSource, @Param(value = XPATH_ELEMENT_QUERY, required = true) String xPathQuery, @Param(value = XML_ELEMENT, required = true) String xmlElement, @Param(value = SECURE_PROCESSING) String secureProcessing) { final CommonInputs inputs = new CommonInputs.CommonInputsBuilder() .withXmlDocument(xmlDocument) .withXmlDocumentSource(xmlDocumentSource) .withXpathQuery(xPathQuery) .withSecureProcessing(secureProcessing) .build(); final CustomInputs customInputs = new CustomInputs.CustomInputsBuilder() .withXmlElement(xmlElement) .build(); return new InsertBeforeService().execute(inputs, customInputs); }
InsertBefore { @Action(name = "Insert Before", outputs = { @Output(RETURN_CODE), @Output(RETURN_RESULT), @Output(RESULT_XML), @Output(ERROR_MESSAGE)}, responses = { @Response(text = ResponseNames.SUCCESS, field = RETURN_CODE, value = SUCCESS, matchType = COMPARE_EQUAL), @Response(text = ResponseNames.FAILURE, field = RETURN_CODE, value = FAILURE, matchType = COMPARE_EQUAL, isDefault = true, isOnFail = true)}) public Map<String, String> execute( @Param(value = XML_DOCUMENT, required = true) String xmlDocument, @Param(value = XML_DOCUMENT_SOURCE) String xmlDocumentSource, @Param(value = XPATH_ELEMENT_QUERY, required = true) String xPathQuery, @Param(value = XML_ELEMENT, required = true) String xmlElement, @Param(value = SECURE_PROCESSING) String secureProcessing) { final CommonInputs inputs = new CommonInputs.CommonInputsBuilder() .withXmlDocument(xmlDocument) .withXmlDocumentSource(xmlDocumentSource) .withXpathQuery(xPathQuery) .withSecureProcessing(secureProcessing) .build(); final CustomInputs customInputs = new CustomInputs.CustomInputsBuilder() .withXmlElement(xmlElement) .build(); return new InsertBeforeService().execute(inputs, customInputs); } }
InsertBefore { @Action(name = "Insert Before", outputs = { @Output(RETURN_CODE), @Output(RETURN_RESULT), @Output(RESULT_XML), @Output(ERROR_MESSAGE)}, responses = { @Response(text = ResponseNames.SUCCESS, field = RETURN_CODE, value = SUCCESS, matchType = COMPARE_EQUAL), @Response(text = ResponseNames.FAILURE, field = RETURN_CODE, value = FAILURE, matchType = COMPARE_EQUAL, isDefault = true, isOnFail = true)}) public Map<String, String> execute( @Param(value = XML_DOCUMENT, required = true) String xmlDocument, @Param(value = XML_DOCUMENT_SOURCE) String xmlDocumentSource, @Param(value = XPATH_ELEMENT_QUERY, required = true) String xPathQuery, @Param(value = XML_ELEMENT, required = true) String xmlElement, @Param(value = SECURE_PROCESSING) String secureProcessing) { final CommonInputs inputs = new CommonInputs.CommonInputsBuilder() .withXmlDocument(xmlDocument) .withXmlDocumentSource(xmlDocumentSource) .withXpathQuery(xPathQuery) .withSecureProcessing(secureProcessing) .build(); final CustomInputs customInputs = new CustomInputs.CustomInputsBuilder() .withXmlElement(xmlElement) .build(); return new InsertBeforeService().execute(inputs, customInputs); }  }
InsertBefore { @Action(name = "Insert Before", outputs = { @Output(RETURN_CODE), @Output(RETURN_RESULT), @Output(RESULT_XML), @Output(ERROR_MESSAGE)}, responses = { @Response(text = ResponseNames.SUCCESS, field = RETURN_CODE, value = SUCCESS, matchType = COMPARE_EQUAL), @Response(text = ResponseNames.FAILURE, field = RETURN_CODE, value = FAILURE, matchType = COMPARE_EQUAL, isDefault = true, isOnFail = true)}) public Map<String, String> execute( @Param(value = XML_DOCUMENT, required = true) String xmlDocument, @Param(value = XML_DOCUMENT_SOURCE) String xmlDocumentSource, @Param(value = XPATH_ELEMENT_QUERY, required = true) String xPathQuery, @Param(value = XML_ELEMENT, required = true) String xmlElement, @Param(value = SECURE_PROCESSING) String secureProcessing) { final CommonInputs inputs = new CommonInputs.CommonInputsBuilder() .withXmlDocument(xmlDocument) .withXmlDocumentSource(xmlDocumentSource) .withXpathQuery(xPathQuery) .withSecureProcessing(secureProcessing) .build(); final CustomInputs customInputs = new CustomInputs.CustomInputsBuilder() .withXmlElement(xmlElement) .build(); return new InsertBeforeService().execute(inputs, customInputs); }  @Action(name = "Insert Before", outputs = { @Output(RETURN_CODE), @Output(RETURN_RESULT), @Output(RESULT_XML), @Output(ERROR_MESSAGE)}, responses = { @Response(text = ResponseNames.SUCCESS, field = RETURN_CODE, value = SUCCESS, matchType = COMPARE_EQUAL), @Response(text = ResponseNames.FAILURE, field = RETURN_CODE, value = FAILURE, matchType = COMPARE_EQUAL, isDefault = true, isOnFail = true)}) Map<String, String> execute(
            @Param(value = XML_DOCUMENT, required = true) String xmlDocument,
            @Param(value = XML_DOCUMENT_SOURCE) String xmlDocumentSource,
            @Param(value = XPATH_ELEMENT_QUERY, required = true) String xPathQuery,
            @Param(value = XML_ELEMENT, required = true) String xmlElement,
            @Param(value = SECURE_PROCESSING) String secureProcessing); }
InsertBefore { @Action(name = "Insert Before", outputs = { @Output(RETURN_CODE), @Output(RETURN_RESULT), @Output(RESULT_XML), @Output(ERROR_MESSAGE)}, responses = { @Response(text = ResponseNames.SUCCESS, field = RETURN_CODE, value = SUCCESS, matchType = COMPARE_EQUAL), @Response(text = ResponseNames.FAILURE, field = RETURN_CODE, value = FAILURE, matchType = COMPARE_EQUAL, isDefault = true, isOnFail = true)}) public Map<String, String> execute( @Param(value = XML_DOCUMENT, required = true) String xmlDocument, @Param(value = XML_DOCUMENT_SOURCE) String xmlDocumentSource, @Param(value = XPATH_ELEMENT_QUERY, required = true) String xPathQuery, @Param(value = XML_ELEMENT, required = true) String xmlElement, @Param(value = SECURE_PROCESSING) String secureProcessing) { final CommonInputs inputs = new CommonInputs.CommonInputsBuilder() .withXmlDocument(xmlDocument) .withXmlDocumentSource(xmlDocumentSource) .withXpathQuery(xPathQuery) .withSecureProcessing(secureProcessing) .build(); final CustomInputs customInputs = new CustomInputs.CustomInputsBuilder() .withXmlElement(xmlElement) .build(); return new InsertBeforeService().execute(inputs, customInputs); }  @Action(name = "Insert Before", outputs = { @Output(RETURN_CODE), @Output(RETURN_RESULT), @Output(RESULT_XML), @Output(ERROR_MESSAGE)}, responses = { @Response(text = ResponseNames.SUCCESS, field = RETURN_CODE, value = SUCCESS, matchType = COMPARE_EQUAL), @Response(text = ResponseNames.FAILURE, field = RETURN_CODE, value = FAILURE, matchType = COMPARE_EQUAL, isDefault = true, isOnFail = true)}) Map<String, String> execute(
            @Param(value = XML_DOCUMENT, required = true) String xmlDocument,
            @Param(value = XML_DOCUMENT_SOURCE) String xmlDocumentSource,
            @Param(value = XPATH_ELEMENT_QUERY, required = true) String xPathQuery,
            @Param(value = XML_ELEMENT, required = true) String xmlElement,
            @Param(value = SECURE_PROCESSING) String secureProcessing);  }