id
int32
0
165k
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
51,600
citrusframework/citrus
modules/citrus-core/src/main/java/com/consol/citrus/message/ZipMessage.java
ZipMessage.addEntry
public ZipMessage addEntry(File file) { try { addEntry(new Entry(file)); } catch (IOException e) { throw new CitrusRuntimeException("Failed to read zip entry content from given file", e); } return this; }
java
public ZipMessage addEntry(File file) { try { addEntry(new Entry(file)); } catch (IOException e) { throw new CitrusRuntimeException("Failed to read zip entry content from given file", e); } return this; }
[ "public", "ZipMessage", "addEntry", "(", "File", "file", ")", "{", "try", "{", "addEntry", "(", "new", "Entry", "(", "file", ")", ")", ";", "}", "catch", "(", "IOException", "e", ")", "{", "throw", "new", "CitrusRuntimeException", "(", "\"Failed to read zi...
Adds new zip archive entry. Entry can be a file or directory. In case of directory all files will be automatically added to the zip archive. Directory structures are retained throughout this process. @param file @return
[ "Adds", "new", "zip", "archive", "entry", ".", "Entry", "can", "be", "a", "file", "or", "directory", ".", "In", "case", "of", "directory", "all", "files", "will", "be", "automatically", "added", "to", "the", "zip", "archive", ".", "Directory", "structures"...
55c58ef74c01d511615e43646ca25c1b2301c56d
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/message/ZipMessage.java#L83-L90
51,601
citrusframework/citrus
modules/citrus-core/src/main/java/com/consol/citrus/message/ZipMessage.java
ZipMessage.addEntry
public ZipMessage addEntry(String fileName, byte[] content) { Entry entry = new Entry(fileName); entry.setContent(content); addEntry(entry); return this; }
java
public ZipMessage addEntry(String fileName, byte[] content) { Entry entry = new Entry(fileName); entry.setContent(content); addEntry(entry); return this; }
[ "public", "ZipMessage", "addEntry", "(", "String", "fileName", ",", "byte", "[", "]", "content", ")", "{", "Entry", "entry", "=", "new", "Entry", "(", "fileName", ")", ";", "entry", ".", "setContent", "(", "content", ")", ";", "addEntry", "(", "entry", ...
Adds new zip archive entry with given content. @param fileName @param content @return
[ "Adds", "new", "zip", "archive", "entry", "with", "given", "content", "." ]
55c58ef74c01d511615e43646ca25c1b2301c56d
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/message/ZipMessage.java#L99-L104
51,602
citrusframework/citrus
modules/citrus-ws/src/main/java/com/consol/citrus/ws/message/converter/SoapMessageConverter.java
SoapMessageConverter.handleInboundSoapMessage
protected void handleInboundSoapMessage(final org.springframework.ws.soap.SoapMessage soapMessage, final SoapMessage message, final WebServiceEndpointConfiguration endpointConfiguration) { handleInboundNamespaces(soapMessage...
java
protected void handleInboundSoapMessage(final org.springframework.ws.soap.SoapMessage soapMessage, final SoapMessage message, final WebServiceEndpointConfiguration endpointConfiguration) { handleInboundNamespaces(soapMessage...
[ "protected", "void", "handleInboundSoapMessage", "(", "final", "org", ".", "springframework", ".", "ws", ".", "soap", ".", "SoapMessage", "soapMessage", ",", "final", "SoapMessage", "message", ",", "final", "WebServiceEndpointConfiguration", "endpointConfiguration", ")"...
Method handles SOAP specific message information such as SOAP action headers and SOAP attachments. @param soapMessage @param message @param endpointConfiguration
[ "Method", "handles", "SOAP", "specific", "message", "information", "such", "as", "SOAP", "action", "headers", "and", "SOAP", "attachments", "." ]
55c58ef74c01d511615e43646ca25c1b2301c56d
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-ws/src/main/java/com/consol/citrus/ws/message/converter/SoapMessageConverter.java#L168-L178
51,603
citrusframework/citrus
modules/citrus-ws/src/main/java/com/consol/citrus/ws/message/converter/SoapMessageConverter.java
SoapMessageConverter.handleInboundHttpHeaders
protected void handleInboundHttpHeaders(final SoapMessage message, final WebServiceEndpointConfiguration endpointConfiguration) { final TransportContext transportContext = TransportContextHolder.getTransportContext(); if (transportContext == null) { ...
java
protected void handleInboundHttpHeaders(final SoapMessage message, final WebServiceEndpointConfiguration endpointConfiguration) { final TransportContext transportContext = TransportContextHolder.getTransportContext(); if (transportContext == null) { ...
[ "protected", "void", "handleInboundHttpHeaders", "(", "final", "SoapMessage", "message", ",", "final", "WebServiceEndpointConfiguration", "endpointConfiguration", ")", "{", "final", "TransportContext", "transportContext", "=", "TransportContextHolder", ".", "getTransportContext...
Reads information from Http connection and adds them as Http marked headers to internal message representation. @param message
[ "Reads", "information", "from", "Http", "connection", "and", "adds", "them", "as", "Http", "marked", "headers", "to", "internal", "message", "representation", "." ]
55c58ef74c01d511615e43646ca25c1b2301c56d
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-ws/src/main/java/com/consol/citrus/ws/message/converter/SoapMessageConverter.java#L220-L258
51,604
citrusframework/citrus
modules/citrus-ws/src/main/java/com/consol/citrus/ws/message/converter/SoapMessageConverter.java
SoapMessageConverter.handleInboundSoapHeaders
protected void handleInboundSoapHeaders(final org.springframework.ws.soap.SoapMessage soapMessage, final SoapMessage message) { try { final SoapHeader soapHeader = soapMessage.getSoapHeader(); if (soapHeader != null) { final It...
java
protected void handleInboundSoapHeaders(final org.springframework.ws.soap.SoapMessage soapMessage, final SoapMessage message) { try { final SoapHeader soapHeader = soapMessage.getSoapHeader(); if (soapHeader != null) { final It...
[ "protected", "void", "handleInboundSoapHeaders", "(", "final", "org", ".", "springframework", ".", "ws", ".", "soap", ".", "SoapMessage", "soapMessage", ",", "final", "SoapMessage", "message", ")", "{", "try", "{", "final", "SoapHeader", "soapHeader", "=", "soap...
Reads all soap headers from web service message and adds them to message builder as normal headers. Also takes care of soap action header. @param soapMessage the web service message. @param message the response message builder.
[ "Reads", "all", "soap", "headers", "from", "web", "service", "message", "and", "adds", "them", "to", "message", "builder", "as", "normal", "headers", ".", "Also", "takes", "care", "of", "soap", "action", "header", "." ]
55c58ef74c01d511615e43646ca25c1b2301c56d
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-ws/src/main/java/com/consol/citrus/ws/message/converter/SoapMessageConverter.java#L267-L304
51,605
citrusframework/citrus
modules/citrus-ws/src/main/java/com/consol/citrus/ws/message/converter/SoapMessageConverter.java
SoapMessageConverter.handleOutboundMimeMessageHeader
private void handleOutboundMimeMessageHeader(final org.springframework.ws.soap.SoapMessage message, final String name, final Object value, final boolean handleMimeHeaders) {...
java
private void handleOutboundMimeMessageHeader(final org.springframework.ws.soap.SoapMessage message, final String name, final Object value, final boolean handleMimeHeaders) {...
[ "private", "void", "handleOutboundMimeMessageHeader", "(", "final", "org", ".", "springframework", ".", "ws", ".", "soap", ".", "SoapMessage", "message", ",", "final", "String", "name", ",", "final", "Object", "value", ",", "final", "boolean", "handleMimeHeaders",...
Adds a HTTP message header to the SOAP message. @param message the SOAP request message. @param name the header name. @param value the header value. @param handleMimeHeaders should handle mime headers.
[ "Adds", "a", "HTTP", "message", "header", "to", "the", "SOAP", "message", "." ]
55c58ef74c01d511615e43646ca25c1b2301c56d
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-ws/src/main/java/com/consol/citrus/ws/message/converter/SoapMessageConverter.java#L314-L331
51,606
citrusframework/citrus
modules/citrus-ws/src/main/java/com/consol/citrus/ws/message/converter/SoapMessageConverter.java
SoapMessageConverter.handleInboundMessageProperties
protected void handleInboundMessageProperties(final MessageContext messageContext, final SoapMessage message) { if (messageContext == null) { return; } final String[] propertyNames = messageContext.getPropertyNames(); if (propertyNames !...
java
protected void handleInboundMessageProperties(final MessageContext messageContext, final SoapMessage message) { if (messageContext == null) { return; } final String[] propertyNames = messageContext.getPropertyNames(); if (propertyNames !...
[ "protected", "void", "handleInboundMessageProperties", "(", "final", "MessageContext", "messageContext", ",", "final", "SoapMessage", "message", ")", "{", "if", "(", "messageContext", "==", "null", ")", "{", "return", ";", "}", "final", "String", "[", "]", "prop...
Adds all message properties from web service message to message builder as normal header entries. @param messageContext the web service request message context. @param message the request message builder.
[ "Adds", "all", "message", "properties", "from", "web", "service", "message", "to", "message", "builder", "as", "normal", "header", "entries", "." ]
55c58ef74c01d511615e43646ca25c1b2301c56d
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-ws/src/main/java/com/consol/citrus/ws/message/converter/SoapMessageConverter.java#L384-L394
51,607
citrusframework/citrus
modules/citrus-ws/src/main/java/com/consol/citrus/ws/message/converter/SoapMessageConverter.java
SoapMessageConverter.handleInboundAttachments
protected void handleInboundAttachments(final org.springframework.ws.soap.SoapMessage soapMessage, final SoapMessage message) { final Iterator<Attachment> attachments = soapMessage.getAttachments(); while (attachments.hasNext()) { final Attachment...
java
protected void handleInboundAttachments(final org.springframework.ws.soap.SoapMessage soapMessage, final SoapMessage message) { final Iterator<Attachment> attachments = soapMessage.getAttachments(); while (attachments.hasNext()) { final Attachment...
[ "protected", "void", "handleInboundAttachments", "(", "final", "org", ".", "springframework", ".", "ws", ".", "soap", ".", "SoapMessage", "soapMessage", ",", "final", "SoapMessage", "message", ")", "{", "final", "Iterator", "<", "Attachment", ">", "attachments", ...
Adds attachments if present in soap web service message. @param soapMessage the web service message. @param message the response message builder.
[ "Adds", "attachments", "if", "present", "in", "soap", "web", "service", "message", "." ]
55c58ef74c01d511615e43646ca25c1b2301c56d
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-ws/src/main/java/com/consol/citrus/ws/message/converter/SoapMessageConverter.java#L402-L416
51,608
citrusframework/citrus
modules/citrus-core/src/main/java/com/consol/citrus/validation/DefaultMessageHeaderValidator.java
DefaultMessageHeaderValidator.getHeaderName
private String getHeaderName(String name, Map<String, Object> receivedHeaders, TestContext context, HeaderValidationContext validationContext) { String headerName = context.resolveDynamicValue(name); if (!receivedHeaders.containsKey(headerName) && validationContext.isHeaderNameIgnoreCas...
java
private String getHeaderName(String name, Map<String, Object> receivedHeaders, TestContext context, HeaderValidationContext validationContext) { String headerName = context.resolveDynamicValue(name); if (!receivedHeaders.containsKey(headerName) && validationContext.isHeaderNameIgnoreCas...
[ "private", "String", "getHeaderName", "(", "String", "name", ",", "Map", "<", "String", ",", "Object", ">", "receivedHeaders", ",", "TestContext", "context", ",", "HeaderValidationContext", "validationContext", ")", "{", "String", "headerName", "=", "context", "."...
Get header name from control message but also check if header expression is a variable or function. In addition to that find case insensitive header name in received message when feature is activated. @param name @param receivedHeaders @param context @param validationContext @return
[ "Get", "header", "name", "from", "control", "message", "but", "also", "check", "if", "header", "expression", "is", "a", "variable", "or", "function", ".", "In", "addition", "to", "that", "find", "case", "insensitive", "header", "name", "in", "received", "mes...
55c58ef74c01d511615e43646ca25c1b2301c56d
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/validation/DefaultMessageHeaderValidator.java#L106-L127
51,609
citrusframework/citrus
modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/builder/WaitHttpConditionBuilder.java
WaitHttpConditionBuilder.status
public WaitHttpConditionBuilder status(HttpStatus status) { getCondition().setHttpResponseCode(String.valueOf(status.value())); return this; }
java
public WaitHttpConditionBuilder status(HttpStatus status) { getCondition().setHttpResponseCode(String.valueOf(status.value())); return this; }
[ "public", "WaitHttpConditionBuilder", "status", "(", "HttpStatus", "status", ")", "{", "getCondition", "(", ")", ".", "setHttpResponseCode", "(", "String", ".", "valueOf", "(", "status", ".", "value", "(", ")", ")", ")", ";", "return", "this", ";", "}" ]
Sets the Http status code to check. @param status @return
[ "Sets", "the", "Http", "status", "code", "to", "check", "." ]
55c58ef74c01d511615e43646ca25c1b2301c56d
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/builder/WaitHttpConditionBuilder.java#L69-L72
51,610
citrusframework/citrus
modules/citrus-core/src/main/java/com/consol/citrus/validation/MessageValidatorRegistry.java
MessageValidatorRegistry.findMessageValidators
public List<MessageValidator<? extends ValidationContext>> findMessageValidators(String messageType, Message message) { List<MessageValidator<? extends ValidationContext>> matchingValidators = new ArrayList<>(); for (MessageValidator<? extends ValidationContext> validator : messageValidators) { ...
java
public List<MessageValidator<? extends ValidationContext>> findMessageValidators(String messageType, Message message) { List<MessageValidator<? extends ValidationContext>> matchingValidators = new ArrayList<>(); for (MessageValidator<? extends ValidationContext> validator : messageValidators) { ...
[ "public", "List", "<", "MessageValidator", "<", "?", "extends", "ValidationContext", ">", ">", "findMessageValidators", "(", "String", "messageType", ",", "Message", "message", ")", "{", "List", "<", "MessageValidator", "<", "?", "extends", "ValidationContext", ">...
Finds matching message validators for this message type. @param messageType the message type @param message the message object @return the list of matching message validators.
[ "Finds", "matching", "message", "validators", "for", "this", "message", "type", "." ]
55c58ef74c01d511615e43646ca25c1b2301c56d
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/validation/MessageValidatorRegistry.java#L57-L92
51,611
citrusframework/citrus
modules/citrus-core/src/main/java/com/consol/citrus/validation/MessageValidatorRegistry.java
MessageValidatorRegistry.getDefaultMessageHeaderValidator
public MessageValidator getDefaultMessageHeaderValidator() { return messageValidators .stream() .filter(validator -> DefaultMessageHeaderValidator.class.isAssignableFrom(validator.getClass())) .findFirst() .orElse(null); }
java
public MessageValidator getDefaultMessageHeaderValidator() { return messageValidators .stream() .filter(validator -> DefaultMessageHeaderValidator.class.isAssignableFrom(validator.getClass())) .findFirst() .orElse(null); }
[ "public", "MessageValidator", "getDefaultMessageHeaderValidator", "(", ")", "{", "return", "messageValidators", ".", "stream", "(", ")", ".", "filter", "(", "validator", "->", "DefaultMessageHeaderValidator", ".", "class", ".", "isAssignableFrom", "(", "validator", "....
Gets the default message header validator. @return
[ "Gets", "the", "default", "message", "header", "validator", "." ]
55c58ef74c01d511615e43646ca25c1b2301c56d
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/validation/MessageValidatorRegistry.java#L137-L143
51,612
citrusframework/citrus
modules/citrus-jms/src/main/java/com/consol/citrus/jms/endpoint/JmsEndpointConfiguration.java
JmsEndpointConfiguration.createJmsTemplate
private void createJmsTemplate() { Assert.isTrue(this.connectionFactory != null, "Neither 'jmsTemplate' nor 'connectionFactory' is set correctly."); jmsTemplate = new JmsTemplate(); jmsTemplate.setConnectionFactory(this.connectionFactory); if (this.destination != null)...
java
private void createJmsTemplate() { Assert.isTrue(this.connectionFactory != null, "Neither 'jmsTemplate' nor 'connectionFactory' is set correctly."); jmsTemplate = new JmsTemplate(); jmsTemplate.setConnectionFactory(this.connectionFactory); if (this.destination != null)...
[ "private", "void", "createJmsTemplate", "(", ")", "{", "Assert", ".", "isTrue", "(", "this", ".", "connectionFactory", "!=", "null", ",", "\"Neither 'jmsTemplate' nor 'connectionFactory' is set correctly.\"", ")", ";", "jmsTemplate", "=", "new", "JmsTemplate", "(", ")...
Creates default JmsTemplate instance from connection factory and destination.
[ "Creates", "default", "JmsTemplate", "instance", "from", "connection", "factory", "and", "destination", "." ]
55c58ef74c01d511615e43646ca25c1b2301c56d
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-jms/src/main/java/com/consol/citrus/jms/endpoint/JmsEndpointConfiguration.java#L102-L121
51,613
citrusframework/citrus
modules/citrus-selenium/src/main/java/com/consol/citrus/selenium/endpoint/SeleniumBrowserConfiguration.java
SeleniumBrowserConfiguration.getFirefoxProfile
public FirefoxProfile getFirefoxProfile() { if (firefoxProfile == null) { firefoxProfile = new FirefoxProfile(); firefoxProfile.setAcceptUntrustedCertificates(true); firefoxProfile.setAssumeUntrustedCertificateIssuer(false); /* default download folder, set to 2 ...
java
public FirefoxProfile getFirefoxProfile() { if (firefoxProfile == null) { firefoxProfile = new FirefoxProfile(); firefoxProfile.setAcceptUntrustedCertificates(true); firefoxProfile.setAssumeUntrustedCertificateIssuer(false); /* default download folder, set to 2 ...
[ "public", "FirefoxProfile", "getFirefoxProfile", "(", ")", "{", "if", "(", "firefoxProfile", "==", "null", ")", "{", "firefoxProfile", "=", "new", "FirefoxProfile", "(", ")", ";", "firefoxProfile", ".", "setAcceptUntrustedCertificates", "(", "true", ")", ";", "f...
Gets the firefoxProfile. @return
[ "Gets", "the", "firefoxProfile", "." ]
55c58ef74c01d511615e43646ca25c1b2301c56d
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-selenium/src/main/java/com/consol/citrus/selenium/endpoint/SeleniumBrowserConfiguration.java#L175-L193
51,614
citrusframework/citrus
modules/citrus-jdbc/src/main/java/com/consol/citrus/jdbc/server/JdbcEndpointAdapterController.java
JdbcEndpointAdapterController.openConnection
@Override public void openConnection(Map<String, String> properties) throws JdbcServerException { if (!endpointConfiguration.isAutoConnect()) { List<OpenConnection.Property> propertyList = convertToPropertyList(properties); handleMessageAndCheckResponse(JdbcMessage.openConnection(pro...
java
@Override public void openConnection(Map<String, String> properties) throws JdbcServerException { if (!endpointConfiguration.isAutoConnect()) { List<OpenConnection.Property> propertyList = convertToPropertyList(properties); handleMessageAndCheckResponse(JdbcMessage.openConnection(pro...
[ "@", "Override", "public", "void", "openConnection", "(", "Map", "<", "String", ",", "String", ">", "properties", ")", "throws", "JdbcServerException", "{", "if", "(", "!", "endpointConfiguration", ".", "isAutoConnect", "(", ")", ")", "{", "List", "<", "Open...
Opens the connection with the given properties @param properties The properties to open the connection with @throws JdbcServerException In case that the maximum connections have been reached
[ "Opens", "the", "connection", "with", "the", "given", "properties" ]
55c58ef74c01d511615e43646ca25c1b2301c56d
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-jdbc/src/main/java/com/consol/citrus/jdbc/server/JdbcEndpointAdapterController.java#L134-L147
51,615
citrusframework/citrus
modules/citrus-jdbc/src/main/java/com/consol/citrus/jdbc/server/JdbcEndpointAdapterController.java
JdbcEndpointAdapterController.closeConnection
@Override public void closeConnection() throws JdbcServerException { if (!endpointConfiguration.isAutoConnect()) { handleMessageAndCheckResponse(JdbcMessage.closeConnection()); } if (connections.decrementAndGet() < 0) { connections.set(0); } }
java
@Override public void closeConnection() throws JdbcServerException { if (!endpointConfiguration.isAutoConnect()) { handleMessageAndCheckResponse(JdbcMessage.closeConnection()); } if (connections.decrementAndGet() < 0) { connections.set(0); } }
[ "@", "Override", "public", "void", "closeConnection", "(", ")", "throws", "JdbcServerException", "{", "if", "(", "!", "endpointConfiguration", ".", "isAutoConnect", "(", ")", ")", "{", "handleMessageAndCheckResponse", "(", "JdbcMessage", ".", "closeConnection", "(",...
Closes the connection @throws JdbcServerException In case that the connection could not be closed
[ "Closes", "the", "connection" ]
55c58ef74c01d511615e43646ca25c1b2301c56d
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-jdbc/src/main/java/com/consol/citrus/jdbc/server/JdbcEndpointAdapterController.java#L153-L162
51,616
citrusframework/citrus
modules/citrus-jdbc/src/main/java/com/consol/citrus/jdbc/server/JdbcEndpointAdapterController.java
JdbcEndpointAdapterController.createPreparedStatement
@Override public void createPreparedStatement(String stmt) throws JdbcServerException { if (!endpointConfiguration.isAutoCreateStatement()) { handleMessageAndCheckResponse(JdbcMessage.createPreparedStatement(stmt)); } }
java
@Override public void createPreparedStatement(String stmt) throws JdbcServerException { if (!endpointConfiguration.isAutoCreateStatement()) { handleMessageAndCheckResponse(JdbcMessage.createPreparedStatement(stmt)); } }
[ "@", "Override", "public", "void", "createPreparedStatement", "(", "String", "stmt", ")", "throws", "JdbcServerException", "{", "if", "(", "!", "endpointConfiguration", ".", "isAutoCreateStatement", "(", ")", ")", "{", "handleMessageAndCheckResponse", "(", "JdbcMessag...
Creates a prepared statement @param stmt The statement to create @throws JdbcServerException In case that the statement was not successful
[ "Creates", "a", "prepared", "statement" ]
55c58ef74c01d511615e43646ca25c1b2301c56d
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-jdbc/src/main/java/com/consol/citrus/jdbc/server/JdbcEndpointAdapterController.java#L169-L174
51,617
citrusframework/citrus
modules/citrus-jdbc/src/main/java/com/consol/citrus/jdbc/server/JdbcEndpointAdapterController.java
JdbcEndpointAdapterController.executeQuery
@Override public DataSet executeQuery(String query) throws JdbcServerException { log.info("Received execute query request: " + query); Message response = handleMessageAndCheckResponse(JdbcMessage.execute(query)); return dataSetCreator.createDataSet(response, getMessageType(response)); }
java
@Override public DataSet executeQuery(String query) throws JdbcServerException { log.info("Received execute query request: " + query); Message response = handleMessageAndCheckResponse(JdbcMessage.execute(query)); return dataSetCreator.createDataSet(response, getMessageType(response)); }
[ "@", "Override", "public", "DataSet", "executeQuery", "(", "String", "query", ")", "throws", "JdbcServerException", "{", "log", ".", "info", "(", "\"Received execute query request: \"", "+", "query", ")", ";", "Message", "response", "=", "handleMessageAndCheckResponse...
Executes a given query and returns the mapped result @param query The query to execute @return The DataSet containing the query result @throws JdbcServerException In case that the query was not successful
[ "Executes", "a", "given", "query", "and", "returns", "the", "mapped", "result" ]
55c58ef74c01d511615e43646ca25c1b2301c56d
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-jdbc/src/main/java/com/consol/citrus/jdbc/server/JdbcEndpointAdapterController.java#L193-L198
51,618
citrusframework/citrus
modules/citrus-jdbc/src/main/java/com/consol/citrus/jdbc/server/JdbcEndpointAdapterController.java
JdbcEndpointAdapterController.executeStatement
@Override public DataSet executeStatement(String stmt) throws JdbcServerException { log.info("Received execute statement request: " + stmt); Message response = handleMessageAndCheckResponse(JdbcMessage.execute(stmt)); return dataSetCreator.createDataSet(response, getMessageType(response)); ...
java
@Override public DataSet executeStatement(String stmt) throws JdbcServerException { log.info("Received execute statement request: " + stmt); Message response = handleMessageAndCheckResponse(JdbcMessage.execute(stmt)); return dataSetCreator.createDataSet(response, getMessageType(response)); ...
[ "@", "Override", "public", "DataSet", "executeStatement", "(", "String", "stmt", ")", "throws", "JdbcServerException", "{", "log", ".", "info", "(", "\"Received execute statement request: \"", "+", "stmt", ")", ";", "Message", "response", "=", "handleMessageAndCheckRe...
Executes the given statement @param stmt The statement to be executed @throws JdbcServerException In case that the execution was not successful
[ "Executes", "the", "given", "statement" ]
55c58ef74c01d511615e43646ca25c1b2301c56d
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-jdbc/src/main/java/com/consol/citrus/jdbc/server/JdbcEndpointAdapterController.java#L205-L210
51,619
citrusframework/citrus
modules/citrus-jdbc/src/main/java/com/consol/citrus/jdbc/server/JdbcEndpointAdapterController.java
JdbcEndpointAdapterController.executeUpdate
@Override public int executeUpdate(String updateSql) throws JdbcServerException { log.info("Received execute update request: " + updateSql); Message response = handleMessageAndCheckResponse(JdbcMessage.execute(updateSql)); return Optional.ofNullable( response.getHeader(JdbcMe...
java
@Override public int executeUpdate(String updateSql) throws JdbcServerException { log.info("Received execute update request: " + updateSql); Message response = handleMessageAndCheckResponse(JdbcMessage.execute(updateSql)); return Optional.ofNullable( response.getHeader(JdbcMe...
[ "@", "Override", "public", "int", "executeUpdate", "(", "String", "updateSql", ")", "throws", "JdbcServerException", "{", "log", ".", "info", "(", "\"Received execute update request: \"", "+", "updateSql", ")", ";", "Message", "response", "=", "handleMessageAndCheckRe...
Executes the given update @param updateSql The update statement to be executed @throws JdbcServerException In case that the execution was not successful
[ "Executes", "the", "given", "update" ]
55c58ef74c01d511615e43646ca25c1b2301c56d
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-jdbc/src/main/java/com/consol/citrus/jdbc/server/JdbcEndpointAdapterController.java#L217-L225
51,620
citrusframework/citrus
modules/citrus-jdbc/src/main/java/com/consol/citrus/jdbc/server/JdbcEndpointAdapterController.java
JdbcEndpointAdapterController.setTransactionState
@Override public void setTransactionState(boolean transactionState) { if (log.isDebugEnabled()) { log.debug(String.format("Received transaction state change: '%s':%n%s", endpointConfiguration.getServerConfiguration().getDatabaseName(), String.valueOf(trans...
java
@Override public void setTransactionState(boolean transactionState) { if (log.isDebugEnabled()) { log.debug(String.format("Received transaction state change: '%s':%n%s", endpointConfiguration.getServerConfiguration().getDatabaseName(), String.valueOf(trans...
[ "@", "Override", "public", "void", "setTransactionState", "(", "boolean", "transactionState", ")", "{", "if", "(", "log", ".", "isDebugEnabled", "(", ")", ")", "{", "log", ".", "debug", "(", "String", ".", "format", "(", "\"Received transaction state change: '%s...
Sets the transaction state of the database connection @param transactionState The boolean value whether the server is in transaction state.
[ "Sets", "the", "transaction", "state", "of", "the", "database", "connection" ]
55c58ef74c01d511615e43646ca25c1b2301c56d
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-jdbc/src/main/java/com/consol/citrus/jdbc/server/JdbcEndpointAdapterController.java#L242-L254
51,621
citrusframework/citrus
modules/citrus-jdbc/src/main/java/com/consol/citrus/jdbc/server/JdbcEndpointAdapterController.java
JdbcEndpointAdapterController.commitStatements
@Override public void commitStatements() { if (log.isDebugEnabled()) { log.debug(String.format("Received transaction commit: '%s':%n", endpointConfiguration.getServerConfiguration().getDatabaseName())); } if(!endpointConfiguration.isAutoTransactionHandling())...
java
@Override public void commitStatements() { if (log.isDebugEnabled()) { log.debug(String.format("Received transaction commit: '%s':%n", endpointConfiguration.getServerConfiguration().getDatabaseName())); } if(!endpointConfiguration.isAutoTransactionHandling())...
[ "@", "Override", "public", "void", "commitStatements", "(", ")", "{", "if", "(", "log", ".", "isDebugEnabled", "(", ")", ")", "{", "log", ".", "debug", "(", "String", ".", "format", "(", "\"Received transaction commit: '%s':%n\"", ",", "endpointConfiguration", ...
Commits the transaction statements
[ "Commits", "the", "transaction", "statements" ]
55c58ef74c01d511615e43646ca25c1b2301c56d
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-jdbc/src/main/java/com/consol/citrus/jdbc/server/JdbcEndpointAdapterController.java#L268-L278
51,622
citrusframework/citrus
modules/citrus-jdbc/src/main/java/com/consol/citrus/jdbc/server/JdbcEndpointAdapterController.java
JdbcEndpointAdapterController.rollbackStatements
@Override public void rollbackStatements() { if (log.isDebugEnabled()) { log.debug(String.format("Received transaction rollback: '%s':%n", endpointConfiguration.getServerConfiguration().getDatabaseName())); } if(!endpointConfiguration.isAutoTransactionHandlin...
java
@Override public void rollbackStatements() { if (log.isDebugEnabled()) { log.debug(String.format("Received transaction rollback: '%s':%n", endpointConfiguration.getServerConfiguration().getDatabaseName())); } if(!endpointConfiguration.isAutoTransactionHandlin...
[ "@", "Override", "public", "void", "rollbackStatements", "(", ")", "{", "if", "(", "log", ".", "isDebugEnabled", "(", ")", ")", "{", "log", ".", "debug", "(", "String", ".", "format", "(", "\"Received transaction rollback: '%s':%n\"", ",", "endpointConfiguration...
Performs a rollback on the current transaction
[ "Performs", "a", "rollback", "on", "the", "current", "transaction" ]
55c58ef74c01d511615e43646ca25c1b2301c56d
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-jdbc/src/main/java/com/consol/citrus/jdbc/server/JdbcEndpointAdapterController.java#L283-L293
51,623
citrusframework/citrus
modules/citrus-jdbc/src/main/java/com/consol/citrus/jdbc/server/JdbcEndpointAdapterController.java
JdbcEndpointAdapterController.createCallableStatement
@Override public void createCallableStatement(String sql) { if (!endpointConfiguration.isAutoCreateStatement()) { handleMessageAndCheckResponse(JdbcMessage.createCallableStatement(sql)); } }
java
@Override public void createCallableStatement(String sql) { if (!endpointConfiguration.isAutoCreateStatement()) { handleMessageAndCheckResponse(JdbcMessage.createCallableStatement(sql)); } }
[ "@", "Override", "public", "void", "createCallableStatement", "(", "String", "sql", ")", "{", "if", "(", "!", "endpointConfiguration", ".", "isAutoCreateStatement", "(", ")", ")", "{", "handleMessageAndCheckResponse", "(", "JdbcMessage", ".", "createCallableStatement"...
Creates a callable statement
[ "Creates", "a", "callable", "statement" ]
55c58ef74c01d511615e43646ca25c1b2301c56d
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-jdbc/src/main/java/com/consol/citrus/jdbc/server/JdbcEndpointAdapterController.java#L298-L303
51,624
citrusframework/citrus
modules/citrus-jdbc/src/main/java/com/consol/citrus/jdbc/server/JdbcEndpointAdapterController.java
JdbcEndpointAdapterController.getMessageType
private MessageType getMessageType(Message response) { String messageTypeString = (String) response.getHeader(MessageHeaders.MESSAGE_TYPE); if (MessageType.knows(messageTypeString)){ return MessageType.valueOf(messageTypeString.toUpperCase()); } return null; }
java
private MessageType getMessageType(Message response) { String messageTypeString = (String) response.getHeader(MessageHeaders.MESSAGE_TYPE); if (MessageType.knows(messageTypeString)){ return MessageType.valueOf(messageTypeString.toUpperCase()); } return null; }
[ "private", "MessageType", "getMessageType", "(", "Message", "response", ")", "{", "String", "messageTypeString", "=", "(", "String", ")", "response", ".", "getHeader", "(", "MessageHeaders", ".", "MESSAGE_TYPE", ")", ";", "if", "(", "MessageType", ".", "knows", ...
Determines the MessageType of the given response @param response The response to get the message type from @return The MessageType of the response
[ "Determines", "the", "MessageType", "of", "the", "given", "response" ]
55c58ef74c01d511615e43646ca25c1b2301c56d
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-jdbc/src/main/java/com/consol/citrus/jdbc/server/JdbcEndpointAdapterController.java#L310-L316
51,625
citrusframework/citrus
modules/citrus-jdbc/src/main/java/com/consol/citrus/jdbc/server/JdbcEndpointAdapterController.java
JdbcEndpointAdapterController.convertToPropertyList
private List<OpenConnection.Property> convertToPropertyList(Map<String, String> properties) { return properties.entrySet() .stream() .map(this::convertToProperty) .sorted(Comparator.comparingInt(OpenConnection.Property::hashCode)) .collect(Collecto...
java
private List<OpenConnection.Property> convertToPropertyList(Map<String, String> properties) { return properties.entrySet() .stream() .map(this::convertToProperty) .sorted(Comparator.comparingInt(OpenConnection.Property::hashCode)) .collect(Collecto...
[ "private", "List", "<", "OpenConnection", ".", "Property", ">", "convertToPropertyList", "(", "Map", "<", "String", ",", "String", ">", "properties", ")", "{", "return", "properties", ".", "entrySet", "(", ")", ".", "stream", "(", ")", ".", "map", "(", "...
Converts a property map propertyKey -> propertyValue to a list of OpenConnection.Properties @param properties The map to convert @return A list of Properties
[ "Converts", "a", "property", "map", "propertyKey", "-", ">", "propertyValue", "to", "a", "list", "of", "OpenConnection", ".", "Properties" ]
55c58ef74c01d511615e43646ca25c1b2301c56d
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-jdbc/src/main/java/com/consol/citrus/jdbc/server/JdbcEndpointAdapterController.java#L323-L329
51,626
citrusframework/citrus
modules/citrus-jdbc/src/main/java/com/consol/citrus/jdbc/server/JdbcEndpointAdapterController.java
JdbcEndpointAdapterController.convertToProperty
private OpenConnection.Property convertToProperty(Map.Entry<String, String> entry) { OpenConnection.Property property = new OpenConnection.Property(); property.setName(entry.getKey()); property.setValue(entry.getValue()); return property; }
java
private OpenConnection.Property convertToProperty(Map.Entry<String, String> entry) { OpenConnection.Property property = new OpenConnection.Property(); property.setName(entry.getKey()); property.setValue(entry.getValue()); return property; }
[ "private", "OpenConnection", ".", "Property", "convertToProperty", "(", "Map", ".", "Entry", "<", "String", ",", "String", ">", "entry", ")", "{", "OpenConnection", ".", "Property", "property", "=", "new", "OpenConnection", ".", "Property", "(", ")", ";", "p...
Converts a Map entry into a OpenConnection.Property @param entry The entry to convert @return the OpenConnection.Property representation
[ "Converts", "a", "Map", "entry", "into", "a", "OpenConnection", ".", "Property" ]
55c58ef74c01d511615e43646ca25c1b2301c56d
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-jdbc/src/main/java/com/consol/citrus/jdbc/server/JdbcEndpointAdapterController.java#L336-L341
51,627
citrusframework/citrus
modules/citrus-jdbc/src/main/java/com/consol/citrus/jdbc/server/JdbcEndpointAdapterController.java
JdbcEndpointAdapterController.handleMessageAndCheckResponse
private Message handleMessageAndCheckResponse(Message request) throws JdbcServerException { Message response = handleMessage(request); checkSuccess(response); return response; }
java
private Message handleMessageAndCheckResponse(Message request) throws JdbcServerException { Message response = handleMessage(request); checkSuccess(response); return response; }
[ "private", "Message", "handleMessageAndCheckResponse", "(", "Message", "request", ")", "throws", "JdbcServerException", "{", "Message", "response", "=", "handleMessage", "(", "request", ")", ";", "checkSuccess", "(", "response", ")", ";", "return", "response", ";", ...
Handle request message and check response is successful. @param request The request message to handle @return The response Message @throws JdbcServerException Thrown when the response has some exception header.
[ "Handle", "request", "message", "and", "check", "response", "is", "successful", "." ]
55c58ef74c01d511615e43646ca25c1b2301c56d
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-jdbc/src/main/java/com/consol/citrus/jdbc/server/JdbcEndpointAdapterController.java#L349-L353
51,628
citrusframework/citrus
modules/citrus-jdbc/src/main/java/com/consol/citrus/jdbc/server/JdbcEndpointAdapterController.java
JdbcEndpointAdapterController.checkSuccess
private void checkSuccess(Message response) throws JdbcServerException { OperationResult operationResult = null; if (response instanceof JdbcMessage || response.getPayload() instanceof OperationResult) { operationResult = response.getPayload(OperationResult.class); } else if (respons...
java
private void checkSuccess(Message response) throws JdbcServerException { OperationResult operationResult = null; if (response instanceof JdbcMessage || response.getPayload() instanceof OperationResult) { operationResult = response.getPayload(OperationResult.class); } else if (respons...
[ "private", "void", "checkSuccess", "(", "Message", "response", ")", "throws", "JdbcServerException", "{", "OperationResult", "operationResult", "=", "null", ";", "if", "(", "response", "instanceof", "JdbcMessage", "||", "response", ".", "getPayload", "(", ")", "in...
Check that response is not having an exception message. @param response The response message to check @throws JdbcServerException In case the message contains a error.
[ "Check", "that", "response", "is", "not", "having", "an", "exception", "message", "." ]
55c58ef74c01d511615e43646ca25c1b2301c56d
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-jdbc/src/main/java/com/consol/citrus/jdbc/server/JdbcEndpointAdapterController.java#L360-L371
51,629
citrusframework/citrus
modules/citrus-core/src/main/java/com/consol/citrus/functions/FunctionLibrary.java
FunctionLibrary.getFunction
public Function getFunction(String functionName) throws NoSuchFunctionException { if (!members.containsKey(functionName)) { throw new NoSuchFunctionException("Can not find function " + functionName + " in library " + name + " (" + prefix + ")"); } return members.get(functionName); ...
java
public Function getFunction(String functionName) throws NoSuchFunctionException { if (!members.containsKey(functionName)) { throw new NoSuchFunctionException("Can not find function " + functionName + " in library " + name + " (" + prefix + ")"); } return members.get(functionName); ...
[ "public", "Function", "getFunction", "(", "String", "functionName", ")", "throws", "NoSuchFunctionException", "{", "if", "(", "!", "members", ".", "containsKey", "(", "functionName", ")", ")", "{", "throw", "new", "NoSuchFunctionException", "(", "\"Can not find func...
Try to find function in library by name. @param functionName function name. @return the function instance. @throws NoSuchFunctionException
[ "Try", "to", "find", "function", "in", "library", "by", "name", "." ]
55c58ef74c01d511615e43646ca25c1b2301c56d
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/functions/FunctionLibrary.java#L50-L56
51,630
citrusframework/citrus
modules/citrus-core/src/main/java/com/consol/citrus/functions/FunctionLibrary.java
FunctionLibrary.knowsFunction
public boolean knowsFunction(String functionName) { String functionPrefix = functionName.substring(0, functionName.indexOf(':') + 1); if (!functionPrefix.equals(prefix)) { return false; } return members.containsKey(functionName.substring(functionName.indexOf(':') + 1, funct...
java
public boolean knowsFunction(String functionName) { String functionPrefix = functionName.substring(0, functionName.indexOf(':') + 1); if (!functionPrefix.equals(prefix)) { return false; } return members.containsKey(functionName.substring(functionName.indexOf(':') + 1, funct...
[ "public", "boolean", "knowsFunction", "(", "String", "functionName", ")", "{", "String", "functionPrefix", "=", "functionName", ".", "substring", "(", "0", ",", "functionName", ".", "indexOf", "(", "'", "'", ")", "+", "1", ")", ";", "if", "(", "!", "func...
Does this function library know a function with the given name. @param functionName name to search for. @return boolean flag to mark existence.
[ "Does", "this", "function", "library", "know", "a", "function", "with", "the", "given", "name", "." ]
55c58ef74c01d511615e43646ca25c1b2301c56d
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/functions/FunctionLibrary.java#L64-L72
51,631
citrusframework/citrus
modules/citrus-jmx/src/main/java/com/consol/citrus/jmx/model/ManagedBeanResult.java
ManagedBeanResult.getResultObject
public java.lang.Object getResultObject(ApplicationContext applicationContext) { if (object == null) { return null; } if (object.getValueObject() != null) { return object.getValueObject(); } try { Class argType = Class.forName(object.getType(...
java
public java.lang.Object getResultObject(ApplicationContext applicationContext) { if (object == null) { return null; } if (object.getValueObject() != null) { return object.getValueObject(); } try { Class argType = Class.forName(object.getType(...
[ "public", "java", ".", "lang", ".", "Object", "getResultObject", "(", "ApplicationContext", "applicationContext", ")", "{", "if", "(", "object", "==", "null", ")", "{", "return", "null", ";", "}", "if", "(", "object", ".", "getValueObject", "(", ")", "!=",...
Gets this service result as object casted to target type if necessary. @return
[ "Gets", "this", "service", "result", "as", "object", "casted", "to", "target", "type", "if", "necessary", "." ]
55c58ef74c01d511615e43646ca25c1b2301c56d
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-jmx/src/main/java/com/consol/citrus/jmx/model/ManagedBeanResult.java#L72-L124
51,632
citrusframework/citrus
modules/citrus-core/src/main/java/com/consol/citrus/endpoint/AbstractEndpointBuilder.java
AbstractEndpointBuilder.initialize
public AbstractEndpointBuilder<T> initialize() { if (getEndpoint() instanceof InitializingBean) { try { ((InitializingBean) getEndpoint()).afterPropertiesSet(); } catch (Exception e) { throw new CitrusRuntimeException("Failed to initialize endpoint", e); ...
java
public AbstractEndpointBuilder<T> initialize() { if (getEndpoint() instanceof InitializingBean) { try { ((InitializingBean) getEndpoint()).afterPropertiesSet(); } catch (Exception e) { throw new CitrusRuntimeException("Failed to initialize endpoint", e); ...
[ "public", "AbstractEndpointBuilder", "<", "T", ">", "initialize", "(", ")", "{", "if", "(", "getEndpoint", "(", ")", "instanceof", "InitializingBean", ")", "{", "try", "{", "(", "(", "InitializingBean", ")", "getEndpoint", "(", ")", ")", ".", "afterPropertie...
Initializes the endpoint. @return
[ "Initializes", "the", "endpoint", "." ]
55c58ef74c01d511615e43646ca25c1b2301c56d
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/endpoint/AbstractEndpointBuilder.java#L62-L72
51,633
citrusframework/citrus
modules/citrus-core/src/main/java/com/consol/citrus/endpoint/AbstractEndpointBuilder.java
AbstractEndpointBuilder.applicationContext
public AbstractEndpointBuilder<T> applicationContext(ApplicationContext applicationContext) { if (getEndpoint() instanceof ApplicationContextAware) { ((ApplicationContextAware) getEndpoint()).setApplicationContext(applicationContext); } if (getEndpoint() instanceof BeanFactoryAware)...
java
public AbstractEndpointBuilder<T> applicationContext(ApplicationContext applicationContext) { if (getEndpoint() instanceof ApplicationContextAware) { ((ApplicationContextAware) getEndpoint()).setApplicationContext(applicationContext); } if (getEndpoint() instanceof BeanFactoryAware)...
[ "public", "AbstractEndpointBuilder", "<", "T", ">", "applicationContext", "(", "ApplicationContext", "applicationContext", ")", "{", "if", "(", "getEndpoint", "(", ")", "instanceof", "ApplicationContextAware", ")", "{", "(", "(", "ApplicationContextAware", ")", "getEn...
Sets the Spring application context. @param applicationContext @return
[ "Sets", "the", "Spring", "application", "context", "." ]
55c58ef74c01d511615e43646ca25c1b2301c56d
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/endpoint/AbstractEndpointBuilder.java#L79-L89
51,634
citrusframework/citrus
modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/builder/ExecuteSQLQueryBuilder.java
ExecuteSQLQueryBuilder.validate
public ExecuteSQLQueryBuilder validate(String column, String ... values) { action.getControlResultSet().put(column, Arrays.asList(values)); return this; }
java
public ExecuteSQLQueryBuilder validate(String column, String ... values) { action.getControlResultSet().put(column, Arrays.asList(values)); return this; }
[ "public", "ExecuteSQLQueryBuilder", "validate", "(", "String", "column", ",", "String", "...", "values", ")", "{", "action", ".", "getControlResultSet", "(", ")", ".", "put", "(", "column", ",", "Arrays", ".", "asList", "(", "values", ")", ")", ";", "retur...
Set expected control result set. Keys represent the column names, values the expected values. @param column @param values
[ "Set", "expected", "control", "result", "set", ".", "Keys", "represent", "the", "column", "names", "values", "the", "expected", "values", "." ]
55c58ef74c01d511615e43646ca25c1b2301c56d
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/builder/ExecuteSQLQueryBuilder.java#L165-L168
51,635
citrusframework/citrus
modules/citrus-ftp/src/main/java/com/consol/citrus/ftp/server/FtpServerBuilder.java
FtpServerBuilder.server
public FtpServerBuilder server(org.apache.ftpserver.FtpServer server) { endpoint.setFtpServer(server); return this; }
java
public FtpServerBuilder server(org.apache.ftpserver.FtpServer server) { endpoint.setFtpServer(server); return this; }
[ "public", "FtpServerBuilder", "server", "(", "org", ".", "apache", ".", "ftpserver", ".", "FtpServer", "server", ")", "{", "endpoint", ".", "setFtpServer", "(", "server", ")", ";", "return", "this", ";", "}" ]
Sets the ftp server. @param server @return
[ "Sets", "the", "ftp", "server", "." ]
55c58ef74c01d511615e43646ca25c1b2301c56d
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-ftp/src/main/java/com/consol/citrus/ftp/server/FtpServerBuilder.java#L93-L96
51,636
structurizr/java
structurizr-client/src/com/structurizr/api/StructurizrClient.java
StructurizrClient.getWorkspace
public Workspace getWorkspace(long workspaceId) throws StructurizrClientException { if (workspaceId <= 0) { throw new IllegalArgumentException("The workspace ID must be a positive integer."); } try (CloseableHttpClient httpClient = HttpClients.createSystem()) { log.info(...
java
public Workspace getWorkspace(long workspaceId) throws StructurizrClientException { if (workspaceId <= 0) { throw new IllegalArgumentException("The workspace ID must be a positive integer."); } try (CloseableHttpClient httpClient = HttpClients.createSystem()) { log.info(...
[ "public", "Workspace", "getWorkspace", "(", "long", "workspaceId", ")", "throws", "StructurizrClientException", "{", "if", "(", "workspaceId", "<=", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"The workspace ID must be a positive integer.\"", ")", ...
Gets the workspace with the given ID. @param workspaceId the ID of your workspace @return a Workspace instance @throws StructurizrClientException if there are problems related to the network, authorization, JSON deserialization, etc
[ "Gets", "the", "workspace", "with", "the", "given", "ID", "." ]
4b204f077877a24bcac363f5ecf0e129a0f9f4c5
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-client/src/com/structurizr/api/StructurizrClient.java#L272-L312
51,637
structurizr/java
structurizr-client/src/com/structurizr/api/StructurizrClient.java
StructurizrClient.putWorkspace
public void putWorkspace(long workspaceId, Workspace workspace) throws StructurizrClientException { if (workspace == null) { throw new IllegalArgumentException("The workspace must not be null."); } else if (workspaceId <= 0) { throw new IllegalArgumentException("The workspace ID ...
java
public void putWorkspace(long workspaceId, Workspace workspace) throws StructurizrClientException { if (workspace == null) { throw new IllegalArgumentException("The workspace must not be null."); } else if (workspaceId <= 0) { throw new IllegalArgumentException("The workspace ID ...
[ "public", "void", "putWorkspace", "(", "long", "workspaceId", ",", "Workspace", "workspace", ")", "throws", "StructurizrClientException", "{", "if", "(", "workspace", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"The workspace must not be...
Updates the given workspace. @param workspaceId the ID of your workspace @param workspace the workspace instance to update @throws StructurizrClientException if there are problems related to the network, authorization, JSON serialization, etc
[ "Updates", "the", "given", "workspace", "." ]
4b204f077877a24bcac363f5ecf0e129a0f9f4c5
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-client/src/com/structurizr/api/StructurizrClient.java#L321-L379
51,638
structurizr/java
structurizr-plantuml/src/com/structurizr/io/plantuml/PlantUMLWriter.java
PlantUMLWriter.write
public void write(Workspace workspace, Writer writer) { if (workspace == null) { throw new IllegalArgumentException("A workspace must be provided."); } if (writer == null) { throw new IllegalArgumentException("A writer must be provided."); } workspace.ge...
java
public void write(Workspace workspace, Writer writer) { if (workspace == null) { throw new IllegalArgumentException("A workspace must be provided."); } if (writer == null) { throw new IllegalArgumentException("A writer must be provided."); } workspace.ge...
[ "public", "void", "write", "(", "Workspace", "workspace", ",", "Writer", "writer", ")", "{", "if", "(", "workspace", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"A workspace must be provided.\"", ")", ";", "}", "if", "(", "writer...
Writes the views in the given workspace as PlantUML definitions, to the specified writer. @param workspace the workspace containing the views to be written @param writer the Writer to write to
[ "Writes", "the", "views", "in", "the", "given", "workspace", "as", "PlantUML", "definitions", "to", "the", "specified", "writer", "." ]
4b204f077877a24bcac363f5ecf0e129a0f9f4c5
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-plantuml/src/com/structurizr/io/plantuml/PlantUMLWriter.java#L133-L148
51,639
structurizr/java
structurizr-plantuml/src/com/structurizr/io/plantuml/PlantUMLWriter.java
PlantUMLWriter.toStdOut
public void toStdOut(Workspace workspace) { if (workspace == null) { throw new IllegalArgumentException("A workspace must be provided."); } StringWriter stringWriter = new StringWriter(); write(workspace, stringWriter); System.out.println(stringWriter.toString()); ...
java
public void toStdOut(Workspace workspace) { if (workspace == null) { throw new IllegalArgumentException("A workspace must be provided."); } StringWriter stringWriter = new StringWriter(); write(workspace, stringWriter); System.out.println(stringWriter.toString()); ...
[ "public", "void", "toStdOut", "(", "Workspace", "workspace", ")", "{", "if", "(", "workspace", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"A workspace must be provided.\"", ")", ";", "}", "StringWriter", "stringWriter", "=", "new", ...
Write the views in the given workspace as PlantUML definitions, to stdout. @param workspace the workspace containing the views to be written
[ "Write", "the", "views", "in", "the", "given", "workspace", "as", "PlantUML", "definitions", "to", "stdout", "." ]
4b204f077877a24bcac363f5ecf0e129a0f9f4c5
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-plantuml/src/com/structurizr/io/plantuml/PlantUMLWriter.java#L155-L163
51,640
structurizr/java
structurizr-plantuml/src/com/structurizr/io/plantuml/PlantUMLWriter.java
PlantUMLWriter.write
public void write(View view, Writer writer) { if (view == null) { throw new IllegalArgumentException("A view must be provided."); } if (writer == null) { throw new IllegalArgumentException("A writer must be provided."); } if (SystemLandscapeView.class.is...
java
public void write(View view, Writer writer) { if (view == null) { throw new IllegalArgumentException("A view must be provided."); } if (writer == null) { throw new IllegalArgumentException("A writer must be provided."); } if (SystemLandscapeView.class.is...
[ "public", "void", "write", "(", "View", "view", ",", "Writer", "writer", ")", "{", "if", "(", "view", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"A view must be provided.\"", ")", ";", "}", "if", "(", "writer", "==", "null",...
Writes a single view as a PlantUML diagram definition, to the specified writer. @param view the view to write @param writer the Writer to write the PlantUML definition to
[ "Writes", "a", "single", "view", "as", "a", "PlantUML", "diagram", "definition", "to", "the", "specified", "writer", "." ]
4b204f077877a24bcac363f5ecf0e129a0f9f4c5
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-plantuml/src/com/structurizr/io/plantuml/PlantUMLWriter.java#L193-L215
51,641
structurizr/java
structurizr-core/src/com/structurizr/model/Container.java
Container.getComponentWithName
public Component getComponentWithName(String name) { if (name == null || name.trim().length() == 0) { throw new IllegalArgumentException("A component name must be provided."); } Optional<Component> component = components.stream().filter(c -> name.equals(c.getName())).findFirst(); ...
java
public Component getComponentWithName(String name) { if (name == null || name.trim().length() == 0) { throw new IllegalArgumentException("A component name must be provided."); } Optional<Component> component = components.stream().filter(c -> name.equals(c.getName())).findFirst(); ...
[ "public", "Component", "getComponentWithName", "(", "String", "name", ")", "{", "if", "(", "name", "==", "null", "||", "name", ".", "trim", "(", ")", ".", "length", "(", ")", "==", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"A comp...
Gets the component with the specified name. @param name the name of the component @return the Component instance, or null if a component with the specified name does not exist @throws IllegalArgumentException if the name is null or empty
[ "Gets", "the", "component", "with", "the", "specified", "name", "." ]
4b204f077877a24bcac363f5ecf0e129a0f9f4c5
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-core/src/com/structurizr/model/Container.java#L145-L152
51,642
structurizr/java
structurizr-core/src/com/structurizr/model/Container.java
Container.getComponentOfType
public Component getComponentOfType(String type) { if (type == null || type.trim().length() == 0) { throw new IllegalArgumentException("A component type must be provided."); } Optional<Component> component = components.stream().filter(c -> type.equals(c.getType().getType())).findFir...
java
public Component getComponentOfType(String type) { if (type == null || type.trim().length() == 0) { throw new IllegalArgumentException("A component type must be provided."); } Optional<Component> component = components.stream().filter(c -> type.equals(c.getType().getType())).findFir...
[ "public", "Component", "getComponentOfType", "(", "String", "type", ")", "{", "if", "(", "type", "==", "null", "||", "type", ".", "trim", "(", ")", ".", "length", "(", ")", "==", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"A compon...
Gets the component of the specified type. @param type the fully qualified type of the component @return the Component instance, or null if a component with the specified type does not exist @throws IllegalArgumentException if the type is null or empty
[ "Gets", "the", "component", "of", "the", "specified", "type", "." ]
4b204f077877a24bcac363f5ecf0e129a0f9f4c5
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-core/src/com/structurizr/model/Container.java#L161-L168
51,643
structurizr/java
structurizr-analysis/src/com/structurizr/analysis/StructurizrAnnotationsComponentFinderStrategy.java
StructurizrAnnotationsComponentFinderStrategy.findUsesComponentAnnotations
private void findUsesComponentAnnotations(Component component, String typeName) { try { Class type = getTypeRepository().loadClass(typeName); for (Field field : type.getDeclaredFields()) { UsesComponent annotation = field.getAnnotation(UsesComponent.class); ...
java
private void findUsesComponentAnnotations(Component component, String typeName) { try { Class type = getTypeRepository().loadClass(typeName); for (Field field : type.getDeclaredFields()) { UsesComponent annotation = field.getAnnotation(UsesComponent.class); ...
[ "private", "void", "findUsesComponentAnnotations", "(", "Component", "component", ",", "String", "typeName", ")", "{", "try", "{", "Class", "type", "=", "getTypeRepository", "(", ")", ".", "loadClass", "(", "typeName", ")", ";", "for", "(", "Field", "field", ...
This will add a description to existing component dependencies, where they have been annotated @UsesComponent.
[ "This", "will", "add", "a", "description", "to", "existing", "component", "dependencies", "where", "they", "have", "been", "annotated" ]
4b204f077877a24bcac363f5ecf0e129a0f9f4c5
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-analysis/src/com/structurizr/analysis/StructurizrAnnotationsComponentFinderStrategy.java#L78-L104
51,644
structurizr/java
structurizr-core/src/com/structurizr/model/SoftwareSystem.java
SoftwareSystem.setLocation
public void setLocation(Location location) { if (location != null) { this.location = location; } else { this.location = Location.Unspecified; } }
java
public void setLocation(Location location) { if (location != null) { this.location = location; } else { this.location = Location.Unspecified; } }
[ "public", "void", "setLocation", "(", "Location", "location", ")", "{", "if", "(", "location", "!=", "null", ")", "{", "this", ".", "location", "=", "location", ";", "}", "else", "{", "this", ".", "location", "=", "Location", ".", "Unspecified", ";", "...
Sets the location of this software system. @param location a Location instance
[ "Sets", "the", "location", "of", "this", "software", "system", "." ]
4b204f077877a24bcac363f5ecf0e129a0f9f4c5
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-core/src/com/structurizr/model/SoftwareSystem.java#L49-L55
51,645
structurizr/java
structurizr-core/src/com/structurizr/model/Component.java
Component.addSupportingType
public CodeElement addSupportingType(String type) { CodeElement codeElement = new CodeElement(type); codeElement.setRole(CodeElementRole.Supporting); this.codeElements.add(codeElement); return codeElement; }
java
public CodeElement addSupportingType(String type) { CodeElement codeElement = new CodeElement(type); codeElement.setRole(CodeElementRole.Supporting); this.codeElements.add(codeElement); return codeElement; }
[ "public", "CodeElement", "addSupportingType", "(", "String", "type", ")", "{", "CodeElement", "codeElement", "=", "new", "CodeElement", "(", "type", ")", ";", "codeElement", ".", "setRole", "(", "CodeElementRole", ".", "Supporting", ")", ";", "this", ".", "cod...
Adds a supporting type to this Component. @param type the fully qualified type name @return a CodeElement representing the supporting type @throws IllegalArgumentException if the specified type is null
[ "Adds", "a", "supporting", "type", "to", "this", "Component", "." ]
4b204f077877a24bcac363f5ecf0e129a0f9f4c5
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-core/src/com/structurizr/model/Component.java#L103-L109
51,646
structurizr/java
structurizr-core/src/com/structurizr/view/ViewSet.java
ViewSet.createSystemLandscapeView
public SystemLandscapeView createSystemLandscapeView(String key, String description) { assertThatTheViewKeyIsSpecifiedAndUnique(key); SystemLandscapeView view = new SystemLandscapeView(model, key, description); view.setViewSet(this); systemLandscapeViews.add(view); return view; ...
java
public SystemLandscapeView createSystemLandscapeView(String key, String description) { assertThatTheViewKeyIsSpecifiedAndUnique(key); SystemLandscapeView view = new SystemLandscapeView(model, key, description); view.setViewSet(this); systemLandscapeViews.add(view); return view; ...
[ "public", "SystemLandscapeView", "createSystemLandscapeView", "(", "String", "key", ",", "String", "description", ")", "{", "assertThatTheViewKeyIsSpecifiedAndUnique", "(", "key", ")", ";", "SystemLandscapeView", "view", "=", "new", "SystemLandscapeView", "(", "model", ...
Creates a system landscape view. @param key the key for the view (must be unique) @param description a description of the view @return an SystemLandscapeView object @throws IllegalArgumentException if the key is not unique
[ "Creates", "a", "system", "landscape", "view", "." ]
4b204f077877a24bcac363f5ecf0e129a0f9f4c5
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-core/src/com/structurizr/view/ViewSet.java#L53-L60
51,647
structurizr/java
structurizr-core/src/com/structurizr/view/ViewSet.java
ViewSet.createSystemContextView
public SystemContextView createSystemContextView(SoftwareSystem softwareSystem, String key, String description) { assertThatTheSoftwareSystemIsNotNull(softwareSystem); assertThatTheViewKeyIsSpecifiedAndUnique(key); SystemContextView view = new SystemContextView(softwareSystem, key, description)...
java
public SystemContextView createSystemContextView(SoftwareSystem softwareSystem, String key, String description) { assertThatTheSoftwareSystemIsNotNull(softwareSystem); assertThatTheViewKeyIsSpecifiedAndUnique(key); SystemContextView view = new SystemContextView(softwareSystem, key, description)...
[ "public", "SystemContextView", "createSystemContextView", "(", "SoftwareSystem", "softwareSystem", ",", "String", "key", ",", "String", "description", ")", "{", "assertThatTheSoftwareSystemIsNotNull", "(", "softwareSystem", ")", ";", "assertThatTheViewKeyIsSpecifiedAndUnique", ...
Creates a system context view, where the scope of the view is the specified software system. @param softwareSystem the SoftwareSystem object representing the scope of the view @param key the key for the view (must be unique) @param description a description of the view @return a...
[ "Creates", "a", "system", "context", "view", "where", "the", "scope", "of", "the", "view", "is", "the", "specified", "software", "system", "." ]
4b204f077877a24bcac363f5ecf0e129a0f9f4c5
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-core/src/com/structurizr/view/ViewSet.java#L71-L79
51,648
structurizr/java
structurizr-core/src/com/structurizr/view/ViewSet.java
ViewSet.createContainerView
public ContainerView createContainerView(SoftwareSystem softwareSystem, String key, String description) { assertThatTheSoftwareSystemIsNotNull(softwareSystem); assertThatTheViewKeyIsSpecifiedAndUnique(key); ContainerView view = new ContainerView(softwareSystem, key, description); view.s...
java
public ContainerView createContainerView(SoftwareSystem softwareSystem, String key, String description) { assertThatTheSoftwareSystemIsNotNull(softwareSystem); assertThatTheViewKeyIsSpecifiedAndUnique(key); ContainerView view = new ContainerView(softwareSystem, key, description); view.s...
[ "public", "ContainerView", "createContainerView", "(", "SoftwareSystem", "softwareSystem", ",", "String", "key", ",", "String", "description", ")", "{", "assertThatTheSoftwareSystemIsNotNull", "(", "softwareSystem", ")", ";", "assertThatTheViewKeyIsSpecifiedAndUnique", "(", ...
Creates a container view, where the scope of the view is the specified software system. @param softwareSystem the SoftwareSystem object representing the scope of the view @param key the key for the view (must be unique) @param description a description of the view @return a Cont...
[ "Creates", "a", "container", "view", "where", "the", "scope", "of", "the", "view", "is", "the", "specified", "software", "system", "." ]
4b204f077877a24bcac363f5ecf0e129a0f9f4c5
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-core/src/com/structurizr/view/ViewSet.java#L90-L98
51,649
structurizr/java
structurizr-core/src/com/structurizr/view/ViewSet.java
ViewSet.createComponentView
public ComponentView createComponentView(Container container, String key, String description) { assertThatTheContainerIsNotNull(container); assertThatTheViewKeyIsSpecifiedAndUnique(key); ComponentView view = new ComponentView(container, key, description); view.setViewSet(this); ...
java
public ComponentView createComponentView(Container container, String key, String description) { assertThatTheContainerIsNotNull(container); assertThatTheViewKeyIsSpecifiedAndUnique(key); ComponentView view = new ComponentView(container, key, description); view.setViewSet(this); ...
[ "public", "ComponentView", "createComponentView", "(", "Container", "container", ",", "String", "key", ",", "String", "description", ")", "{", "assertThatTheContainerIsNotNull", "(", "container", ")", ";", "assertThatTheViewKeyIsSpecifiedAndUnique", "(", "key", ")", ";"...
Creates a component view, where the scope of the view is the specified container. @param container the Container object representing the scope of the view @param key the key for the view (must be unique) @param description a description of the view @return a ContainerView o...
[ "Creates", "a", "component", "view", "where", "the", "scope", "of", "the", "view", "is", "the", "specified", "container", "." ]
4b204f077877a24bcac363f5ecf0e129a0f9f4c5
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-core/src/com/structurizr/view/ViewSet.java#L109-L117
51,650
structurizr/java
structurizr-core/src/com/structurizr/view/ViewSet.java
ViewSet.createDynamicView
public DynamicView createDynamicView(String key, String description) { assertThatTheViewKeyIsSpecifiedAndUnique(key); DynamicView view = new DynamicView(model, key, description); view.setViewSet(this); dynamicViews.add(view); return view; }
java
public DynamicView createDynamicView(String key, String description) { assertThatTheViewKeyIsSpecifiedAndUnique(key); DynamicView view = new DynamicView(model, key, description); view.setViewSet(this); dynamicViews.add(view); return view; }
[ "public", "DynamicView", "createDynamicView", "(", "String", "key", ",", "String", "description", ")", "{", "assertThatTheViewKeyIsSpecifiedAndUnique", "(", "key", ")", ";", "DynamicView", "view", "=", "new", "DynamicView", "(", "model", ",", "key", ",", "descript...
Creates a dynamic view. @param key the key for the view (must be unique) @param description a description of the view @return a DynamicView object @throws IllegalArgumentException if the key is not unique
[ "Creates", "a", "dynamic", "view", "." ]
4b204f077877a24bcac363f5ecf0e129a0f9f4c5
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-core/src/com/structurizr/view/ViewSet.java#L127-L134
51,651
structurizr/java
structurizr-core/src/com/structurizr/view/ViewSet.java
ViewSet.createDeploymentView
public DeploymentView createDeploymentView(String key, String description) { assertThatTheViewKeyIsSpecifiedAndUnique(key); DeploymentView view = new DeploymentView(model, key, description); view.setViewSet(this); deploymentViews.add(view); return view; }
java
public DeploymentView createDeploymentView(String key, String description) { assertThatTheViewKeyIsSpecifiedAndUnique(key); DeploymentView view = new DeploymentView(model, key, description); view.setViewSet(this); deploymentViews.add(view); return view; }
[ "public", "DeploymentView", "createDeploymentView", "(", "String", "key", ",", "String", "description", ")", "{", "assertThatTheViewKeyIsSpecifiedAndUnique", "(", "key", ")", ";", "DeploymentView", "view", "=", "new", "DeploymentView", "(", "model", ",", "key", ",",...
Creates a deployment view. @param key the key for the deployment view (must be unique) @param description a description of the view @return a DeploymentView object @throws IllegalArgumentException if the key is not unique
[ "Creates", "a", "deployment", "view", "." ]
4b204f077877a24bcac363f5ecf0e129a0f9f4c5
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-core/src/com/structurizr/view/ViewSet.java#L197-L204
51,652
structurizr/java
structurizr-core/src/com/structurizr/view/ViewSet.java
ViewSet.createDeploymentView
public DeploymentView createDeploymentView(SoftwareSystem softwareSystem, String key, String description) { assertThatTheSoftwareSystemIsNotNull(softwareSystem); assertThatTheViewKeyIsSpecifiedAndUnique(key); DeploymentView view = new DeploymentView(softwareSystem, key, description); vi...
java
public DeploymentView createDeploymentView(SoftwareSystem softwareSystem, String key, String description) { assertThatTheSoftwareSystemIsNotNull(softwareSystem); assertThatTheViewKeyIsSpecifiedAndUnique(key); DeploymentView view = new DeploymentView(softwareSystem, key, description); vi...
[ "public", "DeploymentView", "createDeploymentView", "(", "SoftwareSystem", "softwareSystem", ",", "String", "key", ",", "String", "description", ")", "{", "assertThatTheSoftwareSystemIsNotNull", "(", "softwareSystem", ")", ";", "assertThatTheViewKeyIsSpecifiedAndUnique", "(",...
Creates a deployment view, where the scope of the view is the specified software system. @param softwareSystem the SoftwareSystem object representing the scope of the view @param key the key for the deployment view (must be unique) @param description a description of the view @return ...
[ "Creates", "a", "deployment", "view", "where", "the", "scope", "of", "the", "view", "is", "the", "specified", "software", "system", "." ]
4b204f077877a24bcac363f5ecf0e129a0f9f4c5
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-core/src/com/structurizr/view/ViewSet.java#L215-L223
51,653
structurizr/java
structurizr-core/src/com/structurizr/view/ViewSet.java
ViewSet.createFilteredView
public FilteredView createFilteredView(StaticView view, String key, String description, FilterMode mode, String... tags) { assertThatTheViewIsNotNull(view); assertThatTheViewKeyIsSpecifiedAndUnique(key); FilteredView filteredView = new FilteredView(view, key, description, mode, tags); f...
java
public FilteredView createFilteredView(StaticView view, String key, String description, FilterMode mode, String... tags) { assertThatTheViewIsNotNull(view); assertThatTheViewKeyIsSpecifiedAndUnique(key); FilteredView filteredView = new FilteredView(view, key, description, mode, tags); f...
[ "public", "FilteredView", "createFilteredView", "(", "StaticView", "view", ",", "String", "key", ",", "String", "description", ",", "FilterMode", "mode", ",", "String", "...", "tags", ")", "{", "assertThatTheViewIsNotNull", "(", "view", ")", ";", "assertThatTheVie...
Creates a FilteredView on top of an existing static view. @param view the static view to base the FilteredView upon @param key the key for the filtered view (must be unique) @param description a description @param mode whether to Include or Exclude elements/relationships based upon their ...
[ "Creates", "a", "FilteredView", "on", "top", "of", "an", "existing", "static", "view", "." ]
4b204f077877a24bcac363f5ecf0e129a0f9f4c5
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-core/src/com/structurizr/view/ViewSet.java#L235-L242
51,654
structurizr/java
structurizr-core/src/com/structurizr/view/ViewSet.java
ViewSet.getViewWithKey
View getViewWithKey(String key) { if (key == null) { throw new IllegalArgumentException("A key must be specified."); } Set<View> views = new HashSet<>(); views.addAll(systemLandscapeViews); views.addAll(systemContextViews); views.addAll(containerViews); ...
java
View getViewWithKey(String key) { if (key == null) { throw new IllegalArgumentException("A key must be specified."); } Set<View> views = new HashSet<>(); views.addAll(systemLandscapeViews); views.addAll(systemContextViews); views.addAll(containerViews); ...
[ "View", "getViewWithKey", "(", "String", "key", ")", "{", "if", "(", "key", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"A key must be specified.\"", ")", ";", "}", "Set", "<", "View", ">", "views", "=", "new", "HashSet", "<>...
Finds the view with the specified key, or null if the view does not exist. @param key the key @return a View object, or null if a view with the specified key could not be found
[ "Finds", "the", "view", "with", "the", "specified", "key", "or", "null", "if", "the", "view", "does", "not", "exist", "." ]
4b204f077877a24bcac363f5ecf0e129a0f9f4c5
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-core/src/com/structurizr/view/ViewSet.java#L278-L292
51,655
structurizr/java
structurizr-core/src/com/structurizr/view/ViewSet.java
ViewSet.getFilteredViewWithKey
FilteredView getFilteredViewWithKey(String key) { if (key == null) { throw new IllegalArgumentException("A key must be specified."); } return filteredViews.stream().filter(v -> key.equals(v.getKey())).findFirst().orElse(null); }
java
FilteredView getFilteredViewWithKey(String key) { if (key == null) { throw new IllegalArgumentException("A key must be specified."); } return filteredViews.stream().filter(v -> key.equals(v.getKey())).findFirst().orElse(null); }
[ "FilteredView", "getFilteredViewWithKey", "(", "String", "key", ")", "{", "if", "(", "key", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"A key must be specified.\"", ")", ";", "}", "return", "filteredViews", ".", "stream", "(", ")"...
Finds the filtered view with the specified key, or null if the view does not exist. @param key the key @return a FilteredView object, or null if a view with the specified key could not be found
[ "Finds", "the", "filtered", "view", "with", "the", "specified", "key", "or", "null", "if", "the", "view", "does", "not", "exist", "." ]
4b204f077877a24bcac363f5ecf0e129a0f9f4c5
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-core/src/com/structurizr/view/ViewSet.java#L300-L306
51,656
structurizr/java
structurizr-core/src/com/structurizr/model/ModelItem.java
ModelItem.getTags
public String getTags() { Set<String> setOfTags = getTagsAsSet(); if (setOfTags.isEmpty()) { return ""; } StringBuilder buf = new StringBuilder(); for (String tag : setOfTags) { buf.append(tag); buf.append(","); } String tags...
java
public String getTags() { Set<String> setOfTags = getTagsAsSet(); if (setOfTags.isEmpty()) { return ""; } StringBuilder buf = new StringBuilder(); for (String tag : setOfTags) { buf.append(tag); buf.append(","); } String tags...
[ "public", "String", "getTags", "(", ")", "{", "Set", "<", "String", ">", "setOfTags", "=", "getTagsAsSet", "(", ")", ";", "if", "(", "setOfTags", ".", "isEmpty", "(", ")", ")", "{", "return", "\"\"", ";", "}", "StringBuilder", "buf", "=", "new", "Str...
Gets the comma separated list of tags. @return a comma separated list of tags, or an empty string if there are no tags
[ "Gets", "the", "comma", "separated", "list", "of", "tags", "." ]
4b204f077877a24bcac363f5ecf0e129a0f9f4c5
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-core/src/com/structurizr/model/ModelItem.java#L39-L54
51,657
structurizr/java
structurizr-core/src/com/structurizr/model/ModelItem.java
ModelItem.addProperty
public void addProperty(String name, String value) { if (name == null || name.trim().length() == 0) { throw new IllegalArgumentException("A property name must be specified."); } if (value == null || value.trim().length() == 0) { throw new IllegalArgumentException("A prop...
java
public void addProperty(String name, String value) { if (name == null || name.trim().length() == 0) { throw new IllegalArgumentException("A property name must be specified."); } if (value == null || value.trim().length() == 0) { throw new IllegalArgumentException("A prop...
[ "public", "void", "addProperty", "(", "String", "name", ",", "String", "value", ")", "{", "if", "(", "name", "==", "null", "||", "name", ".", "trim", "(", ")", ".", "length", "(", ")", "==", "0", ")", "{", "throw", "new", "IllegalArgumentException", ...
Adds a name-value pair property to this element. @param name the name of the property @param value the value of the property
[ "Adds", "a", "name", "-", "value", "pair", "property", "to", "this", "element", "." ]
4b204f077877a24bcac363f5ecf0e129a0f9f4c5
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-core/src/com/structurizr/model/ModelItem.java#L111-L121
51,658
structurizr/java
structurizr-core/src/com/structurizr/model/ModelItem.java
ModelItem.addPerspective
public Perspective addPerspective(String name, String description) { if (StringUtils.isNullOrEmpty(name)) { throw new IllegalArgumentException("A name must be specified."); } if (StringUtils.isNullOrEmpty(description)) { throw new IllegalArgumentException("A description ...
java
public Perspective addPerspective(String name, String description) { if (StringUtils.isNullOrEmpty(name)) { throw new IllegalArgumentException("A name must be specified."); } if (StringUtils.isNullOrEmpty(description)) { throw new IllegalArgumentException("A description ...
[ "public", "Perspective", "addPerspective", "(", "String", "name", ",", "String", "description", ")", "{", "if", "(", "StringUtils", ".", "isNullOrEmpty", "(", "name", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"A name must be specified.\"", ...
Adds a perspective to this model item. @param name the name of the perspective (e.g. "Security", must be unique) @param description a description of the perspective @return a Perspective object @throws IllegalArgumentException if perspective details are not specified, or the named perspecti...
[ "Adds", "a", "perspective", "to", "this", "model", "item", "." ]
4b204f077877a24bcac363f5ecf0e129a0f9f4c5
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-core/src/com/structurizr/model/ModelItem.java#L156-L173
51,659
structurizr/java
structurizr-core/src/com/structurizr/model/DeploymentNode.java
DeploymentNode.add
public ContainerInstance add(Container container, boolean replicateContainerRelationships) { ContainerInstance containerInstance = getModel().addContainerInstance(this, container, replicateContainerRelationships); this.containerInstances.add(containerInstance); return containerInstance; }
java
public ContainerInstance add(Container container, boolean replicateContainerRelationships) { ContainerInstance containerInstance = getModel().addContainerInstance(this, container, replicateContainerRelationships); this.containerInstances.add(containerInstance); return containerInstance; }
[ "public", "ContainerInstance", "add", "(", "Container", "container", ",", "boolean", "replicateContainerRelationships", ")", "{", "ContainerInstance", "containerInstance", "=", "getModel", "(", ")", ".", "addContainerInstance", "(", "this", ",", "container", ",", "rep...
Adds a container instance to this deployment node, optionally replicating all of the container-container relationships. @param container the Container to add an instance of @param replicateContainerRelationships true if the container-container relationships should be replicated between the co...
[ "Adds", "a", "container", "instance", "to", "this", "deployment", "node", "optionally", "replicating", "all", "of", "the", "container", "-", "container", "relationships", "." ]
4b204f077877a24bcac363f5ecf0e129a0f9f4c5
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-core/src/com/structurizr/model/DeploymentNode.java#L50-L55
51,660
structurizr/java
structurizr-core/src/com/structurizr/model/DeploymentNode.java
DeploymentNode.getDeploymentNodeWithName
public DeploymentNode getDeploymentNodeWithName(String name) { if (name == null || name.trim().length() == 0) { throw new IllegalArgumentException("A name must be specified."); } for (DeploymentNode deploymentNode : getChildren()) { if (deploymentNode.getName().equals(na...
java
public DeploymentNode getDeploymentNodeWithName(String name) { if (name == null || name.trim().length() == 0) { throw new IllegalArgumentException("A name must be specified."); } for (DeploymentNode deploymentNode : getChildren()) { if (deploymentNode.getName().equals(na...
[ "public", "DeploymentNode", "getDeploymentNodeWithName", "(", "String", "name", ")", "{", "if", "(", "name", "==", "null", "||", "name", ".", "trim", "(", ")", ".", "length", "(", ")", "==", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", ...
Gets the DeploymentNode with the specified name. @param name the name of the deployment node @return the DeploymentNode instance with the specified name (or null if it doesn't exist).
[ "Gets", "the", "DeploymentNode", "with", "the", "specified", "name", "." ]
4b204f077877a24bcac363f5ecf0e129a0f9f4c5
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-core/src/com/structurizr/model/DeploymentNode.java#L106-L118
51,661
structurizr/java
structurizr-websequencediagrams/src/com/structurizr/io/websequencediagrams/WebSequenceDiagramsWriter.java
WebSequenceDiagramsWriter.write
public void write(Workspace workspace, Writer writer) { if (workspace != null && writer != null) { for (DynamicView view : workspace.getViews().getDynamicViews()) { write(view, writer); } } }
java
public void write(Workspace workspace, Writer writer) { if (workspace != null && writer != null) { for (DynamicView view : workspace.getViews().getDynamicViews()) { write(view, writer); } } }
[ "public", "void", "write", "(", "Workspace", "workspace", ",", "Writer", "writer", ")", "{", "if", "(", "workspace", "!=", "null", "&&", "writer", "!=", "null", ")", "{", "for", "(", "DynamicView", "view", ":", "workspace", ".", "getViews", "(", ")", "...
Writes the dynamic views in the given workspace as WebSequenceDiagrams definitions, to the specified writer. @param workspace the workspace containing the views to be written @param writer the Writer to write to
[ "Writes", "the", "dynamic", "views", "in", "the", "given", "workspace", "as", "WebSequenceDiagrams", "definitions", "to", "the", "specified", "writer", "." ]
4b204f077877a24bcac363f5ecf0e129a0f9f4c5
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-websequencediagrams/src/com/structurizr/io/websequencediagrams/WebSequenceDiagramsWriter.java#L34-L40
51,662
structurizr/java
structurizr-websequencediagrams/src/com/structurizr/io/websequencediagrams/WebSequenceDiagramsWriter.java
WebSequenceDiagramsWriter.write
public void write(Workspace workspace) { StringWriter stringWriter = new StringWriter(); write(workspace, stringWriter); System.out.println(stringWriter.toString()); }
java
public void write(Workspace workspace) { StringWriter stringWriter = new StringWriter(); write(workspace, stringWriter); System.out.println(stringWriter.toString()); }
[ "public", "void", "write", "(", "Workspace", "workspace", ")", "{", "StringWriter", "stringWriter", "=", "new", "StringWriter", "(", ")", ";", "write", "(", "workspace", ",", "stringWriter", ")", ";", "System", ".", "out", ".", "println", "(", "stringWriter"...
Writes the dynamic views in the given workspace as WebSequenceDiagrams definitions, to stdout. @param workspace the workspace containing the views to be written
[ "Writes", "the", "dynamic", "views", "in", "the", "given", "workspace", "as", "WebSequenceDiagrams", "definitions", "to", "stdout", "." ]
4b204f077877a24bcac363f5ecf0e129a0f9f4c5
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-websequencediagrams/src/com/structurizr/io/websequencediagrams/WebSequenceDiagramsWriter.java#L47-L51
51,663
structurizr/java
structurizr-core/src/com/structurizr/view/Branding.java
Branding.setLogo
public void setLogo(String url) { if (url != null && url.trim().length() > 0) { if (Url.isUrl(url) || url.startsWith("data:image/")) { this.logo = url.trim(); } else { throw new IllegalArgumentException(url + " is not a valid URL."); } ...
java
public void setLogo(String url) { if (url != null && url.trim().length() > 0) { if (Url.isUrl(url) || url.startsWith("data:image/")) { this.logo = url.trim(); } else { throw new IllegalArgumentException(url + " is not a valid URL."); } ...
[ "public", "void", "setLogo", "(", "String", "url", ")", "{", "if", "(", "url", "!=", "null", "&&", "url", ".", "trim", "(", ")", ".", "length", "(", ")", ">", "0", ")", "{", "if", "(", "Url", ".", "isUrl", "(", "url", ")", "||", "url", ".", ...
Sets the URL of an image representing a logo. @param url a URL as a String
[ "Sets", "the", "URL", "of", "an", "image", "representing", "a", "logo", "." ]
4b204f077877a24bcac363f5ecf0e129a0f9f4c5
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-core/src/com/structurizr/view/Branding.java#L26-L34
51,664
structurizr/java
structurizr-core/src/com/structurizr/model/ContainerInstance.java
ContainerInstance.addHealthCheck
@Nonnull public HttpHealthCheck addHealthCheck(String name, String url, int interval, long timeout) { if (name == null || name.trim().length() == 0) { throw new IllegalArgumentException("The name must not be null or empty."); } if (url == null || url.trim().length() == 0) { ...
java
@Nonnull public HttpHealthCheck addHealthCheck(String name, String url, int interval, long timeout) { if (name == null || name.trim().length() == 0) { throw new IllegalArgumentException("The name must not be null or empty."); } if (url == null || url.trim().length() == 0) { ...
[ "@", "Nonnull", "public", "HttpHealthCheck", "addHealthCheck", "(", "String", "name", ",", "String", "url", ",", "int", "interval", ",", "long", "timeout", ")", "{", "if", "(", "name", "==", "null", "||", "name", ".", "trim", "(", ")", ".", "length", "...
Adds a new health check. @param name the name of the health check @param url the URL of the health check @param interval the polling interval, in seconds @param timeout the timeout, in milliseconds @return a HttpHealthCheck instance representing the health check that has been added @throws IllegalArgume...
[ "Adds", "a", "new", "health", "check", "." ]
4b204f077877a24bcac363f5ecf0e129a0f9f4c5
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-core/src/com/structurizr/model/ContainerInstance.java#L145-L171
51,665
structurizr/java
structurizr-client/src/com/structurizr/util/WorkspaceUtils.java
WorkspaceUtils.loadWorkspaceFromJson
public static Workspace loadWorkspaceFromJson(File file) throws Exception { if (file == null) { throw new IllegalArgumentException("The path to a JSON file must be specified."); } else if (!file.exists()) { throw new IllegalArgumentException("The specified JSON file does not exis...
java
public static Workspace loadWorkspaceFromJson(File file) throws Exception { if (file == null) { throw new IllegalArgumentException("The path to a JSON file must be specified."); } else if (!file.exists()) { throw new IllegalArgumentException("The specified JSON file does not exis...
[ "public", "static", "Workspace", "loadWorkspaceFromJson", "(", "File", "file", ")", "throws", "Exception", "{", "if", "(", "file", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"The path to a JSON file must be specified.\"", ")", ";", "}...
Loads a workspace from a JSON definition saved as a file. @param file a File representing the JSON definition @return a Workspace object @throws Exception if something goes wrong
[ "Loads", "a", "workspace", "from", "a", "JSON", "definition", "saved", "as", "a", "file", "." ]
4b204f077877a24bcac363f5ecf0e129a0f9f4c5
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-client/src/com/structurizr/util/WorkspaceUtils.java#L22-L30
51,666
structurizr/java
structurizr-client/src/com/structurizr/util/WorkspaceUtils.java
WorkspaceUtils.saveWorkspaceToJson
public static void saveWorkspaceToJson(Workspace workspace, File file) throws Exception { if (workspace == null) { throw new IllegalArgumentException("A workspace must be provided."); } else if (file == null) { throw new IllegalArgumentException("The path to a JSON file must be s...
java
public static void saveWorkspaceToJson(Workspace workspace, File file) throws Exception { if (workspace == null) { throw new IllegalArgumentException("A workspace must be provided."); } else if (file == null) { throw new IllegalArgumentException("The path to a JSON file must be s...
[ "public", "static", "void", "saveWorkspaceToJson", "(", "Workspace", "workspace", ",", "File", "file", ")", "throws", "Exception", "{", "if", "(", "workspace", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"A workspace must be provided.\...
Saves a workspace to a JSON definition as a file. @param workspace a Workspace object @param file a File representing the JSON definition @throws Exception if something goes wrong
[ "Saves", "a", "workspace", "to", "a", "JSON", "definition", "as", "a", "file", "." ]
4b204f077877a24bcac363f5ecf0e129a0f9f4c5
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-client/src/com/structurizr/util/WorkspaceUtils.java#L39-L50
51,667
structurizr/java
structurizr-client/src/com/structurizr/util/WorkspaceUtils.java
WorkspaceUtils.printWorkspaceAsJson
public static void printWorkspaceAsJson(Workspace workspace) { if (workspace == null) { throw new IllegalArgumentException("A workspace must be provided."); } try { System.out.println(toJson(workspace, true)); } catch (Exception e) { e.printStackTrace...
java
public static void printWorkspaceAsJson(Workspace workspace) { if (workspace == null) { throw new IllegalArgumentException("A workspace must be provided."); } try { System.out.println(toJson(workspace, true)); } catch (Exception e) { e.printStackTrace...
[ "public", "static", "void", "printWorkspaceAsJson", "(", "Workspace", "workspace", ")", "{", "if", "(", "workspace", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"A workspace must be provided.\"", ")", ";", "}", "try", "{", "System", ...
Prints a workspace as JSON to stdout - useful for debugging purposes. @param workspace the workspace to print
[ "Prints", "a", "workspace", "as", "JSON", "to", "stdout", "-", "useful", "for", "debugging", "purposes", "." ]
4b204f077877a24bcac363f5ecf0e129a0f9f4c5
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-client/src/com/structurizr/util/WorkspaceUtils.java#L57-L67
51,668
structurizr/java
structurizr-client/src/com/structurizr/util/WorkspaceUtils.java
WorkspaceUtils.toJson
public static String toJson(Workspace workspace, boolean indentOutput) throws Exception { if (workspace == null) { throw new IllegalArgumentException("A workspace must be provided."); } JsonWriter jsonWriter = new JsonWriter(indentOutput); StringWriter stringWriter = new Str...
java
public static String toJson(Workspace workspace, boolean indentOutput) throws Exception { if (workspace == null) { throw new IllegalArgumentException("A workspace must be provided."); } JsonWriter jsonWriter = new JsonWriter(indentOutput); StringWriter stringWriter = new Str...
[ "public", "static", "String", "toJson", "(", "Workspace", "workspace", ",", "boolean", "indentOutput", ")", "throws", "Exception", "{", "if", "(", "workspace", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"A workspace must be provided.\...
Serializes the specified workspace to a JSON string. @param workspace a Workspace instance @param indentOutput whether to indent the output (prettify) @return a JSON string @throws Exception if something goes wrong
[ "Serializes", "the", "specified", "workspace", "to", "a", "JSON", "string", "." ]
4b204f077877a24bcac363f5ecf0e129a0f9f4c5
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-client/src/com/structurizr/util/WorkspaceUtils.java#L77-L89
51,669
structurizr/java
structurizr-client/src/com/structurizr/util/WorkspaceUtils.java
WorkspaceUtils.fromJson
public static Workspace fromJson(String json) throws Exception { if (json == null || json.trim().length() == 0) { throw new IllegalArgumentException("A JSON string must be provided."); } StringReader stringReader = new StringReader(json); return new JsonReader().read(stringR...
java
public static Workspace fromJson(String json) throws Exception { if (json == null || json.trim().length() == 0) { throw new IllegalArgumentException("A JSON string must be provided."); } StringReader stringReader = new StringReader(json); return new JsonReader().read(stringR...
[ "public", "static", "Workspace", "fromJson", "(", "String", "json", ")", "throws", "Exception", "{", "if", "(", "json", "==", "null", "||", "json", ".", "trim", "(", ")", ".", "length", "(", ")", "==", "0", ")", "{", "throw", "new", "IllegalArgumentExc...
Converts the specified JSON string to a Workspace instance. @param json the JSON definition of the workspace @return a Workspace instance @throws Exception if the JSON can not be deserialized
[ "Converts", "the", "specified", "JSON", "string", "to", "a", "Workspace", "instance", "." ]
4b204f077877a24bcac363f5ecf0e129a0f9f4c5
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-client/src/com/structurizr/util/WorkspaceUtils.java#L98-L105
51,670
structurizr/java
structurizr-analysis/src/com/structurizr/analysis/ComponentFinder.java
ComponentFinder.findComponents
public Set<Component> findComponents() throws Exception { Set<Component> componentsFound = new HashSet<>(); for (ComponentFinderStrategy componentFinderStrategy : componentFinderStrategies) { componentFinderStrategy.beforeFindComponents(); } for (ComponentFinderStrategy com...
java
public Set<Component> findComponents() throws Exception { Set<Component> componentsFound = new HashSet<>(); for (ComponentFinderStrategy componentFinderStrategy : componentFinderStrategies) { componentFinderStrategy.beforeFindComponents(); } for (ComponentFinderStrategy com...
[ "public", "Set", "<", "Component", ">", "findComponents", "(", ")", "throws", "Exception", "{", "Set", "<", "Component", ">", "componentsFound", "=", "new", "HashSet", "<>", "(", ")", ";", "for", "(", "ComponentFinderStrategy", "componentFinderStrategy", ":", ...
Find components, using all of the configured component finder strategies in the order they were added. @return the set of Components that were found @throws Exception if something goes wrong
[ "Find", "components", "using", "all", "of", "the", "configured", "component", "finder", "strategies", "in", "the", "order", "they", "were", "added", "." ]
4b204f077877a24bcac363f5ecf0e129a0f9f4c5
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-analysis/src/com/structurizr/analysis/ComponentFinder.java#L69-L85
51,671
structurizr/java
structurizr-analysis/src/com/structurizr/analysis/ComponentFinder.java
ComponentFinder.exclude
public void exclude(String... regexes) { if (regexes != null) { for (String regex : regexes) { this.exclusions.add(Pattern.compile(regex)); } } }
java
public void exclude(String... regexes) { if (regexes != null) { for (String regex : regexes) { this.exclusions.add(Pattern.compile(regex)); } } }
[ "public", "void", "exclude", "(", "String", "...", "regexes", ")", "{", "if", "(", "regexes", "!=", "null", ")", "{", "for", "(", "String", "regex", ":", "regexes", ")", "{", "this", ".", "exclusions", ".", "add", "(", "Pattern", ".", "compile", "(",...
Adds one or more regexes to the set of regexes that define which types should be excluded during the component finding process. @param regexes one or more regular expressions, as Strings
[ "Adds", "one", "or", "more", "regexes", "to", "the", "set", "of", "regexes", "that", "define", "which", "types", "should", "be", "excluded", "during", "the", "component", "finding", "process", "." ]
4b204f077877a24bcac363f5ecf0e129a0f9f4c5
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-analysis/src/com/structurizr/analysis/ComponentFinder.java#L132-L138
51,672
structurizr/java
structurizr-analysis/src/com/structurizr/analysis/ComponentFinder.java
ComponentFinder.getTypeRepository
public TypeRepository getTypeRepository() { if (typeRepository == null) { typeRepository = new DefaultTypeRepository(getPackageNames(), getExclusions(), getUrlClassLoader()); } return typeRepository; }
java
public TypeRepository getTypeRepository() { if (typeRepository == null) { typeRepository = new DefaultTypeRepository(getPackageNames(), getExclusions(), getUrlClassLoader()); } return typeRepository; }
[ "public", "TypeRepository", "getTypeRepository", "(", ")", "{", "if", "(", "typeRepository", "==", "null", ")", "{", "typeRepository", "=", "new", "DefaultTypeRepository", "(", "getPackageNames", "(", ")", ",", "getExclusions", "(", ")", ",", "getUrlClassLoader", ...
Gets the type repository used to analyse java classes. @return the type supplied type repository, or a default implementation
[ "Gets", "the", "type", "repository", "used", "to", "analyse", "java", "classes", "." ]
4b204f077877a24bcac363f5ecf0e129a0f9f4c5
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-analysis/src/com/structurizr/analysis/ComponentFinder.java#L179-L184
51,673
structurizr/java
structurizr-core/src/com/structurizr/view/View.java
View.setAutomaticLayout
public void setAutomaticLayout(boolean enable) { if (enable) { this.setAutomaticLayout(AutomaticLayout.RankDirection.TopBottom, 300, 600, 200, false); } else { this.automaticLayout = null; } }
java
public void setAutomaticLayout(boolean enable) { if (enable) { this.setAutomaticLayout(AutomaticLayout.RankDirection.TopBottom, 300, 600, 200, false); } else { this.automaticLayout = null; } }
[ "public", "void", "setAutomaticLayout", "(", "boolean", "enable", ")", "{", "if", "(", "enable", ")", "{", "this", ".", "setAutomaticLayout", "(", "AutomaticLayout", ".", "RankDirection", ".", "TopBottom", ",", "300", ",", "600", ",", "200", ",", "false", ...
Enables the automatic layout for this view, with some default settings. @param enable a boolean
[ "Enables", "the", "automatic", "layout", "for", "this", "view", "with", "some", "default", "settings", "." ]
4b204f077877a24bcac363f5ecf0e129a0f9f4c5
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-core/src/com/structurizr/view/View.java#L152-L158
51,674
structurizr/java
structurizr-core/src/com/structurizr/view/View.java
View.setAutomaticLayout
public void setAutomaticLayout(AutomaticLayout.RankDirection rankDirection, int rankSeparation, int nodeSeparation, int edgeSeparation, boolean vertices) { this.automaticLayout = new AutomaticLayout(rankDirection, rankSeparation, nodeSeparation, edgeSeparation, vertices); }
java
public void setAutomaticLayout(AutomaticLayout.RankDirection rankDirection, int rankSeparation, int nodeSeparation, int edgeSeparation, boolean vertices) { this.automaticLayout = new AutomaticLayout(rankDirection, rankSeparation, nodeSeparation, edgeSeparation, vertices); }
[ "public", "void", "setAutomaticLayout", "(", "AutomaticLayout", ".", "RankDirection", "rankDirection", ",", "int", "rankSeparation", ",", "int", "nodeSeparation", ",", "int", "edgeSeparation", ",", "boolean", "vertices", ")", "{", "this", ".", "automaticLayout", "="...
Enables the automatic layout for this view, with the specified settings. @param rankDirection the rank direction @param rankSeparation the separation between ranks (in pixels, a positive integer) @param nodeSeparation the separation between nodes within the same rank (in pixels, a positive integer) @param ed...
[ "Enables", "the", "automatic", "layout", "for", "this", "view", "with", "the", "specified", "settings", "." ]
4b204f077877a24bcac363f5ecf0e129a0f9f4c5
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-core/src/com/structurizr/view/View.java#L169-L171
51,675
structurizr/java
structurizr-core/src/com/structurizr/view/View.java
View.remove
public void remove(Relationship relationship) { if (relationship != null) { RelationshipView relationshipView = new RelationshipView(relationship); relationshipViews.remove(relationshipView); } }
java
public void remove(Relationship relationship) { if (relationship != null) { RelationshipView relationshipView = new RelationshipView(relationship); relationshipViews.remove(relationshipView); } }
[ "public", "void", "remove", "(", "Relationship", "relationship", ")", "{", "if", "(", "relationship", "!=", "null", ")", "{", "RelationshipView", "relationshipView", "=", "new", "RelationshipView", "(", "relationship", ")", ";", "relationshipViews", ".", "remove",...
Removes a relationship from this view. @param relationship the Relationship to remove
[ "Removes", "a", "relationship", "from", "this", "view", "." ]
4b204f077877a24bcac363f5ecf0e129a0f9f4c5
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-core/src/com/structurizr/view/View.java#L291-L296
51,676
structurizr/java
structurizr-core/src/com/structurizr/view/View.java
View.removeRelationshipsNotConnectedToElement
public void removeRelationshipsNotConnectedToElement(Element element) { if (element != null) { getRelationships().stream() .map(RelationshipView::getRelationship) .filter(r -> !r.getSource().equals(element) && !r.getDestination().equals(element)) ...
java
public void removeRelationshipsNotConnectedToElement(Element element) { if (element != null) { getRelationships().stream() .map(RelationshipView::getRelationship) .filter(r -> !r.getSource().equals(element) && !r.getDestination().equals(element)) ...
[ "public", "void", "removeRelationshipsNotConnectedToElement", "(", "Element", "element", ")", "{", "if", "(", "element", "!=", "null", ")", "{", "getRelationships", "(", ")", ".", "stream", "(", ")", ".", "map", "(", "RelationshipView", "::", "getRelationship", ...
Removes relationships that are not connected to the specified element. @param element the Element to test against
[ "Removes", "relationships", "that", "are", "not", "connected", "to", "the", "specified", "element", "." ]
4b204f077877a24bcac363f5ecf0e129a0f9f4c5
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-core/src/com/structurizr/view/View.java#L303-L310
51,677
structurizr/java
structurizr-core/src/com/structurizr/view/View.java
View.removeElementsWithNoRelationships
public void removeElementsWithNoRelationships() { Set<RelationshipView> relationships = getRelationships(); Set<String> elementIds = new HashSet<>(); relationships.forEach(rv -> elementIds.add(rv.getRelationship().getSourceId())); relationships.forEach(rv -> elementIds.add(rv.getRelatio...
java
public void removeElementsWithNoRelationships() { Set<RelationshipView> relationships = getRelationships(); Set<String> elementIds = new HashSet<>(); relationships.forEach(rv -> elementIds.add(rv.getRelationship().getSourceId())); relationships.forEach(rv -> elementIds.add(rv.getRelatio...
[ "public", "void", "removeElementsWithNoRelationships", "(", ")", "{", "Set", "<", "RelationshipView", ">", "relationships", "=", "getRelationships", "(", ")", ";", "Set", "<", "String", ">", "elementIds", "=", "new", "HashSet", "<>", "(", ")", ";", "relationsh...
Removes all elements that have no relationships to other elements in this view.
[ "Removes", "all", "elements", "that", "have", "no", "relationships", "to", "other", "elements", "in", "this", "view", "." ]
4b204f077877a24bcac363f5ecf0e129a0f9f4c5
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-core/src/com/structurizr/view/View.java#L345-L357
51,678
structurizr/java
structurizr-core/src/com/structurizr/model/Model.java
Model.getDeploymentNodeWithName
public DeploymentNode getDeploymentNodeWithName(String name, String environment) { for (DeploymentNode deploymentNode : getDeploymentNodes()) { if (deploymentNode.getEnvironment().equals(environment) && deploymentNode.getName().equals(name)) { return deploymentNode; } ...
java
public DeploymentNode getDeploymentNodeWithName(String name, String environment) { for (DeploymentNode deploymentNode : getDeploymentNodes()) { if (deploymentNode.getEnvironment().equals(environment) && deploymentNode.getName().equals(name)) { return deploymentNode; } ...
[ "public", "DeploymentNode", "getDeploymentNodeWithName", "(", "String", "name", ",", "String", "environment", ")", "{", "for", "(", "DeploymentNode", "deploymentNode", ":", "getDeploymentNodes", "(", ")", ")", "{", "if", "(", "deploymentNode", ".", "getEnvironment",...
Gets the deployment node with the specified name and environment. @param name the name of the deployment node @param environment the name of the deployment environment @return the DeploymentNode instance with the specified name (or null if it doesn't exist).
[ "Gets", "the", "deployment", "node", "with", "the", "specified", "name", "and", "environment", "." ]
4b204f077877a24bcac363f5ecf0e129a0f9f4c5
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-core/src/com/structurizr/model/Model.java#L690-L698
51,679
structurizr/java
structurizr-core/src/com/structurizr/model/Model.java
Model.getElementWithCanonicalName
public Element getElementWithCanonicalName(String canonicalName) { if (canonicalName == null || canonicalName.trim().length() == 0) { throw new IllegalArgumentException("A canonical name must be specified."); } // canonical names start with a leading slash, so add this if it's missi...
java
public Element getElementWithCanonicalName(String canonicalName) { if (canonicalName == null || canonicalName.trim().length() == 0) { throw new IllegalArgumentException("A canonical name must be specified."); } // canonical names start with a leading slash, so add this if it's missi...
[ "public", "Element", "getElementWithCanonicalName", "(", "String", "canonicalName", ")", "{", "if", "(", "canonicalName", "==", "null", "||", "canonicalName", ".", "trim", "(", ")", ".", "length", "(", ")", "==", "0", ")", "{", "throw", "new", "IllegalArgume...
Gets the element with the specified canonical name. @param canonicalName the canonical name (e.g. /SoftwareSystem/Container) @return the Element with the given canonical name, or null if one doesn't exist @throws IllegalArgumentException if the canonical name is null or empty
[ "Gets", "the", "element", "with", "the", "specified", "canonical", "name", "." ]
4b204f077877a24bcac363f5ecf0e129a0f9f4c5
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-core/src/com/structurizr/model/Model.java#L755-L772
51,680
structurizr/java
structurizr-core/src/com/structurizr/model/Model.java
Model.modifyRelationship
public void modifyRelationship(Relationship relationship, String description, String technology) { if (relationship == null) { throw new IllegalArgumentException("A relationship must be specified."); } Relationship newRelationship = new Relationship(relationship.getSource(), relatio...
java
public void modifyRelationship(Relationship relationship, String description, String technology) { if (relationship == null) { throw new IllegalArgumentException("A relationship must be specified."); } Relationship newRelationship = new Relationship(relationship.getSource(), relatio...
[ "public", "void", "modifyRelationship", "(", "Relationship", "relationship", ",", "String", "description", ",", "String", "technology", ")", "{", "if", "(", "relationship", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"A relationship mu...
Provides a way for the description and technology to be modified on an existing relationship. @param relationship a Relationship instance @param description the new description @param technology the new technology
[ "Provides", "a", "way", "for", "the", "description", "and", "technology", "to", "be", "modified", "on", "an", "existing", "relationship", "." ]
4b204f077877a24bcac363f5ecf0e129a0f9f4c5
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-core/src/com/structurizr/model/Model.java#L795-L807
51,681
structurizr/java
structurizr-core/src/com/structurizr/model/Element.java
Element.setUrl
public void setUrl(String url) { if (url != null && url.trim().length() > 0) { if (Url.isUrl(url)) { this.url = url; } else { throw new IllegalArgumentException(url + " is not a valid URL."); } } }
java
public void setUrl(String url) { if (url != null && url.trim().length() > 0) { if (Url.isUrl(url)) { this.url = url; } else { throw new IllegalArgumentException(url + " is not a valid URL."); } } }
[ "public", "void", "setUrl", "(", "String", "url", ")", "{", "if", "(", "url", "!=", "null", "&&", "url", ".", "trim", "(", ")", ".", "length", "(", ")", ">", "0", ")", "{", "if", "(", "Url", ".", "isUrl", "(", "url", ")", ")", "{", "this", ...
Sets the URL where more information about this element can be found. @param url the URL as a String @throws IllegalArgumentException if the URL is not a well-formed URL
[ "Sets", "the", "URL", "where", "more", "information", "about", "this", "element", "can", "be", "found", "." ]
4b204f077877a24bcac363f5ecf0e129a0f9f4c5
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-core/src/com/structurizr/model/Element.java#L72-L80
51,682
structurizr/java
structurizr-core/src/com/structurizr/documentation/DocumentationTemplate.java
DocumentationTemplate.addSection
public Section addSection(String title, File... files) throws IOException { return add(null, title, files); }
java
public Section addSection(String title, File... files) throws IOException { return add(null, title, files); }
[ "public", "Section", "addSection", "(", "String", "title", ",", "File", "...", "files", ")", "throws", "IOException", "{", "return", "add", "(", "null", ",", "title", ",", "files", ")", ";", "}" ]
Adds a custom section from one or more files, that isn't related to any element in the model. @param title the section title @param files one or more File objects that point to the documentation content @return a documentation {@link Section} @throws IOException if there i...
[ "Adds", "a", "custom", "section", "from", "one", "or", "more", "files", "that", "isn", "t", "related", "to", "any", "element", "in", "the", "model", "." ]
4b204f077877a24bcac363f5ecf0e129a0f9f4c5
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-core/src/com/structurizr/documentation/DocumentationTemplate.java#L47-L49
51,683
structurizr/java
structurizr-core/src/com/structurizr/documentation/DocumentationTemplate.java
DocumentationTemplate.addSection
@Nonnull public Section addSection(String title, Format format, String content) { return add(null, title, format, content); }
java
@Nonnull public Section addSection(String title, Format format, String content) { return add(null, title, format, content); }
[ "@", "Nonnull", "public", "Section", "addSection", "(", "String", "title", ",", "Format", "format", ",", "String", "content", ")", "{", "return", "add", "(", "null", ",", "title", ",", "format", ",", "content", ")", ";", "}" ]
Adds a custom section, that isn't related to any element in the model. @param title the section title @param format the {@link Format} of the documentation content @param content a String containing the documentation content @return a documentation {@link Section}
[ "Adds", "a", "custom", "section", "that", "isn", "t", "related", "to", "any", "element", "in", "the", "model", "." ]
4b204f077877a24bcac363f5ecf0e129a0f9f4c5
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-core/src/com/structurizr/documentation/DocumentationTemplate.java#L59-L62
51,684
structurizr/java
structurizr-core/src/com/structurizr/documentation/DocumentationTemplate.java
DocumentationTemplate.addImage
public Image addImage(File file) throws IOException { String contentType = ImageUtils.getContentType(file); String base64Content = ImageUtils.getImageAsBase64(file); Image image = new Image(file.getName(), contentType, base64Content); documentation.addImage(image); return image...
java
public Image addImage(File file) throws IOException { String contentType = ImageUtils.getContentType(file); String base64Content = ImageUtils.getImageAsBase64(file); Image image = new Image(file.getName(), contentType, base64Content); documentation.addImage(image); return image...
[ "public", "Image", "addImage", "(", "File", "file", ")", "throws", "IOException", "{", "String", "contentType", "=", "ImageUtils", ".", "getContentType", "(", "file", ")", ";", "String", "base64Content", "=", "ImageUtils", ".", "getImageAsBase64", "(", "file", ...
Adds an image from the given file to the workspace. @param file a File descriptor representing an image file on disk @return an Image object representing the image added @throws IOException if there is an error reading the image
[ "Adds", "an", "image", "from", "the", "given", "file", "to", "the", "workspace", "." ]
4b204f077877a24bcac363f5ecf0e129a0f9f4c5
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-core/src/com/structurizr/documentation/DocumentationTemplate.java#L240-L248
51,685
structurizr/java
structurizr-core/src/com/structurizr/configuration/WorkspaceConfiguration.java
WorkspaceConfiguration.addUser
public void addUser(String username, Role role) { if (StringUtils.isNullOrEmpty(username)) { throw new IllegalArgumentException("A username must be specified."); } if (role == null) { throw new IllegalArgumentException("A role must be specified."); } use...
java
public void addUser(String username, Role role) { if (StringUtils.isNullOrEmpty(username)) { throw new IllegalArgumentException("A username must be specified."); } if (role == null) { throw new IllegalArgumentException("A role must be specified."); } use...
[ "public", "void", "addUser", "(", "String", "username", ",", "Role", "role", ")", "{", "if", "(", "StringUtils", ".", "isNullOrEmpty", "(", "username", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"A username must be specified.\"", ")", ";",...
Adds a user, with the specified username and role. @param username the username (e.g. an e-mail address) @param role the user's role
[ "Adds", "a", "user", "with", "the", "specified", "username", "and", "role", "." ]
4b204f077877a24bcac363f5ecf0e129a0f9f4c5
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-core/src/com/structurizr/configuration/WorkspaceConfiguration.java#L39-L49
51,686
structurizr/java
structurizr-core/src/com/structurizr/view/ComponentView.java
ComponentView.add
public void add(Container container, boolean addRelationships) { if (container != null && !container.equals(getContainer())) { addElement(container, addRelationships); } }
java
public void add(Container container, boolean addRelationships) { if (container != null && !container.equals(getContainer())) { addElement(container, addRelationships); } }
[ "public", "void", "add", "(", "Container", "container", ",", "boolean", "addRelationships", ")", "{", "if", "(", "container", "!=", "null", "&&", "!", "container", ".", "equals", "(", "getContainer", "(", ")", ")", ")", "{", "addElement", "(", "container",...
Adds an individual container to this view. @param container the Container to add @param addRelationships whether to add relationships to/from the container
[ "Adds", "an", "individual", "container", "to", "this", "view", "." ]
4b204f077877a24bcac363f5ecf0e129a0f9f4c5
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-core/src/com/structurizr/view/ComponentView.java#L105-L109
51,687
structurizr/java
structurizr-core/src/com/structurizr/view/ComponentView.java
ComponentView.add
public void add(Component component, boolean addRelationships) { if (component != null) { if (!component.getContainer().equals(getContainer())) { throw new IllegalArgumentException("Only components belonging to " + container.getName() + " can be added to this view."); } ...
java
public void add(Component component, boolean addRelationships) { if (component != null) { if (!component.getContainer().equals(getContainer())) { throw new IllegalArgumentException("Only components belonging to " + container.getName() + " can be added to this view."); } ...
[ "public", "void", "add", "(", "Component", "component", ",", "boolean", "addRelationships", ")", "{", "if", "(", "component", "!=", "null", ")", "{", "if", "(", "!", "component", ".", "getContainer", "(", ")", ".", "equals", "(", "getContainer", "(", ")"...
Adds an individual component to this view. @param component the Component to add @param addRelationships whether to add relationships to/from the component
[ "Adds", "an", "individual", "component", "to", "this", "view", "." ]
4b204f077877a24bcac363f5ecf0e129a0f9f4c5
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-core/src/com/structurizr/view/ComponentView.java#L133-L141
51,688
structurizr/java
structurizr-core/src/com/structurizr/view/StaticView.java
StaticView.removeElementsThatAreUnreachableFrom
public void removeElementsThatAreUnreachableFrom(Element element) { if (element != null) { Set<Element> elementsToShow = new HashSet<>(); Set<Element> elementsVisited = new HashSet<>(); findElementsToShow(element, element, elementsToShow, elementsVisited); for (E...
java
public void removeElementsThatAreUnreachableFrom(Element element) { if (element != null) { Set<Element> elementsToShow = new HashSet<>(); Set<Element> elementsVisited = new HashSet<>(); findElementsToShow(element, element, elementsToShow, elementsVisited); for (E...
[ "public", "void", "removeElementsThatAreUnreachableFrom", "(", "Element", "element", ")", "{", "if", "(", "element", "!=", "null", ")", "{", "Set", "<", "Element", ">", "elementsToShow", "=", "new", "HashSet", "<>", "(", ")", ";", "Set", "<", "Element", ">...
Removes all elements that cannot be reached by traversing the graph of relationships starting with the specified element. @param element the starting element
[ "Removes", "all", "elements", "that", "cannot", "be", "reached", "by", "traversing", "the", "graph", "of", "relationships", "starting", "with", "the", "specified", "element", "." ]
4b204f077877a24bcac363f5ecf0e129a0f9f4c5
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-core/src/com/structurizr/view/StaticView.java#L143-L155
51,689
structurizr/java
structurizr-core/src/com/structurizr/view/StaticView.java
StaticView.addAnimation
public void addAnimation(Element... elements) { if (elements == null || elements.length == 0) { throw new IllegalArgumentException("One or more elements must be specified."); } Set<String> elementIdsInPreviousAnimationSteps = new HashSet<>(); Set<Element> elementsInThisAnima...
java
public void addAnimation(Element... elements) { if (elements == null || elements.length == 0) { throw new IllegalArgumentException("One or more elements must be specified."); } Set<String> elementIdsInPreviousAnimationSteps = new HashSet<>(); Set<Element> elementsInThisAnima...
[ "public", "void", "addAnimation", "(", "Element", "...", "elements", ")", "{", "if", "(", "elements", "==", "null", "||", "elements", ".", "length", "==", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"One or more elements must be specified.\""...
Adds an animation step, with the specified elements. @param elements the elements that should be shown in the animation step
[ "Adds", "an", "animation", "step", "with", "the", "specified", "elements", "." ]
4b204f077877a24bcac363f5ecf0e129a0f9f4c5
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-core/src/com/structurizr/view/StaticView.java#L198-L232
51,690
structurizr/java
structurizr-client/src/com/structurizr/io/json/JsonWriter.java
JsonWriter.write
public void write(Workspace workspace, Writer writer) throws WorkspaceWriterException { if (workspace == null) { throw new IllegalArgumentException("Workspace cannot be null."); } if (writer == null) { throw new IllegalArgumentException("Writer cannot be null."); ...
java
public void write(Workspace workspace, Writer writer) throws WorkspaceWriterException { if (workspace == null) { throw new IllegalArgumentException("Workspace cannot be null."); } if (writer == null) { throw new IllegalArgumentException("Writer cannot be null."); ...
[ "public", "void", "write", "(", "Workspace", "workspace", ",", "Writer", "writer", ")", "throws", "WorkspaceWriterException", "{", "if", "(", "workspace", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Workspace cannot be null.\"", ")", ...
Writes a workspace definition as a JSON string to the specified Writer object. @param workspace the Workspace object to write @param writer the Writer object to write the workspace to @throws WorkspaceWriterException if something goes wrong
[ "Writes", "a", "workspace", "definition", "as", "a", "JSON", "string", "to", "the", "specified", "Writer", "object", "." ]
4b204f077877a24bcac363f5ecf0e129a0f9f4c5
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-client/src/com/structurizr/io/json/JsonWriter.java#L32-L55
51,691
structurizr/java
structurizr-core/src/com/structurizr/documentation/AutomaticDocumentationTemplate.java
AutomaticDocumentationTemplate.addSections
public List<Section> addSections(SoftwareSystem softwareSystem, File directory) throws IOException { if (softwareSystem == null) { throw new IllegalArgumentException("A software system must be specified."); } return add(softwareSystem, directory); }
java
public List<Section> addSections(SoftwareSystem softwareSystem, File directory) throws IOException { if (softwareSystem == null) { throw new IllegalArgumentException("A software system must be specified."); } return add(softwareSystem, directory); }
[ "public", "List", "<", "Section", ">", "addSections", "(", "SoftwareSystem", "softwareSystem", ",", "File", "directory", ")", "throws", "IOException", "{", "if", "(", "softwareSystem", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"A...
Adds all files in the specified directory, each in its own section, related to a software system. @param directory the directory to scan @param softwareSystem the SoftwareSystem to associate the documentation with @return a List of Section objects @throws IOException if there is an err...
[ "Adds", "all", "files", "in", "the", "specified", "directory", "each", "in", "its", "own", "section", "related", "to", "a", "software", "system", "." ]
4b204f077877a24bcac363f5ecf0e129a0f9f4c5
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-core/src/com/structurizr/documentation/AutomaticDocumentationTemplate.java#L45-L51
51,692
structurizr/java
structurizr-analysis/src/com/structurizr/analysis/TypeUtils.java
TypeUtils.getVisibility
public static TypeVisibility getVisibility(TypeRepository typeRepository, String typeName) { try { Class<?> type = typeRepository.loadClass(typeName); int modifiers = type.getModifiers(); if (Modifier.isPrivate(modifiers)) { return TypeVisibility.PRIVATE; ...
java
public static TypeVisibility getVisibility(TypeRepository typeRepository, String typeName) { try { Class<?> type = typeRepository.loadClass(typeName); int modifiers = type.getModifiers(); if (Modifier.isPrivate(modifiers)) { return TypeVisibility.PRIVATE; ...
[ "public", "static", "TypeVisibility", "getVisibility", "(", "TypeRepository", "typeRepository", ",", "String", "typeName", ")", "{", "try", "{", "Class", "<", "?", ">", "type", "=", "typeRepository", ".", "loadClass", "(", "typeName", ")", ";", "int", "modifie...
Finds the visibility of a given type. @param typeRepository the repository where types should be loaded from @param typeName the fully qualified type name @return a TypeVisibility object representing the visibility (e.g. public, package, etc)
[ "Finds", "the", "visibility", "of", "a", "given", "type", "." ]
4b204f077877a24bcac363f5ecf0e129a0f9f4c5
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-analysis/src/com/structurizr/analysis/TypeUtils.java#L25-L42
51,693
structurizr/java
structurizr-analysis/src/com/structurizr/analysis/TypeUtils.java
TypeUtils.getCategory
public static TypeCategory getCategory(TypeRepository typeRepository, String typeName) { try { Class<?> type = typeRepository.loadClass(typeName); if (type.isInterface()) { return TypeCategory.INTERFACE; } else if (type.isEnum()) { return TypeC...
java
public static TypeCategory getCategory(TypeRepository typeRepository, String typeName) { try { Class<?> type = typeRepository.loadClass(typeName); if (type.isInterface()) { return TypeCategory.INTERFACE; } else if (type.isEnum()) { return TypeC...
[ "public", "static", "TypeCategory", "getCategory", "(", "TypeRepository", "typeRepository", ",", "String", "typeName", ")", "{", "try", "{", "Class", "<", "?", ">", "type", "=", "typeRepository", ".", "loadClass", "(", "typeName", ")", ";", "if", "(", "type"...
Finds the category of a given type. @param typeRepository the repository where types should be loaded from @param typeName the fully qualified type name @return a TypeCategory object representing the category (e.g. class, interface, enum, etc)
[ "Finds", "the", "category", "of", "a", "given", "type", "." ]
4b204f077877a24bcac363f5ecf0e129a0f9f4c5
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-analysis/src/com/structurizr/analysis/TypeUtils.java#L51-L69
51,694
structurizr/java
structurizr-analysis/src/com/structurizr/analysis/TypeUtils.java
TypeUtils.findTypesAnnotatedWith
public static Set<Class<?>> findTypesAnnotatedWith(Class<? extends Annotation> annotation, Set<Class<?>> types) { if (annotation == null) { throw new IllegalArgumentException("An annotation type must be specified."); } return types.stream().filter(c -> c.isAnnotationPresent(annotati...
java
public static Set<Class<?>> findTypesAnnotatedWith(Class<? extends Annotation> annotation, Set<Class<?>> types) { if (annotation == null) { throw new IllegalArgumentException("An annotation type must be specified."); } return types.stream().filter(c -> c.isAnnotationPresent(annotati...
[ "public", "static", "Set", "<", "Class", "<", "?", ">", ">", "findTypesAnnotatedWith", "(", "Class", "<", "?", "extends", "Annotation", ">", "annotation", ",", "Set", "<", "Class", "<", "?", ">", ">", "types", ")", "{", "if", "(", "annotation", "==", ...
Finds the set of types that are annotated with the specified annotation. @param annotation the Annotation to find @param types the set of Class objects to search through @return a Set of Class objects, or an empty set of none could be found
[ "Finds", "the", "set", "of", "types", "that", "are", "annotated", "with", "the", "specified", "annotation", "." ]
4b204f077877a24bcac363f5ecf0e129a0f9f4c5
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-analysis/src/com/structurizr/analysis/TypeUtils.java#L78-L84
51,695
structurizr/java
structurizr-analysis/src/com/structurizr/analysis/TypeUtils.java
TypeUtils.findFirstImplementationOfInterface
public static Class findFirstImplementationOfInterface(Class interfaceType, Set<Class<?>> types) { if (interfaceType == null) { throw new IllegalArgumentException("An interface type must be provided."); } else if (!interfaceType.isInterface()) { throw new IllegalArgumentException...
java
public static Class findFirstImplementationOfInterface(Class interfaceType, Set<Class<?>> types) { if (interfaceType == null) { throw new IllegalArgumentException("An interface type must be provided."); } else if (!interfaceType.isInterface()) { throw new IllegalArgumentException...
[ "public", "static", "Class", "findFirstImplementationOfInterface", "(", "Class", "interfaceType", ",", "Set", "<", "Class", "<", "?", ">", ">", "types", ")", "{", "if", "(", "interfaceType", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "...
Finds the first implementation of the given interface. @param interfaceType a Class object representing the interface type @param types the set of Class objects to search through @return the first concrete implementation class of the given interface, or null if one can't be found
[ "Finds", "the", "first", "implementation", "of", "the", "given", "interface", "." ]
4b204f077877a24bcac363f5ecf0e129a0f9f4c5
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-analysis/src/com/structurizr/analysis/TypeUtils.java#L94-L115
51,696
structurizr/java
structurizr-dot/src/com/structurizr/io/dot/DotWriter.java
DotWriter.write
public void write(Workspace workspace, Writer writer) { workspace.getViews().getSystemContextViews().forEach(v -> write(v, null, writer)); workspace.getViews().getContainerViews().forEach(v -> write(v, v.getSoftwareSystem(), writer)); workspace.getViews().getComponentViews().forEach(v -> write(v...
java
public void write(Workspace workspace, Writer writer) { workspace.getViews().getSystemContextViews().forEach(v -> write(v, null, writer)); workspace.getViews().getContainerViews().forEach(v -> write(v, v.getSoftwareSystem(), writer)); workspace.getViews().getComponentViews().forEach(v -> write(v...
[ "public", "void", "write", "(", "Workspace", "workspace", ",", "Writer", "writer", ")", "{", "workspace", ".", "getViews", "(", ")", ".", "getSystemContextViews", "(", ")", ".", "forEach", "(", "v", "->", "write", "(", "v", ",", "null", ",", "writer", ...
Writes the views in the given workspace as DOT notation, to the specified Writer. @param workspace the workspace containing the views to be written @param writer the Writer to write to
[ "Writes", "the", "views", "in", "the", "given", "workspace", "as", "DOT", "notation", "to", "the", "specified", "Writer", "." ]
4b204f077877a24bcac363f5ecf0e129a0f9f4c5
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-dot/src/com/structurizr/io/dot/DotWriter.java#L30-L34
51,697
structurizr/java
structurizr-core/src/com/structurizr/model/HttpHealthCheck.java
HttpHealthCheck.addHeader
public void addHeader(String name, String value) { if (name == null || name.trim().length() == 0) { throw new IllegalArgumentException("The header name must not be null or empty."); } if (value == null) { throw new IllegalArgumentException("The header value must not be n...
java
public void addHeader(String name, String value) { if (name == null || name.trim().length() == 0) { throw new IllegalArgumentException("The header name must not be null or empty."); } if (value == null) { throw new IllegalArgumentException("The header value must not be n...
[ "public", "void", "addHeader", "(", "String", "name", ",", "String", "value", ")", "{", "if", "(", "name", "==", "null", "||", "name", ".", "trim", "(", ")", ".", "length", "(", ")", "==", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(...
Adds a HTTP header, which will be sent with the HTTP request to the health check URL. @param name the name of the header @param value the value of the header
[ "Adds", "a", "HTTP", "header", "which", "will", "be", "sent", "with", "the", "HTTP", "request", "to", "the", "health", "check", "URL", "." ]
4b204f077877a24bcac363f5ecf0e129a0f9f4c5
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-core/src/com/structurizr/model/HttpHealthCheck.java#L68-L78
51,698
structurizr/java
structurizr-core/src/com/structurizr/util/Url.java
Url.isUrl
public static boolean isUrl(String urlAsString) { if (urlAsString != null && urlAsString.trim().length() > 0) { try { new URL(urlAsString); return true; } catch (MalformedURLException murle) { return false; } } ...
java
public static boolean isUrl(String urlAsString) { if (urlAsString != null && urlAsString.trim().length() > 0) { try { new URL(urlAsString); return true; } catch (MalformedURLException murle) { return false; } } ...
[ "public", "static", "boolean", "isUrl", "(", "String", "urlAsString", ")", "{", "if", "(", "urlAsString", "!=", "null", "&&", "urlAsString", ".", "trim", "(", ")", ".", "length", "(", ")", ">", "0", ")", "{", "try", "{", "new", "URL", "(", "urlAsStri...
Determines whether the supplied string is a valid URL. @param urlAsString the URL, as a String @return true if the URL is valid, false otherwise
[ "Determines", "whether", "the", "supplied", "string", "is", "a", "valid", "URL", "." ]
4b204f077877a24bcac363f5ecf0e129a0f9f4c5
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-core/src/com/structurizr/util/Url.java#L17-L28
51,699
structurizr/java
structurizr-analysis/src/com/structurizr/analysis/DefaultTypeRepository.java
DefaultTypeRepository.findReferencedTypes
public Set<Class<?>> findReferencedTypes(String typeName) { Set<Class<?>> referencedTypes = new HashSet<>(); // use the cached version if possible if (referencedTypesCache.containsKey(typeName)) { return referencedTypesCache.get(typeName); } try { CtClas...
java
public Set<Class<?>> findReferencedTypes(String typeName) { Set<Class<?>> referencedTypes = new HashSet<>(); // use the cached version if possible if (referencedTypesCache.containsKey(typeName)) { return referencedTypesCache.get(typeName); } try { CtClas...
[ "public", "Set", "<", "Class", "<", "?", ">", ">", "findReferencedTypes", "(", "String", "typeName", ")", "{", "Set", "<", "Class", "<", "?", ">", ">", "referencedTypes", "=", "new", "HashSet", "<>", "(", ")", ";", "// use the cached version if possible", ...
Finds the set of types referenced by the specified type. @param typeName the starting type @return a Set of Class objects, or an empty set if none were found
[ "Finds", "the", "set", "of", "types", "referenced", "by", "the", "specified", "type", "." ]
4b204f077877a24bcac363f5ecf0e129a0f9f4c5
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-analysis/src/com/structurizr/analysis/DefaultTypeRepository.java#L118-L153