repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 | partition stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|
citrusframework/citrus | modules/citrus-jdbc/src/main/java/com/consol/citrus/jdbc/data/DataSetCreator.java | DataSetCreator.createDataSet | public DataSet createDataSet(final Message response, final MessageType messageType) {
try {
if (response.getPayload() instanceof DataSet) {
return response.getPayload(DataSet.class);
} else if (isReadyToMarshal(response, messageType)) {
return marshalRespo... | java | public DataSet createDataSet(final Message response, final MessageType messageType) {
try {
if (response.getPayload() instanceof DataSet) {
return response.getPayload(DataSet.class);
} else if (isReadyToMarshal(response, messageType)) {
return marshalRespo... | [
"public",
"DataSet",
"createDataSet",
"(",
"final",
"Message",
"response",
",",
"final",
"MessageType",
"messageType",
")",
"{",
"try",
"{",
"if",
"(",
"response",
".",
"getPayload",
"(",
")",
"instanceof",
"DataSet",
")",
"{",
"return",
"response",
".",
"ge... | Converts Citrus result set representation to db driver model result set.
@param response The result set to convert
@return A DataSet the jdbc driver can understand | [
"Converts",
"Citrus",
"result",
"set",
"representation",
"to",
"db",
"driver",
"model",
"result",
"set",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-jdbc/src/main/java/com/consol/citrus/jdbc/data/DataSetCreator.java#L42-L54 | train |
citrusframework/citrus | modules/citrus-jdbc/src/main/java/com/consol/citrus/jdbc/data/DataSetCreator.java | DataSetCreator.marshalResponse | private DataSet marshalResponse(final Message response, final MessageType messageType) throws SQLException {
String dataSet = null;
if (response instanceof JdbcMessage || response.getPayload() instanceof OperationResult) {
dataSet = response.getPayload(OperationResult.class).getDataSet();
... | java | private DataSet marshalResponse(final Message response, final MessageType messageType) throws SQLException {
String dataSet = null;
if (response instanceof JdbcMessage || response.getPayload() instanceof OperationResult) {
dataSet = response.getPayload(OperationResult.class).getDataSet();
... | [
"private",
"DataSet",
"marshalResponse",
"(",
"final",
"Message",
"response",
",",
"final",
"MessageType",
"messageType",
")",
"throws",
"SQLException",
"{",
"String",
"dataSet",
"=",
"null",
";",
"if",
"(",
"response",
"instanceof",
"JdbcMessage",
"||",
"response... | Marshals the given message to the requested MessageType
@param response The response to marshal
@param messageType The requested MessageType
@return A DataSet representing the message
@throws SQLException In case the marshalling failed | [
"Marshals",
"the",
"given",
"message",
"to",
"the",
"requested",
"MessageType"
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-jdbc/src/main/java/com/consol/citrus/jdbc/data/DataSetCreator.java#L63-L88 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/xml/XsdSchemaRepository.java | XsdSchemaRepository.canValidate | public boolean canValidate(Document doc) {
XsdSchema schema = schemaMappingStrategy.getSchema(schemas, doc);
return schema != null;
} | java | public boolean canValidate(Document doc) {
XsdSchema schema = schemaMappingStrategy.getSchema(schemas, doc);
return schema != null;
} | [
"public",
"boolean",
"canValidate",
"(",
"Document",
"doc",
")",
"{",
"XsdSchema",
"schema",
"=",
"schemaMappingStrategy",
".",
"getSchema",
"(",
"schemas",
",",
"doc",
")",
";",
"return",
"schema",
"!=",
"null",
";",
"}"
] | Find the matching schema for document using given schema mapping strategy.
@param doc the document instance to validate.
@return boolean flag marking matching schema instance found | [
"Find",
"the",
"matching",
"schema",
"for",
"document",
"using",
"given",
"schema",
"mapping",
"strategy",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/xml/XsdSchemaRepository.java#L63-L66 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/xml/XsdSchemaRepository.java | XsdSchemaRepository.addCitrusSchema | protected void addCitrusSchema(String schemaName) throws IOException, SAXException, ParserConfigurationException {
Resource resource = new PathMatchingResourcePatternResolver().getResource("classpath:com/consol/citrus/schema/" + schemaName + ".xsd");
if (resource.exists()) {
addXsdSchema(res... | java | protected void addCitrusSchema(String schemaName) throws IOException, SAXException, ParserConfigurationException {
Resource resource = new PathMatchingResourcePatternResolver().getResource("classpath:com/consol/citrus/schema/" + schemaName + ".xsd");
if (resource.exists()) {
addXsdSchema(res... | [
"protected",
"void",
"addCitrusSchema",
"(",
"String",
"schemaName",
")",
"throws",
"IOException",
",",
"SAXException",
",",
"ParserConfigurationException",
"{",
"Resource",
"resource",
"=",
"new",
"PathMatchingResourcePatternResolver",
"(",
")",
".",
"getResource",
"("... | Adds Citrus message schema to repository if available on classpath.
@param schemaName The name of the schema within the citrus schema package | [
"Adds",
"Citrus",
"message",
"schema",
"to",
"repository",
"if",
"available",
"on",
"classpath",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/xml/XsdSchemaRepository.java#L96-L101 | train |
citrusframework/citrus | modules/citrus-ssh/src/main/java/com/consol/citrus/ssh/SshCommand.java | SshCommand.copyToStream | private void copyToStream(String txt, OutputStream stream) throws IOException {
if (txt != null) {
stream.write(txt.getBytes());
}
} | java | private void copyToStream(String txt, OutputStream stream) throws IOException {
if (txt != null) {
stream.write(txt.getBytes());
}
} | [
"private",
"void",
"copyToStream",
"(",
"String",
"txt",
",",
"OutputStream",
"stream",
")",
"throws",
"IOException",
"{",
"if",
"(",
"txt",
"!=",
"null",
")",
"{",
"stream",
".",
"write",
"(",
"txt",
".",
"getBytes",
"(",
")",
")",
";",
"}",
"}"
] | Copy character sequence to outbput stream.
@param txt
@param stream
@throws IOException | [
"Copy",
"character",
"sequence",
"to",
"outbput",
"stream",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-ssh/src/main/java/com/consol/citrus/ssh/SshCommand.java#L135-L139 | train |
citrusframework/citrus | modules/citrus-http/src/main/java/com/consol/citrus/http/model/FormData.java | FormData.addControl | public void addControl(Control control) {
if (controls == null) {
controls = new FormData.Controls();
}
this.controls.add(control);
} | java | public void addControl(Control control) {
if (controls == null) {
controls = new FormData.Controls();
}
this.controls.add(control);
} | [
"public",
"void",
"addControl",
"(",
"Control",
"control",
")",
"{",
"if",
"(",
"controls",
"==",
"null",
")",
"{",
"controls",
"=",
"new",
"FormData",
".",
"Controls",
"(",
")",
";",
"}",
"this",
".",
"controls",
".",
"add",
"(",
"control",
")",
";"... | Adds new form control.
@param control | [
"Adds",
"new",
"form",
"control",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-http/src/main/java/com/consol/citrus/http/model/FormData.java#L96-L102 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/validation/json/schema/JsonSchemaFilter.java | JsonSchemaFilter.filter | public List<SimpleJsonSchema> filter(List<JsonSchemaRepository> schemaRepositories,
JsonMessageValidationContext jsonMessageValidationContext,
ApplicationContext applicationContext) {
if (isSchemaRepositorySpecified(jsonMessageVal... | java | public List<SimpleJsonSchema> filter(List<JsonSchemaRepository> schemaRepositories,
JsonMessageValidationContext jsonMessageValidationContext,
ApplicationContext applicationContext) {
if (isSchemaRepositorySpecified(jsonMessageVal... | [
"public",
"List",
"<",
"SimpleJsonSchema",
">",
"filter",
"(",
"List",
"<",
"JsonSchemaRepository",
">",
"schemaRepositories",
",",
"JsonMessageValidationContext",
"jsonMessageValidationContext",
",",
"ApplicationContext",
"applicationContext",
")",
"{",
"if",
"(",
"isSch... | Filters the all schema repositories based on the configuration in the jsonMessageValidationContext
and returns a list of relevant schemas for the validation
@param schemaRepositories The repositories to be filtered
@param jsonMessageValidationContext The context for the json message validation
@param applicationContext... | [
"Filters",
"the",
"all",
"schema",
"repositories",
"based",
"on",
"the",
"configuration",
"in",
"the",
"jsonMessageValidationContext",
"and",
"returns",
"a",
"list",
"of",
"relevant",
"schemas",
"for",
"the",
"validation"
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/validation/json/schema/JsonSchemaFilter.java#L51-L61 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/validation/json/schema/JsonSchemaFilter.java | JsonSchemaFilter.getSchemaFromContext | private List<SimpleJsonSchema> getSchemaFromContext(JsonMessageValidationContext jsonMessageValidationContext,
ApplicationContext applicationContext) {
try {
SimpleJsonSchema simpleJsonSchema =
applicationContext.getBean(jso... | java | private List<SimpleJsonSchema> getSchemaFromContext(JsonMessageValidationContext jsonMessageValidationContext,
ApplicationContext applicationContext) {
try {
SimpleJsonSchema simpleJsonSchema =
applicationContext.getBean(jso... | [
"private",
"List",
"<",
"SimpleJsonSchema",
">",
"getSchemaFromContext",
"(",
"JsonMessageValidationContext",
"jsonMessageValidationContext",
",",
"ApplicationContext",
"applicationContext",
")",
"{",
"try",
"{",
"SimpleJsonSchema",
"simpleJsonSchema",
"=",
"applicationContext"... | Extracts the the schema specified in the jsonMessageValidationContext from the application context
@param jsonMessageValidationContext The message validation context containing the name of the schema to extract
@param applicationContext The application context to extract the schema from
@return A list containing the re... | [
"Extracts",
"the",
"the",
"schema",
"specified",
"in",
"the",
"jsonMessageValidationContext",
"from",
"the",
"application",
"context"
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/validation/json/schema/JsonSchemaFilter.java#L70-L86 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/validation/json/schema/JsonSchemaFilter.java | JsonSchemaFilter.filterByRepositoryName | private List<SimpleJsonSchema> filterByRepositoryName(List<JsonSchemaRepository> schemaRepositories,
JsonMessageValidationContext jsonMessageValidationContext) {
for (JsonSchemaRepository jsonSchemaRepository : schemaRepositories) {
if (Objec... | java | private List<SimpleJsonSchema> filterByRepositoryName(List<JsonSchemaRepository> schemaRepositories,
JsonMessageValidationContext jsonMessageValidationContext) {
for (JsonSchemaRepository jsonSchemaRepository : schemaRepositories) {
if (Objec... | [
"private",
"List",
"<",
"SimpleJsonSchema",
">",
"filterByRepositoryName",
"(",
"List",
"<",
"JsonSchemaRepository",
">",
"schemaRepositories",
",",
"JsonMessageValidationContext",
"jsonMessageValidationContext",
")",
"{",
"for",
"(",
"JsonSchemaRepository",
"jsonSchemaReposi... | Filters the schema repositories by the name configured in the jsonMessageValidationContext
@param schemaRepositories The List of schema repositories to filter
@param jsonMessageValidationContext The validation context of the json message containing the repository name
@return The list of json schemas found in the match... | [
"Filters",
"the",
"schema",
"repositories",
"by",
"the",
"name",
"configured",
"in",
"the",
"jsonMessageValidationContext"
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/validation/json/schema/JsonSchemaFilter.java#L95-L109 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/validation/json/schema/JsonSchemaFilter.java | JsonSchemaFilter.mergeRepositories | private List<SimpleJsonSchema> mergeRepositories(List<JsonSchemaRepository> schemaRepositories) {
return schemaRepositories.stream()
.map(JsonSchemaRepository::getSchemas)
.flatMap(List::stream)
.collect(Collectors.toList());
} | java | private List<SimpleJsonSchema> mergeRepositories(List<JsonSchemaRepository> schemaRepositories) {
return schemaRepositories.stream()
.map(JsonSchemaRepository::getSchemas)
.flatMap(List::stream)
.collect(Collectors.toList());
} | [
"private",
"List",
"<",
"SimpleJsonSchema",
">",
"mergeRepositories",
"(",
"List",
"<",
"JsonSchemaRepository",
">",
"schemaRepositories",
")",
"{",
"return",
"schemaRepositories",
".",
"stream",
"(",
")",
".",
"map",
"(",
"JsonSchemaRepository",
"::",
"getSchemas",... | Merges the list of given schema repositories to one unified list of json schemas
@param schemaRepositories The list of json schemas to merge
@return A list of all json schemas contained in the repositories | [
"Merges",
"the",
"list",
"of",
"given",
"schema",
"repositories",
"to",
"one",
"unified",
"list",
"of",
"json",
"schemas"
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/validation/json/schema/JsonSchemaFilter.java#L116-L121 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/annotations/CitrusAnnotations.java | CitrusAnnotations.injectAll | public static final void injectAll(final Object target, final Citrus citrusFramework) {
injectAll(target, citrusFramework, citrusFramework.createTestContext());
} | java | public static final void injectAll(final Object target, final Citrus citrusFramework) {
injectAll(target, citrusFramework, citrusFramework.createTestContext());
} | [
"public",
"static",
"final",
"void",
"injectAll",
"(",
"final",
"Object",
"target",
",",
"final",
"Citrus",
"citrusFramework",
")",
"{",
"injectAll",
"(",
"target",
",",
"citrusFramework",
",",
"citrusFramework",
".",
"createTestContext",
"(",
")",
")",
";",
"... | Creates new Citrus test context and injects all supported components and endpoints to target object using annotations.
@param target | [
"Creates",
"new",
"Citrus",
"test",
"context",
"and",
"injects",
"all",
"supported",
"components",
"and",
"endpoints",
"to",
"target",
"object",
"using",
"annotations",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/annotations/CitrusAnnotations.java#L60-L62 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/annotations/CitrusAnnotations.java | CitrusAnnotations.injectAll | public static final void injectAll(final Object target, final Citrus citrusFramework, final TestContext context) {
injectCitrusFramework(target, citrusFramework);
injectEndpoints(target, context);
} | java | public static final void injectAll(final Object target, final Citrus citrusFramework, final TestContext context) {
injectCitrusFramework(target, citrusFramework);
injectEndpoints(target, context);
} | [
"public",
"static",
"final",
"void",
"injectAll",
"(",
"final",
"Object",
"target",
",",
"final",
"Citrus",
"citrusFramework",
",",
"final",
"TestContext",
"context",
")",
"{",
"injectCitrusFramework",
"(",
"target",
",",
"citrusFramework",
")",
";",
"injectEndpoi... | Injects all supported components and endpoints to target object using annotations.
@param target | [
"Injects",
"all",
"supported",
"components",
"and",
"endpoints",
"to",
"target",
"object",
"using",
"annotations",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/annotations/CitrusAnnotations.java#L68-L71 | train |
citrusframework/citrus | modules/citrus-http/src/main/java/com/consol/citrus/http/message/HttpMessageConverter.java | HttpMessageConverter.getCustomHeaders | private Map<String, String> getCustomHeaders(HttpHeaders httpHeaders, Map<String, Object> mappedHeaders) {
Map<String, String> customHeaders = new HashMap<>();
for (Map.Entry<String, List<String>> header : httpHeaders.entrySet()) {
if (!mappedHeaders.containsKey(header.getKey())) {
... | java | private Map<String, String> getCustomHeaders(HttpHeaders httpHeaders, Map<String, Object> mappedHeaders) {
Map<String, String> customHeaders = new HashMap<>();
for (Map.Entry<String, List<String>> header : httpHeaders.entrySet()) {
if (!mappedHeaders.containsKey(header.getKey())) {
... | [
"private",
"Map",
"<",
"String",
",",
"String",
">",
"getCustomHeaders",
"(",
"HttpHeaders",
"httpHeaders",
",",
"Map",
"<",
"String",
",",
"Object",
">",
"mappedHeaders",
")",
"{",
"Map",
"<",
"String",
",",
"String",
">",
"customHeaders",
"=",
"new",
"Ha... | Message headers consist of standard HTTP message headers and custom headers.
This method assumes that all header entries that were not initially mapped
by header mapper implementations are custom headers.
@param httpHeaders all message headers in their pre nature.
@param mappedHeaders the previously mapped header entr... | [
"Message",
"headers",
"consist",
"of",
"standard",
"HTTP",
"message",
"headers",
"and",
"custom",
"headers",
".",
"This",
"method",
"assumes",
"that",
"all",
"header",
"entries",
"that",
"were",
"not",
"initially",
"mapped",
"by",
"header",
"mapper",
"implementa... | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-http/src/main/java/com/consol/citrus/http/message/HttpMessageConverter.java#L126-L136 | train |
citrusframework/citrus | modules/citrus-http/src/main/java/com/consol/citrus/http/message/HttpMessageConverter.java | HttpMessageConverter.createHttpHeaders | private HttpHeaders createHttpHeaders(HttpMessage httpMessage,
HttpEndpointConfiguration endpointConfiguration) {
HttpHeaders httpHeaders = new HttpHeaders();
endpointConfiguration
.getHeaderMapper()
.fromHeaders(
... | java | private HttpHeaders createHttpHeaders(HttpMessage httpMessage,
HttpEndpointConfiguration endpointConfiguration) {
HttpHeaders httpHeaders = new HttpHeaders();
endpointConfiguration
.getHeaderMapper()
.fromHeaders(
... | [
"private",
"HttpHeaders",
"createHttpHeaders",
"(",
"HttpMessage",
"httpMessage",
",",
"HttpEndpointConfiguration",
"endpointConfiguration",
")",
"{",
"HttpHeaders",
"httpHeaders",
"=",
"new",
"HttpHeaders",
"(",
")",
";",
"endpointConfiguration",
".",
"getHeaderMapper",
... | Creates HttpHeaders based on the outbound message and the endpoint configurations header mapper.
@param httpMessage The HttpMessage to copy the headers from
@param endpointConfiguration The endpoint configuration to get th header mapper from | [
"Creates",
"HttpHeaders",
"based",
"on",
"the",
"outbound",
"message",
"and",
"the",
"endpoint",
"configurations",
"header",
"mapper",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-http/src/main/java/com/consol/citrus/http/message/HttpMessageConverter.java#L166-L191 | train |
citrusframework/citrus | modules/citrus-http/src/main/java/com/consol/citrus/http/message/HttpMessageConverter.java | HttpMessageConverter.createHttpEntity | private HttpEntity<?> createHttpEntity(HttpHeaders httpHeaders, Object payload, HttpMethod method) {
if (httpMethodSupportsBody(method)) {
return new HttpEntity<>(payload, httpHeaders);
} else {
return new HttpEntity<>(httpHeaders);
}
} | java | private HttpEntity<?> createHttpEntity(HttpHeaders httpHeaders, Object payload, HttpMethod method) {
if (httpMethodSupportsBody(method)) {
return new HttpEntity<>(payload, httpHeaders);
} else {
return new HttpEntity<>(httpHeaders);
}
} | [
"private",
"HttpEntity",
"<",
"?",
">",
"createHttpEntity",
"(",
"HttpHeaders",
"httpHeaders",
",",
"Object",
"payload",
",",
"HttpMethod",
"method",
")",
"{",
"if",
"(",
"httpMethodSupportsBody",
"(",
"method",
")",
")",
"{",
"return",
"new",
"HttpEntity",
"<... | Composes a HttpEntity based on the given parameters
@param httpHeaders The headers to set
@param payload The payload to set
@param method The HttpMethod to use
@return The composed HttpEntitiy | [
"Composes",
"a",
"HttpEntity",
"based",
"on",
"the",
"given",
"parameters"
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-http/src/main/java/com/consol/citrus/http/message/HttpMessageConverter.java#L215-L221 | train |
citrusframework/citrus | modules/citrus-http/src/main/java/com/consol/citrus/http/message/HttpMessageConverter.java | HttpMessageConverter.convertOutboundMessage | private HttpMessage convertOutboundMessage(Message message) {
HttpMessage httpMessage;
if (message instanceof HttpMessage) {
httpMessage = (HttpMessage) message;
} else {
httpMessage = new HttpMessage(message);
}
return httpMessage;
} | java | private HttpMessage convertOutboundMessage(Message message) {
HttpMessage httpMessage;
if (message instanceof HttpMessage) {
httpMessage = (HttpMessage) message;
} else {
httpMessage = new HttpMessage(message);
}
return httpMessage;
} | [
"private",
"HttpMessage",
"convertOutboundMessage",
"(",
"Message",
"message",
")",
"{",
"HttpMessage",
"httpMessage",
";",
"if",
"(",
"message",
"instanceof",
"HttpMessage",
")",
"{",
"httpMessage",
"=",
"(",
"HttpMessage",
")",
"message",
";",
"}",
"else",
"{"... | Converts the outbound Message object into a HttpMessage
@param message The message to convert
@return The converted message as HttpMessage | [
"Converts",
"the",
"outbound",
"Message",
"object",
"into",
"a",
"HttpMessage"
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-http/src/main/java/com/consol/citrus/http/message/HttpMessageConverter.java#L228-L236 | train |
citrusframework/citrus | modules/citrus-http/src/main/java/com/consol/citrus/http/message/HttpMessageConverter.java | HttpMessageConverter.httpMethodSupportsBody | private boolean httpMethodSupportsBody(HttpMethod method) {
return HttpMethod.POST.equals(method) || HttpMethod.PUT.equals(method)
|| HttpMethod.DELETE.equals(method) || HttpMethod.PATCH.equals(method);
} | java | private boolean httpMethodSupportsBody(HttpMethod method) {
return HttpMethod.POST.equals(method) || HttpMethod.PUT.equals(method)
|| HttpMethod.DELETE.equals(method) || HttpMethod.PATCH.equals(method);
} | [
"private",
"boolean",
"httpMethodSupportsBody",
"(",
"HttpMethod",
"method",
")",
"{",
"return",
"HttpMethod",
".",
"POST",
".",
"equals",
"(",
"method",
")",
"||",
"HttpMethod",
".",
"PUT",
".",
"equals",
"(",
"method",
")",
"||",
"HttpMethod",
".",
"DELETE... | Determines whether the given message type supports a message body
@param method The HttpMethod to evaluate
@return Whether a message body is supported | [
"Determines",
"whether",
"the",
"given",
"message",
"type",
"supports",
"a",
"message",
"body"
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-http/src/main/java/com/consol/citrus/http/message/HttpMessageConverter.java#L243-L246 | train |
citrusframework/citrus | modules/citrus-http/src/main/java/com/consol/citrus/http/message/HttpMessageConverter.java | HttpMessageConverter.composeContentTypeHeaderValue | private String composeContentTypeHeaderValue(HttpEndpointConfiguration endpointConfiguration) {
return (endpointConfiguration.getContentType().contains("charset") || !StringUtils.hasText(endpointConfiguration.getCharset())) ?
endpointConfiguration.getContentType() :
endpointConfi... | java | private String composeContentTypeHeaderValue(HttpEndpointConfiguration endpointConfiguration) {
return (endpointConfiguration.getContentType().contains("charset") || !StringUtils.hasText(endpointConfiguration.getCharset())) ?
endpointConfiguration.getContentType() :
endpointConfi... | [
"private",
"String",
"composeContentTypeHeaderValue",
"(",
"HttpEndpointConfiguration",
"endpointConfiguration",
")",
"{",
"return",
"(",
"endpointConfiguration",
".",
"getContentType",
"(",
")",
".",
"contains",
"(",
"\"charset\"",
")",
"||",
"!",
"StringUtils",
".",
... | Creates the content type header value enriched with charset information if possible
@param endpointConfiguration The endpoint configuration to get the content type from
@return The content type header including charset information | [
"Creates",
"the",
"content",
"type",
"header",
"value",
"enriched",
"with",
"charset",
"information",
"if",
"possible"
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-http/src/main/java/com/consol/citrus/http/message/HttpMessageConverter.java#L253-L257 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/config/util/BeanDefinitionParserUtils.java | BeanDefinitionParserUtils.setPropertyValue | public static void setPropertyValue(BeanDefinitionBuilder builder, String propertyValue, String propertyName) {
if (StringUtils.hasText(propertyValue)) {
builder.addPropertyValue(propertyName, propertyValue);
}
} | java | public static void setPropertyValue(BeanDefinitionBuilder builder, String propertyValue, String propertyName) {
if (StringUtils.hasText(propertyValue)) {
builder.addPropertyValue(propertyName, propertyValue);
}
} | [
"public",
"static",
"void",
"setPropertyValue",
"(",
"BeanDefinitionBuilder",
"builder",
",",
"String",
"propertyValue",
",",
"String",
"propertyName",
")",
"{",
"if",
"(",
"StringUtils",
".",
"hasText",
"(",
"propertyValue",
")",
")",
"{",
"builder",
".",
"addP... | Sets the property value on bean definition in case value
is set properly.
@param builder the bean definition builder to be configured
@param propertyValue the property value
@param propertyName the name of the property | [
"Sets",
"the",
"property",
"value",
"on",
"bean",
"definition",
"in",
"case",
"value",
"is",
"set",
"properly",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/config/util/BeanDefinitionParserUtils.java#L48-L52 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/config/util/BeanDefinitionParserUtils.java | BeanDefinitionParserUtils.setConstructorArgValue | public static void setConstructorArgValue(BeanDefinitionBuilder builder, String propertyValue) {
if (StringUtils.hasText(propertyValue)) {
builder.addConstructorArgValue(propertyValue);
}
} | java | public static void setConstructorArgValue(BeanDefinitionBuilder builder, String propertyValue) {
if (StringUtils.hasText(propertyValue)) {
builder.addConstructorArgValue(propertyValue);
}
} | [
"public",
"static",
"void",
"setConstructorArgValue",
"(",
"BeanDefinitionBuilder",
"builder",
",",
"String",
"propertyValue",
")",
"{",
"if",
"(",
"StringUtils",
".",
"hasText",
"(",
"propertyValue",
")",
")",
"{",
"builder",
".",
"addConstructorArgValue",
"(",
"... | Sets the property value on bean definition as constructor argument in case value
is not null.
@param builder the bean definition to be configured
@param propertyValue the property value | [
"Sets",
"the",
"property",
"value",
"on",
"bean",
"definition",
"as",
"constructor",
"argument",
"in",
"case",
"value",
"is",
"not",
"null",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/config/util/BeanDefinitionParserUtils.java#L61-L65 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/config/util/BeanDefinitionParserUtils.java | BeanDefinitionParserUtils.registerBean | public static BeanDefinitionHolder registerBean(String beanId, Class<?> beanClass, ParserContext parserContext, boolean shouldFireEvents) {
return registerBean(beanId, BeanDefinitionBuilder.genericBeanDefinition(beanClass).getBeanDefinition(), parserContext, shouldFireEvents);
} | java | public static BeanDefinitionHolder registerBean(String beanId, Class<?> beanClass, ParserContext parserContext, boolean shouldFireEvents) {
return registerBean(beanId, BeanDefinitionBuilder.genericBeanDefinition(beanClass).getBeanDefinition(), parserContext, shouldFireEvents);
} | [
"public",
"static",
"BeanDefinitionHolder",
"registerBean",
"(",
"String",
"beanId",
",",
"Class",
"<",
"?",
">",
"beanClass",
",",
"ParserContext",
"parserContext",
",",
"boolean",
"shouldFireEvents",
")",
"{",
"return",
"registerBean",
"(",
"beanId",
",",
"BeanD... | Creates new bean definition from bean class and registers new bean in parser registry.
Returns bean definition holder.
@param beanId
@param beanClass
@param parserContext
@param shouldFireEvents | [
"Creates",
"new",
"bean",
"definition",
"from",
"bean",
"class",
"and",
"registers",
"new",
"bean",
"in",
"parser",
"registry",
".",
"Returns",
"bean",
"definition",
"holder",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/config/util/BeanDefinitionParserUtils.java#L118-L120 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/config/util/BeanDefinitionParserUtils.java | BeanDefinitionParserUtils.registerBean | public static BeanDefinitionHolder registerBean(String beanId, BeanDefinition beanDefinition, ParserContext parserContext, boolean shouldFireEvents) {
if (parserContext.getRegistry().containsBeanDefinition(beanId)) {
return new BeanDefinitionHolder(parserContext.getRegistry().getBeanDefinition(beanI... | java | public static BeanDefinitionHolder registerBean(String beanId, BeanDefinition beanDefinition, ParserContext parserContext, boolean shouldFireEvents) {
if (parserContext.getRegistry().containsBeanDefinition(beanId)) {
return new BeanDefinitionHolder(parserContext.getRegistry().getBeanDefinition(beanI... | [
"public",
"static",
"BeanDefinitionHolder",
"registerBean",
"(",
"String",
"beanId",
",",
"BeanDefinition",
"beanDefinition",
",",
"ParserContext",
"parserContext",
",",
"boolean",
"shouldFireEvents",
")",
"{",
"if",
"(",
"parserContext",
".",
"getRegistry",
"(",
")",... | Registers bean definition in parser registry and returns bean definition holder.
@param beanId
@param beanDefinition
@param parserContext
@param shouldFireEvents
@return | [
"Registers",
"bean",
"definition",
"in",
"parser",
"registry",
"and",
"returns",
"bean",
"definition",
"holder",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/config/util/BeanDefinitionParserUtils.java#L130-L144 | train |
citrusframework/citrus | modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/junit/jupiter/CitrusExtension.java | CitrusExtension.isDesignerMethod | private static boolean isDesignerMethod(Method method) {
Class<?>[] parameterTypes = method.getParameterTypes();
for (Class<?> parameterType : parameterTypes) {
if (parameterType.isAssignableFrom(TestDesigner.class)) {
return true;
}
}
return fal... | java | private static boolean isDesignerMethod(Method method) {
Class<?>[] parameterTypes = method.getParameterTypes();
for (Class<?> parameterType : parameterTypes) {
if (parameterType.isAssignableFrom(TestDesigner.class)) {
return true;
}
}
return fal... | [
"private",
"static",
"boolean",
"isDesignerMethod",
"(",
"Method",
"method",
")",
"{",
"Class",
"<",
"?",
">",
"[",
"]",
"parameterTypes",
"=",
"method",
".",
"getParameterTypes",
"(",
")",
";",
"for",
"(",
"Class",
"<",
"?",
">",
"parameterType",
":",
"... | Searches for method parameter of type test designer.
@param method
@return | [
"Searches",
"for",
"method",
"parameter",
"of",
"type",
"test",
"designer",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/junit/jupiter/CitrusExtension.java#L208-L218 | train |
citrusframework/citrus | modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/junit/jupiter/CitrusExtension.java | CitrusExtension.isDesignerClass | private static boolean isDesignerClass(Class<?> type) {
return Stream.of(type.getDeclaredFields()).anyMatch(field -> TestDesigner.class.isAssignableFrom(field.getType()));
} | java | private static boolean isDesignerClass(Class<?> type) {
return Stream.of(type.getDeclaredFields()).anyMatch(field -> TestDesigner.class.isAssignableFrom(field.getType()));
} | [
"private",
"static",
"boolean",
"isDesignerClass",
"(",
"Class",
"<",
"?",
">",
"type",
")",
"{",
"return",
"Stream",
".",
"of",
"(",
"type",
".",
"getDeclaredFields",
"(",
")",
")",
".",
"anyMatch",
"(",
"field",
"->",
"TestDesigner",
".",
"class",
".",... | Searches for field of type test designer.
@param type
@return | [
"Searches",
"for",
"field",
"of",
"type",
"test",
"designer",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/junit/jupiter/CitrusExtension.java#L225-L227 | train |
citrusframework/citrus | modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/junit/jupiter/CitrusExtension.java | CitrusExtension.isRunnerMethod | private static boolean isRunnerMethod(Method method) {
Class<?>[] parameterTypes = method.getParameterTypes();
for (Class<?> parameterType : parameterTypes) {
if (parameterType.isAssignableFrom(TestRunner.class)) {
return true;
}
}
return false;
... | java | private static boolean isRunnerMethod(Method method) {
Class<?>[] parameterTypes = method.getParameterTypes();
for (Class<?> parameterType : parameterTypes) {
if (parameterType.isAssignableFrom(TestRunner.class)) {
return true;
}
}
return false;
... | [
"private",
"static",
"boolean",
"isRunnerMethod",
"(",
"Method",
"method",
")",
"{",
"Class",
"<",
"?",
">",
"[",
"]",
"parameterTypes",
"=",
"method",
".",
"getParameterTypes",
"(",
")",
";",
"for",
"(",
"Class",
"<",
"?",
">",
"parameterType",
":",
"pa... | Searches for method parameter of type test runner.
@param method
@return | [
"Searches",
"for",
"method",
"parameter",
"of",
"type",
"test",
"runner",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/junit/jupiter/CitrusExtension.java#L234-L244 | train |
citrusframework/citrus | modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/junit/jupiter/CitrusExtension.java | CitrusExtension.isRunnerClass | private static boolean isRunnerClass(Class<?> type) {
return Stream.of(type.getDeclaredFields()).anyMatch(field -> TestRunner.class.isAssignableFrom(field.getType()));
} | java | private static boolean isRunnerClass(Class<?> type) {
return Stream.of(type.getDeclaredFields()).anyMatch(field -> TestRunner.class.isAssignableFrom(field.getType()));
} | [
"private",
"static",
"boolean",
"isRunnerClass",
"(",
"Class",
"<",
"?",
">",
"type",
")",
"{",
"return",
"Stream",
".",
"of",
"(",
"type",
".",
"getDeclaredFields",
"(",
")",
")",
".",
"anyMatch",
"(",
"field",
"->",
"TestRunner",
".",
"class",
".",
"... | Searches for field of type test runner.
@param type
@return | [
"Searches",
"for",
"field",
"of",
"type",
"test",
"runner",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/junit/jupiter/CitrusExtension.java#L251-L253 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/variable/VariableUtils.java | VariableUtils.getValueFromScript | public static String getValueFromScript(String scriptEngine, String code) {
try {
ScriptEngine engine = new ScriptEngineManager().getEngineByName(scriptEngine);
if (engine == null) {
throw new CitrusRuntimeException("Unable to find script engine with name '" ... | java | public static String getValueFromScript(String scriptEngine, String code) {
try {
ScriptEngine engine = new ScriptEngineManager().getEngineByName(scriptEngine);
if (engine == null) {
throw new CitrusRuntimeException("Unable to find script engine with name '" ... | [
"public",
"static",
"String",
"getValueFromScript",
"(",
"String",
"scriptEngine",
",",
"String",
"code",
")",
"{",
"try",
"{",
"ScriptEngine",
"engine",
"=",
"new",
"ScriptEngineManager",
"(",
")",
".",
"getEngineByName",
"(",
"scriptEngine",
")",
";",
"if",
... | Evaluates script code and returns a variable value as result.
@param scriptEngine the name of the scripting engine.
@param code the script code.
@return the variable value as String. | [
"Evaluates",
"script",
"code",
"and",
"returns",
"a",
"variable",
"value",
"as",
"result",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/variable/VariableUtils.java#L47-L59 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/variable/VariableUtils.java | VariableUtils.cutOffSingleQuotes | public static String cutOffSingleQuotes(String variable) {
if (StringUtils.hasText(variable) && variable.length() > 1 && variable.charAt(0) == '\'' && variable.charAt(variable.length() - 1) == '\'') {
return variable.substring(1, variable.length() - 1);
}
return variable;
} | java | public static String cutOffSingleQuotes(String variable) {
if (StringUtils.hasText(variable) && variable.length() > 1 && variable.charAt(0) == '\'' && variable.charAt(variable.length() - 1) == '\'') {
return variable.substring(1, variable.length() - 1);
}
return variable;
} | [
"public",
"static",
"String",
"cutOffSingleQuotes",
"(",
"String",
"variable",
")",
"{",
"if",
"(",
"StringUtils",
".",
"hasText",
"(",
"variable",
")",
"&&",
"variable",
".",
"length",
"(",
")",
">",
"1",
"&&",
"variable",
".",
"charAt",
"(",
"0",
")",
... | Cut off single quotes prefix and suffix.
@param variable
@return | [
"Cut",
"off",
"single",
"quotes",
"prefix",
"and",
"suffix",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/variable/VariableUtils.java#L66-L72 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/variable/VariableUtils.java | VariableUtils.cutOffDoubleQuotes | public static String cutOffDoubleQuotes(String variable) {
if (StringUtils.hasText(variable) && variable.length() > 1 && variable.charAt(0) == '"' && variable.charAt(variable.length() - 1) == '"') {
return variable.substring(1, variable.length() - 1);
}
return variable;
} | java | public static String cutOffDoubleQuotes(String variable) {
if (StringUtils.hasText(variable) && variable.length() > 1 && variable.charAt(0) == '"' && variable.charAt(variable.length() - 1) == '"') {
return variable.substring(1, variable.length() - 1);
}
return variable;
} | [
"public",
"static",
"String",
"cutOffDoubleQuotes",
"(",
"String",
"variable",
")",
"{",
"if",
"(",
"StringUtils",
".",
"hasText",
"(",
"variable",
")",
"&&",
"variable",
".",
"length",
"(",
")",
">",
"1",
"&&",
"variable",
".",
"charAt",
"(",
"0",
")",
... | Cut off double quotes prefix and suffix.
@param variable
@return | [
"Cut",
"off",
"double",
"quotes",
"prefix",
"and",
"suffix",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/variable/VariableUtils.java#L79-L85 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/variable/VariableUtils.java | VariableUtils.cutOffVariablesPrefix | public static String cutOffVariablesPrefix(String variable) {
if (variable.startsWith(Citrus.VARIABLE_PREFIX) && variable.endsWith(Citrus.VARIABLE_SUFFIX)) {
return variable.substring(Citrus.VARIABLE_PREFIX.length(), variable.length() - Citrus.VARIABLE_SUFFIX.length());
}
return var... | java | public static String cutOffVariablesPrefix(String variable) {
if (variable.startsWith(Citrus.VARIABLE_PREFIX) && variable.endsWith(Citrus.VARIABLE_SUFFIX)) {
return variable.substring(Citrus.VARIABLE_PREFIX.length(), variable.length() - Citrus.VARIABLE_SUFFIX.length());
}
return var... | [
"public",
"static",
"String",
"cutOffVariablesPrefix",
"(",
"String",
"variable",
")",
"{",
"if",
"(",
"variable",
".",
"startsWith",
"(",
"Citrus",
".",
"VARIABLE_PREFIX",
")",
"&&",
"variable",
".",
"endsWith",
"(",
"Citrus",
".",
"VARIABLE_SUFFIX",
")",
")"... | Cut off variables prefix
@param variable
@return | [
"Cut",
"off",
"variables",
"prefix"
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/variable/VariableUtils.java#L92-L98 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/variable/VariableUtils.java | VariableUtils.cutOffVariablesEscaping | public static String cutOffVariablesEscaping(String variable) {
if (variable.startsWith(Citrus.VARIABLE_ESCAPE) && variable.endsWith(Citrus.VARIABLE_ESCAPE)) {
return variable.substring(Citrus.VARIABLE_ESCAPE.length(), variable.length() - Citrus.VARIABLE_ESCAPE.length());
}
return v... | java | public static String cutOffVariablesEscaping(String variable) {
if (variable.startsWith(Citrus.VARIABLE_ESCAPE) && variable.endsWith(Citrus.VARIABLE_ESCAPE)) {
return variable.substring(Citrus.VARIABLE_ESCAPE.length(), variable.length() - Citrus.VARIABLE_ESCAPE.length());
}
return v... | [
"public",
"static",
"String",
"cutOffVariablesEscaping",
"(",
"String",
"variable",
")",
"{",
"if",
"(",
"variable",
".",
"startsWith",
"(",
"Citrus",
".",
"VARIABLE_ESCAPE",
")",
"&&",
"variable",
".",
"endsWith",
"(",
"Citrus",
".",
"VARIABLE_ESCAPE",
")",
"... | Cut off variables escaping
@param variable
@return | [
"Cut",
"off",
"variables",
"escaping"
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/variable/VariableUtils.java#L105-L111 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/variable/VariableUtils.java | VariableUtils.isVariableName | public static boolean isVariableName(final String expression) {
if (expression == null || expression.length() == 0) {
return false;
}
if (expression.startsWith(Citrus.VARIABLE_PREFIX) && expression.endsWith(Citrus.VARIABLE_SUFFIX)) {
return true;
}
retur... | java | public static boolean isVariableName(final String expression) {
if (expression == null || expression.length() == 0) {
return false;
}
if (expression.startsWith(Citrus.VARIABLE_PREFIX) && expression.endsWith(Citrus.VARIABLE_SUFFIX)) {
return true;
}
retur... | [
"public",
"static",
"boolean",
"isVariableName",
"(",
"final",
"String",
"expression",
")",
"{",
"if",
"(",
"expression",
"==",
"null",
"||",
"expression",
".",
"length",
"(",
")",
"==",
"0",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"expression"... | Checks whether a given expression is a variable name.
@param expression
@return flag true/false | [
"Checks",
"whether",
"a",
"given",
"expression",
"is",
"a",
"variable",
"name",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/variable/VariableUtils.java#L118-L128 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/variable/VariableUtils.java | VariableUtils.replaceVariablesInString | public static String replaceVariablesInString(final String str, TestContext context, boolean enableQuoting) {
StringBuffer newStr = new StringBuffer();
boolean isVarComplete;
StringBuffer variableNameBuf = new StringBuffer();
int startIndex = 0;
int curIndex;
int searchIndex;... | java | public static String replaceVariablesInString(final String str, TestContext context, boolean enableQuoting) {
StringBuffer newStr = new StringBuffer();
boolean isVarComplete;
StringBuffer variableNameBuf = new StringBuffer();
int startIndex = 0;
int curIndex;
int searchIndex;... | [
"public",
"static",
"String",
"replaceVariablesInString",
"(",
"final",
"String",
"str",
",",
"TestContext",
"context",
",",
"boolean",
"enableQuoting",
")",
"{",
"StringBuffer",
"newStr",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"boolean",
"isVarComplete",
";",... | Replace all variable expression in a string with
its respective value. Variable values are enclosed with quotes
if enabled.
@param str
@param context
@param enableQuoting
@return | [
"Replace",
"all",
"variable",
"expression",
"in",
"a",
"string",
"with",
"its",
"respective",
"value",
".",
"Variable",
"values",
"are",
"enclosed",
"with",
"quotes",
"if",
"enabled",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/variable/VariableUtils.java#L140-L197 | train |
citrusframework/citrus | modules/citrus-vertx/src/main/java/com/consol/citrus/vertx/factory/AbstractVertxInstanceFactory.java | AbstractVertxInstanceFactory.createVertx | protected Vertx createVertx(VertxEndpointConfiguration endpointConfiguration) {
final Vertx[] vertx = new Vertx[1];
final Future loading = new FutureFactoryImpl().future();
Handler<AsyncResult<Vertx>> asyncLoadingHandler = new Handler<AsyncResult<Vertx>>() {
@Override
pu... | java | protected Vertx createVertx(VertxEndpointConfiguration endpointConfiguration) {
final Vertx[] vertx = new Vertx[1];
final Future loading = new FutureFactoryImpl().future();
Handler<AsyncResult<Vertx>> asyncLoadingHandler = new Handler<AsyncResult<Vertx>>() {
@Override
pu... | [
"protected",
"Vertx",
"createVertx",
"(",
"VertxEndpointConfiguration",
"endpointConfiguration",
")",
"{",
"final",
"Vertx",
"[",
"]",
"vertx",
"=",
"new",
"Vertx",
"[",
"1",
"]",
";",
"final",
"Future",
"loading",
"=",
"new",
"FutureFactoryImpl",
"(",
")",
".... | Creates new Vert.x instance with default factory. Subclasses may overwrite this
method in order to provide special Vert.x instance.
@return | [
"Creates",
"new",
"Vert",
".",
"x",
"instance",
"with",
"default",
"factory",
".",
"Subclasses",
"may",
"overwrite",
"this",
"method",
"in",
"order",
"to",
"provide",
"special",
"Vert",
".",
"x",
"instance",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-vertx/src/main/java/com/consol/citrus/vertx/factory/AbstractVertxInstanceFactory.java#L47-L89 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/functions/core/AbstractDateFunction.java | AbstractDateFunction.getDateValueOffset | protected int getDateValueOffset(String offsetString, char c) {
ArrayList<Character> charList = new ArrayList<Character>();
int index = offsetString.indexOf(c);
if (index != -1) {
for (int i = index-1; i >= 0; i--) {
if (Character.isDigit(offsetString.charAt(i))) {
... | java | protected int getDateValueOffset(String offsetString, char c) {
ArrayList<Character> charList = new ArrayList<Character>();
int index = offsetString.indexOf(c);
if (index != -1) {
for (int i = index-1; i >= 0; i--) {
if (Character.isDigit(offsetString.charAt(i))) {
... | [
"protected",
"int",
"getDateValueOffset",
"(",
"String",
"offsetString",
",",
"char",
"c",
")",
"{",
"ArrayList",
"<",
"Character",
">",
"charList",
"=",
"new",
"ArrayList",
"<",
"Character",
">",
"(",
")",
";",
"int",
"index",
"=",
"offsetString",
".",
"i... | Parse offset string and add or subtract date offset value.
@param offsetString
@param c
@return | [
"Parse",
"offset",
"string",
"and",
"add",
"or",
"subtract",
"date",
"offset",
"value",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/functions/core/AbstractDateFunction.java#L56-L82 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/report/JUnitReporter.java | JUnitReporter.createReportContent | private String createReportContent(String suiteName, List<TestResult> results, ReportTemplates templates) throws IOException {
final StringBuilder reportDetails = new StringBuilder();
for (TestResult result: results) {
Properties detailProps = new Properties();
detailProps.put("... | java | private String createReportContent(String suiteName, List<TestResult> results, ReportTemplates templates) throws IOException {
final StringBuilder reportDetails = new StringBuilder();
for (TestResult result: results) {
Properties detailProps = new Properties();
detailProps.put("... | [
"private",
"String",
"createReportContent",
"(",
"String",
"suiteName",
",",
"List",
"<",
"TestResult",
">",
"results",
",",
"ReportTemplates",
"templates",
")",
"throws",
"IOException",
"{",
"final",
"StringBuilder",
"reportDetails",
"=",
"new",
"StringBuilder",
"(... | Create report file for test class.
@param suiteName
@param results
@param templates
@return | [
"Create",
"report",
"file",
"for",
"test",
"class",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/report/JUnitReporter.java#L116-L149 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/report/JUnitReporter.java | JUnitReporter.createReportFile | private void createReportFile(String reportFileName, String content, File targetDirectory) {
if (!targetDirectory.exists()) {
if (!targetDirectory.mkdirs()) {
throw new CitrusRuntimeException("Unable to create report output directory: " + getReportDirectory() + (StringUtils.hasText(o... | java | private void createReportFile(String reportFileName, String content, File targetDirectory) {
if (!targetDirectory.exists()) {
if (!targetDirectory.mkdirs()) {
throw new CitrusRuntimeException("Unable to create report output directory: " + getReportDirectory() + (StringUtils.hasText(o... | [
"private",
"void",
"createReportFile",
"(",
"String",
"reportFileName",
",",
"String",
"content",
",",
"File",
"targetDirectory",
")",
"{",
"if",
"(",
"!",
"targetDirectory",
".",
"exists",
"(",
")",
")",
"{",
"if",
"(",
"!",
"targetDirectory",
".",
"mkdirs"... | Creates the JUnit report file
@param reportFileName The report file to write
@param content The String content of the report file | [
"Creates",
"the",
"JUnit",
"report",
"file"
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/report/JUnitReporter.java#L156-L169 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/validation/json/schema/JsonSchemaValidation.java | JsonSchemaValidation.validate | public ProcessingReport validate(Message message,
List<JsonSchemaRepository> schemaRepositories,
JsonMessageValidationContext validationContext,
ApplicationContext applicationContext) {
return validate... | java | public ProcessingReport validate(Message message,
List<JsonSchemaRepository> schemaRepositories,
JsonMessageValidationContext validationContext,
ApplicationContext applicationContext) {
return validate... | [
"public",
"ProcessingReport",
"validate",
"(",
"Message",
"message",
",",
"List",
"<",
"JsonSchemaRepository",
">",
"schemaRepositories",
",",
"JsonMessageValidationContext",
"validationContext",
",",
"ApplicationContext",
"applicationContext",
")",
"{",
"return",
"validate... | Validates the given message against a list of JsonSchemaRepositories under consideration of the actual context
@param message The message to be validated
@param schemaRepositories The schema repositories to be used for validation
@param validationContext The context of the validation to be used for the validation
@para... | [
"Validates",
"the",
"given",
"message",
"against",
"a",
"list",
"of",
"JsonSchemaRepositories",
"under",
"consideration",
"of",
"the",
"actual",
"context"
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/validation/json/schema/JsonSchemaValidation.java#L69-L74 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/validation/json/schema/JsonSchemaValidation.java | JsonSchemaValidation.validate | private GraciousProcessingReport validate(Message message, List<SimpleJsonSchema> jsonSchemas) {
if (jsonSchemas.isEmpty()) {
return new GraciousProcessingReport(true);
} else {
List<ProcessingReport> processingReports = new LinkedList<>();
for (SimpleJsonSchema simpl... | java | private GraciousProcessingReport validate(Message message, List<SimpleJsonSchema> jsonSchemas) {
if (jsonSchemas.isEmpty()) {
return new GraciousProcessingReport(true);
} else {
List<ProcessingReport> processingReports = new LinkedList<>();
for (SimpleJsonSchema simpl... | [
"private",
"GraciousProcessingReport",
"validate",
"(",
"Message",
"message",
",",
"List",
"<",
"SimpleJsonSchema",
">",
"jsonSchemas",
")",
"{",
"if",
"(",
"jsonSchemas",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
"new",
"GraciousProcessingReport",
"(",
"tru... | Validates a message against all schemas contained in the given json schema repository
@param message The message to be validated
@param jsonSchemas The list of json schemas to iterate over | [
"Validates",
"a",
"message",
"against",
"all",
"schemas",
"contained",
"in",
"the",
"given",
"json",
"schema",
"repository"
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/validation/json/schema/JsonSchemaValidation.java#L81-L91 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/validation/json/schema/JsonSchemaValidation.java | JsonSchemaValidation.validate | private ProcessingReport validate(Message message, SimpleJsonSchema simpleJsonSchema) {
try {
JsonNode receivedJson = objectMapper.readTree(message.getPayload(String.class));
return simpleJsonSchema.getSchema().validate(receivedJson);
} catch (IOException | ProcessingException e)... | java | private ProcessingReport validate(Message message, SimpleJsonSchema simpleJsonSchema) {
try {
JsonNode receivedJson = objectMapper.readTree(message.getPayload(String.class));
return simpleJsonSchema.getSchema().validate(receivedJson);
} catch (IOException | ProcessingException e)... | [
"private",
"ProcessingReport",
"validate",
"(",
"Message",
"message",
",",
"SimpleJsonSchema",
"simpleJsonSchema",
")",
"{",
"try",
"{",
"JsonNode",
"receivedJson",
"=",
"objectMapper",
".",
"readTree",
"(",
"message",
".",
"getPayload",
"(",
"String",
".",
"class... | Validates a given message against a given json schema
@param message The message to be validated
@param simpleJsonSchema The json schema to validate against
@return returns the report holding the result of the validation | [
"Validates",
"a",
"given",
"message",
"against",
"a",
"given",
"json",
"schema"
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/validation/json/schema/JsonSchemaValidation.java#L99-L106 | train |
citrusframework/citrus | modules/citrus-mail/src/main/java/com/consol/citrus/mail/server/MailServer.java | MailServer.invokeEndpointAdapter | protected Message invokeEndpointAdapter(MailMessage mail) {
if (splitMultipart) {
return split(mail.getPayload(MailRequest.class).getBody(), mail.getHeaders());
} else {
return getEndpointAdapter().handleMessage(mail);
}
} | java | protected Message invokeEndpointAdapter(MailMessage mail) {
if (splitMultipart) {
return split(mail.getPayload(MailRequest.class).getBody(), mail.getHeaders());
} else {
return getEndpointAdapter().handleMessage(mail);
}
} | [
"protected",
"Message",
"invokeEndpointAdapter",
"(",
"MailMessage",
"mail",
")",
"{",
"if",
"(",
"splitMultipart",
")",
"{",
"return",
"split",
"(",
"mail",
".",
"getPayload",
"(",
"MailRequest",
".",
"class",
")",
".",
"getBody",
"(",
")",
",",
"mail",
"... | Invokes the endpoint adapter with constructed mail message and headers.
@param mail | [
"Invokes",
"the",
"endpoint",
"adapter",
"with",
"constructed",
"mail",
"message",
"and",
"headers",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-mail/src/main/java/com/consol/citrus/mail/server/MailServer.java#L148-L154 | train |
citrusframework/citrus | modules/citrus-mail/src/main/java/com/consol/citrus/mail/server/MailServer.java | MailServer.split | private Message split(BodyPart bodyPart, Map<String, Object> messageHeaders) {
MailMessage mailRequest = createMailMessage(messageHeaders, bodyPart.getContent(), bodyPart.getContentType());
Stack<Message> responseStack = new Stack<>();
if (bodyPart instanceof AttachmentPart) {
fillS... | java | private Message split(BodyPart bodyPart, Map<String, Object> messageHeaders) {
MailMessage mailRequest = createMailMessage(messageHeaders, bodyPart.getContent(), bodyPart.getContentType());
Stack<Message> responseStack = new Stack<>();
if (bodyPart instanceof AttachmentPart) {
fillS... | [
"private",
"Message",
"split",
"(",
"BodyPart",
"bodyPart",
",",
"Map",
"<",
"String",
",",
"Object",
">",
"messageHeaders",
")",
"{",
"MailMessage",
"mailRequest",
"=",
"createMailMessage",
"(",
"messageHeaders",
",",
"bodyPart",
".",
"getContent",
"(",
")",
... | Split mail message into several messages. Each body and each attachment results in separate message
invoked on endpoint adapter. Mail message response if any should be sent only once within test case.
However latest mail response sent by test case is returned, others are ignored.
@param bodyPart
@param messageHeaders | [
"Split",
"mail",
"message",
"into",
"several",
"messages",
".",
"Each",
"body",
"and",
"each",
"attachment",
"results",
"in",
"separate",
"message",
"invoked",
"on",
"endpoint",
"adapter",
".",
"Mail",
"message",
"response",
"if",
"any",
"should",
"be",
"sent"... | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-mail/src/main/java/com/consol/citrus/mail/server/MailServer.java#L164-L184 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/config/xml/SchemaRepositoryParser.java | SchemaRepositoryParser.registerJsonSchemaRepository | private void registerJsonSchemaRepository(Element element, ParserContext parserContext) {
BeanDefinitionBuilder builder = BeanDefinitionBuilder.genericBeanDefinition(JsonSchemaRepository.class);
addLocationsToBuilder(element, builder);
parseSchemasElement(element, builder, parserContext);
... | java | private void registerJsonSchemaRepository(Element element, ParserContext parserContext) {
BeanDefinitionBuilder builder = BeanDefinitionBuilder.genericBeanDefinition(JsonSchemaRepository.class);
addLocationsToBuilder(element, builder);
parseSchemasElement(element, builder, parserContext);
... | [
"private",
"void",
"registerJsonSchemaRepository",
"(",
"Element",
"element",
",",
"ParserContext",
"parserContext",
")",
"{",
"BeanDefinitionBuilder",
"builder",
"=",
"BeanDefinitionBuilder",
".",
"genericBeanDefinition",
"(",
"JsonSchemaRepository",
".",
"class",
")",
"... | Registers a JsonSchemaRepository definition in the parser context
@param element The element to be converted into a JsonSchemaRepository definition
@param parserContext The parser context to add the definitions to | [
"Registers",
"a",
"JsonSchemaRepository",
"definition",
"in",
"the",
"parser",
"context"
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/config/xml/SchemaRepositoryParser.java#L69-L74 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/config/xml/SchemaRepositoryParser.java | SchemaRepositoryParser.registerXmlSchemaRepository | private void registerXmlSchemaRepository(Element element, ParserContext parserContext) {
BeanDefinitionBuilder builder = BeanDefinitionBuilder.genericBeanDefinition(XsdSchemaRepository.class);
BeanDefinitionParserUtils.setPropertyReference(builder, element.getAttribute("schema-mapping-strategy"), "schem... | java | private void registerXmlSchemaRepository(Element element, ParserContext parserContext) {
BeanDefinitionBuilder builder = BeanDefinitionBuilder.genericBeanDefinition(XsdSchemaRepository.class);
BeanDefinitionParserUtils.setPropertyReference(builder, element.getAttribute("schema-mapping-strategy"), "schem... | [
"private",
"void",
"registerXmlSchemaRepository",
"(",
"Element",
"element",
",",
"ParserContext",
"parserContext",
")",
"{",
"BeanDefinitionBuilder",
"builder",
"=",
"BeanDefinitionBuilder",
".",
"genericBeanDefinition",
"(",
"XsdSchemaRepository",
".",
"class",
")",
";"... | Registers a XsdSchemaRepository definition in the parser context
@param element The element to be converted into a XmlSchemaRepository definition
@param parserContext The parser context to add the definitions to | [
"Registers",
"a",
"XsdSchemaRepository",
"definition",
"in",
"the",
"parser",
"context"
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/config/xml/SchemaRepositoryParser.java#L81-L87 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/config/xml/SchemaRepositoryParser.java | SchemaRepositoryParser.isXmlSchemaRepository | private boolean isXmlSchemaRepository(Element element) {
String schemaRepositoryType = element.getAttribute("type");
return StringUtils.isEmpty(schemaRepositoryType) || "xml".equals(schemaRepositoryType);
} | java | private boolean isXmlSchemaRepository(Element element) {
String schemaRepositoryType = element.getAttribute("type");
return StringUtils.isEmpty(schemaRepositoryType) || "xml".equals(schemaRepositoryType);
} | [
"private",
"boolean",
"isXmlSchemaRepository",
"(",
"Element",
"element",
")",
"{",
"String",
"schemaRepositoryType",
"=",
"element",
".",
"getAttribute",
"(",
"\"type\"",
")",
";",
"return",
"StringUtils",
".",
"isEmpty",
"(",
"schemaRepositoryType",
")",
"||",
"... | Decides whether the given element is a xml schema repository.
Note:
If the "type" attribute has not been set, the repository is interpreted as a xml repository by definition.
This is important to guarantee downwards compatibility.
@param element The element to be checked
@return Whether the given element is a xml sche... | [
"Decides",
"whether",
"the",
"given",
"element",
"is",
"a",
"xml",
"schema",
"repository",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/config/xml/SchemaRepositoryParser.java#L98-L101 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/config/xml/SchemaRepositoryParser.java | SchemaRepositoryParser.addLocationsToBuilder | private void addLocationsToBuilder(Element element, BeanDefinitionBuilder builder) {
Element locationsElement = DomUtils.getChildElementByTagName(element, LOCATIONS);
if (locationsElement != null) {
List<Element> locationElements = DomUtils.getChildElementsByTagName(locationsElement, LOCATIO... | java | private void addLocationsToBuilder(Element element, BeanDefinitionBuilder builder) {
Element locationsElement = DomUtils.getChildElementByTagName(element, LOCATIONS);
if (locationsElement != null) {
List<Element> locationElements = DomUtils.getChildElementsByTagName(locationsElement, LOCATIO... | [
"private",
"void",
"addLocationsToBuilder",
"(",
"Element",
"element",
",",
"BeanDefinitionBuilder",
"builder",
")",
"{",
"Element",
"locationsElement",
"=",
"DomUtils",
".",
"getChildElementByTagName",
"(",
"element",
",",
"LOCATIONS",
")",
";",
"if",
"(",
"locatio... | Adds the locations contained in the given locations element to the BeanDefinitionBuilder
@param element the element containing the locations to be added to the builder
@param builder the BeanDefinitionBuilder to add the locations to | [
"Adds",
"the",
"locations",
"contained",
"in",
"the",
"given",
"locations",
"element",
"to",
"the",
"BeanDefinitionBuilder"
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/config/xml/SchemaRepositoryParser.java#L118-L131 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/config/xml/SchemaRepositoryParser.java | SchemaRepositoryParser.parseSchemasElement | private void parseSchemasElement(Element element,
BeanDefinitionBuilder builder,
ParserContext parserContext) {
Element schemasElement = DomUtils.getChildElementByTagName(element, SCHEMAS);
if (schemasElement != null) {
... | java | private void parseSchemasElement(Element element,
BeanDefinitionBuilder builder,
ParserContext parserContext) {
Element schemasElement = DomUtils.getChildElementByTagName(element, SCHEMAS);
if (schemasElement != null) {
... | [
"private",
"void",
"parseSchemasElement",
"(",
"Element",
"element",
",",
"BeanDefinitionBuilder",
"builder",
",",
"ParserContext",
"parserContext",
")",
"{",
"Element",
"schemasElement",
"=",
"DomUtils",
".",
"getChildElementByTagName",
"(",
"element",
",",
"SCHEMAS",
... | Parses the given schema element to RuntimeBeanReference in consideration of the given context
and adds them to the builder
@param element The element from where the schemas will be parsed
@param builder The builder to add the resulting RuntimeBeanReference to
@param parserContext The context to parse the schema element... | [
"Parses",
"the",
"given",
"schema",
"element",
"to",
"RuntimeBeanReference",
"in",
"consideration",
"of",
"the",
"given",
"context",
"and",
"adds",
"them",
"to",
"the",
"builder"
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/config/xml/SchemaRepositoryParser.java#L140-L153 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/config/xml/SchemaRepositoryParser.java | SchemaRepositoryParser.constructRuntimeBeanReferences | private ManagedList<RuntimeBeanReference> constructRuntimeBeanReferences(
ParserContext parserContext,
List<Element> schemaElements) {
ManagedList<RuntimeBeanReference> runtimeBeanReferences = new ManagedList<>();
for (Element schemaElement : schemaElements) {
if (s... | java | private ManagedList<RuntimeBeanReference> constructRuntimeBeanReferences(
ParserContext parserContext,
List<Element> schemaElements) {
ManagedList<RuntimeBeanReference> runtimeBeanReferences = new ManagedList<>();
for (Element schemaElement : schemaElements) {
if (s... | [
"private",
"ManagedList",
"<",
"RuntimeBeanReference",
">",
"constructRuntimeBeanReferences",
"(",
"ParserContext",
"parserContext",
",",
"List",
"<",
"Element",
">",
"schemaElements",
")",
"{",
"ManagedList",
"<",
"RuntimeBeanReference",
">",
"runtimeBeanReferences",
"="... | Construct a List of RuntimeBeanReferences from the given list of schema elements under
consideration of the given parser context
@param parserContext The context to parse the elements in
@param schemaElements The element to be parsed
@return A list of RuntimeBeanReferences that have been defined in the xml document | [
"Construct",
"a",
"List",
"of",
"RuntimeBeanReferences",
"from",
"the",
"given",
"list",
"of",
"schema",
"elements",
"under",
"consideration",
"of",
"the",
"given",
"parser",
"context"
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/config/xml/SchemaRepositoryParser.java#L162-L180 | train |
citrusframework/citrus | modules/citrus-ssh/src/main/java/com/consol/citrus/ssh/server/SinglePublicKeyAuthenticator.java | SinglePublicKeyAuthenticator.readKey | private PublicKey readKey(InputStream is) {
InputStreamReader isr = new InputStreamReader(is);
PEMParser r = new PEMParser(isr);
try {
Object o = r.readObject();
if (o instanceof PEMKeyPair) {
PEMKeyPair keyPair = (PEMKeyPair) o;
if (keyPai... | java | private PublicKey readKey(InputStream is) {
InputStreamReader isr = new InputStreamReader(is);
PEMParser r = new PEMParser(isr);
try {
Object o = r.readObject();
if (o instanceof PEMKeyPair) {
PEMKeyPair keyPair = (PEMKeyPair) o;
if (keyPai... | [
"private",
"PublicKey",
"readKey",
"(",
"InputStream",
"is",
")",
"{",
"InputStreamReader",
"isr",
"=",
"new",
"InputStreamReader",
"(",
"is",
")",
";",
"PEMParser",
"r",
"=",
"new",
"PEMParser",
"(",
"isr",
")",
";",
"try",
"{",
"Object",
"o",
"=",
"r",... | Read the key with bouncycastle's PEM tools
@param is
@return | [
"Read",
"the",
"key",
"with",
"bouncycastle",
"s",
"PEM",
"tools"
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-ssh/src/main/java/com/consol/citrus/ssh/server/SinglePublicKeyAuthenticator.java#L87-L109 | train |
citrusframework/citrus | modules/citrus-websocket/src/main/java/com/consol/citrus/websocket/handler/CitrusWebSocketHandler.java | CitrusWebSocketHandler.sendMessage | public boolean sendMessage(WebSocketMessage<?> message) {
boolean sentSuccessfully = false;
if (sessions.isEmpty()) {
LOG.warn("No Web Socket session exists - message cannot be sent");
}
for (WebSocketSession session : sessions.values()) {
if (session != null && ... | java | public boolean sendMessage(WebSocketMessage<?> message) {
boolean sentSuccessfully = false;
if (sessions.isEmpty()) {
LOG.warn("No Web Socket session exists - message cannot be sent");
}
for (WebSocketSession session : sessions.values()) {
if (session != null && ... | [
"public",
"boolean",
"sendMessage",
"(",
"WebSocketMessage",
"<",
"?",
">",
"message",
")",
"{",
"boolean",
"sentSuccessfully",
"=",
"false",
";",
"if",
"(",
"sessions",
".",
"isEmpty",
"(",
")",
")",
"{",
"LOG",
".",
"warn",
"(",
"\"No Web Socket session ex... | Publish message to all sessions known to this handler.
@param message
@return | [
"Publish",
"message",
"to",
"all",
"sessions",
"known",
"to",
"this",
"handler",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-websocket/src/main/java/com/consol/citrus/websocket/handler/CitrusWebSocketHandler.java#L94-L111 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/validation/matcher/ValidationMatcherRegistry.java | ValidationMatcherRegistry.getLibraryForPrefix | public ValidationMatcherLibrary getLibraryForPrefix(String validationMatcherPrefix) {
if (validationMatcherLibraries != null) {
for (ValidationMatcherLibrary validationMatcherLibrary : validationMatcherLibraries) {
if (validationMatcherLibrary.getPrefix().equals(validationMatcherPref... | java | public ValidationMatcherLibrary getLibraryForPrefix(String validationMatcherPrefix) {
if (validationMatcherLibraries != null) {
for (ValidationMatcherLibrary validationMatcherLibrary : validationMatcherLibraries) {
if (validationMatcherLibrary.getPrefix().equals(validationMatcherPref... | [
"public",
"ValidationMatcherLibrary",
"getLibraryForPrefix",
"(",
"String",
"validationMatcherPrefix",
")",
"{",
"if",
"(",
"validationMatcherLibraries",
"!=",
"null",
")",
"{",
"for",
"(",
"ValidationMatcherLibrary",
"validationMatcherLibrary",
":",
"validationMatcherLibrari... | Get library for validationMatcher prefix.
@param validationMatcherPrefix to be searched for
@return ValidationMatcherLibrary instance | [
"Get",
"library",
"for",
"validationMatcher",
"prefix",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/validation/matcher/ValidationMatcherRegistry.java#L40-L50 | train |
citrusframework/citrus | modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/builder/WaitConditionBuilder.java | WaitConditionBuilder.ms | public S ms(Long milliseconds) {
builder.milliseconds(String.valueOf(milliseconds));
return self;
} | java | public S ms(Long milliseconds) {
builder.milliseconds(String.valueOf(milliseconds));
return self;
} | [
"public",
"S",
"ms",
"(",
"Long",
"milliseconds",
")",
"{",
"builder",
".",
"milliseconds",
"(",
"String",
".",
"valueOf",
"(",
"milliseconds",
")",
")",
";",
"return",
"self",
";",
"}"
] | The total length of milliseconds to wait on the condition to be satisfied
@param milliseconds
@return | [
"The",
"total",
"length",
"of",
"milliseconds",
"to",
"wait",
"on",
"the",
"condition",
"to",
"be",
"satisfied"
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/builder/WaitConditionBuilder.java#L83-L86 | train |
citrusframework/citrus | modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/builder/WaitConditionBuilder.java | WaitConditionBuilder.interval | public S interval(Long interval) {
builder.interval(String.valueOf(interval));
return self;
} | java | public S interval(Long interval) {
builder.interval(String.valueOf(interval));
return self;
} | [
"public",
"S",
"interval",
"(",
"Long",
"interval",
")",
"{",
"builder",
".",
"interval",
"(",
"String",
".",
"valueOf",
"(",
"interval",
")",
")",
";",
"return",
"self",
";",
"}"
] | The interval in seconds to use between each test of the condition
@param interval
@return | [
"The",
"interval",
"in",
"seconds",
"to",
"use",
"between",
"each",
"test",
"of",
"the",
"condition"
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/builder/WaitConditionBuilder.java#L123-L126 | train |
citrusframework/citrus | modules/citrus-selenium/src/main/java/com/consol/citrus/selenium/util/BrowserUtils.java | BrowserUtils.makeIECachingSafeUrl | public static String makeIECachingSafeUrl(String url, long unique) {
if (url.contains("timestamp=")) {
return url.replaceFirst("(.*)(timestamp=)(.*)([&#].*)", "$1$2" + unique + "$4")
.replaceFirst("(.*)(timestamp=)(.*)$", "$1$2" + unique);
} else {
return url.... | java | public static String makeIECachingSafeUrl(String url, long unique) {
if (url.contains("timestamp=")) {
return url.replaceFirst("(.*)(timestamp=)(.*)([&#].*)", "$1$2" + unique + "$4")
.replaceFirst("(.*)(timestamp=)(.*)$", "$1$2" + unique);
} else {
return url.... | [
"public",
"static",
"String",
"makeIECachingSafeUrl",
"(",
"String",
"url",
",",
"long",
"unique",
")",
"{",
"if",
"(",
"url",
".",
"contains",
"(",
"\"timestamp=\"",
")",
")",
"{",
"return",
"url",
".",
"replaceFirst",
"(",
"\"(.*)(timestamp=)(.*)([&#].*)\"",
... | Makes new unique URL to avoid IE caching.
@param url
@param unique
@return | [
"Makes",
"new",
"unique",
"URL",
"to",
"avoid",
"IE",
"caching",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-selenium/src/main/java/com/consol/citrus/selenium/util/BrowserUtils.java#L38-L47 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/report/FailureStackElement.java | FailureStackElement.getStackMessage | public String getStackMessage() {
if (lineNumberEnd.longValue() > 0 && !lineNumberStart.equals(lineNumberEnd)) {
return "at " + testFilePath + "(" + actionName + ":" + lineNumberStart + "-" + lineNumberEnd + ")";
} else {
return "at " + testFilePath + "(" + actionName + ":" + lin... | java | public String getStackMessage() {
if (lineNumberEnd.longValue() > 0 && !lineNumberStart.equals(lineNumberEnd)) {
return "at " + testFilePath + "(" + actionName + ":" + lineNumberStart + "-" + lineNumberEnd + ")";
} else {
return "at " + testFilePath + "(" + actionName + ":" + lin... | [
"public",
"String",
"getStackMessage",
"(",
")",
"{",
"if",
"(",
"lineNumberEnd",
".",
"longValue",
"(",
")",
">",
"0",
"&&",
"!",
"lineNumberStart",
".",
"equals",
"(",
"lineNumberEnd",
")",
")",
"{",
"return",
"\"at \"",
"+",
"testFilePath",
"+",
"\"(\""... | Constructs the stack trace message.
@return the stack trace message. | [
"Constructs",
"the",
"stack",
"trace",
"message",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/report/FailureStackElement.java#L54-L60 | train |
citrusframework/citrus | modules/citrus-docker/src/main/java/com/consol/citrus/docker/command/AbstractDockerCommand.java | AbstractDockerCommand.success | protected ResponseItem success() {
ResponseItem response = new ResponseItem();
Field statusField = ReflectionUtils.findField(ResponseItem.class, "status");
ReflectionUtils.makeAccessible(statusField);
ReflectionUtils.setField(statusField, response, "success");
return response;
... | java | protected ResponseItem success() {
ResponseItem response = new ResponseItem();
Field statusField = ReflectionUtils.findField(ResponseItem.class, "status");
ReflectionUtils.makeAccessible(statusField);
ReflectionUtils.setField(statusField, response, "success");
return response;
... | [
"protected",
"ResponseItem",
"success",
"(",
")",
"{",
"ResponseItem",
"response",
"=",
"new",
"ResponseItem",
"(",
")",
";",
"Field",
"statusField",
"=",
"ReflectionUtils",
".",
"findField",
"(",
"ResponseItem",
".",
"class",
",",
"\"status\"",
")",
";",
"Ref... | Construct default success response for commands without return value.
@return | [
"Construct",
"default",
"success",
"response",
"for",
"commands",
"without",
"return",
"value",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-docker/src/main/java/com/consol/citrus/docker/command/AbstractDockerCommand.java#L61-L68 | train |
citrusframework/citrus | modules/citrus-docker/src/main/java/com/consol/citrus/docker/command/AbstractDockerCommand.java | AbstractDockerCommand.getParameter | protected String getParameter(String parameterName, TestContext context) {
if (getParameters().containsKey(parameterName)) {
return context.replaceDynamicContentInString(getParameters().get(parameterName).toString());
} else {
throw new CitrusRuntimeException(String.format("Missi... | java | protected String getParameter(String parameterName, TestContext context) {
if (getParameters().containsKey(parameterName)) {
return context.replaceDynamicContentInString(getParameters().get(parameterName).toString());
} else {
throw new CitrusRuntimeException(String.format("Missi... | [
"protected",
"String",
"getParameter",
"(",
"String",
"parameterName",
",",
"TestContext",
"context",
")",
"{",
"if",
"(",
"getParameters",
"(",
")",
".",
"containsKey",
"(",
"parameterName",
")",
")",
"{",
"return",
"context",
".",
"replaceDynamicContentInString"... | Gets the docker command parameter.
@return | [
"Gets",
"the",
"docker",
"command",
"parameter",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-docker/src/main/java/com/consol/citrus/docker/command/AbstractDockerCommand.java#L99-L105 | train |
citrusframework/citrus | modules/citrus-kafka/src/main/java/com/consol/citrus/kafka/endpoint/KafkaEndpointBuilder.java | KafkaEndpointBuilder.producerProperties | public KafkaEndpointBuilder producerProperties(Map<String, Object> producerProperties) {
endpoint.getEndpointConfiguration().setProducerProperties(producerProperties);
return this;
} | java | public KafkaEndpointBuilder producerProperties(Map<String, Object> producerProperties) {
endpoint.getEndpointConfiguration().setProducerProperties(producerProperties);
return this;
} | [
"public",
"KafkaEndpointBuilder",
"producerProperties",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
"producerProperties",
")",
"{",
"endpoint",
".",
"getEndpointConfiguration",
"(",
")",
".",
"setProducerProperties",
"(",
"producerProperties",
")",
";",
"return",
... | Sets the producer properties.
@param producerProperties
@return | [
"Sets",
"the",
"producer",
"properties",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-kafka/src/main/java/com/consol/citrus/kafka/endpoint/KafkaEndpointBuilder.java#L186-L189 | train |
citrusframework/citrus | modules/citrus-kafka/src/main/java/com/consol/citrus/kafka/endpoint/KafkaEndpointBuilder.java | KafkaEndpointBuilder.consumerProperties | public KafkaEndpointBuilder consumerProperties(Map<String, Object> consumerProperties) {
endpoint.getEndpointConfiguration().setConsumerProperties(consumerProperties);
return this;
} | java | public KafkaEndpointBuilder consumerProperties(Map<String, Object> consumerProperties) {
endpoint.getEndpointConfiguration().setConsumerProperties(consumerProperties);
return this;
} | [
"public",
"KafkaEndpointBuilder",
"consumerProperties",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
"consumerProperties",
")",
"{",
"endpoint",
".",
"getEndpointConfiguration",
"(",
")",
".",
"setConsumerProperties",
"(",
"consumerProperties",
")",
";",
"return",
... | Sets the consumer properties.
@param consumerProperties
@return | [
"Sets",
"the",
"consumer",
"properties",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-kafka/src/main/java/com/consol/citrus/kafka/endpoint/KafkaEndpointBuilder.java#L196-L199 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/validation/text/PlainTextMessageValidator.java | PlainTextMessageValidator.validateText | private void validateText(String receivedMessagePayload, String controlMessagePayload) {
if (!StringUtils.hasText(controlMessagePayload)) {
log.debug("Skip message payload validation as no control message was defined");
return;
} else {
Assert.isTrue(StringUtils.hasTe... | java | private void validateText(String receivedMessagePayload, String controlMessagePayload) {
if (!StringUtils.hasText(controlMessagePayload)) {
log.debug("Skip message payload validation as no control message was defined");
return;
} else {
Assert.isTrue(StringUtils.hasTe... | [
"private",
"void",
"validateText",
"(",
"String",
"receivedMessagePayload",
",",
"String",
"controlMessagePayload",
")",
"{",
"if",
"(",
"!",
"StringUtils",
".",
"hasText",
"(",
"controlMessagePayload",
")",
")",
"{",
"log",
".",
"debug",
"(",
"\"Skip message payl... | Compares two string with each other in order to validate plain text.
@param receivedMessagePayload
@param controlMessagePayload | [
"Compares",
"two",
"string",
"with",
"each",
"other",
"in",
"order",
"to",
"validate",
"plain",
"text",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/validation/text/PlainTextMessageValidator.java#L168-L186 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/validation/text/PlainTextMessageValidator.java | PlainTextMessageValidator.normalizeWhitespace | private String normalizeWhitespace(String payload) {
if (ignoreWhitespace) {
StringBuilder result = new StringBuilder();
boolean lastWasSpace = true;
for (int i = 0; i < payload.length(); i++) {
char c = payload.charAt(i);
if (Character.isWhite... | java | private String normalizeWhitespace(String payload) {
if (ignoreWhitespace) {
StringBuilder result = new StringBuilder();
boolean lastWasSpace = true;
for (int i = 0; i < payload.length(); i++) {
char c = payload.charAt(i);
if (Character.isWhite... | [
"private",
"String",
"normalizeWhitespace",
"(",
"String",
"payload",
")",
"{",
"if",
"(",
"ignoreWhitespace",
")",
"{",
"StringBuilder",
"result",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"boolean",
"lastWasSpace",
"=",
"true",
";",
"for",
"(",
"int",
"i... | Normalize whitespace characters if appropriate. Based on system property settings this method normalizes
new line characters exclusively or filters all whitespaces such as double whitespaces and new lines.
@param payload
@return | [
"Normalize",
"whitespace",
"characters",
"if",
"appropriate",
".",
"Based",
"on",
"system",
"property",
"settings",
"this",
"method",
"normalizes",
"new",
"line",
"characters",
"exclusively",
"or",
"filters",
"all",
"whitespaces",
"such",
"as",
"double",
"whitespace... | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/validation/text/PlainTextMessageValidator.java#L195-L219 | train |
citrusframework/citrus | modules/citrus-http/src/main/java/com/consol/citrus/http/client/HttpClientBuilder.java | HttpClientBuilder.interceptor | public HttpClientBuilder interceptor(ClientHttpRequestInterceptor interceptor) {
if (endpoint.getEndpointConfiguration().getClientInterceptors() == null) {
endpoint.getEndpointConfiguration().setClientInterceptors(new ArrayList<ClientHttpRequestInterceptor>());
}
endpoint.getEndpoin... | java | public HttpClientBuilder interceptor(ClientHttpRequestInterceptor interceptor) {
if (endpoint.getEndpointConfiguration().getClientInterceptors() == null) {
endpoint.getEndpointConfiguration().setClientInterceptors(new ArrayList<ClientHttpRequestInterceptor>());
}
endpoint.getEndpoin... | [
"public",
"HttpClientBuilder",
"interceptor",
"(",
"ClientHttpRequestInterceptor",
"interceptor",
")",
"{",
"if",
"(",
"endpoint",
".",
"getEndpointConfiguration",
"(",
")",
".",
"getClientInterceptors",
"(",
")",
"==",
"null",
")",
"{",
"endpoint",
".",
"getEndpoin... | Sets a client single interceptor.
@param interceptor
@return | [
"Sets",
"a",
"client",
"single",
"interceptor",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-http/src/main/java/com/consol/citrus/http/client/HttpClientBuilder.java#L214-L221 | train |
citrusframework/citrus | modules/citrus-http/src/main/java/com/consol/citrus/http/validation/FormUrlEncodedMessageValidator.java | FormUrlEncodedMessageValidator.createFormData | private FormData createFormData(Message message) {
FormData formData = new ObjectFactory().createFormData();
formData.setContentType(getFormContentType(message));
formData.setAction(getFormAction(message));
if (message.getPayload() instanceof MultiValueMap) {
MultiValueMap<... | java | private FormData createFormData(Message message) {
FormData formData = new ObjectFactory().createFormData();
formData.setContentType(getFormContentType(message));
formData.setAction(getFormAction(message));
if (message.getPayload() instanceof MultiValueMap) {
MultiValueMap<... | [
"private",
"FormData",
"createFormData",
"(",
"Message",
"message",
")",
"{",
"FormData",
"formData",
"=",
"new",
"ObjectFactory",
"(",
")",
".",
"createFormData",
"(",
")",
";",
"formData",
".",
"setContentType",
"(",
"getFormContentType",
"(",
"message",
")",
... | Create form data model object from url encoded message payload.
@param message
@return | [
"Create",
"form",
"data",
"model",
"object",
"from",
"url",
"encoded",
"message",
"payload",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-http/src/main/java/com/consol/citrus/http/validation/FormUrlEncodedMessageValidator.java#L86-L126 | train |
citrusframework/citrus | modules/citrus-http/src/main/java/com/consol/citrus/http/validation/FormUrlEncodedMessageValidator.java | FormUrlEncodedMessageValidator.getFormAction | private String getFormAction(Message message) {
return message.getHeader(HttpMessageHeaders.HTTP_REQUEST_URI) != null ? message.getHeader(HttpMessageHeaders.HTTP_REQUEST_URI).toString() : null;
} | java | private String getFormAction(Message message) {
return message.getHeader(HttpMessageHeaders.HTTP_REQUEST_URI) != null ? message.getHeader(HttpMessageHeaders.HTTP_REQUEST_URI).toString() : null;
} | [
"private",
"String",
"getFormAction",
"(",
"Message",
"message",
")",
"{",
"return",
"message",
".",
"getHeader",
"(",
"HttpMessageHeaders",
".",
"HTTP_REQUEST_URI",
")",
"!=",
"null",
"?",
"message",
".",
"getHeader",
"(",
"HttpMessageHeaders",
".",
"HTTP_REQUEST... | Reads form action target from message headers.
@param message
@return | [
"Reads",
"form",
"action",
"target",
"from",
"message",
"headers",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-http/src/main/java/com/consol/citrus/http/validation/FormUrlEncodedMessageValidator.java#L143-L145 | train |
citrusframework/citrus | modules/citrus-http/src/main/java/com/consol/citrus/http/validation/FormUrlEncodedMessageValidator.java | FormUrlEncodedMessageValidator.getFormContentType | private String getFormContentType(Message message) {
return message.getHeader(HttpMessageHeaders.HTTP_CONTENT_TYPE) != null ? message.getHeader(HttpMessageHeaders.HTTP_CONTENT_TYPE).toString() : null;
} | java | private String getFormContentType(Message message) {
return message.getHeader(HttpMessageHeaders.HTTP_CONTENT_TYPE) != null ? message.getHeader(HttpMessageHeaders.HTTP_CONTENT_TYPE).toString() : null;
} | [
"private",
"String",
"getFormContentType",
"(",
"Message",
"message",
")",
"{",
"return",
"message",
".",
"getHeader",
"(",
"HttpMessageHeaders",
".",
"HTTP_CONTENT_TYPE",
")",
"!=",
"null",
"?",
"message",
".",
"getHeader",
"(",
"HttpMessageHeaders",
".",
"HTTP_C... | Reads form content type from message headers.
@param message
@return | [
"Reads",
"form",
"content",
"type",
"from",
"message",
"headers",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-http/src/main/java/com/consol/citrus/http/validation/FormUrlEncodedMessageValidator.java#L152-L154 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/variable/dictionary/AbstractDataDictionary.java | AbstractDataDictionary.convertIfNecessary | protected <T> T convertIfNecessary(String value, T originalValue) {
if (originalValue == null) {
return (T) value;
}
return TypeConversionUtils.convertIfNecessary(value, (Class<T>) originalValue.getClass());
} | java | protected <T> T convertIfNecessary(String value, T originalValue) {
if (originalValue == null) {
return (T) value;
}
return TypeConversionUtils.convertIfNecessary(value, (Class<T>) originalValue.getClass());
} | [
"protected",
"<",
"T",
">",
"T",
"convertIfNecessary",
"(",
"String",
"value",
",",
"T",
"originalValue",
")",
"{",
"if",
"(",
"originalValue",
"==",
"null",
")",
"{",
"return",
"(",
"T",
")",
"value",
";",
"}",
"return",
"TypeConversionUtils",
".",
"con... | Convert to original value type if necessary.
@param value
@param originalValue
@param <T>
@return | [
"Convert",
"to",
"original",
"value",
"type",
"if",
"necessary",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/variable/dictionary/AbstractDataDictionary.java#L62-L68 | train |
citrusframework/citrus | modules/citrus-http/src/main/java/com/consol/citrus/http/message/HttpQueryParamHeaderValidator.java | HttpQueryParamHeaderValidator.convertToMap | private Map<String, String> convertToMap(Object expression) {
if (expression instanceof Map) {
return (Map<String, String>) expression;
}
return Stream.of(Optional.ofNullable(expression)
.map(Object::toString)
.orElse("")
.split(","))
... | java | private Map<String, String> convertToMap(Object expression) {
if (expression instanceof Map) {
return (Map<String, String>) expression;
}
return Stream.of(Optional.ofNullable(expression)
.map(Object::toString)
.orElse("")
.split(","))
... | [
"private",
"Map",
"<",
"String",
",",
"String",
">",
"convertToMap",
"(",
"Object",
"expression",
")",
"{",
"if",
"(",
"expression",
"instanceof",
"Map",
")",
"{",
"return",
"(",
"Map",
"<",
"String",
",",
"String",
">",
")",
"expression",
";",
"}",
"r... | Convert query string key-value expression to map.
@param expression
@return | [
"Convert",
"query",
"string",
"key",
"-",
"value",
"expression",
"to",
"map",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-http/src/main/java/com/consol/citrus/http/message/HttpQueryParamHeaderValidator.java#L63-L74 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/validation/script/GroovyScriptMessageBuilder.java | GroovyScriptMessageBuilder.buildMessagePayload | public String buildMessagePayload(TestContext context, String messageType) {
try {
//construct control message payload
String messagePayload = "";
if (scriptResourcePath != null) {
messagePayload = buildMarkupBuilderScript(context.replaceDynamicContentInSt... | java | public String buildMessagePayload(TestContext context, String messageType) {
try {
//construct control message payload
String messagePayload = "";
if (scriptResourcePath != null) {
messagePayload = buildMarkupBuilderScript(context.replaceDynamicContentInSt... | [
"public",
"String",
"buildMessagePayload",
"(",
"TestContext",
"context",
",",
"String",
"messageType",
")",
"{",
"try",
"{",
"//construct control message payload",
"String",
"messagePayload",
"=",
"\"\"",
";",
"if",
"(",
"scriptResourcePath",
"!=",
"null",
")",
"{"... | Build the control message from script code. | [
"Build",
"the",
"control",
"message",
"from",
"script",
"code",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/validation/script/GroovyScriptMessageBuilder.java#L55-L70 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/validation/script/GroovyScriptMessageBuilder.java | GroovyScriptMessageBuilder.buildMarkupBuilderScript | private String buildMarkupBuilderScript(String scriptData) {
try {
ClassLoader parent = GroovyScriptMessageBuilder.class.getClassLoader();
GroovyClassLoader loader = new GroovyClassLoader(parent);
Class<?> groovyClass = loader.parseClass(TemplateBasedScriptBuild... | java | private String buildMarkupBuilderScript(String scriptData) {
try {
ClassLoader parent = GroovyScriptMessageBuilder.class.getClassLoader();
GroovyClassLoader loader = new GroovyClassLoader(parent);
Class<?> groovyClass = loader.parseClass(TemplateBasedScriptBuild... | [
"private",
"String",
"buildMarkupBuilderScript",
"(",
"String",
"scriptData",
")",
"{",
"try",
"{",
"ClassLoader",
"parent",
"=",
"GroovyScriptMessageBuilder",
".",
"class",
".",
"getClassLoader",
"(",
")",
";",
"GroovyClassLoader",
"loader",
"=",
"new",
"GroovyClas... | Builds an automatic Groovy MarkupBuilder script with given script body.
@param scriptData
@return | [
"Builds",
"an",
"automatic",
"Groovy",
"MarkupBuilder",
"script",
"with",
"given",
"script",
"body",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/validation/script/GroovyScriptMessageBuilder.java#L78-L100 | train |
citrusframework/citrus | modules/citrus-kubernetes/src/main/java/com/consol/citrus/kubernetes/command/AbstractCreateCommand.java | AbstractCreateCommand.getTemplateAsStream | protected InputStream getTemplateAsStream(TestContext context) {
Resource resource;
if (templateResource != null) {
resource = templateResource;
} else {
resource = FileUtils.getFileResource(template, context);
}
String templateYml;
try {
... | java | protected InputStream getTemplateAsStream(TestContext context) {
Resource resource;
if (templateResource != null) {
resource = templateResource;
} else {
resource = FileUtils.getFileResource(template, context);
}
String templateYml;
try {
... | [
"protected",
"InputStream",
"getTemplateAsStream",
"(",
"TestContext",
"context",
")",
"{",
"Resource",
"resource",
";",
"if",
"(",
"templateResource",
"!=",
"null",
")",
"{",
"resource",
"=",
"templateResource",
";",
"}",
"else",
"{",
"resource",
"=",
"FileUtil... | Create input stream from template resource and add test variable support.
@param context
@return | [
"Create",
"input",
"stream",
"from",
"template",
"resource",
"and",
"add",
"test",
"variable",
"support",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-kubernetes/src/main/java/com/consol/citrus/kubernetes/command/AbstractCreateCommand.java#L81-L96 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/actions/ExecuteSQLQueryAction.java | ExecuteSQLQueryAction.fillColumnValuesMap | private void fillColumnValuesMap(List<Map<String, Object>> results, Map<String, List<String>> columnValuesMap) {
for (Map<String, Object> row : results) {
for (Entry<String, Object> column : row.entrySet()) {
String columnValue;
String columnName = column.getKey();
... | java | private void fillColumnValuesMap(List<Map<String, Object>> results, Map<String, List<String>> columnValuesMap) {
for (Map<String, Object> row : results) {
for (Entry<String, Object> column : row.entrySet()) {
String columnValue;
String columnName = column.getKey();
... | [
"private",
"void",
"fillColumnValuesMap",
"(",
"List",
"<",
"Map",
"<",
"String",
",",
"Object",
">",
">",
"results",
",",
"Map",
"<",
"String",
",",
"List",
"<",
"String",
">",
">",
"columnValuesMap",
")",
"{",
"for",
"(",
"Map",
"<",
"String",
",",
... | Form a Map object which contains all columns of the result as keys
and a List of row values as values of the Map
@param results result map from last jdbc query execution
@param columnValuesMap map holding all result columns and corresponding values | [
"Form",
"a",
"Map",
"object",
"which",
"contains",
"all",
"columns",
"of",
"the",
"result",
"as",
"keys",
"and",
"a",
"List",
"of",
"row",
"values",
"as",
"values",
"of",
"the",
"Map"
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/actions/ExecuteSQLQueryAction.java#L169-L336 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/functions/FunctionUtils.java | FunctionUtils.resolveFunction | public static String resolveFunction(String functionString, TestContext context) {
String functionExpression = VariableUtils.cutOffVariablesPrefix(functionString);
if (!functionExpression.contains("(") || !functionExpression.endsWith(")") || !functionExpression.contains(":")) {
throw new In... | java | public static String resolveFunction(String functionString, TestContext context) {
String functionExpression = VariableUtils.cutOffVariablesPrefix(functionString);
if (!functionExpression.contains("(") || !functionExpression.endsWith(")") || !functionExpression.contains(":")) {
throw new In... | [
"public",
"static",
"String",
"resolveFunction",
"(",
"String",
"functionString",
",",
"TestContext",
"context",
")",
"{",
"String",
"functionExpression",
"=",
"VariableUtils",
".",
"cutOffVariablesPrefix",
"(",
"functionString",
")",
";",
"if",
"(",
"!",
"functionE... | This method resolves a custom function to its respective result.
@param functionString to evaluate.
@throws com.consol.citrus.exceptions.CitrusRuntimeException
@return evaluated result | [
"This",
"method",
"resolves",
"a",
"custom",
"function",
"to",
"its",
"respective",
"result",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/functions/FunctionUtils.java#L127-L150 | train |
citrusframework/citrus | modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/builder/AssertSoapFaultBuilder.java | AssertSoapFaultBuilder.faultDetailResource | public AssertSoapFaultBuilder faultDetailResource(Resource resource, Charset charset) {
try {
action.getFaultDetails().add(FileUtils.readToString(resource, charset));
} catch (IOException e) {
throw new CitrusRuntimeException("Failed to read fault detail resource", e);
}
... | java | public AssertSoapFaultBuilder faultDetailResource(Resource resource, Charset charset) {
try {
action.getFaultDetails().add(FileUtils.readToString(resource, charset));
} catch (IOException e) {
throw new CitrusRuntimeException("Failed to read fault detail resource", e);
}
... | [
"public",
"AssertSoapFaultBuilder",
"faultDetailResource",
"(",
"Resource",
"resource",
",",
"Charset",
"charset",
")",
"{",
"try",
"{",
"action",
".",
"getFaultDetails",
"(",
")",
".",
"add",
"(",
"FileUtils",
".",
"readToString",
"(",
"resource",
",",
"charset... | Expect fault detail from file resource.
@param resource
@param charset
@return | [
"Expect",
"fault",
"detail",
"from",
"file",
"resource",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/builder/AssertSoapFaultBuilder.java#L140-L147 | train |
citrusframework/citrus | modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/builder/AssertSoapFaultBuilder.java | AssertSoapFaultBuilder.validator | public AssertSoapFaultBuilder validator(String validatorName, ApplicationContext applicationContext) {
action.setValidator(applicationContext.getBean(validatorName, SoapFaultValidator.class));
return this;
} | java | public AssertSoapFaultBuilder validator(String validatorName, ApplicationContext applicationContext) {
action.setValidator(applicationContext.getBean(validatorName, SoapFaultValidator.class));
return this;
} | [
"public",
"AssertSoapFaultBuilder",
"validator",
"(",
"String",
"validatorName",
",",
"ApplicationContext",
"applicationContext",
")",
"{",
"action",
".",
"setValidator",
"(",
"applicationContext",
".",
"getBean",
"(",
"validatorName",
",",
"SoapFaultValidator",
".",
"c... | Set explicit SOAP fault validator implementation by bean name.
@param validatorName
@param applicationContext
@return | [
"Set",
"explicit",
"SOAP",
"fault",
"validator",
"implementation",
"by",
"bean",
"name",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/builder/AssertSoapFaultBuilder.java#L175-L178 | train |
citrusframework/citrus | modules/citrus-kafka/src/main/java/com/consol/citrus/kafka/message/KafkaMessage.java | KafkaMessage.getPartition | public Integer getPartition() {
Object partition = getHeader(KafkaMessageHeaders.PARTITION);
if (partition != null) {
return TypeConversionUtils.convertIfNecessary(partition, Integer.class);
}
return null;
} | java | public Integer getPartition() {
Object partition = getHeader(KafkaMessageHeaders.PARTITION);
if (partition != null) {
return TypeConversionUtils.convertIfNecessary(partition, Integer.class);
}
return null;
} | [
"public",
"Integer",
"getPartition",
"(",
")",
"{",
"Object",
"partition",
"=",
"getHeader",
"(",
"KafkaMessageHeaders",
".",
"PARTITION",
")",
";",
"if",
"(",
"partition",
"!=",
"null",
")",
"{",
"return",
"TypeConversionUtils",
".",
"convertIfNecessary",
"(",
... | Gets the Kafka partition header.
@return | [
"Gets",
"the",
"Kafka",
"partition",
"header",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-kafka/src/main/java/com/consol/citrus/kafka/message/KafkaMessage.java#L103-L111 | train |
citrusframework/citrus | modules/citrus-kafka/src/main/java/com/consol/citrus/kafka/message/KafkaMessage.java | KafkaMessage.getTimestamp | public Long getTimestamp() {
Object timestamp = getHeader(KafkaMessageHeaders.TIMESTAMP);
if (timestamp != null) {
return Long.valueOf(timestamp.toString());
}
return null;
} | java | public Long getTimestamp() {
Object timestamp = getHeader(KafkaMessageHeaders.TIMESTAMP);
if (timestamp != null) {
return Long.valueOf(timestamp.toString());
}
return null;
} | [
"public",
"Long",
"getTimestamp",
"(",
")",
"{",
"Object",
"timestamp",
"=",
"getHeader",
"(",
"KafkaMessageHeaders",
".",
"TIMESTAMP",
")",
";",
"if",
"(",
"timestamp",
"!=",
"null",
")",
"{",
"return",
"Long",
".",
"valueOf",
"(",
"timestamp",
".",
"toSt... | Gets the Kafka timestamp header.
@return | [
"Gets",
"the",
"Kafka",
"timestamp",
"header",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-kafka/src/main/java/com/consol/citrus/kafka/message/KafkaMessage.java#L117-L125 | train |
citrusframework/citrus | modules/citrus-kafka/src/main/java/com/consol/citrus/kafka/message/KafkaMessage.java | KafkaMessage.getOffset | public Long getOffset() {
Object offset = getHeader(KafkaMessageHeaders.OFFSET);
if (offset != null) {
return TypeConversionUtils.convertIfNecessary(offset, Long.class);
}
return 0L;
} | java | public Long getOffset() {
Object offset = getHeader(KafkaMessageHeaders.OFFSET);
if (offset != null) {
return TypeConversionUtils.convertIfNecessary(offset, Long.class);
}
return 0L;
} | [
"public",
"Long",
"getOffset",
"(",
")",
"{",
"Object",
"offset",
"=",
"getHeader",
"(",
"KafkaMessageHeaders",
".",
"OFFSET",
")",
";",
"if",
"(",
"offset",
"!=",
"null",
")",
"{",
"return",
"TypeConversionUtils",
".",
"convertIfNecessary",
"(",
"offset",
"... | Gets the Kafka offset header.
@return | [
"Gets",
"the",
"Kafka",
"offset",
"header",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-kafka/src/main/java/com/consol/citrus/kafka/message/KafkaMessage.java#L131-L139 | train |
citrusframework/citrus | modules/citrus-kafka/src/main/java/com/consol/citrus/kafka/message/KafkaMessage.java | KafkaMessage.getMessageKey | public Object getMessageKey() {
Object key = getHeader(KafkaMessageHeaders.MESSAGE_KEY);
if (key != null) {
return key;
}
return null;
} | java | public Object getMessageKey() {
Object key = getHeader(KafkaMessageHeaders.MESSAGE_KEY);
if (key != null) {
return key;
}
return null;
} | [
"public",
"Object",
"getMessageKey",
"(",
")",
"{",
"Object",
"key",
"=",
"getHeader",
"(",
"KafkaMessageHeaders",
".",
"MESSAGE_KEY",
")",
";",
"if",
"(",
"key",
"!=",
"null",
")",
"{",
"return",
"key",
";",
"}",
"return",
"null",
";",
"}"
] | Gets the Kafka message key header.
@return | [
"Gets",
"the",
"Kafka",
"message",
"key",
"header",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-kafka/src/main/java/com/consol/citrus/kafka/message/KafkaMessage.java#L145-L153 | train |
citrusframework/citrus | modules/citrus-kafka/src/main/java/com/consol/citrus/kafka/message/KafkaMessage.java | KafkaMessage.getTopic | public String getTopic() {
Object topic = getHeader(KafkaMessageHeaders.TOPIC);
if (topic != null) {
return topic.toString();
}
return null;
} | java | public String getTopic() {
Object topic = getHeader(KafkaMessageHeaders.TOPIC);
if (topic != null) {
return topic.toString();
}
return null;
} | [
"public",
"String",
"getTopic",
"(",
")",
"{",
"Object",
"topic",
"=",
"getHeader",
"(",
"KafkaMessageHeaders",
".",
"TOPIC",
")",
";",
"if",
"(",
"topic",
"!=",
"null",
")",
"{",
"return",
"topic",
".",
"toString",
"(",
")",
";",
"}",
"return",
"null"... | Gets the Kafka topic header.
@return | [
"Gets",
"the",
"Kafka",
"topic",
"header",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-kafka/src/main/java/com/consol/citrus/kafka/message/KafkaMessage.java#L159-L167 | train |
citrusframework/citrus | modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/builder/WaitActionConditionBuilder.java | WaitActionConditionBuilder.action | public Wait action(TestAction action) {
if (action instanceof TestActionBuilder) {
getCondition().setAction(((TestActionBuilder) action).build());
this.action.setAction(((TestActionBuilder) action).build());
getBuilder().actions(((TestActionBuilder) action).build());
... | java | public Wait action(TestAction action) {
if (action instanceof TestActionBuilder) {
getCondition().setAction(((TestActionBuilder) action).build());
this.action.setAction(((TestActionBuilder) action).build());
getBuilder().actions(((TestActionBuilder) action).build());
... | [
"public",
"Wait",
"action",
"(",
"TestAction",
"action",
")",
"{",
"if",
"(",
"action",
"instanceof",
"TestActionBuilder",
")",
"{",
"getCondition",
"(",
")",
".",
"setAction",
"(",
"(",
"(",
"TestActionBuilder",
")",
"action",
")",
".",
"build",
"(",
")",... | Sets the test action to execute and wait for.
@param action
@return | [
"Sets",
"the",
"test",
"action",
"to",
"execute",
"and",
"wait",
"for",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/builder/WaitActionConditionBuilder.java#L47-L59 | train |
citrusframework/citrus | modules/citrus-http/src/main/java/com/consol/citrus/http/interceptor/LoggingClientInterceptor.java | LoggingClientInterceptor.getRequestContent | private String getRequestContent(HttpRequest request, String body) {
StringBuilder builder = new StringBuilder();
builder.append(request.getMethod());
builder.append(" ");
builder.append(request.getURI());
builder.append(NEWLINE);
appendHeaders(request.g... | java | private String getRequestContent(HttpRequest request, String body) {
StringBuilder builder = new StringBuilder();
builder.append(request.getMethod());
builder.append(" ");
builder.append(request.getURI());
builder.append(NEWLINE);
appendHeaders(request.g... | [
"private",
"String",
"getRequestContent",
"(",
"HttpRequest",
"request",
",",
"String",
"body",
")",
"{",
"StringBuilder",
"builder",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"builder",
".",
"append",
"(",
"request",
".",
"getMethod",
"(",
")",
")",
";",
... | Builds request content string from request and body.
@param request
@param body
@return | [
"Builds",
"request",
"content",
"string",
"from",
"request",
"and",
"body",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-http/src/main/java/com/consol/citrus/http/interceptor/LoggingClientInterceptor.java#L99-L113 | train |
citrusframework/citrus | modules/citrus-http/src/main/java/com/consol/citrus/http/interceptor/LoggingClientInterceptor.java | LoggingClientInterceptor.getResponseContent | private String getResponseContent(CachingClientHttpResponseWrapper response) throws IOException {
if (response != null) {
StringBuilder builder = new StringBuilder();
builder.append("HTTP/1.1 "); // TODO get Http version from message
builder.append(response.getSt... | java | private String getResponseContent(CachingClientHttpResponseWrapper response) throws IOException {
if (response != null) {
StringBuilder builder = new StringBuilder();
builder.append("HTTP/1.1 "); // TODO get Http version from message
builder.append(response.getSt... | [
"private",
"String",
"getResponseContent",
"(",
"CachingClientHttpResponseWrapper",
"response",
")",
"throws",
"IOException",
"{",
"if",
"(",
"response",
"!=",
"null",
")",
"{",
"StringBuilder",
"builder",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"builder",
"."... | Builds response content string from response object.
@param response
@return
@throws IOException | [
"Builds",
"response",
"content",
"string",
"from",
"response",
"object",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-http/src/main/java/com/consol/citrus/http/interceptor/LoggingClientInterceptor.java#L121-L140 | train |
citrusframework/citrus | modules/citrus-http/src/main/java/com/consol/citrus/http/interceptor/LoggingClientInterceptor.java | LoggingClientInterceptor.appendHeaders | private void appendHeaders(HttpHeaders headers, StringBuilder builder) {
for (Entry<String, List<String>> headerEntry : headers.entrySet()) {
builder.append(headerEntry.getKey());
builder.append(":");
builder.append(StringUtils.arrayToCommaDelimitedString(headerEntry.getValue... | java | private void appendHeaders(HttpHeaders headers, StringBuilder builder) {
for (Entry<String, List<String>> headerEntry : headers.entrySet()) {
builder.append(headerEntry.getKey());
builder.append(":");
builder.append(StringUtils.arrayToCommaDelimitedString(headerEntry.getValue... | [
"private",
"void",
"appendHeaders",
"(",
"HttpHeaders",
"headers",
",",
"StringBuilder",
"builder",
")",
"{",
"for",
"(",
"Entry",
"<",
"String",
",",
"List",
"<",
"String",
">",
">",
"headerEntry",
":",
"headers",
".",
"entrySet",
"(",
")",
")",
"{",
"b... | Append Http headers to string builder.
@param headers
@param builder | [
"Append",
"Http",
"headers",
"to",
"string",
"builder",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-http/src/main/java/com/consol/citrus/http/interceptor/LoggingClientInterceptor.java#L147-L154 | train |
citrusframework/citrus | modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/builder/DockerActionBuilder.java | DockerActionBuilder.start | public ContainerStart start(String containerId) {
ContainerStart command = new ContainerStart();
command.container(containerId);
action.setCommand(command);
return command;
} | java | public ContainerStart start(String containerId) {
ContainerStart command = new ContainerStart();
command.container(containerId);
action.setCommand(command);
return command;
} | [
"public",
"ContainerStart",
"start",
"(",
"String",
"containerId",
")",
"{",
"ContainerStart",
"command",
"=",
"new",
"ContainerStart",
"(",
")",
";",
"command",
".",
"container",
"(",
"containerId",
")",
";",
"action",
".",
"setCommand",
"(",
"command",
")",
... | Adds a start command. | [
"Adds",
"a",
"start",
"command",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/builder/DockerActionBuilder.java#L94-L99 | train |
citrusframework/citrus | modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/builder/DockerActionBuilder.java | DockerActionBuilder.stop | public ContainerStop stop(String containerId) {
ContainerStop command = new ContainerStop();
command.container(containerId);
action.setCommand(command);
return command;
} | java | public ContainerStop stop(String containerId) {
ContainerStop command = new ContainerStop();
command.container(containerId);
action.setCommand(command);
return command;
} | [
"public",
"ContainerStop",
"stop",
"(",
"String",
"containerId",
")",
"{",
"ContainerStop",
"command",
"=",
"new",
"ContainerStop",
"(",
")",
";",
"command",
".",
"container",
"(",
"containerId",
")",
";",
"action",
".",
"setCommand",
"(",
"command",
")",
";... | Adds a stop command. | [
"Adds",
"a",
"stop",
"command",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/builder/DockerActionBuilder.java#L104-L109 | train |
citrusframework/citrus | modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/builder/DockerActionBuilder.java | DockerActionBuilder.wait | public ContainerWait wait(String containerId) {
ContainerWait command = new ContainerWait();
command.container(containerId);
action.setCommand(command);
return command;
} | java | public ContainerWait wait(String containerId) {
ContainerWait command = new ContainerWait();
command.container(containerId);
action.setCommand(command);
return command;
} | [
"public",
"ContainerWait",
"wait",
"(",
"String",
"containerId",
")",
"{",
"ContainerWait",
"command",
"=",
"new",
"ContainerWait",
"(",
")",
";",
"command",
".",
"container",
"(",
"containerId",
")",
";",
"action",
".",
"setCommand",
"(",
"command",
")",
";... | Adds a wait command. | [
"Adds",
"a",
"wait",
"command",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/builder/DockerActionBuilder.java#L114-L119 | train |
citrusframework/citrus | modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/builder/SendMessageBuilder.java | SendMessageBuilder.messageType | public T messageType(String messageType) {
this.messageType = messageType;
getAction().setMessageType(messageType);
if (binaryMessageConstructionInterceptor.supportsMessageType(messageType)) {
getMessageContentBuilder().add(binaryMessageConstructionInterceptor);
}
i... | java | public T messageType(String messageType) {
this.messageType = messageType;
getAction().setMessageType(messageType);
if (binaryMessageConstructionInterceptor.supportsMessageType(messageType)) {
getMessageContentBuilder().add(binaryMessageConstructionInterceptor);
}
i... | [
"public",
"T",
"messageType",
"(",
"String",
"messageType",
")",
"{",
"this",
".",
"messageType",
"=",
"messageType",
";",
"getAction",
"(",
")",
".",
"setMessageType",
"(",
"messageType",
")",
";",
"if",
"(",
"binaryMessageConstructionInterceptor",
".",
"suppor... | Sets a explicit message type for this send action.
@param messageType The message type to send the message in
@return The modified send message | [
"Sets",
"a",
"explicit",
"message",
"type",
"for",
"this",
"send",
"action",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/builder/SendMessageBuilder.java#L439-L452 | train |
citrusframework/citrus | modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/builder/SendMessageBuilder.java | SendMessageBuilder.xpath | public T xpath(String expression, String value) {
if (xpathMessageConstructionInterceptor == null) {
xpathMessageConstructionInterceptor = new XpathMessageConstructionInterceptor();
if (getAction().getMessageBuilder() != null) {
(getAction().getMessageBuilder()).add(xpat... | java | public T xpath(String expression, String value) {
if (xpathMessageConstructionInterceptor == null) {
xpathMessageConstructionInterceptor = new XpathMessageConstructionInterceptor();
if (getAction().getMessageBuilder() != null) {
(getAction().getMessageBuilder()).add(xpat... | [
"public",
"T",
"xpath",
"(",
"String",
"expression",
",",
"String",
"value",
")",
"{",
"if",
"(",
"xpathMessageConstructionInterceptor",
"==",
"null",
")",
"{",
"xpathMessageConstructionInterceptor",
"=",
"new",
"XpathMessageConstructionInterceptor",
"(",
")",
";",
... | Adds XPath manipulating expression that evaluates to message payload before sending.
@param expression
@param value
@return | [
"Adds",
"XPath",
"manipulating",
"expression",
"that",
"evaluates",
"to",
"message",
"payload",
"before",
"sending",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/builder/SendMessageBuilder.java#L507-L523 | train |
citrusframework/citrus | modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/builder/SendMessageBuilder.java | SendMessageBuilder.jsonPath | public T jsonPath(String expression, String value) {
if (jsonPathMessageConstructionInterceptor == null) {
jsonPathMessageConstructionInterceptor = new JsonPathMessageConstructionInterceptor();
if (getAction().getMessageBuilder() != null) {
(getAction().getMessageBuilder... | java | public T jsonPath(String expression, String value) {
if (jsonPathMessageConstructionInterceptor == null) {
jsonPathMessageConstructionInterceptor = new JsonPathMessageConstructionInterceptor();
if (getAction().getMessageBuilder() != null) {
(getAction().getMessageBuilder... | [
"public",
"T",
"jsonPath",
"(",
"String",
"expression",
",",
"String",
"value",
")",
"{",
"if",
"(",
"jsonPathMessageConstructionInterceptor",
"==",
"null",
")",
"{",
"jsonPathMessageConstructionInterceptor",
"=",
"new",
"JsonPathMessageConstructionInterceptor",
"(",
")... | Adds JSONPath manipulating expression that evaluates to message payload before sending.
@param expression
@param value
@return | [
"Adds",
"JSONPath",
"manipulating",
"expression",
"that",
"evaluates",
"to",
"message",
"payload",
"before",
"sending",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/builder/SendMessageBuilder.java#L531-L547 | train |
citrusframework/citrus | modules/citrus-ws/src/main/java/com/consol/citrus/ws/interceptor/LoggingInterceptorSupport.java | LoggingInterceptorSupport.logRequest | protected void logRequest(String logMessage, MessageContext messageContext, boolean incoming) throws TransformerException {
if (messageContext.getRequest() instanceof SoapMessage) {
logSoapMessage(logMessage, (SoapMessage) messageContext.getRequest(), incoming);
} else {
logWebSe... | java | protected void logRequest(String logMessage, MessageContext messageContext, boolean incoming) throws TransformerException {
if (messageContext.getRequest() instanceof SoapMessage) {
logSoapMessage(logMessage, (SoapMessage) messageContext.getRequest(), incoming);
} else {
logWebSe... | [
"protected",
"void",
"logRequest",
"(",
"String",
"logMessage",
",",
"MessageContext",
"messageContext",
",",
"boolean",
"incoming",
")",
"throws",
"TransformerException",
"{",
"if",
"(",
"messageContext",
".",
"getRequest",
"(",
")",
"instanceof",
"SoapMessage",
")... | Logs request message from message context. SOAP messages get logged with envelope transformation
other messages with serialization.
@param logMessage
@param messageContext
@param incoming
@throws TransformerException | [
"Logs",
"request",
"message",
"from",
"message",
"context",
".",
"SOAP",
"messages",
"get",
"logged",
"with",
"envelope",
"transformation",
"other",
"messages",
"with",
"serialization",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-ws/src/main/java/com/consol/citrus/ws/interceptor/LoggingInterceptorSupport.java#L62-L68 | train |
citrusframework/citrus | modules/citrus-ws/src/main/java/com/consol/citrus/ws/interceptor/LoggingInterceptorSupport.java | LoggingInterceptorSupport.logResponse | protected void logResponse(String logMessage, MessageContext messageContext, boolean incoming) throws TransformerException {
if (messageContext.hasResponse()) {
if (messageContext.getResponse() instanceof SoapMessage) {
logSoapMessage(logMessage, (SoapMessage) messageContext.getRespo... | java | protected void logResponse(String logMessage, MessageContext messageContext, boolean incoming) throws TransformerException {
if (messageContext.hasResponse()) {
if (messageContext.getResponse() instanceof SoapMessage) {
logSoapMessage(logMessage, (SoapMessage) messageContext.getRespo... | [
"protected",
"void",
"logResponse",
"(",
"String",
"logMessage",
",",
"MessageContext",
"messageContext",
",",
"boolean",
"incoming",
")",
"throws",
"TransformerException",
"{",
"if",
"(",
"messageContext",
".",
"hasResponse",
"(",
")",
")",
"{",
"if",
"(",
"mes... | Logs response message from message context if any. SOAP messages get logged with envelope transformation
other messages with serialization.
@param logMessage
@param messageContext
@param incoming
@throws TransformerException | [
"Logs",
"response",
"message",
"from",
"message",
"context",
"if",
"any",
".",
"SOAP",
"messages",
"get",
"logged",
"with",
"envelope",
"transformation",
"other",
"messages",
"with",
"serialization",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-ws/src/main/java/com/consol/citrus/ws/interceptor/LoggingInterceptorSupport.java#L79-L87 | train |
citrusframework/citrus | modules/citrus-ws/src/main/java/com/consol/citrus/ws/interceptor/LoggingInterceptorSupport.java | LoggingInterceptorSupport.logSoapMessage | protected void logSoapMessage(String logMessage, SoapMessage soapMessage, boolean incoming) throws TransformerException {
Transformer transformer = createIndentingTransformer();
StringWriter writer = new StringWriter();
transformer.transform(soapMessage.getEnvelope().getSource(), new St... | java | protected void logSoapMessage(String logMessage, SoapMessage soapMessage, boolean incoming) throws TransformerException {
Transformer transformer = createIndentingTransformer();
StringWriter writer = new StringWriter();
transformer.transform(soapMessage.getEnvelope().getSource(), new St... | [
"protected",
"void",
"logSoapMessage",
"(",
"String",
"logMessage",
",",
"SoapMessage",
"soapMessage",
",",
"boolean",
"incoming",
")",
"throws",
"TransformerException",
"{",
"Transformer",
"transformer",
"=",
"createIndentingTransformer",
"(",
")",
";",
"StringWriter",... | Log SOAP message with transformer instance.
@param logMessage the customized log message.
@param soapMessage the message content as SOAP envelope source.
@param incoming
@throws TransformerException | [
"Log",
"SOAP",
"message",
"with",
"transformer",
"instance",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-ws/src/main/java/com/consol/citrus/ws/interceptor/LoggingInterceptorSupport.java#L97-L103 | train |
citrusframework/citrus | modules/citrus-ws/src/main/java/com/consol/citrus/ws/interceptor/LoggingInterceptorSupport.java | LoggingInterceptorSupport.logMessage | protected void logMessage(String logMessage, String message, boolean incoming) {
if (messageListener != null) {
log.debug(logMessage);
if (incoming) {
messageListener.onInboundMessage(new RawMessage(message), null);
} else {
messageListener.on... | java | protected void logMessage(String logMessage, String message, boolean incoming) {
if (messageListener != null) {
log.debug(logMessage);
if (incoming) {
messageListener.onInboundMessage(new RawMessage(message), null);
} else {
messageListener.on... | [
"protected",
"void",
"logMessage",
"(",
"String",
"logMessage",
",",
"String",
"message",
",",
"boolean",
"incoming",
")",
"{",
"if",
"(",
"messageListener",
"!=",
"null",
")",
"{",
"log",
".",
"debug",
"(",
"logMessage",
")",
";",
"if",
"(",
"incoming",
... | Performs the final logger call with dynamic message.
@param logMessage a custom log message entry.
@param message the message content.
@param incoming | [
"Performs",
"the",
"final",
"logger",
"call",
"with",
"dynamic",
"message",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-ws/src/main/java/com/consol/citrus/ws/interceptor/LoggingInterceptorSupport.java#L131-L145 | train |
citrusframework/citrus | modules/citrus-ws/src/main/java/com/consol/citrus/ws/interceptor/LoggingInterceptorSupport.java | LoggingInterceptorSupport.createIndentingTransformer | private Transformer createIndentingTransformer() throws TransformerConfigurationException {
Transformer transformer = createTransformer();
transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
transformer.setOutputProperty(OutputKeys.INDENT, "yes");
return transformer;
... | java | private Transformer createIndentingTransformer() throws TransformerConfigurationException {
Transformer transformer = createTransformer();
transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
transformer.setOutputProperty(OutputKeys.INDENT, "yes");
return transformer;
... | [
"private",
"Transformer",
"createIndentingTransformer",
"(",
")",
"throws",
"TransformerConfigurationException",
"{",
"Transformer",
"transformer",
"=",
"createTransformer",
"(",
")",
";",
"transformer",
".",
"setOutputProperty",
"(",
"OutputKeys",
".",
"OMIT_XML_DECLARATIO... | Get transformer implementation with output properties set.
@return the transformer instance.
@throws TransformerConfigurationException | [
"Get",
"transformer",
"implementation",
"with",
"output",
"properties",
"set",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-ws/src/main/java/com/consol/citrus/ws/interceptor/LoggingInterceptorSupport.java#L153-L158 | train |
citrusframework/citrus | modules/citrus-kafka/src/main/java/com/consol/citrus/kafka/endpoint/KafkaProducer.java | KafkaProducer.createKafkaProducer | private org.apache.kafka.clients.producer.KafkaProducer<Object, Object> createKafkaProducer() {
Map<String, Object> producerProps = new HashMap<>();
producerProps.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, endpointConfiguration.getServer());
producerProps.put(ProducerConfig.REQUEST_TIMEOUT_MS_... | java | private org.apache.kafka.clients.producer.KafkaProducer<Object, Object> createKafkaProducer() {
Map<String, Object> producerProps = new HashMap<>();
producerProps.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, endpointConfiguration.getServer());
producerProps.put(ProducerConfig.REQUEST_TIMEOUT_MS_... | [
"private",
"org",
".",
"apache",
".",
"kafka",
".",
"clients",
".",
"producer",
".",
"KafkaProducer",
"<",
"Object",
",",
"Object",
">",
"createKafkaProducer",
"(",
")",
"{",
"Map",
"<",
"String",
",",
"Object",
">",
"producerProps",
"=",
"new",
"HashMap",... | Creates default KafkaTemplate instance from endpoint configuration. | [
"Creates",
"default",
"KafkaTemplate",
"instance",
"from",
"endpoint",
"configuration",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-kafka/src/main/java/com/consol/citrus/kafka/endpoint/KafkaProducer.java#L97-L109 | train |
citrusframework/citrus | modules/citrus-kafka/src/main/java/com/consol/citrus/kafka/endpoint/KafkaProducer.java | KafkaProducer.setProducer | public void setProducer(org.apache.kafka.clients.producer.KafkaProducer<Object, Object> producer) {
this.producer = producer;
} | java | public void setProducer(org.apache.kafka.clients.producer.KafkaProducer<Object, Object> producer) {
this.producer = producer;
} | [
"public",
"void",
"setProducer",
"(",
"org",
".",
"apache",
".",
"kafka",
".",
"clients",
".",
"producer",
".",
"KafkaProducer",
"<",
"Object",
",",
"Object",
">",
"producer",
")",
"{",
"this",
".",
"producer",
"=",
"producer",
";",
"}"
] | Sets the producer.
@param producer | [
"Sets",
"the",
"producer",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-kafka/src/main/java/com/consol/citrus/kafka/endpoint/KafkaProducer.java#L122-L124 | train |
citrusframework/citrus | tools/remote/citrus-remote-server/src/main/java/com/consol/citrus/remote/CitrusRemoteServer.java | CitrusRemoteServer.start | public void start() {
application = new CitrusRemoteApplication(configuration);
port(configuration.getPort());
application.init();
if (!configuration.isSkipTests()) {
new RunController(configuration).run();
}
if (configuration.getTimeToLive() == 0) {
... | java | public void start() {
application = new CitrusRemoteApplication(configuration);
port(configuration.getPort());
application.init();
if (!configuration.isSkipTests()) {
new RunController(configuration).run();
}
if (configuration.getTimeToLive() == 0) {
... | [
"public",
"void",
"start",
"(",
")",
"{",
"application",
"=",
"new",
"CitrusRemoteApplication",
"(",
"configuration",
")",
";",
"port",
"(",
"configuration",
".",
"getPort",
"(",
")",
")",
";",
"application",
".",
"init",
"(",
")",
";",
"if",
"(",
"!",
... | Start server instance and listen for incoming requests. | [
"Start",
"server",
"instance",
"and",
"listen",
"for",
"incoming",
"requests",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/tools/remote/citrus-remote-server/src/main/java/com/consol/citrus/remote/CitrusRemoteServer.java#L96-L108 | train |
citrusframework/citrus | tools/remote/citrus-remote-server/src/main/java/com/consol/citrus/remote/CitrusRemoteServer.java | CitrusRemoteServer.waitForCompletion | public boolean waitForCompletion() {
try {
return completed.get();
} catch (InterruptedException | ExecutionException e) {
log.warn("Failed to wait for server completion", e);
}
return false;
} | java | public boolean waitForCompletion() {
try {
return completed.get();
} catch (InterruptedException | ExecutionException e) {
log.warn("Failed to wait for server completion", e);
}
return false;
} | [
"public",
"boolean",
"waitForCompletion",
"(",
")",
"{",
"try",
"{",
"return",
"completed",
".",
"get",
"(",
")",
";",
"}",
"catch",
"(",
"InterruptedException",
"|",
"ExecutionException",
"e",
")",
"{",
"log",
".",
"warn",
"(",
"\"Failed to wait for server co... | Waits for completed state of application.
@return | [
"Waits",
"for",
"completed",
"state",
"of",
"application",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/tools/remote/citrus-remote-server/src/main/java/com/consol/citrus/remote/CitrusRemoteServer.java#L130-L138 | train |
citrusframework/citrus | modules/citrus-jmx/src/main/java/com/consol/citrus/jmx/server/JmxServerBuilder.java | JmxServerBuilder.environmentProperties | public JmxServerBuilder environmentProperties(Properties environmentProperties) {
HashMap<String, Object> properties = new HashMap<>(environmentProperties.size());
for (Map.Entry<Object, Object> entry : environmentProperties.entrySet()) {
properties.put(entry.getKey().toString(), entry.getVa... | java | public JmxServerBuilder environmentProperties(Properties environmentProperties) {
HashMap<String, Object> properties = new HashMap<>(environmentProperties.size());
for (Map.Entry<Object, Object> entry : environmentProperties.entrySet()) {
properties.put(entry.getKey().toString(), entry.getVa... | [
"public",
"JmxServerBuilder",
"environmentProperties",
"(",
"Properties",
"environmentProperties",
")",
"{",
"HashMap",
"<",
"String",
",",
"Object",
">",
"properties",
"=",
"new",
"HashMap",
"<>",
"(",
"environmentProperties",
".",
"size",
"(",
")",
")",
";",
"... | Sets the environment properties.
@param environmentProperties
@return | [
"Sets",
"the",
"environment",
"properties",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-jmx/src/main/java/com/consol/citrus/jmx/server/JmxServerBuilder.java#L104-L112 | train |
citrusframework/citrus | modules/citrus-jmx/src/main/java/com/consol/citrus/jmx/server/JmxServerBuilder.java | JmxServerBuilder.timeout | public JmxServerBuilder timeout(long timeout) {
endpoint.setDefaultTimeout(timeout);
endpoint.getEndpointConfiguration().setTimeout(timeout);
return this;
} | java | public JmxServerBuilder timeout(long timeout) {
endpoint.setDefaultTimeout(timeout);
endpoint.getEndpointConfiguration().setTimeout(timeout);
return this;
} | [
"public",
"JmxServerBuilder",
"timeout",
"(",
"long",
"timeout",
")",
"{",
"endpoint",
".",
"setDefaultTimeout",
"(",
"timeout",
")",
";",
"endpoint",
".",
"getEndpointConfiguration",
"(",
")",
".",
"setTimeout",
"(",
"timeout",
")",
";",
"return",
"this",
";"... | Sets the default timeout.
@param timeout
@return | [
"Sets",
"the",
"default",
"timeout",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-jmx/src/main/java/com/consol/citrus/jmx/server/JmxServerBuilder.java#L149-L153 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.