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-core/src/main/java/com/consol/citrus/config/xml/PayloadElementParser.java | PayloadElementParser.parseMessagePayload | public static String parseMessagePayload(Element payloadElement) {
if (payloadElement == null) {
return "";
}
try {
Document payload = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
payload.appendChild(payload.importNode(payl... | java | public static String parseMessagePayload(Element payloadElement) {
if (payloadElement == null) {
return "";
}
try {
Document payload = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
payload.appendChild(payload.importNode(payl... | [
"public",
"static",
"String",
"parseMessagePayload",
"(",
"Element",
"payloadElement",
")",
"{",
"if",
"(",
"payloadElement",
"==",
"null",
")",
"{",
"return",
"\"\"",
";",
"}",
"try",
"{",
"Document",
"payload",
"=",
"DocumentBuilderFactory",
".",
"newInstance"... | Static parse method taking care of payload element.
@param payloadElement | [
"Static",
"parse",
"method",
"taking",
"care",
"of",
"payload",
"element",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/config/xml/PayloadElementParser.java#L44-L62 | train |
citrusframework/citrus | modules/citrus-zookeeper/src/main/java/com/consol/citrus/zookeeper/server/ZooServer.java | ZooServer.getServerFactory | public ServerCnxnFactory getServerFactory() {
if (serverFactory == null) {
try {
serverFactory = new NIOServerCnxnFactory();
serverFactory.configure(new InetSocketAddress(port), 5000);
} catch (IOException e) {
throw new CitrusRuntimeExcept... | java | public ServerCnxnFactory getServerFactory() {
if (serverFactory == null) {
try {
serverFactory = new NIOServerCnxnFactory();
serverFactory.configure(new InetSocketAddress(port), 5000);
} catch (IOException e) {
throw new CitrusRuntimeExcept... | [
"public",
"ServerCnxnFactory",
"getServerFactory",
"(",
")",
"{",
"if",
"(",
"serverFactory",
"==",
"null",
")",
"{",
"try",
"{",
"serverFactory",
"=",
"new",
"NIOServerCnxnFactory",
"(",
")",
";",
"serverFactory",
".",
"configure",
"(",
"new",
"InetSocketAddres... | Gets the value of the serverFactory property.
@return the serverFactory | [
"Gets",
"the",
"value",
"of",
"the",
"serverFactory",
"property",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-zookeeper/src/main/java/com/consol/citrus/zookeeper/server/ZooServer.java#L58-L69 | train |
citrusframework/citrus | modules/citrus-zookeeper/src/main/java/com/consol/citrus/zookeeper/server/ZooServer.java | ZooServer.getZooKeeperServer | public ZooKeeperServer getZooKeeperServer() {
if (zooKeeperServer == null) {
String dataDirectory = System.getProperty("java.io.tmpdir");
File dir = new File(dataDirectory, "zookeeper").getAbsoluteFile();
try {
zooKeeperServer = new ZooKeeperServer(dir, dir, 2... | java | public ZooKeeperServer getZooKeeperServer() {
if (zooKeeperServer == null) {
String dataDirectory = System.getProperty("java.io.tmpdir");
File dir = new File(dataDirectory, "zookeeper").getAbsoluteFile();
try {
zooKeeperServer = new ZooKeeperServer(dir, dir, 2... | [
"public",
"ZooKeeperServer",
"getZooKeeperServer",
"(",
")",
"{",
"if",
"(",
"zooKeeperServer",
"==",
"null",
")",
"{",
"String",
"dataDirectory",
"=",
"System",
".",
"getProperty",
"(",
"\"java.io.tmpdir\"",
")",
";",
"File",
"dir",
"=",
"new",
"File",
"(",
... | Gets the value of the zooKeeperServer property.
@return the zooKeeperServer | [
"Gets",
"the",
"value",
"of",
"the",
"zooKeeperServer",
"property",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-zookeeper/src/main/java/com/consol/citrus/zookeeper/server/ZooServer.java#L85-L97 | train |
citrusframework/citrus | modules/citrus-http/src/main/java/com/consol/citrus/http/client/BasicAuthClientHttpRequestFactory.java | BasicAuthClientHttpRequestFactory.getObject | public HttpComponentsClientHttpRequestFactory getObject() throws Exception {
Assert.notNull(credentials, "User credentials not set properly!");
HttpComponentsClientHttpRequestFactory requestFactory = new HttpComponentsClientHttpRequestFactory(httpClient) {
@Override
prot... | java | public HttpComponentsClientHttpRequestFactory getObject() throws Exception {
Assert.notNull(credentials, "User credentials not set properly!");
HttpComponentsClientHttpRequestFactory requestFactory = new HttpComponentsClientHttpRequestFactory(httpClient) {
@Override
prot... | [
"public",
"HttpComponentsClientHttpRequestFactory",
"getObject",
"(",
")",
"throws",
"Exception",
"{",
"Assert",
".",
"notNull",
"(",
"credentials",
",",
"\"User credentials not set properly!\"",
")",
";",
"HttpComponentsClientHttpRequestFactory",
"requestFactory",
"=",
"new"... | Construct the client factory bean with user credentials. | [
"Construct",
"the",
"client",
"factory",
"bean",
"with",
"user",
"credentials",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-http/src/main/java/com/consol/citrus/http/client/BasicAuthClientHttpRequestFactory.java#L68-L97 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/validation/AbstractMessageValidator.java | AbstractMessageValidator.findValidationContext | protected T findValidationContext(List<ValidationContext> validationContexts) {
for (ValidationContext validationContext : validationContexts) {
if (getRequiredValidationContextType().isInstance(validationContext)) {
return (T) validationContext;
}
}
retu... | java | protected T findValidationContext(List<ValidationContext> validationContexts) {
for (ValidationContext validationContext : validationContexts) {
if (getRequiredValidationContextType().isInstance(validationContext)) {
return (T) validationContext;
}
}
retu... | [
"protected",
"T",
"findValidationContext",
"(",
"List",
"<",
"ValidationContext",
">",
"validationContexts",
")",
"{",
"for",
"(",
"ValidationContext",
"validationContext",
":",
"validationContexts",
")",
"{",
"if",
"(",
"getRequiredValidationContextType",
"(",
")",
"... | Finds the message validation context that is most appropriate for this validator implementation.
@param validationContexts
@return | [
"Finds",
"the",
"message",
"validation",
"context",
"that",
"is",
"most",
"appropriate",
"for",
"this",
"validator",
"implementation",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/validation/AbstractMessageValidator.java#L71-L79 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/container/Wait.java | Wait.getWaitTimeMs | private long getWaitTimeMs(TestContext context) {
if (StringUtils.hasText(seconds)) {
return Long.valueOf(context.replaceDynamicContentInString(seconds)) * 1000;
} else {
return Long.valueOf(context.replaceDynamicContentInString(milliseconds));
}
} | java | private long getWaitTimeMs(TestContext context) {
if (StringUtils.hasText(seconds)) {
return Long.valueOf(context.replaceDynamicContentInString(seconds)) * 1000;
} else {
return Long.valueOf(context.replaceDynamicContentInString(milliseconds));
}
} | [
"private",
"long",
"getWaitTimeMs",
"(",
"TestContext",
"context",
")",
"{",
"if",
"(",
"StringUtils",
".",
"hasText",
"(",
"seconds",
")",
")",
"{",
"return",
"Long",
".",
"valueOf",
"(",
"context",
".",
"replaceDynamicContentInString",
"(",
"seconds",
")",
... | Gets total wait time in milliseconds. Either uses second time value or default milliseconds.
@param context
@return | [
"Gets",
"total",
"wait",
"time",
"in",
"milliseconds",
".",
"Either",
"uses",
"second",
"time",
"value",
"or",
"default",
"milliseconds",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/container/Wait.java#L121-L127 | train |
citrusframework/citrus | modules/citrus-jms/src/main/java/com/consol/citrus/jms/endpoint/JmsSyncProducer.java | JmsSyncProducer.createConnection | protected void createConnection() throws JMSException {
if (connection == null) {
if (!endpointConfiguration.isPubSubDomain() && endpointConfiguration.getConnectionFactory() instanceof QueueConnectionFactory) {
connection = ((QueueConnectionFactory) endpointConfiguration.getConnectio... | java | protected void createConnection() throws JMSException {
if (connection == null) {
if (!endpointConfiguration.isPubSubDomain() && endpointConfiguration.getConnectionFactory() instanceof QueueConnectionFactory) {
connection = ((QueueConnectionFactory) endpointConfiguration.getConnectio... | [
"protected",
"void",
"createConnection",
"(",
")",
"throws",
"JMSException",
"{",
"if",
"(",
"connection",
"==",
"null",
")",
"{",
"if",
"(",
"!",
"endpointConfiguration",
".",
"isPubSubDomain",
"(",
")",
"&&",
"endpointConfiguration",
".",
"getConnectionFactory",... | Create new JMS connection.
@return connection
@throws JMSException | [
"Create",
"new",
"JMS",
"connection",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-jms/src/main/java/com/consol/citrus/jms/endpoint/JmsSyncProducer.java#L188-L204 | train |
citrusframework/citrus | modules/citrus-jms/src/main/java/com/consol/citrus/jms/endpoint/JmsSyncProducer.java | JmsSyncProducer.createSession | protected void createSession(Connection connection) throws JMSException {
if (session == null) {
if (!endpointConfiguration.isPubSubDomain() && connection instanceof QueueConnection) {
session = ((QueueConnection) connection).createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
... | java | protected void createSession(Connection connection) throws JMSException {
if (session == null) {
if (!endpointConfiguration.isPubSubDomain() && connection instanceof QueueConnection) {
session = ((QueueConnection) connection).createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
... | [
"protected",
"void",
"createSession",
"(",
"Connection",
"connection",
")",
"throws",
"JMSException",
"{",
"if",
"(",
"session",
"==",
"null",
")",
"{",
"if",
"(",
"!",
"endpointConfiguration",
".",
"isPubSubDomain",
"(",
")",
"&&",
"connection",
"instanceof",
... | Create new JMS session.
@param connection to use for session creation.
@return session.
@throws JMSException | [
"Create",
"new",
"JMS",
"session",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-jms/src/main/java/com/consol/citrus/jms/endpoint/JmsSyncProducer.java#L212-L225 | train |
citrusframework/citrus | modules/citrus-jms/src/main/java/com/consol/citrus/jms/endpoint/JmsSyncProducer.java | JmsSyncProducer.deleteTemporaryDestination | private void deleteTemporaryDestination(Destination destination) {
log.debug("Delete temporary destination: '{}'", destination);
try {
if (destination instanceof TemporaryQueue) {
((TemporaryQueue) destination).delete();
} else if (destination instanceof Temporar... | java | private void deleteTemporaryDestination(Destination destination) {
log.debug("Delete temporary destination: '{}'", destination);
try {
if (destination instanceof TemporaryQueue) {
((TemporaryQueue) destination).delete();
} else if (destination instanceof Temporar... | [
"private",
"void",
"deleteTemporaryDestination",
"(",
"Destination",
"destination",
")",
"{",
"log",
".",
"debug",
"(",
"\"Delete temporary destination: '{}'\"",
",",
"destination",
")",
";",
"try",
"{",
"if",
"(",
"destination",
"instanceof",
"TemporaryQueue",
")",
... | Delete temporary destinations.
@param destination | [
"Delete",
"temporary",
"destinations",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-jms/src/main/java/com/consol/citrus/jms/endpoint/JmsSyncProducer.java#L254-L266 | train |
citrusframework/citrus | modules/citrus-jms/src/main/java/com/consol/citrus/jms/endpoint/JmsSyncProducer.java | JmsSyncProducer.getReplyDestination | private Destination getReplyDestination(Session session, Message message) throws JMSException {
if (message.getHeader(org.springframework.messaging.MessageHeaders.REPLY_CHANNEL) != null) {
if (message.getHeader(org.springframework.messaging.MessageHeaders.REPLY_CHANNEL) instanceof Destination) {
... | java | private Destination getReplyDestination(Session session, Message message) throws JMSException {
if (message.getHeader(org.springframework.messaging.MessageHeaders.REPLY_CHANNEL) != null) {
if (message.getHeader(org.springframework.messaging.MessageHeaders.REPLY_CHANNEL) instanceof Destination) {
... | [
"private",
"Destination",
"getReplyDestination",
"(",
"Session",
"session",
",",
"Message",
"message",
")",
"throws",
"JMSException",
"{",
"if",
"(",
"message",
".",
"getHeader",
"(",
"org",
".",
"springframework",
".",
"messaging",
".",
"MessageHeaders",
".",
"... | Retrieve the reply destination either by injected instance, destination name or
by creating a new temporary destination.
@param session current JMS session
@param message holding possible reply destination in header.
@return the reply destination.
@throws JMSException | [
"Retrieve",
"the",
"reply",
"destination",
"either",
"by",
"injected",
"instance",
"destination",
"name",
"or",
"by",
"creating",
"a",
"new",
"temporary",
"destination",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-jms/src/main/java/com/consol/citrus/jms/endpoint/JmsSyncProducer.java#L277-L295 | train |
citrusframework/citrus | modules/citrus-jms/src/main/java/com/consol/citrus/jms/endpoint/JmsSyncProducer.java | JmsSyncProducer.resolveDestination | private Destination resolveDestination(String destinationName) throws JMSException {
if (log.isDebugEnabled()) {
log.debug("Sending JMS message to destination: '" + destinationName + "'");
}
return resolveDestinationName(destinationName, session);
} | java | private Destination resolveDestination(String destinationName) throws JMSException {
if (log.isDebugEnabled()) {
log.debug("Sending JMS message to destination: '" + destinationName + "'");
}
return resolveDestinationName(destinationName, session);
} | [
"private",
"Destination",
"resolveDestination",
"(",
"String",
"destinationName",
")",
"throws",
"JMSException",
"{",
"if",
"(",
"log",
".",
"isDebugEnabled",
"(",
")",
")",
"{",
"log",
".",
"debug",
"(",
"\"Sending JMS message to destination: '\"",
"+",
"destinatio... | Resolve destination from given name.
@param destinationName
@return
@throws JMSException | [
"Resolve",
"destination",
"from",
"given",
"name",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-jms/src/main/java/com/consol/citrus/jms/endpoint/JmsSyncProducer.java#L303-L309 | train |
citrusframework/citrus | modules/citrus-jms/src/main/java/com/consol/citrus/jms/endpoint/JmsSyncProducer.java | JmsSyncProducer.resolveDestinationName | private Destination resolveDestinationName(String name, Session session) throws JMSException {
if (endpointConfiguration.getDestinationResolver() != null) {
return endpointConfiguration.getDestinationResolver().resolveDestinationName(session, name, endpointConfiguration.isPubSubDomain());
}
... | java | private Destination resolveDestinationName(String name, Session session) throws JMSException {
if (endpointConfiguration.getDestinationResolver() != null) {
return endpointConfiguration.getDestinationResolver().resolveDestinationName(session, name, endpointConfiguration.isPubSubDomain());
}
... | [
"private",
"Destination",
"resolveDestinationName",
"(",
"String",
"name",
",",
"Session",
"session",
")",
"throws",
"JMSException",
"{",
"if",
"(",
"endpointConfiguration",
".",
"getDestinationResolver",
"(",
")",
"!=",
"null",
")",
"{",
"return",
"endpointConfigur... | Resolves the destination name from Jms session.
@param name
@param session
@return | [
"Resolves",
"the",
"destination",
"name",
"from",
"Jms",
"session",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-jms/src/main/java/com/consol/citrus/jms/endpoint/JmsSyncProducer.java#L317-L323 | train |
citrusframework/citrus | modules/citrus-jms/src/main/java/com/consol/citrus/jms/endpoint/JmsSyncProducer.java | JmsSyncProducer.destroy | public void destroy() {
JmsUtils.closeSession(session);
if (connection != null) {
ConnectionFactoryUtils.releaseConnection(connection, endpointConfiguration.getConnectionFactory(), true);
}
} | java | public void destroy() {
JmsUtils.closeSession(session);
if (connection != null) {
ConnectionFactoryUtils.releaseConnection(connection, endpointConfiguration.getConnectionFactory(), true);
}
} | [
"public",
"void",
"destroy",
"(",
")",
"{",
"JmsUtils",
".",
"closeSession",
"(",
"session",
")",
";",
"if",
"(",
"connection",
"!=",
"null",
")",
"{",
"ConnectionFactoryUtils",
".",
"releaseConnection",
"(",
"connection",
",",
"endpointConfiguration",
".",
"g... | Destroy method closing JMS session and connection | [
"Destroy",
"method",
"closing",
"JMS",
"session",
"and",
"connection"
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-jms/src/main/java/com/consol/citrus/jms/endpoint/JmsSyncProducer.java#L328-L334 | train |
citrusframework/citrus | modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/builder/CamelRouteActionBuilder.java | CamelRouteActionBuilder.context | public CamelRouteActionBuilder context(String camelContext) {
Assert.notNull(applicationContext, "Citrus application context is not initialized!");
this.camelContext = applicationContext.getBean(camelContext, ModelCamelContext.class);
return this;
} | java | public CamelRouteActionBuilder context(String camelContext) {
Assert.notNull(applicationContext, "Citrus application context is not initialized!");
this.camelContext = applicationContext.getBean(camelContext, ModelCamelContext.class);
return this;
} | [
"public",
"CamelRouteActionBuilder",
"context",
"(",
"String",
"camelContext",
")",
"{",
"Assert",
".",
"notNull",
"(",
"applicationContext",
",",
"\"Citrus application context is not initialized!\"",
")",
";",
"this",
".",
"camelContext",
"=",
"applicationContext",
".",
... | Sets the Camel context to use.
@param camelContext
@return | [
"Sets",
"the",
"Camel",
"context",
"to",
"use",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/builder/CamelRouteActionBuilder.java#L55-L59 | train |
citrusframework/citrus | modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/builder/CamelRouteActionBuilder.java | CamelRouteActionBuilder.controlBus | public CamelControlBusActionBuilder controlBus() {
CamelControlBusAction camelControlBusAction = new CamelControlBusAction();
camelControlBusAction.setCamelContext(getCamelContext());
action.setDelegate(camelControlBusAction);
return new CamelControlBusActionBuilder(camelControlBusAction);
} | java | public CamelControlBusActionBuilder controlBus() {
CamelControlBusAction camelControlBusAction = new CamelControlBusAction();
camelControlBusAction.setCamelContext(getCamelContext());
action.setDelegate(camelControlBusAction);
return new CamelControlBusActionBuilder(camelControlBusAction);
} | [
"public",
"CamelControlBusActionBuilder",
"controlBus",
"(",
")",
"{",
"CamelControlBusAction",
"camelControlBusAction",
"=",
"new",
"CamelControlBusAction",
"(",
")",
";",
"camelControlBusAction",
".",
"setCamelContext",
"(",
"getCamelContext",
"(",
")",
")",
";",
"act... | Execute control bus Camel operations.
@return | [
"Execute",
"control",
"bus",
"Camel",
"operations",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/builder/CamelRouteActionBuilder.java#L75-L81 | train |
citrusframework/citrus | modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/builder/CamelRouteActionBuilder.java | CamelRouteActionBuilder.create | public CamelRouteActionBuilder create(RouteBuilder routeBuilder) {
CreateCamelRouteAction camelRouteAction = new CreateCamelRouteAction();
try {
if (!routeBuilder.getContext().equals(getCamelContext())) {
routeBuilder.configureRoutes(getCamelContext());
} else {
routeBuilder.configure();
}
cam... | java | public CamelRouteActionBuilder create(RouteBuilder routeBuilder) {
CreateCamelRouteAction camelRouteAction = new CreateCamelRouteAction();
try {
if (!routeBuilder.getContext().equals(getCamelContext())) {
routeBuilder.configureRoutes(getCamelContext());
} else {
routeBuilder.configure();
}
cam... | [
"public",
"CamelRouteActionBuilder",
"create",
"(",
"RouteBuilder",
"routeBuilder",
")",
"{",
"CreateCamelRouteAction",
"camelRouteAction",
"=",
"new",
"CreateCamelRouteAction",
"(",
")",
";",
"try",
"{",
"if",
"(",
"!",
"routeBuilder",
".",
"getContext",
"(",
")",
... | Creates new Camel routes in route builder.
@param routeBuilder
@return | [
"Creates",
"new",
"Camel",
"routes",
"in",
"route",
"builder",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/builder/CamelRouteActionBuilder.java#L88-L106 | train |
citrusframework/citrus | modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/builder/CamelRouteActionBuilder.java | CamelRouteActionBuilder.start | public void start(String ... routes) {
StartCamelRouteAction camelRouteAction = new StartCamelRouteAction();
camelRouteAction.setRouteIds(Arrays.asList(routes));
camelRouteAction.setCamelContext(getCamelContext());
action.setDelegate(camelRouteAction);
} | java | public void start(String ... routes) {
StartCamelRouteAction camelRouteAction = new StartCamelRouteAction();
camelRouteAction.setRouteIds(Arrays.asList(routes));
camelRouteAction.setCamelContext(getCamelContext());
action.setDelegate(camelRouteAction);
} | [
"public",
"void",
"start",
"(",
"String",
"...",
"routes",
")",
"{",
"StartCamelRouteAction",
"camelRouteAction",
"=",
"new",
"StartCamelRouteAction",
"(",
")",
";",
"camelRouteAction",
".",
"setRouteIds",
"(",
"Arrays",
".",
"asList",
"(",
"routes",
")",
")",
... | Start these Camel routes. | [
"Start",
"these",
"Camel",
"routes",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/builder/CamelRouteActionBuilder.java#L111-L117 | train |
citrusframework/citrus | modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/builder/CamelRouteActionBuilder.java | CamelRouteActionBuilder.stop | public void stop(String ... routes) {
StopCamelRouteAction camelRouteAction = new StopCamelRouteAction();
camelRouteAction.setRouteIds(Arrays.asList(routes));
camelRouteAction.setCamelContext(getCamelContext());
action.setDelegate(camelRouteAction);
} | java | public void stop(String ... routes) {
StopCamelRouteAction camelRouteAction = new StopCamelRouteAction();
camelRouteAction.setRouteIds(Arrays.asList(routes));
camelRouteAction.setCamelContext(getCamelContext());
action.setDelegate(camelRouteAction);
} | [
"public",
"void",
"stop",
"(",
"String",
"...",
"routes",
")",
"{",
"StopCamelRouteAction",
"camelRouteAction",
"=",
"new",
"StopCamelRouteAction",
"(",
")",
";",
"camelRouteAction",
".",
"setRouteIds",
"(",
"Arrays",
".",
"asList",
"(",
"routes",
")",
")",
";... | Stop these Camel routes. | [
"Stop",
"these",
"Camel",
"routes",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/builder/CamelRouteActionBuilder.java#L122-L128 | train |
citrusframework/citrus | modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/builder/CamelRouteActionBuilder.java | CamelRouteActionBuilder.remove | public void remove(String ... routes) {
RemoveCamelRouteAction camelRouteAction = new RemoveCamelRouteAction();
camelRouteAction.setRouteIds(Arrays.asList(routes));
camelRouteAction.setCamelContext(getCamelContext());
action.setDelegate(camelRouteAction);
} | java | public void remove(String ... routes) {
RemoveCamelRouteAction camelRouteAction = new RemoveCamelRouteAction();
camelRouteAction.setRouteIds(Arrays.asList(routes));
camelRouteAction.setCamelContext(getCamelContext());
action.setDelegate(camelRouteAction);
} | [
"public",
"void",
"remove",
"(",
"String",
"...",
"routes",
")",
"{",
"RemoveCamelRouteAction",
"camelRouteAction",
"=",
"new",
"RemoveCamelRouteAction",
"(",
")",
";",
"camelRouteAction",
".",
"setRouteIds",
"(",
"Arrays",
".",
"asList",
"(",
"routes",
")",
")"... | Remove these Camel routes. | [
"Remove",
"these",
"Camel",
"routes",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/builder/CamelRouteActionBuilder.java#L133-L139 | train |
citrusframework/citrus | modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/builder/CamelRouteActionBuilder.java | CamelRouteActionBuilder.getCamelContext | private ModelCamelContext getCamelContext() {
if (camelContext == null) {
Assert.notNull(applicationContext, "Citrus application context is not initialized!");
if (applicationContext.containsBean("citrusCamelContext")) {
camelContext = applicationContext.getBean("citrusCamelContext", M... | java | private ModelCamelContext getCamelContext() {
if (camelContext == null) {
Assert.notNull(applicationContext, "Citrus application context is not initialized!");
if (applicationContext.containsBean("citrusCamelContext")) {
camelContext = applicationContext.getBean("citrusCamelContext", M... | [
"private",
"ModelCamelContext",
"getCamelContext",
"(",
")",
"{",
"if",
"(",
"camelContext",
"==",
"null",
")",
"{",
"Assert",
".",
"notNull",
"(",
"applicationContext",
",",
"\"Citrus application context is not initialized!\"",
")",
";",
"if",
"(",
"applicationContex... | Gets the camel context either explicitly set before or default
context from Spring application context.
@return | [
"Gets",
"the",
"camel",
"context",
"either",
"explicitly",
"set",
"before",
"or",
"default",
"context",
"from",
"Spring",
"application",
"context",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/builder/CamelRouteActionBuilder.java#L155-L167 | train |
citrusframework/citrus | modules/citrus-http/src/main/java/com/consol/citrus/http/message/HttpMessageContentBuilder.java | HttpMessageContentBuilder.replaceHeaders | private void replaceHeaders(final Message from, final Message to) {
to.getHeaders().clear();
to.getHeaders().putAll(from.getHeaders());
} | java | private void replaceHeaders(final Message from, final Message to) {
to.getHeaders().clear();
to.getHeaders().putAll(from.getHeaders());
} | [
"private",
"void",
"replaceHeaders",
"(",
"final",
"Message",
"from",
",",
"final",
"Message",
"to",
")",
"{",
"to",
".",
"getHeaders",
"(",
")",
".",
"clear",
"(",
")",
";",
"to",
".",
"getHeaders",
"(",
")",
".",
"putAll",
"(",
"from",
".",
"getHea... | Replaces all headers
@param from The message to take the headers from
@param to The message to set the headers to | [
"Replaces",
"all",
"headers"
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-http/src/main/java/com/consol/citrus/http/message/HttpMessageContentBuilder.java#L82-L85 | train |
citrusframework/citrus | modules/citrus-ws/src/main/java/com/consol/citrus/ws/validation/AbstractSoapAttachmentValidator.java | AbstractSoapAttachmentValidator.findAttachment | protected SoapAttachment findAttachment(SoapMessage soapMessage, SoapAttachment controlAttachment) {
List<SoapAttachment> attachments = soapMessage.getAttachments();
Attachment matching = null;
if (controlAttachment.getContentId() == null) {
if (attachments.size() == 1) {
... | java | protected SoapAttachment findAttachment(SoapMessage soapMessage, SoapAttachment controlAttachment) {
List<SoapAttachment> attachments = soapMessage.getAttachments();
Attachment matching = null;
if (controlAttachment.getContentId() == null) {
if (attachments.size() == 1) {
... | [
"protected",
"SoapAttachment",
"findAttachment",
"(",
"SoapMessage",
"soapMessage",
",",
"SoapAttachment",
"controlAttachment",
")",
"{",
"List",
"<",
"SoapAttachment",
">",
"attachments",
"=",
"soapMessage",
".",
"getAttachments",
"(",
")",
";",
"Attachment",
"matchi... | Finds attachment in list of soap attachments on incoming soap message. By default
uses content id of control attachment as search key. If no proper attachment with this content id
was found in soap message throws validation exception.
@param soapMessage
@param controlAttachment
@return | [
"Finds",
"attachment",
"in",
"list",
"of",
"soap",
"attachments",
"on",
"incoming",
"soap",
"message",
".",
"By",
"default",
"uses",
"content",
"id",
"of",
"control",
"attachment",
"as",
"search",
"key",
".",
"If",
"no",
"proper",
"attachment",
"with",
"this... | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-ws/src/main/java/com/consol/citrus/ws/validation/AbstractSoapAttachmentValidator.java#L73-L98 | train |
citrusframework/citrus | modules/citrus-ws/src/main/java/com/consol/citrus/ws/validation/AbstractSoapAttachmentValidator.java | AbstractSoapAttachmentValidator.validateAttachmentContentId | protected void validateAttachmentContentId(SoapAttachment receivedAttachment, SoapAttachment controlAttachment) {
//in case contentId was not set in test case, skip validation
if (!StringUtils.hasText(controlAttachment.getContentId())) { return; }
if (receivedAttachment.getContentId() ... | java | protected void validateAttachmentContentId(SoapAttachment receivedAttachment, SoapAttachment controlAttachment) {
//in case contentId was not set in test case, skip validation
if (!StringUtils.hasText(controlAttachment.getContentId())) { return; }
if (receivedAttachment.getContentId() ... | [
"protected",
"void",
"validateAttachmentContentId",
"(",
"SoapAttachment",
"receivedAttachment",
",",
"SoapAttachment",
"controlAttachment",
")",
"{",
"//in case contentId was not set in test case, skip validation ",
"if",
"(",
"!",
"StringUtils",
".",
"hasText",
"(",
"controlA... | Validating SOAP attachment content id.
@param receivedAttachment
@param controlAttachment | [
"Validating",
"SOAP",
"attachment",
"content",
"id",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-ws/src/main/java/com/consol/citrus/ws/validation/AbstractSoapAttachmentValidator.java#L105-L127 | train |
citrusframework/citrus | modules/citrus-ws/src/main/java/com/consol/citrus/ws/validation/AbstractSoapAttachmentValidator.java | AbstractSoapAttachmentValidator.validateAttachmentContentType | protected void validateAttachmentContentType(SoapAttachment receivedAttachment, SoapAttachment controlAttachment) {
//in case contentType was not set in test case, skip validation
if (!StringUtils.hasText(controlAttachment.getContentType())) { return; }
if (receivedAttachment.getContent... | java | protected void validateAttachmentContentType(SoapAttachment receivedAttachment, SoapAttachment controlAttachment) {
//in case contentType was not set in test case, skip validation
if (!StringUtils.hasText(controlAttachment.getContentType())) { return; }
if (receivedAttachment.getContent... | [
"protected",
"void",
"validateAttachmentContentType",
"(",
"SoapAttachment",
"receivedAttachment",
",",
"SoapAttachment",
"controlAttachment",
")",
"{",
"//in case contentType was not set in test case, skip validation",
"if",
"(",
"!",
"StringUtils",
".",
"hasText",
"(",
"contr... | Validating SOAP attachment content type.
@param receivedAttachment
@param controlAttachment | [
"Validating",
"SOAP",
"attachment",
"content",
"type",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-ws/src/main/java/com/consol/citrus/ws/validation/AbstractSoapAttachmentValidator.java#L134-L156 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/xml/xpath/XPathUtils.java | XPathUtils.replaceDynamicNamespaces | public static String replaceDynamicNamespaces(String expression, Map<String, String> namespaces) {
String expressionResult = expression;
for (Entry<String, String> namespaceEntry : namespaces.entrySet()) {
if (expressionResult.contains(DYNAMIC_NS_START + namespaceEntry.getValue() + ... | java | public static String replaceDynamicNamespaces(String expression, Map<String, String> namespaces) {
String expressionResult = expression;
for (Entry<String, String> namespaceEntry : namespaces.entrySet()) {
if (expressionResult.contains(DYNAMIC_NS_START + namespaceEntry.getValue() + ... | [
"public",
"static",
"String",
"replaceDynamicNamespaces",
"(",
"String",
"expression",
",",
"Map",
"<",
"String",
",",
"String",
">",
"namespaces",
")",
"{",
"String",
"expressionResult",
"=",
"expression",
";",
"for",
"(",
"Entry",
"<",
"String",
",",
"String... | Replaces all dynamic namespaces in a XPath expression with respective prefixes
in namespace map.
XPath: <code>/{http://sample.org/foo}foo/{http://sample.org/bar}bar</code>
results in <code>/ns1:foo/ns2:bar</code> where the namespace map contains ns1 and ns2.
@param expression
@param namespaces
@return | [
"Replaces",
"all",
"dynamic",
"namespaces",
"in",
"a",
"XPath",
"expression",
"with",
"respective",
"prefixes",
"in",
"namespace",
"map",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/xml/xpath/XPathUtils.java#L93-L104 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/xml/xpath/XPathUtils.java | XPathUtils.evaluate | public static Object evaluate(Node node, String xPathExpression,
NamespaceContext nsContext, XPathExpressionResult resultType) {
if (resultType.equals(XPathExpressionResult.NODE)) {
Node resultNode = evaluateAsNode(node, xPathExpression, nsContext);
if (resultNode.getNodeTyp... | java | public static Object evaluate(Node node, String xPathExpression,
NamespaceContext nsContext, XPathExpressionResult resultType) {
if (resultType.equals(XPathExpressionResult.NODE)) {
Node resultNode = evaluateAsNode(node, xPathExpression, nsContext);
if (resultNode.getNodeTyp... | [
"public",
"static",
"Object",
"evaluate",
"(",
"Node",
"node",
",",
"String",
"xPathExpression",
",",
"NamespaceContext",
"nsContext",
",",
"XPathExpressionResult",
"resultType",
")",
"{",
"if",
"(",
"resultType",
".",
"equals",
"(",
"XPathExpressionResult",
".",
... | Evaluate XPath expression as String result type regardless
what actual result type the expression will evaluate to.
@param node
@param xPathExpression
@param nsContext
@param resultType
@return | [
"Evaluate",
"XPath",
"expression",
"as",
"String",
"result",
"type",
"regardless",
"what",
"actual",
"result",
"type",
"the",
"expression",
"will",
"evaluate",
"to",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/xml/xpath/XPathUtils.java#L124-L172 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/xml/xpath/XPathUtils.java | XPathUtils.evaluateAsNode | public static Node evaluateAsNode(Node node, String xPathExpression, NamespaceContext nsContext) {
Node result = (Node) evaluateExpression(node, xPathExpression, nsContext, XPathConstants.NODE);
if (result == null) {
throw new CitrusRuntimeException("No result for XPath expression: '" + xPa... | java | public static Node evaluateAsNode(Node node, String xPathExpression, NamespaceContext nsContext) {
Node result = (Node) evaluateExpression(node, xPathExpression, nsContext, XPathConstants.NODE);
if (result == null) {
throw new CitrusRuntimeException("No result for XPath expression: '" + xPa... | [
"public",
"static",
"Node",
"evaluateAsNode",
"(",
"Node",
"node",
",",
"String",
"xPathExpression",
",",
"NamespaceContext",
"nsContext",
")",
"{",
"Node",
"result",
"=",
"(",
"Node",
")",
"evaluateExpression",
"(",
"node",
",",
"xPathExpression",
",",
"nsConte... | Evaluate XPath expression with result type Node.
@param node
@param xPathExpression
@param nsContext
@return | [
"Evaluate",
"XPath",
"expression",
"with",
"result",
"type",
"Node",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/xml/xpath/XPathUtils.java#L181-L189 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/xml/xpath/XPathUtils.java | XPathUtils.evaluateAsNodeList | public static NodeList evaluateAsNodeList(Node node, String xPathExpression, NamespaceContext nsContext) {
NodeList result = (NodeList) evaluateExpression(node, xPathExpression, nsContext, XPathConstants.NODESET);
if (result == null) {
throw new CitrusRuntimeException("No result for XPath e... | java | public static NodeList evaluateAsNodeList(Node node, String xPathExpression, NamespaceContext nsContext) {
NodeList result = (NodeList) evaluateExpression(node, xPathExpression, nsContext, XPathConstants.NODESET);
if (result == null) {
throw new CitrusRuntimeException("No result for XPath e... | [
"public",
"static",
"NodeList",
"evaluateAsNodeList",
"(",
"Node",
"node",
",",
"String",
"xPathExpression",
",",
"NamespaceContext",
"nsContext",
")",
"{",
"NodeList",
"result",
"=",
"(",
"NodeList",
")",
"evaluateExpression",
"(",
"node",
",",
"xPathExpression",
... | Evaluate XPath expression with result type NodeList.
@param node
@param xPathExpression
@param nsContext
@return | [
"Evaluate",
"XPath",
"expression",
"with",
"result",
"type",
"NodeList",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/xml/xpath/XPathUtils.java#L198-L206 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/xml/xpath/XPathUtils.java | XPathUtils.evaluateAsString | public static String evaluateAsString(Node node, String xPathExpression, NamespaceContext nsContext) {
String result = (String) evaluateExpression(node, xPathExpression, nsContext, XPathConstants.STRING);
if (!StringUtils.hasText(result)) {
//result is empty so check if the expression node ... | java | public static String evaluateAsString(Node node, String xPathExpression, NamespaceContext nsContext) {
String result = (String) evaluateExpression(node, xPathExpression, nsContext, XPathConstants.STRING);
if (!StringUtils.hasText(result)) {
//result is empty so check if the expression node ... | [
"public",
"static",
"String",
"evaluateAsString",
"(",
"Node",
"node",
",",
"String",
"xPathExpression",
",",
"NamespaceContext",
"nsContext",
")",
"{",
"String",
"result",
"=",
"(",
"String",
")",
"evaluateExpression",
"(",
"node",
",",
"xPathExpression",
",",
... | Evaluate XPath expression with result type String.
@param node
@param xPathExpression
@param nsContext
@return | [
"Evaluate",
"XPath",
"expression",
"with",
"result",
"type",
"String",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/xml/xpath/XPathUtils.java#L215-L225 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/xml/xpath/XPathUtils.java | XPathUtils.evaluateAsBoolean | public static Boolean evaluateAsBoolean(Node node, String xPathExpression, NamespaceContext nsContext) {
return (Boolean) evaluateExpression(node, xPathExpression, nsContext, XPathConstants.BOOLEAN);
} | java | public static Boolean evaluateAsBoolean(Node node, String xPathExpression, NamespaceContext nsContext) {
return (Boolean) evaluateExpression(node, xPathExpression, nsContext, XPathConstants.BOOLEAN);
} | [
"public",
"static",
"Boolean",
"evaluateAsBoolean",
"(",
"Node",
"node",
",",
"String",
"xPathExpression",
",",
"NamespaceContext",
"nsContext",
")",
"{",
"return",
"(",
"Boolean",
")",
"evaluateExpression",
"(",
"node",
",",
"xPathExpression",
",",
"nsContext",
"... | Evaluate XPath expression with result type Boolean value.
@param node
@param xPathExpression
@param nsContext
@return | [
"Evaluate",
"XPath",
"expression",
"with",
"result",
"type",
"Boolean",
"value",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/xml/xpath/XPathUtils.java#L234-L236 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/xml/xpath/XPathUtils.java | XPathUtils.evaluateAsNumber | public static Double evaluateAsNumber(Node node, String xPathExpression, NamespaceContext nsContext) {
return (Double) evaluateExpression(node, xPathExpression, nsContext, XPathConstants.NUMBER);
} | java | public static Double evaluateAsNumber(Node node, String xPathExpression, NamespaceContext nsContext) {
return (Double) evaluateExpression(node, xPathExpression, nsContext, XPathConstants.NUMBER);
} | [
"public",
"static",
"Double",
"evaluateAsNumber",
"(",
"Node",
"node",
",",
"String",
"xPathExpression",
",",
"NamespaceContext",
"nsContext",
")",
"{",
"return",
"(",
"Double",
")",
"evaluateExpression",
"(",
"node",
",",
"xPathExpression",
",",
"nsContext",
",",... | Evaluate XPath expression with result type Number.
@param node
@param xPathExpression
@param nsContext
@return | [
"Evaluate",
"XPath",
"expression",
"with",
"result",
"type",
"Number",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/xml/xpath/XPathUtils.java#L245-L247 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/xml/xpath/XPathUtils.java | XPathUtils.evaluateAsObject | public static Object evaluateAsObject(Node node, String xPathExpression, NamespaceContext nsContext, QName resultType) {
return evaluateExpression(node, xPathExpression, nsContext, resultType);
} | java | public static Object evaluateAsObject(Node node, String xPathExpression, NamespaceContext nsContext, QName resultType) {
return evaluateExpression(node, xPathExpression, nsContext, resultType);
} | [
"public",
"static",
"Object",
"evaluateAsObject",
"(",
"Node",
"node",
",",
"String",
"xPathExpression",
",",
"NamespaceContext",
"nsContext",
",",
"QName",
"resultType",
")",
"{",
"return",
"evaluateExpression",
"(",
"node",
",",
"xPathExpression",
",",
"nsContext"... | Evaluate XPath expression.
@param node
@param xPathExpression
@param nsContext
@return | [
"Evaluate",
"XPath",
"expression",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/xml/xpath/XPathUtils.java#L256-L258 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/xml/xpath/XPathUtils.java | XPathUtils.buildExpression | private static XPathExpression buildExpression(String xPathExpression, NamespaceContext nsContext)
throws XPathExpressionException {
XPath xpath = createXPathFactory().newXPath();
if (nsContext != null) {
xpath.setNamespaceContext(nsContext);
}
return xp... | java | private static XPathExpression buildExpression(String xPathExpression, NamespaceContext nsContext)
throws XPathExpressionException {
XPath xpath = createXPathFactory().newXPath();
if (nsContext != null) {
xpath.setNamespaceContext(nsContext);
}
return xp... | [
"private",
"static",
"XPathExpression",
"buildExpression",
"(",
"String",
"xPathExpression",
",",
"NamespaceContext",
"nsContext",
")",
"throws",
"XPathExpressionException",
"{",
"XPath",
"xpath",
"=",
"createXPathFactory",
"(",
")",
".",
"newXPath",
"(",
")",
";",
... | Construct a xPath expression instance with given expression string and namespace context.
If namespace context is not specified a default context is built from the XML node
that is evaluated against.
@param xPathExpression
@param nsContext
@return
@throws XPathExpressionException | [
"Construct",
"a",
"xPath",
"expression",
"instance",
"with",
"given",
"expression",
"string",
"and",
"namespace",
"context",
".",
"If",
"namespace",
"context",
"is",
"not",
"specified",
"a",
"default",
"context",
"is",
"built",
"from",
"the",
"XML",
"node",
"t... | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/xml/xpath/XPathUtils.java#L269-L278 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/xml/xpath/XPathUtils.java | XPathUtils.evaluateExpression | public static Object evaluateExpression(Node node, String xPathExpression, NamespaceContext nsContext, QName returnType) {
try {
return buildExpression(xPathExpression, nsContext).evaluate(node, returnType);
} catch (XPathExpressionException e) {
throw new CitrusRuntimeException(... | java | public static Object evaluateExpression(Node node, String xPathExpression, NamespaceContext nsContext, QName returnType) {
try {
return buildExpression(xPathExpression, nsContext).evaluate(node, returnType);
} catch (XPathExpressionException e) {
throw new CitrusRuntimeException(... | [
"public",
"static",
"Object",
"evaluateExpression",
"(",
"Node",
"node",
",",
"String",
"xPathExpression",
",",
"NamespaceContext",
"nsContext",
",",
"QName",
"returnType",
")",
"{",
"try",
"{",
"return",
"buildExpression",
"(",
"xPathExpression",
",",
"nsContext",
... | Evaluates the expression.
@param node the node.
@param xPathExpression the expression.
@param nsContext the context.
@param returnType
@return the result. | [
"Evaluates",
"the",
"expression",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/xml/xpath/XPathUtils.java#L298-L304 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/xml/xpath/XPathUtils.java | XPathUtils.createXPathFactory | private synchronized static XPathFactory createXPathFactory() {
XPathFactory factory = null;
// read system property and see if there is a factory set
Properties properties = System.getProperties();
for (Map.Entry<Object, Object> prop : properties.entrySet()) {
String key = ... | java | private synchronized static XPathFactory createXPathFactory() {
XPathFactory factory = null;
// read system property and see if there is a factory set
Properties properties = System.getProperties();
for (Map.Entry<Object, Object> prop : properties.entrySet()) {
String key = ... | [
"private",
"synchronized",
"static",
"XPathFactory",
"createXPathFactory",
"(",
")",
"{",
"XPathFactory",
"factory",
"=",
"null",
";",
"// read system property and see if there is a factory set",
"Properties",
"properties",
"=",
"System",
".",
"getProperties",
"(",
")",
"... | Creates new xpath factory which is not thread safe per definition.
@return | [
"Creates",
"new",
"xpath",
"factory",
"which",
"is",
"not",
"thread",
"safe",
"per",
"definition",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/xml/xpath/XPathUtils.java#L310-L337 | train |
citrusframework/citrus | modules/citrus-rmi/src/main/java/com/consol/citrus/rmi/endpoint/RmiEndpointConfiguration.java | RmiEndpointConfiguration.getRegistry | public Registry getRegistry() throws RemoteException {
if (registry == null) {
if (StringUtils.hasText(host)) {
registry = LocateRegistry.getRegistry(host, port);
} else {
registry = LocateRegistry.getRegistry(port);
}
}
return... | java | public Registry getRegistry() throws RemoteException {
if (registry == null) {
if (StringUtils.hasText(host)) {
registry = LocateRegistry.getRegistry(host, port);
} else {
registry = LocateRegistry.getRegistry(port);
}
}
return... | [
"public",
"Registry",
"getRegistry",
"(",
")",
"throws",
"RemoteException",
"{",
"if",
"(",
"registry",
"==",
"null",
")",
"{",
"if",
"(",
"StringUtils",
".",
"hasText",
"(",
"host",
")",
")",
"{",
"registry",
"=",
"LocateRegistry",
".",
"getRegistry",
"("... | Gets the RMI registry based on host and port settings in this configuration.
@return
@throws RemoteException | [
"Gets",
"the",
"RMI",
"registry",
"based",
"on",
"host",
"and",
"port",
"settings",
"in",
"this",
"configuration",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-rmi/src/main/java/com/consol/citrus/rmi/endpoint/RmiEndpointConfiguration.java#L69-L79 | train |
citrusframework/citrus | modules/citrus-arquillian/src/main/java/com/consol/citrus/arquillian/shrinkwrap/CitrusArchiveBuilder.java | CitrusArchiveBuilder.build | public File[] build() {
MavenStrategyStage maven = Maven.configureResolver()
.workOffline(offline)
.resolve(artifactCoordinates);
return applyTransitivity(maven).asFile();
} | java | public File[] build() {
MavenStrategyStage maven = Maven.configureResolver()
.workOffline(offline)
.resolve(artifactCoordinates);
return applyTransitivity(maven).asFile();
} | [
"public",
"File",
"[",
"]",
"build",
"(",
")",
"{",
"MavenStrategyStage",
"maven",
"=",
"Maven",
".",
"configureResolver",
"(",
")",
".",
"workOffline",
"(",
"offline",
")",
".",
"resolve",
"(",
"artifactCoordinates",
")",
";",
"return",
"applyTransitivity",
... | Resolve artifacts for given coordinates.
@return | [
"Resolve",
"artifacts",
"for",
"given",
"coordinates",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-arquillian/src/main/java/com/consol/citrus/arquillian/shrinkwrap/CitrusArchiveBuilder.java#L83-L89 | train |
citrusframework/citrus | modules/citrus-arquillian/src/main/java/com/consol/citrus/arquillian/shrinkwrap/CitrusArchiveBuilder.java | CitrusArchiveBuilder.all | public CitrusArchiveBuilder all() {
core();
jms();
kafka();
jdbc();
http();
websocket();
ws();
ssh();
ftp();
mail();
camel();
vertx();
docker();
kubernetes();
selenium();
cucumber();
z... | java | public CitrusArchiveBuilder all() {
core();
jms();
kafka();
jdbc();
http();
websocket();
ws();
ssh();
ftp();
mail();
camel();
vertx();
docker();
kubernetes();
selenium();
cucumber();
z... | [
"public",
"CitrusArchiveBuilder",
"all",
"(",
")",
"{",
"core",
"(",
")",
";",
"jms",
"(",
")",
";",
"kafka",
"(",
")",
";",
"jdbc",
"(",
")",
";",
"http",
"(",
")",
";",
"websocket",
"(",
")",
";",
"ws",
"(",
")",
";",
"ssh",
"(",
")",
";",
... | Gets the complete Citrus stack as resolved Maven dependency set.
@return | [
"Gets",
"the",
"complete",
"Citrus",
"stack",
"as",
"resolved",
"Maven",
"dependency",
"set",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-arquillian/src/main/java/com/consol/citrus/arquillian/shrinkwrap/CitrusArchiveBuilder.java#L95-L119 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/report/AbstractOutputFileReporter.java | AbstractOutputFileReporter.createReportFile | private void createReportFile(String reportFileName, String content) {
File targetDirectory = new File(getReportDirectory());
if (!targetDirectory.exists()) {
if (!targetDirectory.mkdirs()) {
throw new CitrusRuntimeException("Unable to create report output directory: " + getR... | java | private void createReportFile(String reportFileName, String content) {
File targetDirectory = new File(getReportDirectory());
if (!targetDirectory.exists()) {
if (!targetDirectory.mkdirs()) {
throw new CitrusRuntimeException("Unable to create report output directory: " + getR... | [
"private",
"void",
"createReportFile",
"(",
"String",
"reportFileName",
",",
"String",
"content",
")",
"{",
"File",
"targetDirectory",
"=",
"new",
"File",
"(",
"getReportDirectory",
"(",
")",
")",
";",
"if",
"(",
"!",
"targetDirectory",
".",
"exists",
"(",
"... | Creates the HTML report file
@param reportFileName The report file to write
@param content The String content of the report file | [
"Creates",
"the",
"HTML",
"report",
"file"
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/report/AbstractOutputFileReporter.java#L54-L69 | train |
citrusframework/citrus | modules/citrus-cucumber/src/main/java/com/consol/citrus/cucumber/step/runner/selenium/SeleniumSteps.java | SeleniumSteps.verifyPage | private void verifyPage(String pageId) {
if (!pages.containsKey(pageId)) {
throw new CitrusRuntimeException(String.format("Unknown page '%s' - please introduce page with type information first", pageId));
}
} | java | private void verifyPage(String pageId) {
if (!pages.containsKey(pageId)) {
throw new CitrusRuntimeException(String.format("Unknown page '%s' - please introduce page with type information first", pageId));
}
} | [
"private",
"void",
"verifyPage",
"(",
"String",
"pageId",
")",
"{",
"if",
"(",
"!",
"pages",
".",
"containsKey",
"(",
"pageId",
")",
")",
"{",
"throw",
"new",
"CitrusRuntimeException",
"(",
"String",
".",
"format",
"(",
"\"Unknown page '%s' - please introduce pa... | Verify that page is known.
@param pageId | [
"Verify",
"that",
"page",
"is",
"known",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-cucumber/src/main/java/com/consol/citrus/cucumber/step/runner/selenium/SeleniumSteps.java#L252-L256 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/main/CitrusAppOptions.java | CitrusAppOptions.apply | public static <T extends CitrusAppConfiguration> T apply(T configuration, String[] arguments) {
LinkedList<String> args = new LinkedList<>(Arrays.asList(arguments));
CitrusAppOptions options = new CitrusAppOptions();
while (!args.isEmpty()) {
String arg = args.removeFirst();
... | java | public static <T extends CitrusAppConfiguration> T apply(T configuration, String[] arguments) {
LinkedList<String> args = new LinkedList<>(Arrays.asList(arguments));
CitrusAppOptions options = new CitrusAppOptions();
while (!args.isEmpty()) {
String arg = args.removeFirst();
... | [
"public",
"static",
"<",
"T",
"extends",
"CitrusAppConfiguration",
">",
"T",
"apply",
"(",
"T",
"configuration",
",",
"String",
"[",
"]",
"arguments",
")",
"{",
"LinkedList",
"<",
"String",
">",
"args",
"=",
"new",
"LinkedList",
"<>",
"(",
"Arrays",
".",
... | Apply options based on given argument line.
@param configuration
@param arguments | [
"Apply",
"options",
"based",
"on",
"given",
"argument",
"line",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/main/CitrusAppOptions.java#L179-L194 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/config/xml/AbstractDataDictionaryParser.java | AbstractDataDictionaryParser.parseMappingDefinitions | private void parseMappingDefinitions(BeanDefinitionBuilder builder, Element element) {
HashMap<String, String> mappings = new HashMap<String, String>();
for (Element matcher : DomUtils.getChildElementsByTagName(element, "mapping")) {
mappings.put(matcher.getAttribute("path"), matcher.getAttr... | java | private void parseMappingDefinitions(BeanDefinitionBuilder builder, Element element) {
HashMap<String, String> mappings = new HashMap<String, String>();
for (Element matcher : DomUtils.getChildElementsByTagName(element, "mapping")) {
mappings.put(matcher.getAttribute("path"), matcher.getAttr... | [
"private",
"void",
"parseMappingDefinitions",
"(",
"BeanDefinitionBuilder",
"builder",
",",
"Element",
"element",
")",
"{",
"HashMap",
"<",
"String",
",",
"String",
">",
"mappings",
"=",
"new",
"HashMap",
"<",
"String",
",",
"String",
">",
"(",
")",
";",
"fo... | Parses all mapping definitions and adds those to the bean definition
builder as property value.
@param builder the target bean definition builder.
@param element the source element. | [
"Parses",
"all",
"mapping",
"definitions",
"and",
"adds",
"those",
"to",
"the",
"bean",
"definition",
"builder",
"as",
"property",
"value",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/config/xml/AbstractDataDictionaryParser.java#L67-L76 | train |
citrusframework/citrus | tools/remote/citrus-remote-server/src/main/java/com/consol/citrus/remote/CitrusRemoteApplication.java | CitrusRemoteApplication.getJUnitReportsFolder | private String getJUnitReportsFolder() {
if (ClassUtils.isPresent("org.testng.annotations.Test", getClass().getClassLoader())) {
return "test-output" + File.separator + "junitreports";
} else if (ClassUtils.isPresent("org.junit.Test", getClass().getClassLoader())) {
JUnitReporter... | java | private String getJUnitReportsFolder() {
if (ClassUtils.isPresent("org.testng.annotations.Test", getClass().getClassLoader())) {
return "test-output" + File.separator + "junitreports";
} else if (ClassUtils.isPresent("org.junit.Test", getClass().getClassLoader())) {
JUnitReporter... | [
"private",
"String",
"getJUnitReportsFolder",
"(",
")",
"{",
"if",
"(",
"ClassUtils",
".",
"isPresent",
"(",
"\"org.testng.annotations.Test\"",
",",
"getClass",
"(",
")",
".",
"getClassLoader",
"(",
")",
")",
")",
"{",
"return",
"\"test-output\"",
"+",
"File",
... | Find reports folder based in unit testing framework present on classpath.
@return | [
"Find",
"reports",
"folder",
"based",
"in",
"unit",
"testing",
"framework",
"present",
"on",
"classpath",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/tools/remote/citrus-remote-server/src/main/java/com/consol/citrus/remote/CitrusRemoteApplication.java#L259-L268 | train |
citrusframework/citrus | modules/citrus-kubernetes/src/main/java/com/consol/citrus/kubernetes/endpoint/KubernetesEndpointConfiguration.java | KubernetesEndpointConfiguration.getKubernetesClient | public io.fabric8.kubernetes.client.KubernetesClient getKubernetesClient() {
if (kubernetesClient == null) {
kubernetesClient = createKubernetesClient();
}
return kubernetesClient;
} | java | public io.fabric8.kubernetes.client.KubernetesClient getKubernetesClient() {
if (kubernetesClient == null) {
kubernetesClient = createKubernetesClient();
}
return kubernetesClient;
} | [
"public",
"io",
".",
"fabric8",
".",
"kubernetes",
".",
"client",
".",
"KubernetesClient",
"getKubernetesClient",
"(",
")",
"{",
"if",
"(",
"kubernetesClient",
"==",
"null",
")",
"{",
"kubernetesClient",
"=",
"createKubernetesClient",
"(",
")",
";",
"}",
"retu... | Constructs or gets the kubernetes client implementation.
@return | [
"Constructs",
"or",
"gets",
"the",
"kubernetes",
"client",
"implementation",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-kubernetes/src/main/java/com/consol/citrus/kubernetes/endpoint/KubernetesEndpointConfiguration.java#L59-L65 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/report/HtmlReporter.java | HtmlReporter.getLogoImageData | private String getLogoImageData() {
ByteArrayOutputStream os = new ByteArrayOutputStream();
BufferedInputStream reader = null;
try {
reader = new BufferedInputStream(FileUtils.getFileResource(logo).getInputStream());
byte[] contents = new byte[1024];... | java | private String getLogoImageData() {
ByteArrayOutputStream os = new ByteArrayOutputStream();
BufferedInputStream reader = null;
try {
reader = new BufferedInputStream(FileUtils.getFileResource(logo).getInputStream());
byte[] contents = new byte[1024];... | [
"private",
"String",
"getLogoImageData",
"(",
")",
"{",
"ByteArrayOutputStream",
"os",
"=",
"new",
"ByteArrayOutputStream",
"(",
")",
";",
"BufferedInputStream",
"reader",
"=",
"null",
";",
"try",
"{",
"reader",
"=",
"new",
"BufferedInputStream",
"(",
"FileUtils",... | Reads citrus logo png image and converts to base64 encoded string for inline HTML image display.
@return
@throws IOException | [
"Reads",
"citrus",
"logo",
"png",
"image",
"and",
"converts",
"to",
"base64",
"encoded",
"string",
"for",
"inline",
"HTML",
"image",
"display",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/report/HtmlReporter.java#L127-L157 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/report/HtmlReporter.java | HtmlReporter.getCodeSnippetHtml | private String getCodeSnippetHtml(Throwable cause) {
StringBuilder codeSnippet = new StringBuilder();
BufferedReader reader = null;
try {
if (cause instanceof CitrusRuntimeException) {
CitrusRuntimeException ex = (CitrusRuntimeException) cause;
... | java | private String getCodeSnippetHtml(Throwable cause) {
StringBuilder codeSnippet = new StringBuilder();
BufferedReader reader = null;
try {
if (cause instanceof CitrusRuntimeException) {
CitrusRuntimeException ex = (CitrusRuntimeException) cause;
... | [
"private",
"String",
"getCodeSnippetHtml",
"(",
"Throwable",
"cause",
")",
"{",
"StringBuilder",
"codeSnippet",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"BufferedReader",
"reader",
"=",
"null",
";",
"try",
"{",
"if",
"(",
"cause",
"instanceof",
"CitrusRuntime... | Gets the code section from test case XML which is responsible for the
error.
@param cause the error cause.
@return | [
"Gets",
"the",
"code",
"section",
"from",
"test",
"case",
"XML",
"which",
"is",
"responsible",
"for",
"the",
"error",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/report/HtmlReporter.java#L165-L224 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/report/HtmlReporter.java | HtmlReporter.getStackTraceHtml | private String getStackTraceHtml(Throwable cause) {
StringBuilder stackTraceBuilder = new StringBuilder();
stackTraceBuilder.append(cause.getClass().getName())
.append(": ")
.append(cause.getMessage())
.append("\n ");
for (i... | java | private String getStackTraceHtml(Throwable cause) {
StringBuilder stackTraceBuilder = new StringBuilder();
stackTraceBuilder.append(cause.getClass().getName())
.append(": ")
.append(cause.getMessage())
.append("\n ");
for (i... | [
"private",
"String",
"getStackTraceHtml",
"(",
"Throwable",
"cause",
")",
"{",
"StringBuilder",
"stackTraceBuilder",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"stackTraceBuilder",
".",
"append",
"(",
"cause",
".",
"getClass",
"(",
")",
".",
"getName",
"(",
"... | Construct HTML code snippet for stack trace information.
@param cause the causing error.
@return | [
"Construct",
"HTML",
"code",
"snippet",
"for",
"stack",
"trace",
"information",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/report/HtmlReporter.java#L231-L245 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/validation/xml/DomXmlMessageValidator.java | DomXmlMessageValidator.validateNamespaces | protected void validateNamespaces(Map<String, String> expectedNamespaces, Message receivedMessage) {
if (CollectionUtils.isEmpty(expectedNamespaces)) { return; }
if (receivedMessage.getPayload() == null || !StringUtils.hasText(receivedMessage.getPayload(String.class))) {
throw new Validatio... | java | protected void validateNamespaces(Map<String, String> expectedNamespaces, Message receivedMessage) {
if (CollectionUtils.isEmpty(expectedNamespaces)) { return; }
if (receivedMessage.getPayload() == null || !StringUtils.hasText(receivedMessage.getPayload(String.class))) {
throw new Validatio... | [
"protected",
"void",
"validateNamespaces",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"expectedNamespaces",
",",
"Message",
"receivedMessage",
")",
"{",
"if",
"(",
"CollectionUtils",
".",
"isEmpty",
"(",
"expectedNamespaces",
")",
")",
"{",
"return",
";",
... | Validate namespaces in message. The method compares namespace declarations in the root
element of the received message to expected namespaces. Prefixes are important too, so
differing namespace prefixes will fail the validation.
@param expectedNamespaces
@param receivedMessage | [
"Validate",
"namespaces",
"in",
"message",
".",
"The",
"method",
"compares",
"namespace",
"declarations",
"in",
"the",
"root",
"element",
"of",
"the",
"received",
"message",
"to",
"expected",
"namespaces",
".",
"Prefixes",
"are",
"important",
"too",
"so",
"diffe... | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/validation/xml/DomXmlMessageValidator.java#L241-L282 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/validation/xml/DomXmlMessageValidator.java | DomXmlMessageValidator.validateMessageContent | protected void validateMessageContent(Message receivedMessage, Message controlMessage, XmlMessageValidationContext validationContext,
TestContext context) {
if (controlMessage == null || controlMessage.getPayload() == null) {
log.debug("Skip message payload validation as no control messa... | java | protected void validateMessageContent(Message receivedMessage, Message controlMessage, XmlMessageValidationContext validationContext,
TestContext context) {
if (controlMessage == null || controlMessage.getPayload() == null) {
log.debug("Skip message payload validation as no control messa... | [
"protected",
"void",
"validateMessageContent",
"(",
"Message",
"receivedMessage",
",",
"Message",
"controlMessage",
",",
"XmlMessageValidationContext",
"validationContext",
",",
"TestContext",
"context",
")",
"{",
"if",
"(",
"controlMessage",
"==",
"null",
"||",
"contro... | Validate message payloads by comparing to a control message.
@param receivedMessage
@param validationContext
@param context | [
"Validate",
"message",
"payloads",
"by",
"comparing",
"to",
"a",
"control",
"message",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/validation/xml/DomXmlMessageValidator.java#L322-L360 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/validation/xml/DomXmlMessageValidator.java | DomXmlMessageValidator.validateXmlHeaderFragment | private void validateXmlHeaderFragment(String receivedHeaderData, String controlHeaderData,
XmlMessageValidationContext validationContext, TestContext context) {
log.debug("Start XML header data validation ...");
Document received = XMLUtils.parseMessagePayload(receivedHeaderData);
... | java | private void validateXmlHeaderFragment(String receivedHeaderData, String controlHeaderData,
XmlMessageValidationContext validationContext, TestContext context) {
log.debug("Start XML header data validation ...");
Document received = XMLUtils.parseMessagePayload(receivedHeaderData);
... | [
"private",
"void",
"validateXmlHeaderFragment",
"(",
"String",
"receivedHeaderData",
",",
"String",
"controlHeaderData",
",",
"XmlMessageValidationContext",
"validationContext",
",",
"TestContext",
"context",
")",
"{",
"log",
".",
"debug",
"(",
"\"Start XML header data vali... | Validates XML header fragment data.
@param receivedHeaderData
@param controlHeaderData
@param validationContext
@param context | [
"Validates",
"XML",
"header",
"fragment",
"data",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/validation/xml/DomXmlMessageValidator.java#L369-L387 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/validation/xml/DomXmlMessageValidator.java | DomXmlMessageValidator.validateXmlTree | private void validateXmlTree(Node received, Node source,
XmlMessageValidationContext validationContext, NamespaceContext namespaceContext, TestContext context) {
switch(received.getNodeType()) {
case Node.DOCUMENT_TYPE_NODE:
doDocumentTypeDefinition(received, source, val... | java | private void validateXmlTree(Node received, Node source,
XmlMessageValidationContext validationContext, NamespaceContext namespaceContext, TestContext context) {
switch(received.getNodeType()) {
case Node.DOCUMENT_TYPE_NODE:
doDocumentTypeDefinition(received, source, val... | [
"private",
"void",
"validateXmlTree",
"(",
"Node",
"received",
",",
"Node",
"source",
",",
"XmlMessageValidationContext",
"validationContext",
",",
"NamespaceContext",
"namespaceContext",
",",
"TestContext",
"context",
")",
"{",
"switch",
"(",
"received",
".",
"getNod... | Walk the XML tree and validate all nodes.
@param received
@param source
@param validationContext | [
"Walk",
"the",
"XML",
"tree",
"and",
"validate",
"all",
"nodes",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/validation/xml/DomXmlMessageValidator.java#L396-L419 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/validation/xml/DomXmlMessageValidator.java | DomXmlMessageValidator.doDocumentTypeDefinition | private void doDocumentTypeDefinition(Node received, Node source,
XmlMessageValidationContext validationContext,
NamespaceContext namespaceContext, TestContext context) {
Assert.isTrue(source instanceof DocumentType, "Missing document type definition in expected xml fragment");
... | java | private void doDocumentTypeDefinition(Node received, Node source,
XmlMessageValidationContext validationContext,
NamespaceContext namespaceContext, TestContext context) {
Assert.isTrue(source instanceof DocumentType, "Missing document type definition in expected xml fragment");
... | [
"private",
"void",
"doDocumentTypeDefinition",
"(",
"Node",
"received",
",",
"Node",
"source",
",",
"XmlMessageValidationContext",
"validationContext",
",",
"NamespaceContext",
"namespaceContext",
",",
"TestContext",
"context",
")",
"{",
"Assert",
".",
"isTrue",
"(",
... | Handle document type definition with validation of publicId and systemId.
@param received
@param source
@param validationContext
@param namespaceContext | [
"Handle",
"document",
"type",
"definition",
"with",
"validation",
"of",
"publicId",
"and",
"systemId",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/validation/xml/DomXmlMessageValidator.java#L428-L476 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/validation/xml/DomXmlMessageValidator.java | DomXmlMessageValidator.doElement | private void doElement(Node received, Node source,
XmlMessageValidationContext validationContext, NamespaceContext namespaceContext, TestContext context) {
doElementNameValidation(received, source);
doElementNamespaceValidation(received, source);
//check if element is ignored eith... | java | private void doElement(Node received, Node source,
XmlMessageValidationContext validationContext, NamespaceContext namespaceContext, TestContext context) {
doElementNameValidation(received, source);
doElementNamespaceValidation(received, source);
//check if element is ignored eith... | [
"private",
"void",
"doElement",
"(",
"Node",
"received",
",",
"Node",
"source",
",",
"XmlMessageValidationContext",
"validationContext",
",",
"NamespaceContext",
"namespaceContext",
",",
"TestContext",
"context",
")",
"{",
"doElementNameValidation",
"(",
"received",
","... | Handle element node.
@param received
@param source
@param validationContext | [
"Handle",
"element",
"node",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/validation/xml/DomXmlMessageValidator.java#L485-L540 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/validation/xml/DomXmlMessageValidator.java | DomXmlMessageValidator.doText | private void doText(Element received, Element source) {
if (log.isDebugEnabled()) {
log.debug("Validating node value for element: " + received.getLocalName());
}
String receivedText = DomUtils.getTextValue(received);
String sourceText = DomUtils.getTextValue(source);
... | java | private void doText(Element received, Element source) {
if (log.isDebugEnabled()) {
log.debug("Validating node value for element: " + received.getLocalName());
}
String receivedText = DomUtils.getTextValue(received);
String sourceText = DomUtils.getTextValue(source);
... | [
"private",
"void",
"doText",
"(",
"Element",
"received",
",",
"Element",
"source",
")",
"{",
"if",
"(",
"log",
".",
"isDebugEnabled",
"(",
")",
")",
"{",
"log",
".",
"debug",
"(",
"\"Validating node value for element: \"",
"+",
"received",
".",
"getLocalName",... | Handle text node during validation.
@param received
@param source | [
"Handle",
"text",
"node",
"during",
"validation",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/validation/xml/DomXmlMessageValidator.java#L548-L574 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/validation/xml/DomXmlMessageValidator.java | DomXmlMessageValidator.doAttribute | private void doAttribute(Node receivedElement, Node receivedAttribute, Node sourceElement,
XmlMessageValidationContext validationContext, NamespaceContext namespaceContext, TestContext context) {
if (receivedAttribute.getNodeName().startsWith(XMLConstants.XMLNS_ATTRIBUTE)) { return; }
Strin... | java | private void doAttribute(Node receivedElement, Node receivedAttribute, Node sourceElement,
XmlMessageValidationContext validationContext, NamespaceContext namespaceContext, TestContext context) {
if (receivedAttribute.getNodeName().startsWith(XMLConstants.XMLNS_ATTRIBUTE)) { return; }
Strin... | [
"private",
"void",
"doAttribute",
"(",
"Node",
"receivedElement",
",",
"Node",
"receivedAttribute",
",",
"Node",
"sourceElement",
",",
"XmlMessageValidationContext",
"validationContext",
",",
"NamespaceContext",
"namespaceContext",
",",
"TestContext",
"context",
")",
"{",... | Handle attribute node during validation.
@param receivedElement
@param receivedAttribute
@param sourceElement
@param validationContext | [
"Handle",
"attribute",
"node",
"during",
"validation",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/validation/xml/DomXmlMessageValidator.java#L584-L624 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/validation/xml/DomXmlMessageValidator.java | DomXmlMessageValidator.doNamespaceQualifiedAttributeValidation | private void doNamespaceQualifiedAttributeValidation(Node receivedElement, Node receivedAttribute, Node sourceElement, Node sourceAttribute) {
String receivedValue = receivedAttribute.getNodeValue();
String sourceValue = sourceAttribute.getNodeValue();
if (receivedValue.contains(":") && sourceV... | java | private void doNamespaceQualifiedAttributeValidation(Node receivedElement, Node receivedAttribute, Node sourceElement, Node sourceAttribute) {
String receivedValue = receivedAttribute.getNodeValue();
String sourceValue = sourceAttribute.getNodeValue();
if (receivedValue.contains(":") && sourceV... | [
"private",
"void",
"doNamespaceQualifiedAttributeValidation",
"(",
"Node",
"receivedElement",
",",
"Node",
"receivedAttribute",
",",
"Node",
"sourceElement",
",",
"Node",
"sourceAttribute",
")",
"{",
"String",
"receivedValue",
"=",
"receivedAttribute",
".",
"getNodeValue"... | Perform validation on namespace qualified attribute values if present. This includes the validation of namespace presence
and equality.
@param receivedElement
@param receivedAttribute
@param sourceElement
@param sourceAttribute | [
"Perform",
"validation",
"on",
"namespace",
"qualified",
"attribute",
"values",
"if",
"present",
".",
"This",
"includes",
"the",
"validation",
"of",
"namespace",
"presence",
"and",
"equality",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/validation/xml/DomXmlMessageValidator.java#L634-L668 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/validation/xml/DomXmlMessageValidator.java | DomXmlMessageValidator.doPI | private void doPI(Node received) {
if (log.isDebugEnabled()) {
log.debug("Ignored processing instruction (" + received.getLocalName() + "=" + received.getNodeValue() + ")");
}
} | java | private void doPI(Node received) {
if (log.isDebugEnabled()) {
log.debug("Ignored processing instruction (" + received.getLocalName() + "=" + received.getNodeValue() + ")");
}
} | [
"private",
"void",
"doPI",
"(",
"Node",
"received",
")",
"{",
"if",
"(",
"log",
".",
"isDebugEnabled",
"(",
")",
")",
"{",
"log",
".",
"debug",
"(",
"\"Ignored processing instruction (\"",
"+",
"received",
".",
"getLocalName",
"(",
")",
"+",
"\"=\"",
"+",
... | Handle processing instruction during validation.
@param received | [
"Handle",
"processing",
"instruction",
"during",
"validation",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/validation/xml/DomXmlMessageValidator.java#L675-L679 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/validation/xml/DomXmlMessageValidator.java | DomXmlMessageValidator.isValidationMatcherExpression | private boolean isValidationMatcherExpression(Node node) {
switch (node.getNodeType()) {
case Node.ELEMENT_NODE:
return node.getFirstChild() != null &&
StringUtils.hasText(node.getFirstChild().getNodeValue()) &&
ValidationMatcherUtils.isValidationMatch... | java | private boolean isValidationMatcherExpression(Node node) {
switch (node.getNodeType()) {
case Node.ELEMENT_NODE:
return node.getFirstChild() != null &&
StringUtils.hasText(node.getFirstChild().getNodeValue()) &&
ValidationMatcherUtils.isValidationMatch... | [
"private",
"boolean",
"isValidationMatcherExpression",
"(",
"Node",
"node",
")",
"{",
"switch",
"(",
"node",
".",
"getNodeType",
"(",
")",
")",
"{",
"case",
"Node",
".",
"ELEMENT_NODE",
":",
"return",
"node",
".",
"getFirstChild",
"(",
")",
"!=",
"null",
"... | Checks whether the given node contains a validation matcher
@param node
@return true if node value contains validation matcher, false if not | [
"Checks",
"whether",
"the",
"given",
"node",
"contains",
"a",
"validation",
"matcher"
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/validation/xml/DomXmlMessageValidator.java#L703-L716 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/validation/xml/DomXmlMessageValidator.java | DomXmlMessageValidator.addSchemaRepository | public void addSchemaRepository(XsdSchemaRepository schemaRepository) {
if (schemaRepositories == null) {
schemaRepositories = new ArrayList<XsdSchemaRepository>();
}
schemaRepositories.add(schemaRepository);
} | java | public void addSchemaRepository(XsdSchemaRepository schemaRepository) {
if (schemaRepositories == null) {
schemaRepositories = new ArrayList<XsdSchemaRepository>();
}
schemaRepositories.add(schemaRepository);
} | [
"public",
"void",
"addSchemaRepository",
"(",
"XsdSchemaRepository",
"schemaRepository",
")",
"{",
"if",
"(",
"schemaRepositories",
"==",
"null",
")",
"{",
"schemaRepositories",
"=",
"new",
"ArrayList",
"<",
"XsdSchemaRepository",
">",
"(",
")",
";",
"}",
"schemaR... | Set the schema repository holding all known schema definition files.
@param schemaRepository the schemaRepository to set | [
"Set",
"the",
"schema",
"repository",
"holding",
"all",
"known",
"schema",
"definition",
"files",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/validation/xml/DomXmlMessageValidator.java#L745-L751 | train |
citrusframework/citrus | modules/citrus-model/model-core/src/main/java/com/consol/citrus/model/config/core/SchemaRepositoryModelBuilder.java | SchemaRepositoryModelBuilder.addSchema | public SchemaRepositoryModelBuilder addSchema(String id, String location) {
SchemaModel schema = new SchemaModel();
schema.setId(id);
schema.setLocation(location);
if (model.getSchemas() == null) {
model.setSchemas(new SchemaRepositoryModel.Schemas());
}
mod... | java | public SchemaRepositoryModelBuilder addSchema(String id, String location) {
SchemaModel schema = new SchemaModel();
schema.setId(id);
schema.setLocation(location);
if (model.getSchemas() == null) {
model.setSchemas(new SchemaRepositoryModel.Schemas());
}
mod... | [
"public",
"SchemaRepositoryModelBuilder",
"addSchema",
"(",
"String",
"id",
",",
"String",
"location",
")",
"{",
"SchemaModel",
"schema",
"=",
"new",
"SchemaModel",
"(",
")",
";",
"schema",
".",
"setId",
"(",
"id",
")",
";",
"schema",
".",
"setLocation",
"("... | Adds new schema by id and location.
@param id
@param location
@return | [
"Adds",
"new",
"schema",
"by",
"id",
"and",
"location",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-model/model-core/src/main/java/com/consol/citrus/model/config/core/SchemaRepositoryModelBuilder.java#L52-L63 | train |
citrusframework/citrus | modules/citrus-model/model-core/src/main/java/com/consol/citrus/model/config/core/SchemaRepositoryModelBuilder.java | SchemaRepositoryModelBuilder.addSchema | public SchemaRepositoryModelBuilder addSchema(SchemaModel schema) {
if (model.getSchemas() == null) {
model.setSchemas(new SchemaRepositoryModel.Schemas());
}
model.getSchemas().getSchemas().add(schema);
return this;
} | java | public SchemaRepositoryModelBuilder addSchema(SchemaModel schema) {
if (model.getSchemas() == null) {
model.setSchemas(new SchemaRepositoryModel.Schemas());
}
model.getSchemas().getSchemas().add(schema);
return this;
} | [
"public",
"SchemaRepositoryModelBuilder",
"addSchema",
"(",
"SchemaModel",
"schema",
")",
"{",
"if",
"(",
"model",
".",
"getSchemas",
"(",
")",
"==",
"null",
")",
"{",
"model",
".",
"setSchemas",
"(",
"new",
"SchemaRepositoryModel",
".",
"Schemas",
"(",
")",
... | Adds new schema by instance.
@param schema
@return | [
"Adds",
"new",
"schema",
"by",
"instance",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-model/model-core/src/main/java/com/consol/citrus/model/config/core/SchemaRepositoryModelBuilder.java#L70-L77 | train |
citrusframework/citrus | modules/citrus-model/model-core/src/main/java/com/consol/citrus/model/config/core/SchemaRepositoryModelBuilder.java | SchemaRepositoryModelBuilder.addSchemaReference | public SchemaRepositoryModelBuilder addSchemaReference(String schemaId) {
SchemaRepositoryModel.Schemas.Reference schemaRef = new SchemaRepositoryModel.Schemas.Reference();
schemaRef.setSchema(schemaId);
if (model.getSchemas() == null) {
model.setSchemas(new SchemaRepositoryModel.Sc... | java | public SchemaRepositoryModelBuilder addSchemaReference(String schemaId) {
SchemaRepositoryModel.Schemas.Reference schemaRef = new SchemaRepositoryModel.Schemas.Reference();
schemaRef.setSchema(schemaId);
if (model.getSchemas() == null) {
model.setSchemas(new SchemaRepositoryModel.Sc... | [
"public",
"SchemaRepositoryModelBuilder",
"addSchemaReference",
"(",
"String",
"schemaId",
")",
"{",
"SchemaRepositoryModel",
".",
"Schemas",
".",
"Reference",
"schemaRef",
"=",
"new",
"SchemaRepositoryModel",
".",
"Schemas",
".",
"Reference",
"(",
")",
";",
"schemaRe... | Add new schema reference by id
@param schemaId the schema to reference
@return | [
"Add",
"new",
"schema",
"reference",
"by",
"id"
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-model/model-core/src/main/java/com/consol/citrus/model/config/core/SchemaRepositoryModelBuilder.java#L84-L94 | train |
citrusframework/citrus | modules/citrus-cucumber/src/main/java/com/consol/citrus/cucumber/step/xml/XmlSteps.java | XmlSteps.execute | public void execute(StepTemplate stepTemplate, Object[] args) {
Template steps = new Template();
steps.setActions(stepTemplate.getActions());
steps.setActor(stepTemplate.getActor());
TemplateBuilder templateBuilder = new TemplateBuilder(steps)
.name(stepTemplate.getName())
... | java | public void execute(StepTemplate stepTemplate, Object[] args) {
Template steps = new Template();
steps.setActions(stepTemplate.getActions());
steps.setActor(stepTemplate.getActor());
TemplateBuilder templateBuilder = new TemplateBuilder(steps)
.name(stepTemplate.getName())
... | [
"public",
"void",
"execute",
"(",
"StepTemplate",
"stepTemplate",
",",
"Object",
"[",
"]",
"args",
")",
"{",
"Template",
"steps",
"=",
"new",
"Template",
"(",
")",
";",
"steps",
".",
"setActions",
"(",
"stepTemplate",
".",
"getActions",
"(",
")",
")",
";... | Run template within designer.
@param stepTemplate
@param args | [
"Run",
"template",
"within",
"designer",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-cucumber/src/main/java/com/consol/citrus/cucumber/step/xml/XmlSteps.java#L45-L70 | train |
citrusframework/citrus | modules/citrus-mail/src/main/java/com/consol/citrus/mail/message/MailMessageConverter.java | MailMessageConverter.createMessageHeaders | protected Map<String,Object> createMessageHeaders(MimeMailMessage msg) throws MessagingException, IOException {
Map<String, Object> headers = new HashMap<>();
headers.put(CitrusMailMessageHeaders.MAIL_MESSAGE_ID, msg.getMimeMessage().getMessageID());
headers.put(CitrusMailMessageHeaders.MAIL_FRO... | java | protected Map<String,Object> createMessageHeaders(MimeMailMessage msg) throws MessagingException, IOException {
Map<String, Object> headers = new HashMap<>();
headers.put(CitrusMailMessageHeaders.MAIL_MESSAGE_ID, msg.getMimeMessage().getMessageID());
headers.put(CitrusMailMessageHeaders.MAIL_FRO... | [
"protected",
"Map",
"<",
"String",
",",
"Object",
">",
"createMessageHeaders",
"(",
"MimeMailMessage",
"msg",
")",
"throws",
"MessagingException",
",",
"IOException",
"{",
"Map",
"<",
"String",
",",
"Object",
">",
"headers",
"=",
"new",
"HashMap",
"<>",
"(",
... | Reads basic message information such as sender, recipients and mail subject to message headers.
@param msg
@return | [
"Reads",
"basic",
"message",
"information",
"such",
"as",
"sender",
"recipients",
"and",
"mail",
"subject",
"to",
"message",
"headers",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-mail/src/main/java/com/consol/citrus/mail/message/MailMessageConverter.java#L142-L155 | train |
citrusframework/citrus | modules/citrus-mail/src/main/java/com/consol/citrus/mail/message/MailMessageConverter.java | MailMessageConverter.handlePart | protected BodyPart handlePart(MimePart part) throws IOException, MessagingException {
String contentType = parseContentType(part.getContentType());
if (part.isMimeType("multipart/*")) {
return handleMultiPart((Multipart) part.getContent());
} else if (part.isMimeType("text/*")) {
... | java | protected BodyPart handlePart(MimePart part) throws IOException, MessagingException {
String contentType = parseContentType(part.getContentType());
if (part.isMimeType("multipart/*")) {
return handleMultiPart((Multipart) part.getContent());
} else if (part.isMimeType("text/*")) {
... | [
"protected",
"BodyPart",
"handlePart",
"(",
"MimePart",
"part",
")",
"throws",
"IOException",
",",
"MessagingException",
"{",
"String",
"contentType",
"=",
"parseContentType",
"(",
"part",
".",
"getContentType",
"(",
")",
")",
";",
"if",
"(",
"part",
".",
"isM... | Process message part. Can be a text, binary or multipart instance.
@param part
@return
@throws java.io.IOException | [
"Process",
"message",
"part",
".",
"Can",
"be",
"a",
"text",
"binary",
"or",
"multipart",
"instance",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-mail/src/main/java/com/consol/citrus/mail/message/MailMessageConverter.java#L163-L177 | train |
citrusframework/citrus | modules/citrus-mail/src/main/java/com/consol/citrus/mail/message/MailMessageConverter.java | MailMessageConverter.handleMultiPart | private BodyPart handleMultiPart(Multipart body) throws IOException, MessagingException {
BodyPart bodyPart = null;
for (int i = 0; i < body.getCount(); i++) {
MimePart entity = (MimePart) body.getBodyPart(i);
if (bodyPart == null) {
bodyPart = handlePart(entity)... | java | private BodyPart handleMultiPart(Multipart body) throws IOException, MessagingException {
BodyPart bodyPart = null;
for (int i = 0; i < body.getCount(); i++) {
MimePart entity = (MimePart) body.getBodyPart(i);
if (bodyPart == null) {
bodyPart = handlePart(entity)... | [
"private",
"BodyPart",
"handleMultiPart",
"(",
"Multipart",
"body",
")",
"throws",
"IOException",
",",
"MessagingException",
"{",
"BodyPart",
"bodyPart",
"=",
"null",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"body",
".",
"getCount",
"(",
")",
... | Construct multipart body with first part being the body content and further parts being the attachments.
@param body
@return
@throws IOException | [
"Construct",
"multipart",
"body",
"with",
"first",
"part",
"being",
"the",
"body",
"content",
"and",
"further",
"parts",
"being",
"the",
"attachments",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-mail/src/main/java/com/consol/citrus/mail/message/MailMessageConverter.java#L185-L199 | train |
citrusframework/citrus | modules/citrus-mail/src/main/java/com/consol/citrus/mail/message/MailMessageConverter.java | MailMessageConverter.handleApplicationContentPart | protected BodyPart handleApplicationContentPart(MimePart applicationData, String contentType) throws IOException, MessagingException {
if (applicationData.isMimeType("application/pdf")) {
return handleImageBinaryPart(applicationData, contentType);
} else if (applicationData.isMimeType("appli... | java | protected BodyPart handleApplicationContentPart(MimePart applicationData, String contentType) throws IOException, MessagingException {
if (applicationData.isMimeType("application/pdf")) {
return handleImageBinaryPart(applicationData, contentType);
} else if (applicationData.isMimeType("appli... | [
"protected",
"BodyPart",
"handleApplicationContentPart",
"(",
"MimePart",
"applicationData",
",",
"String",
"contentType",
")",
"throws",
"IOException",
",",
"MessagingException",
"{",
"if",
"(",
"applicationData",
".",
"isMimeType",
"(",
"\"application/pdf\"",
")",
")"... | Construct body part form special application data. Based on known application content types delegate to text,
image or binary body construction.
@param applicationData
@param contentType
@return
@throws IOException | [
"Construct",
"body",
"part",
"form",
"special",
"application",
"data",
".",
"Based",
"on",
"known",
"application",
"content",
"types",
"delegate",
"to",
"text",
"image",
"or",
"binary",
"body",
"construction",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-mail/src/main/java/com/consol/citrus/mail/message/MailMessageConverter.java#L209-L227 | train |
citrusframework/citrus | modules/citrus-mail/src/main/java/com/consol/citrus/mail/message/MailMessageConverter.java | MailMessageConverter.handleImageBinaryPart | protected BodyPart handleImageBinaryPart(MimePart image, String contentType) throws IOException, MessagingException {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
FileCopyUtils.copy(image.getInputStream(), bos);
String base64 = Base64.encodeBase64String(bos.toByteArray());
re... | java | protected BodyPart handleImageBinaryPart(MimePart image, String contentType) throws IOException, MessagingException {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
FileCopyUtils.copy(image.getInputStream(), bos);
String base64 = Base64.encodeBase64String(bos.toByteArray());
re... | [
"protected",
"BodyPart",
"handleImageBinaryPart",
"(",
"MimePart",
"image",
",",
"String",
"contentType",
")",
"throws",
"IOException",
",",
"MessagingException",
"{",
"ByteArrayOutputStream",
"bos",
"=",
"new",
"ByteArrayOutputStream",
"(",
")",
";",
"FileCopyUtils",
... | Construct base64 body part from image data.
@param image
@param contentType
@return
@throws IOException | [
"Construct",
"base64",
"body",
"part",
"from",
"image",
"data",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-mail/src/main/java/com/consol/citrus/mail/message/MailMessageConverter.java#L236-L241 | train |
citrusframework/citrus | modules/citrus-mail/src/main/java/com/consol/citrus/mail/message/MailMessageConverter.java | MailMessageConverter.handleBinaryPart | protected BodyPart handleBinaryPart(MimePart mediaPart, String contentType) throws IOException, MessagingException {
String contentId = mediaPart.getContentID() != null ? "(" + mediaPart.getContentID() + ")" : "";
return new BodyPart(mediaPart.getFileName() + contentId, contentType);
} | java | protected BodyPart handleBinaryPart(MimePart mediaPart, String contentType) throws IOException, MessagingException {
String contentId = mediaPart.getContentID() != null ? "(" + mediaPart.getContentID() + ")" : "";
return new BodyPart(mediaPart.getFileName() + contentId, contentType);
} | [
"protected",
"BodyPart",
"handleBinaryPart",
"(",
"MimePart",
"mediaPart",
",",
"String",
"contentType",
")",
"throws",
"IOException",
",",
"MessagingException",
"{",
"String",
"contentId",
"=",
"mediaPart",
".",
"getContentID",
"(",
")",
"!=",
"null",
"?",
"\"(\"... | Construct simple body part from binary data just adding file name as content.
@param mediaPart
@param contentType
@return
@throws IOException | [
"Construct",
"simple",
"body",
"part",
"from",
"binary",
"data",
"just",
"adding",
"file",
"name",
"as",
"content",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-mail/src/main/java/com/consol/citrus/mail/message/MailMessageConverter.java#L250-L253 | train |
citrusframework/citrus | modules/citrus-mail/src/main/java/com/consol/citrus/mail/message/MailMessageConverter.java | MailMessageConverter.handleTextPart | protected BodyPart handleTextPart(MimePart textPart, String contentType) throws IOException, MessagingException {
String content;
if (textPart.getContent() instanceof String) {
content = (String) textPart.getContent();
} else if (textPart.getContent() instanceof InputStream) {
... | java | protected BodyPart handleTextPart(MimePart textPart, String contentType) throws IOException, MessagingException {
String content;
if (textPart.getContent() instanceof String) {
content = (String) textPart.getContent();
} else if (textPart.getContent() instanceof InputStream) {
... | [
"protected",
"BodyPart",
"handleTextPart",
"(",
"MimePart",
"textPart",
",",
"String",
"contentType",
")",
"throws",
"IOException",
",",
"MessagingException",
"{",
"String",
"content",
";",
"if",
"(",
"textPart",
".",
"getContent",
"(",
")",
"instanceof",
"String"... | Construct simple binary body part with base64 data.
@param textPart
@param contentType
@return
@throws IOException | [
"Construct",
"simple",
"binary",
"body",
"part",
"with",
"base64",
"data",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-mail/src/main/java/com/consol/citrus/mail/message/MailMessageConverter.java#L262-L274 | train |
citrusframework/citrus | modules/citrus-mail/src/main/java/com/consol/citrus/mail/message/MailMessageConverter.java | MailMessageConverter.stripMailBodyEnding | private String stripMailBodyEnding(String textBody) throws IOException {
BufferedReader reader = null;
StringBuilder body = new StringBuilder();
try {
reader = new BufferedReader(new StringReader(textBody));
String line = reader.readLine();
while (line != nu... | java | private String stripMailBodyEnding(String textBody) throws IOException {
BufferedReader reader = null;
StringBuilder body = new StringBuilder();
try {
reader = new BufferedReader(new StringReader(textBody));
String line = reader.readLine();
while (line != nu... | [
"private",
"String",
"stripMailBodyEnding",
"(",
"String",
"textBody",
")",
"throws",
"IOException",
"{",
"BufferedReader",
"reader",
"=",
"null",
";",
"StringBuilder",
"body",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"try",
"{",
"reader",
"=",
"new",
"Buff... | Removes SMTP mail body ending which is defined by single '.' character in separate line marking
the mail body end of file.
@param textBody
@return | [
"Removes",
"SMTP",
"mail",
"body",
"ending",
"which",
"is",
"defined",
"by",
"single",
".",
"character",
"in",
"separate",
"line",
"marking",
"the",
"mail",
"body",
"end",
"of",
"file",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-mail/src/main/java/com/consol/citrus/mail/message/MailMessageConverter.java#L282-L306 | train |
citrusframework/citrus | modules/citrus-mail/src/main/java/com/consol/citrus/mail/message/MailMessageConverter.java | MailMessageConverter.parseContentType | static String parseContentType(String contentType) throws IOException {
if (contentType.indexOf(System.getProperty("line.separator")) > 0) {
BufferedReader reader = new BufferedReader(new StringReader(contentType));
try {
String plainContentType = reader.readLine();
... | java | static String parseContentType(String contentType) throws IOException {
if (contentType.indexOf(System.getProperty("line.separator")) > 0) {
BufferedReader reader = new BufferedReader(new StringReader(contentType));
try {
String plainContentType = reader.readLine();
... | [
"static",
"String",
"parseContentType",
"(",
"String",
"contentType",
")",
"throws",
"IOException",
"{",
"if",
"(",
"contentType",
".",
"indexOf",
"(",
"System",
".",
"getProperty",
"(",
"\"line.separator\"",
")",
")",
">",
"0",
")",
"{",
"BufferedReader",
"re... | When content type has multiple lines this method just returns plain content type information in first line.
This is the case when multipart mixed content type has boundary information in next line.
@param contentType
@return
@throws IOException | [
"When",
"content",
"type",
"has",
"multiple",
"lines",
"this",
"method",
"just",
"returns",
"plain",
"content",
"type",
"information",
"in",
"first",
"line",
".",
"This",
"is",
"the",
"case",
"when",
"multipart",
"mixed",
"content",
"type",
"has",
"boundary",
... | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-mail/src/main/java/com/consol/citrus/mail/message/MailMessageConverter.java#L343-L364 | train |
citrusframework/citrus | modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/builder/SoapServerActionBuilder.java | SoapServerActionBuilder.receive | public SoapServerRequestActionBuilder receive() {
SoapServerRequestActionBuilder soapServerRequestActionBuilder = new SoapServerRequestActionBuilder(action, soapServer)
.withApplicationContext(applicationContext);
return soapServerRequestActionBuilder;
} | java | public SoapServerRequestActionBuilder receive() {
SoapServerRequestActionBuilder soapServerRequestActionBuilder = new SoapServerRequestActionBuilder(action, soapServer)
.withApplicationContext(applicationContext);
return soapServerRequestActionBuilder;
} | [
"public",
"SoapServerRequestActionBuilder",
"receive",
"(",
")",
"{",
"SoapServerRequestActionBuilder",
"soapServerRequestActionBuilder",
"=",
"new",
"SoapServerRequestActionBuilder",
"(",
"action",
",",
"soapServer",
")",
".",
"withApplicationContext",
"(",
"applicationContext... | Generic request builder for receiving SOAP messages on server.
@return | [
"Generic",
"request",
"builder",
"for",
"receiving",
"SOAP",
"messages",
"on",
"server",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/builder/SoapServerActionBuilder.java#L50-L54 | train |
citrusframework/citrus | modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/builder/SoapServerActionBuilder.java | SoapServerActionBuilder.send | public SoapServerResponseActionBuilder send() {
SoapServerResponseActionBuilder soapServerResponseActionBuilder = new SoapServerResponseActionBuilder(action, soapServer)
.withApplicationContext(applicationContext);
return soapServerResponseActionBuilder;
} | java | public SoapServerResponseActionBuilder send() {
SoapServerResponseActionBuilder soapServerResponseActionBuilder = new SoapServerResponseActionBuilder(action, soapServer)
.withApplicationContext(applicationContext);
return soapServerResponseActionBuilder;
} | [
"public",
"SoapServerResponseActionBuilder",
"send",
"(",
")",
"{",
"SoapServerResponseActionBuilder",
"soapServerResponseActionBuilder",
"=",
"new",
"SoapServerResponseActionBuilder",
"(",
"action",
",",
"soapServer",
")",
".",
"withApplicationContext",
"(",
"applicationContex... | Generic response builder for sending SOAP response messages to client.
@return | [
"Generic",
"response",
"builder",
"for",
"sending",
"SOAP",
"response",
"messages",
"to",
"client",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/builder/SoapServerActionBuilder.java#L60-L64 | train |
citrusframework/citrus | modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/builder/SoapServerActionBuilder.java | SoapServerActionBuilder.sendFault | public SoapServerFaultResponseActionBuilder sendFault() {
SoapServerFaultResponseActionBuilder soapServerResponseActionBuilder = new SoapServerFaultResponseActionBuilder(action, soapServer)
.withApplicationContext(applicationContext);
return soapServerResponseActionBuilder;
} | java | public SoapServerFaultResponseActionBuilder sendFault() {
SoapServerFaultResponseActionBuilder soapServerResponseActionBuilder = new SoapServerFaultResponseActionBuilder(action, soapServer)
.withApplicationContext(applicationContext);
return soapServerResponseActionBuilder;
} | [
"public",
"SoapServerFaultResponseActionBuilder",
"sendFault",
"(",
")",
"{",
"SoapServerFaultResponseActionBuilder",
"soapServerResponseActionBuilder",
"=",
"new",
"SoapServerFaultResponseActionBuilder",
"(",
"action",
",",
"soapServer",
")",
".",
"withApplicationContext",
"(",
... | Generic response builder for sending SOAP fault messages to client.
@return | [
"Generic",
"response",
"builder",
"for",
"sending",
"SOAP",
"fault",
"messages",
"to",
"client",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/builder/SoapServerActionBuilder.java#L70-L74 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/json/JsonPathUtils.java | JsonPathUtils.evaluate | public static Object evaluate(ReadContext readerContext, String jsonPathExpression) {
String expression = jsonPathExpression;
String jsonPathFunction = null;
for (String name : JsonPathFunctions.getSupportedFunctions()) {
if (expression.endsWith(String.format(".%s()", name))) {
... | java | public static Object evaluate(ReadContext readerContext, String jsonPathExpression) {
String expression = jsonPathExpression;
String jsonPathFunction = null;
for (String name : JsonPathFunctions.getSupportedFunctions()) {
if (expression.endsWith(String.format(".%s()", name))) {
... | [
"public",
"static",
"Object",
"evaluate",
"(",
"ReadContext",
"readerContext",
",",
"String",
"jsonPathExpression",
")",
"{",
"String",
"expression",
"=",
"jsonPathExpression",
";",
"String",
"jsonPathFunction",
"=",
"null",
";",
"for",
"(",
"String",
"name",
":",... | Evaluate JsonPath expression using given read context and return result as object.
@param readerContext
@param jsonPathExpression
@return | [
"Evaluate",
"JsonPath",
"expression",
"using",
"given",
"read",
"context",
"and",
"return",
"result",
"as",
"object",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/json/JsonPathUtils.java#L60-L96 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/json/JsonPathUtils.java | JsonPathUtils.evaluateAsString | public static String evaluateAsString(String payload, String jsonPathExpression) {
try {
JSONParser parser = new JSONParser(JSONParser.MODE_JSON_SIMPLE);
Object receivedJson = parser.parse(payload);
ReadContext readerContext = JsonPath.parse(receivedJson);
return... | java | public static String evaluateAsString(String payload, String jsonPathExpression) {
try {
JSONParser parser = new JSONParser(JSONParser.MODE_JSON_SIMPLE);
Object receivedJson = parser.parse(payload);
ReadContext readerContext = JsonPath.parse(receivedJson);
return... | [
"public",
"static",
"String",
"evaluateAsString",
"(",
"String",
"payload",
",",
"String",
"jsonPathExpression",
")",
"{",
"try",
"{",
"JSONParser",
"parser",
"=",
"new",
"JSONParser",
"(",
"JSONParser",
".",
"MODE_JSON_SIMPLE",
")",
";",
"Object",
"receivedJson",... | Evaluate JsonPath expression on given payload string and return result as string.
@param payload
@param jsonPathExpression
@return | [
"Evaluate",
"JsonPath",
"expression",
"on",
"given",
"payload",
"string",
"and",
"return",
"result",
"as",
"string",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/json/JsonPathUtils.java#L104-L114 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/json/JsonPathUtils.java | JsonPathUtils.evaluateAsString | public static String evaluateAsString(ReadContext readerContext, String jsonPathExpression) {
Object jsonPathResult = evaluate(readerContext, jsonPathExpression);
if (jsonPathResult instanceof JSONArray) {
return ((JSONArray) jsonPathResult).toJSONString();
} else if (jsonPathResult... | java | public static String evaluateAsString(ReadContext readerContext, String jsonPathExpression) {
Object jsonPathResult = evaluate(readerContext, jsonPathExpression);
if (jsonPathResult instanceof JSONArray) {
return ((JSONArray) jsonPathResult).toJSONString();
} else if (jsonPathResult... | [
"public",
"static",
"String",
"evaluateAsString",
"(",
"ReadContext",
"readerContext",
",",
"String",
"jsonPathExpression",
")",
"{",
"Object",
"jsonPathResult",
"=",
"evaluate",
"(",
"readerContext",
",",
"jsonPathExpression",
")",
";",
"if",
"(",
"jsonPathResult",
... | Evaluate JsonPath expression using given read context and return result as string.
@param readerContext
@param jsonPathExpression
@return | [
"Evaluate",
"JsonPath",
"expression",
"using",
"given",
"read",
"context",
"and",
"return",
"result",
"as",
"string",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/json/JsonPathUtils.java#L122-L132 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/util/XMLUtils.java | XMLUtils.stripWhitespaceNodes | public static void stripWhitespaceNodes(Node element) {
Node node, child;
for (child = element.getFirstChild(); child != null; child = node) {
node = child.getNextSibling();
stripWhitespaceNodes(child);
}
if (element.getNodeType() == Node.TEXT_NODE && element.get... | java | public static void stripWhitespaceNodes(Node element) {
Node node, child;
for (child = element.getFirstChild(); child != null; child = node) {
node = child.getNextSibling();
stripWhitespaceNodes(child);
}
if (element.getNodeType() == Node.TEXT_NODE && element.get... | [
"public",
"static",
"void",
"stripWhitespaceNodes",
"(",
"Node",
"element",
")",
"{",
"Node",
"node",
",",
"child",
";",
"for",
"(",
"child",
"=",
"element",
".",
"getFirstChild",
"(",
")",
";",
"child",
"!=",
"null",
";",
"child",
"=",
"node",
")",
"{... | Removes text nodes that are only containing whitespace characters
inside a DOM tree.
@param element the root node to normalize. | [
"Removes",
"text",
"nodes",
"that",
"are",
"only",
"containing",
"whitespace",
"characters",
"inside",
"a",
"DOM",
"tree",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/util/XMLUtils.java#L153-L163 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/util/XMLUtils.java | XMLUtils.buildNodeName | private static void buildNodeName(Node node, StringBuffer buffer) {
if (node.getParentNode() == null) {
return;
}
buildNodeName(node.getParentNode(), buffer);
if (node.getParentNode() != null
&& node.getParentNode().getParentNode() != null) {
buf... | java | private static void buildNodeName(Node node, StringBuffer buffer) {
if (node.getParentNode() == null) {
return;
}
buildNodeName(node.getParentNode(), buffer);
if (node.getParentNode() != null
&& node.getParentNode().getParentNode() != null) {
buf... | [
"private",
"static",
"void",
"buildNodeName",
"(",
"Node",
"node",
",",
"StringBuffer",
"buffer",
")",
"{",
"if",
"(",
"node",
".",
"getParentNode",
"(",
")",
"==",
"null",
")",
"{",
"return",
";",
"}",
"buildNodeName",
"(",
"node",
".",
"getParentNode",
... | Builds the node path expression for a node in the DOM tree.
@param node in a DOM tree.
@param buffer string buffer. | [
"Builds",
"the",
"node",
"path",
"expression",
"for",
"a",
"node",
"in",
"the",
"DOM",
"tree",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/util/XMLUtils.java#L192-L205 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/util/XMLUtils.java | XMLUtils.serialize | public static String serialize(Document doc) {
LSSerializer serializer = configurer.createLSSerializer();
LSOutput output = configurer.createLSOutput();
String charset = getTargetCharset(doc).displayName();
output.setEncoding(charset);
StringWriter writer = new StringWriter();
... | java | public static String serialize(Document doc) {
LSSerializer serializer = configurer.createLSSerializer();
LSOutput output = configurer.createLSOutput();
String charset = getTargetCharset(doc).displayName();
output.setEncoding(charset);
StringWriter writer = new StringWriter();
... | [
"public",
"static",
"String",
"serialize",
"(",
"Document",
"doc",
")",
"{",
"LSSerializer",
"serializer",
"=",
"configurer",
".",
"createLSSerializer",
"(",
")",
";",
"LSOutput",
"output",
"=",
"configurer",
".",
"createLSOutput",
"(",
")",
";",
"String",
"ch... | Serializes a DOM document
@param doc
@throws CitrusRuntimeException
@return serialized XML string | [
"Serializes",
"a",
"DOM",
"document"
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/util/XMLUtils.java#L213-L226 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/util/XMLUtils.java | XMLUtils.prettyPrint | public static String prettyPrint(String xml) {
LSParser parser = configurer.createLSParser();
configurer.setParserConfigParameter(parser, VALIDATE_IF_SCHEMA, false);
LSInput input = configurer.createLSInput();
try {
Charset charset = getTargetCharset(xml);
inpu... | java | public static String prettyPrint(String xml) {
LSParser parser = configurer.createLSParser();
configurer.setParserConfigParameter(parser, VALIDATE_IF_SCHEMA, false);
LSInput input = configurer.createLSInput();
try {
Charset charset = getTargetCharset(xml);
inpu... | [
"public",
"static",
"String",
"prettyPrint",
"(",
"String",
"xml",
")",
"{",
"LSParser",
"parser",
"=",
"configurer",
".",
"createLSParser",
"(",
")",
";",
"configurer",
".",
"setParserConfigParameter",
"(",
"parser",
",",
"VALIDATE_IF_SCHEMA",
",",
"false",
")"... | Pretty prints a XML string.
@param xml
@throws CitrusRuntimeException
@return pretty printed XML string | [
"Pretty",
"prints",
"a",
"XML",
"string",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/util/XMLUtils.java#L234-L257 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/util/XMLUtils.java | XMLUtils.lookupNamespaces | public static Map<String, String> lookupNamespaces(Node referenceNode) {
Map<String, String> namespaces = new HashMap<String, String>();
Node node;
if (referenceNode.getNodeType() == Node.DOCUMENT_NODE) {
node = referenceNode.getFirstChild();
} else {
node = refe... | java | public static Map<String, String> lookupNamespaces(Node referenceNode) {
Map<String, String> namespaces = new HashMap<String, String>();
Node node;
if (referenceNode.getNodeType() == Node.DOCUMENT_NODE) {
node = referenceNode.getFirstChild();
} else {
node = refe... | [
"public",
"static",
"Map",
"<",
"String",
",",
"String",
">",
"lookupNamespaces",
"(",
"Node",
"referenceNode",
")",
"{",
"Map",
"<",
"String",
",",
"String",
">",
"namespaces",
"=",
"new",
"HashMap",
"<",
"String",
",",
"String",
">",
"(",
")",
";",
"... | Look up namespace attribute declarations in the specified node and
store them in a binding map, where the key is the namespace prefix and the value
is the namespace uri.
@param referenceNode XML node to search for namespace declarations.
@return map containing namespace prefix - namespace url pairs. | [
"Look",
"up",
"namespace",
"attribute",
"declarations",
"in",
"the",
"specified",
"node",
"and",
"store",
"them",
"in",
"a",
"binding",
"map",
"where",
"the",
"key",
"is",
"the",
"namespace",
"prefix",
"and",
"the",
"value",
"is",
"the",
"namespace",
"uri",
... | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/util/XMLUtils.java#L267-L291 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/util/XMLUtils.java | XMLUtils.lookupNamespaces | public static Map<String, String> lookupNamespaces(String xml) {
Map<String, String> namespaces = new HashMap<String, String>();
//TODO: handle inner CDATA sections because namespaces they might interfere with real namespaces in xml fragment
if (xml.indexOf(XMLConstants.XMLNS_ATTRIBUTE) != -1) ... | java | public static Map<String, String> lookupNamespaces(String xml) {
Map<String, String> namespaces = new HashMap<String, String>();
//TODO: handle inner CDATA sections because namespaces they might interfere with real namespaces in xml fragment
if (xml.indexOf(XMLConstants.XMLNS_ATTRIBUTE) != -1) ... | [
"public",
"static",
"Map",
"<",
"String",
",",
"String",
">",
"lookupNamespaces",
"(",
"String",
"xml",
")",
"{",
"Map",
"<",
"String",
",",
"String",
">",
"namespaces",
"=",
"new",
"HashMap",
"<",
"String",
",",
"String",
">",
"(",
")",
";",
"//TODO: ... | Look up namespace attribute declarations in the XML fragment and
store them in a binding map, where the key is the namespace prefix and the value
is the namespace uri.
@param xml XML fragment.
@return map containing namespace prefix - namespace uri pairs. | [
"Look",
"up",
"namespace",
"attribute",
"declarations",
"in",
"the",
"XML",
"fragment",
"and",
"store",
"them",
"in",
"a",
"binding",
"map",
"where",
"the",
"key",
"is",
"the",
"namespace",
"prefix",
"and",
"the",
"value",
"is",
"the",
"namespace",
"uri",
... | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/util/XMLUtils.java#L301-L337 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/util/XMLUtils.java | XMLUtils.parseMessagePayload | public static Document parseMessagePayload(String messagePayload) {
LSParser parser = configurer.createLSParser();
LSInput receivedInput = configurer.createLSInput();
try {
Charset charset = getTargetCharset(messagePayload);
receivedInput.setByteStream(new ByteArrayInputS... | java | public static Document parseMessagePayload(String messagePayload) {
LSParser parser = configurer.createLSParser();
LSInput receivedInput = configurer.createLSInput();
try {
Charset charset = getTargetCharset(messagePayload);
receivedInput.setByteStream(new ByteArrayInputS... | [
"public",
"static",
"Document",
"parseMessagePayload",
"(",
"String",
"messagePayload",
")",
"{",
"LSParser",
"parser",
"=",
"configurer",
".",
"createLSParser",
"(",
")",
";",
"LSInput",
"receivedInput",
"=",
"configurer",
".",
"createLSInput",
"(",
")",
";",
"... | Parse message payload with DOM implementation.
@param messagePayload
@throws CitrusRuntimeException
@return DOM document. | [
"Parse",
"message",
"payload",
"with",
"DOM",
"implementation",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/util/XMLUtils.java#L345-L357 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/util/XMLUtils.java | XMLUtils.getTargetCharset | public static Charset getTargetCharset(Document doc) {
String defaultEncoding = System.getProperty(Citrus.CITRUS_FILE_ENCODING_PROPERTY, System.getenv(Citrus.CITRUS_FILE_ENCODING_ENV));
if (StringUtils.hasText(defaultEncoding)) {
return Charset.forName(defaultEncoding);
}
if... | java | public static Charset getTargetCharset(Document doc) {
String defaultEncoding = System.getProperty(Citrus.CITRUS_FILE_ENCODING_PROPERTY, System.getenv(Citrus.CITRUS_FILE_ENCODING_ENV));
if (StringUtils.hasText(defaultEncoding)) {
return Charset.forName(defaultEncoding);
}
if... | [
"public",
"static",
"Charset",
"getTargetCharset",
"(",
"Document",
"doc",
")",
"{",
"String",
"defaultEncoding",
"=",
"System",
".",
"getProperty",
"(",
"Citrus",
".",
"CITRUS_FILE_ENCODING_PROPERTY",
",",
"System",
".",
"getenv",
"(",
"Citrus",
".",
"CITRUS_FILE... | Try to find encoding for document node. Also supports Citrus default encoding set
as System property.
@param doc
@return | [
"Try",
"to",
"find",
"encoding",
"for",
"document",
"node",
".",
"Also",
"supports",
"Citrus",
"default",
"encoding",
"set",
"as",
"System",
"property",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/util/XMLUtils.java#L365-L377 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/util/XMLUtils.java | XMLUtils.getTargetCharset | private static Charset getTargetCharset(String messagePayload) throws UnsupportedEncodingException {
String defaultEncoding = System.getProperty(Citrus.CITRUS_FILE_ENCODING_PROPERTY, System.getenv(Citrus.CITRUS_FILE_ENCODING_ENV));
if (StringUtils.hasText(defaultEncoding)) {
return Charset.f... | java | private static Charset getTargetCharset(String messagePayload) throws UnsupportedEncodingException {
String defaultEncoding = System.getProperty(Citrus.CITRUS_FILE_ENCODING_PROPERTY, System.getenv(Citrus.CITRUS_FILE_ENCODING_ENV));
if (StringUtils.hasText(defaultEncoding)) {
return Charset.f... | [
"private",
"static",
"Charset",
"getTargetCharset",
"(",
"String",
"messagePayload",
")",
"throws",
"UnsupportedEncodingException",
"{",
"String",
"defaultEncoding",
"=",
"System",
".",
"getProperty",
"(",
"Citrus",
".",
"CITRUS_FILE_ENCODING_PROPERTY",
",",
"System",
"... | Try to find target encoding in XML declaration.
@param messagePayload XML message payload.
@return charsetName if supported. | [
"Try",
"to",
"find",
"target",
"encoding",
"in",
"XML",
"declaration",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/util/XMLUtils.java#L385-L427 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/util/XMLUtils.java | XMLUtils.omitXmlDeclaration | public static String omitXmlDeclaration(String xml) {
if (xml.startsWith("<?xml") && xml.contains("?>")) {
return xml.substring(xml.indexOf("?>") + 2).trim();
}
return xml;
} | java | public static String omitXmlDeclaration(String xml) {
if (xml.startsWith("<?xml") && xml.contains("?>")) {
return xml.substring(xml.indexOf("?>") + 2).trim();
}
return xml;
} | [
"public",
"static",
"String",
"omitXmlDeclaration",
"(",
"String",
"xml",
")",
"{",
"if",
"(",
"xml",
".",
"startsWith",
"(",
"\"<?xml\"",
")",
"&&",
"xml",
".",
"contains",
"(",
"\"?>\"",
")",
")",
"{",
"return",
"xml",
".",
"substring",
"(",
"xml",
"... | Removes leading XML declaration from xml if present.
@param xml
@return | [
"Removes",
"leading",
"XML",
"declaration",
"from",
"xml",
"if",
"present",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/util/XMLUtils.java#L434-L440 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/xml/schema/WsdlXsdSchema.java | WsdlXsdSchema.loadSchemas | private Resource loadSchemas(Definition definition) throws WSDLException, IOException, TransformerException, TransformerFactoryConfigurationError {
Types types = definition.getTypes();
Resource targetXsd = null;
Resource firstSchemaInWSDL = null;
if (types != null) {
List<?>... | java | private Resource loadSchemas(Definition definition) throws WSDLException, IOException, TransformerException, TransformerFactoryConfigurationError {
Types types = definition.getTypes();
Resource targetXsd = null;
Resource firstSchemaInWSDL = null;
if (types != null) {
List<?>... | [
"private",
"Resource",
"loadSchemas",
"(",
"Definition",
"definition",
")",
"throws",
"WSDLException",
",",
"IOException",
",",
"TransformerException",
",",
"TransformerFactoryConfigurationError",
"{",
"Types",
"types",
"=",
"definition",
".",
"getTypes",
"(",
")",
";... | Loads nested schema type definitions from wsdl.
@throws IOException
@throws WSDLException
@throws TransformerFactoryConfigurationError
@throws TransformerException | [
"Loads",
"nested",
"schema",
"type",
"definitions",
"from",
"wsdl",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/xml/schema/WsdlXsdSchema.java#L92-L154 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/xml/schema/WsdlXsdSchema.java | WsdlXsdSchema.inheritNamespaces | @SuppressWarnings("unchecked")
private void inheritNamespaces(SchemaImpl schema, Definition wsdl) {
Map<String, String> wsdlNamespaces = wsdl.getNamespaces();
for (Entry<String, String> nsEntry: wsdlNamespaces.entrySet()) {
if (StringUtils.hasText(nsEntry.getKey())) {
... | java | @SuppressWarnings("unchecked")
private void inheritNamespaces(SchemaImpl schema, Definition wsdl) {
Map<String, String> wsdlNamespaces = wsdl.getNamespaces();
for (Entry<String, String> nsEntry: wsdlNamespaces.entrySet()) {
if (StringUtils.hasText(nsEntry.getKey())) {
... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"private",
"void",
"inheritNamespaces",
"(",
"SchemaImpl",
"schema",
",",
"Definition",
"wsdl",
")",
"{",
"Map",
"<",
"String",
",",
"String",
">",
"wsdlNamespaces",
"=",
"wsdl",
".",
"getNamespaces",
"(",
")... | Adds WSDL level namespaces to schema definition if necessary.
@param schema
@param wsdl | [
"Adds",
"WSDL",
"level",
"namespaces",
"to",
"schema",
"definition",
"if",
"necessary",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/xml/schema/WsdlXsdSchema.java#L161-L176 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/xml/schema/WsdlXsdSchema.java | WsdlXsdSchema.getWsdlDefinition | private Definition getWsdlDefinition(Resource wsdl) {
try {
Definition definition;
if (wsdl.getURI().toString().startsWith("jar:")) {
// Locate WSDL imports in Jar files
definition = WSDLFactory.newInstance().newWSDLReader().readWSDL(new JarWSDLLocator(wsd... | java | private Definition getWsdlDefinition(Resource wsdl) {
try {
Definition definition;
if (wsdl.getURI().toString().startsWith("jar:")) {
// Locate WSDL imports in Jar files
definition = WSDLFactory.newInstance().newWSDLReader().readWSDL(new JarWSDLLocator(wsd... | [
"private",
"Definition",
"getWsdlDefinition",
"(",
"Resource",
"wsdl",
")",
"{",
"try",
"{",
"Definition",
"definition",
";",
"if",
"(",
"wsdl",
".",
"getURI",
"(",
")",
".",
"toString",
"(",
")",
".",
"startsWith",
"(",
"\"jar:\"",
")",
")",
"{",
"// Lo... | Reads WSDL definition from resource.
@param wsdl
@return
@throws IOException
@throws WSDLException | [
"Reads",
"WSDL",
"definition",
"from",
"resource",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/xml/schema/WsdlXsdSchema.java#L185-L201 | train |
citrusframework/citrus | modules/citrus-ftp/src/main/java/com/consol/citrus/ftp/client/FtpClient.java | FtpClient.listFiles | protected FtpMessage listFiles(ListCommand list, TestContext context) {
String remoteFilePath = Optional.ofNullable(list.getTarget())
.map(ListCommand.Target::getPath)
.map(context::replaceDynamicContentInString)
... | java | protected FtpMessage listFiles(ListCommand list, TestContext context) {
String remoteFilePath = Optional.ofNullable(list.getTarget())
.map(ListCommand.Target::getPath)
.map(context::replaceDynamicContentInString)
... | [
"protected",
"FtpMessage",
"listFiles",
"(",
"ListCommand",
"list",
",",
"TestContext",
"context",
")",
"{",
"String",
"remoteFilePath",
"=",
"Optional",
".",
"ofNullable",
"(",
"list",
".",
"getTarget",
"(",
")",
")",
".",
"map",
"(",
"ListCommand",
".",
"T... | Perform list files operation and provide file information as response.
@param list
@param context
@return | [
"Perform",
"list",
"files",
"operation",
"and",
"provide",
"file",
"information",
"as",
"response",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-ftp/src/main/java/com/consol/citrus/ftp/client/FtpClient.java#L156-L179 | train |
citrusframework/citrus | modules/citrus-ftp/src/main/java/com/consol/citrus/ftp/client/FtpClient.java | FtpClient.deleteFile | protected FtpMessage deleteFile(DeleteCommand delete, TestContext context) {
String remoteFilePath = context.replaceDynamicContentInString(delete.getTarget().getPath());
try {
if (!StringUtils.hasText(remoteFilePath)) {
return null;
}
boolean success... | java | protected FtpMessage deleteFile(DeleteCommand delete, TestContext context) {
String remoteFilePath = context.replaceDynamicContentInString(delete.getTarget().getPath());
try {
if (!StringUtils.hasText(remoteFilePath)) {
return null;
}
boolean success... | [
"protected",
"FtpMessage",
"deleteFile",
"(",
"DeleteCommand",
"delete",
",",
"TestContext",
"context",
")",
"{",
"String",
"remoteFilePath",
"=",
"context",
".",
"replaceDynamicContentInString",
"(",
"delete",
".",
"getTarget",
"(",
")",
".",
"getPath",
"(",
")",... | Performs delete file operation.
@param delete
@param context | [
"Performs",
"delete",
"file",
"operation",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-ftp/src/main/java/com/consol/citrus/ftp/client/FtpClient.java#L186-L235 | train |
citrusframework/citrus | modules/citrus-ftp/src/main/java/com/consol/citrus/ftp/client/FtpClient.java | FtpClient.isDirectory | protected boolean isDirectory(String remoteFilePath) throws IOException {
if (!ftpClient.changeWorkingDirectory(remoteFilePath)) { // not a directory or not accessible
switch (ftpClient.listFiles(remoteFilePath).length) {
case 0:
throw new CitrusRuntimeException(... | java | protected boolean isDirectory(String remoteFilePath) throws IOException {
if (!ftpClient.changeWorkingDirectory(remoteFilePath)) { // not a directory or not accessible
switch (ftpClient.listFiles(remoteFilePath).length) {
case 0:
throw new CitrusRuntimeException(... | [
"protected",
"boolean",
"isDirectory",
"(",
"String",
"remoteFilePath",
")",
"throws",
"IOException",
"{",
"if",
"(",
"!",
"ftpClient",
".",
"changeWorkingDirectory",
"(",
"remoteFilePath",
")",
")",
"{",
"// not a directory or not accessible",
"switch",
"(",
"ftpClie... | Check file path type directory or file.
@param remoteFilePath
@return
@throws IOException | [
"Check",
"file",
"path",
"type",
"directory",
"or",
"file",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-ftp/src/main/java/com/consol/citrus/ftp/client/FtpClient.java#L243-L257 | train |
citrusframework/citrus | modules/citrus-ftp/src/main/java/com/consol/citrus/ftp/client/FtpClient.java | FtpClient.storeFile | protected FtpMessage storeFile(PutCommand command, TestContext context) {
try {
String localFilePath = context.replaceDynamicContentInString(command.getFile().getPath());
String remoteFilePath = addFileNameToTargetPath(localFilePath, context.replaceDynamicContentInString(command.getTarge... | java | protected FtpMessage storeFile(PutCommand command, TestContext context) {
try {
String localFilePath = context.replaceDynamicContentInString(command.getFile().getPath());
String remoteFilePath = addFileNameToTargetPath(localFilePath, context.replaceDynamicContentInString(command.getTarge... | [
"protected",
"FtpMessage",
"storeFile",
"(",
"PutCommand",
"command",
",",
"TestContext",
"context",
")",
"{",
"try",
"{",
"String",
"localFilePath",
"=",
"context",
".",
"replaceDynamicContentInString",
"(",
"command",
".",
"getFile",
"(",
")",
".",
"getPath",
... | Performs store file operation.
@param command
@param context | [
"Performs",
"store",
"file",
"operation",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-ftp/src/main/java/com/consol/citrus/ftp/client/FtpClient.java#L264-L283 | train |
citrusframework/citrus | modules/citrus-ftp/src/main/java/com/consol/citrus/ftp/client/FtpClient.java | FtpClient.getLocalFileInputStream | protected InputStream getLocalFileInputStream(String path, String dataType, TestContext context) throws IOException {
if (dataType.equals(DataType.ASCII.name())) {
String content = context.replaceDynamicContentInString(FileUtils.readToString(FileUtils.getFileResource(path)));
return new ... | java | protected InputStream getLocalFileInputStream(String path, String dataType, TestContext context) throws IOException {
if (dataType.equals(DataType.ASCII.name())) {
String content = context.replaceDynamicContentInString(FileUtils.readToString(FileUtils.getFileResource(path)));
return new ... | [
"protected",
"InputStream",
"getLocalFileInputStream",
"(",
"String",
"path",
",",
"String",
"dataType",
",",
"TestContext",
"context",
")",
"throws",
"IOException",
"{",
"if",
"(",
"dataType",
".",
"equals",
"(",
"DataType",
".",
"ASCII",
".",
"name",
"(",
")... | Constructs local file input stream. When using ASCII data type the test variable replacement is activated otherwise
plain byte stream is used.
@param path
@param dataType
@param context
@return
@throws IOException | [
"Constructs",
"local",
"file",
"input",
"stream",
".",
"When",
"using",
"ASCII",
"data",
"type",
"the",
"test",
"variable",
"replacement",
"is",
"activated",
"otherwise",
"plain",
"byte",
"stream",
"is",
"used",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-ftp/src/main/java/com/consol/citrus/ftp/client/FtpClient.java#L295-L302 | train |
citrusframework/citrus | modules/citrus-ftp/src/main/java/com/consol/citrus/ftp/client/FtpClient.java | FtpClient.retrieveFile | protected FtpMessage retrieveFile(GetCommand command, TestContext context) {
try {
String remoteFilePath = context.replaceDynamicContentInString(command.getFile().getPath());
String localFilePath = addFileNameToTargetPath(remoteFilePath, context.replaceDynamicContentInString(command.getT... | java | protected FtpMessage retrieveFile(GetCommand command, TestContext context) {
try {
String remoteFilePath = context.replaceDynamicContentInString(command.getFile().getPath());
String localFilePath = addFileNameToTargetPath(remoteFilePath, context.replaceDynamicContentInString(command.getT... | [
"protected",
"FtpMessage",
"retrieveFile",
"(",
"GetCommand",
"command",
",",
"TestContext",
"context",
")",
"{",
"try",
"{",
"String",
"remoteFilePath",
"=",
"context",
".",
"replaceDynamicContentInString",
"(",
"command",
".",
"getFile",
"(",
")",
".",
"getPath"... | Performs retrieve file operation.
@param command | [
"Performs",
"retrieve",
"file",
"operation",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-ftp/src/main/java/com/consol/citrus/ftp/client/FtpClient.java#L308-L342 | train |
citrusframework/citrus | modules/citrus-ftp/src/main/java/com/consol/citrus/ftp/client/FtpClient.java | FtpClient.getFileType | private int getFileType(String typeInfo) {
switch (typeInfo) {
case "ASCII":
return FTP.ASCII_FILE_TYPE;
case "BINARY":
return FTP.BINARY_FILE_TYPE;
case "EBCDIC":
return FTP.EBCDIC_FILE_TYPE;
case "LOCAL":
... | java | private int getFileType(String typeInfo) {
switch (typeInfo) {
case "ASCII":
return FTP.ASCII_FILE_TYPE;
case "BINARY":
return FTP.BINARY_FILE_TYPE;
case "EBCDIC":
return FTP.EBCDIC_FILE_TYPE;
case "LOCAL":
... | [
"private",
"int",
"getFileType",
"(",
"String",
"typeInfo",
")",
"{",
"switch",
"(",
"typeInfo",
")",
"{",
"case",
"\"ASCII\"",
":",
"return",
"FTP",
".",
"ASCII_FILE_TYPE",
";",
"case",
"\"BINARY\"",
":",
"return",
"FTP",
".",
"BINARY_FILE_TYPE",
";",
"case... | Get file type from info string.
@param typeInfo
@return | [
"Get",
"file",
"type",
"from",
"info",
"string",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-ftp/src/main/java/com/consol/citrus/ftp/client/FtpClient.java#L349-L362 | train |
citrusframework/citrus | modules/citrus-ftp/src/main/java/com/consol/citrus/ftp/client/FtpClient.java | FtpClient.connectAndLogin | protected void connectAndLogin() throws IOException {
if (!ftpClient.isConnected()) {
ftpClient.connect(getEndpointConfiguration().getHost(), getEndpointConfiguration().getPort());
if (log.isDebugEnabled()) {
log.debug("Connected to FTP server: " + ftpClient.getReplyStri... | java | protected void connectAndLogin() throws IOException {
if (!ftpClient.isConnected()) {
ftpClient.connect(getEndpointConfiguration().getHost(), getEndpointConfiguration().getPort());
if (log.isDebugEnabled()) {
log.debug("Connected to FTP server: " + ftpClient.getReplyStri... | [
"protected",
"void",
"connectAndLogin",
"(",
")",
"throws",
"IOException",
"{",
"if",
"(",
"!",
"ftpClient",
".",
"isConnected",
"(",
")",
")",
"{",
"ftpClient",
".",
"connect",
"(",
"getEndpointConfiguration",
"(",
")",
".",
"getHost",
"(",
")",
",",
"get... | Opens a new connection and performs login with user name and password if set.
@throws IOException | [
"Opens",
"a",
"new",
"connection",
"and",
"performs",
"login",
"with",
"user",
"name",
"and",
"password",
"if",
"set",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-ftp/src/main/java/com/consol/citrus/ftp/client/FtpClient.java#L388-L419 | train |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/validation/xml/XmlMarshallingValidationCallback.java | XmlMarshallingValidationCallback.getPayloadSource | private Source getPayloadSource(Object payload) {
Source source = null;
if (payload instanceof String) {
source = new StringSource((String) payload);
} else if (payload instanceof File) {
source = new StreamSource((File) payload);
} else if (payload insta... | java | private Source getPayloadSource(Object payload) {
Source source = null;
if (payload instanceof String) {
source = new StringSource((String) payload);
} else if (payload instanceof File) {
source = new StreamSource((File) payload);
} else if (payload insta... | [
"private",
"Source",
"getPayloadSource",
"(",
"Object",
"payload",
")",
"{",
"Source",
"source",
"=",
"null",
";",
"if",
"(",
"payload",
"instanceof",
"String",
")",
"{",
"source",
"=",
"new",
"StringSource",
"(",
"(",
"String",
")",
"payload",
")",
";",
... | Creates the payload source for unmarshalling.
@param payload
@return | [
"Creates",
"the",
"payload",
"source",
"for",
"unmarshalling",
"."
] | 55c58ef74c01d511615e43646ca25c1b2301c56d | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/validation/xml/XmlMarshallingValidationCallback.java#L85-L103 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.