Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ public class DatabaseConnectionFactory {
private Map<String, CustomDriverInfo> customDriverInfoMap;
private Logger logger = LogManager.getLogger(getClass());

/**
* Instantiates a new DatabaseConnectionFactory with the specified MirthContextFactory.
*
* @param contextFactory
* The MirthContextFactory to use when creating database connections.
*/
public DatabaseConnectionFactory(MirthContextFactory contextFactory) {
this.contextFactory = contextFactory;
}
Expand Down
23 changes: 22 additions & 1 deletion server/src/com/mirth/connect/server/userutil/DeployedState.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,28 @@
* STOPPED
*/
public enum DeployedState {
UNDEPLOYED, DEPLOYING, UNDEPLOYING, STARTING, STARTED, PAUSING, PAUSED, STOPPING, STOPPED, SYNCING, UNKNOWN;
/** The channel is disabled or not yet deployed. */
UNDEPLOYED,
/** The channel is in the process of being deployed. */
DEPLOYING,
/** The channel is in the process of being undeployed. */
UNDEPLOYING,
/** The channel is in the process of starting. */
STARTING,
/** The channel is running. */
STARTED,
/** The channel is in the process of pausing. */
PAUSING,
/** The channel is paused. */
PAUSED,
/** The channel is in the process of stopping. */
STOPPING,
/** The channel is stopped. */
STOPPED,
/** The channel is in the process of syncing. */
SYNCING,
/** The channel state is unknown. */
UNKNOWN;

private DeployedState() {}

Expand Down
13 changes: 13 additions & 0 deletions server/src/com/mirth/connect/server/userutil/EncryptedData.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@ public class EncryptedData {
private String header;
private byte[] encryptedData;

/**
* Instantiates a new EncryptedData object with the specified header and encrypted data.
*
* @param header
* The meta-information about the encrypted data, including the algorithm and
* initialization vector used.
* @param encryptedData
* The encrypted data as a byte array.
*/
public EncryptedData(String header, byte[] encryptedData) {
this.header = header;
this.encryptedData = encryptedData;
Expand All @@ -25,13 +34,17 @@ public EncryptedData(String header, byte[] encryptedData) {
/**
* Returns the meta-information about the encrypted data. Includes the algorithm and
* initialization vector used.
*
* @return The header information as a string.
*/
public String getHeader() {
return header;
}

/**
* Returns the encrypted data as a byte array.
*
* @return The encrypted data.
*/
public byte[] getEncryptedData() {
return encryptedData;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ public class MirthCachedRowSet implements CachedRowSet {
private RowSetMetaDataImpl RowSetMD;
private CachedRowSet delegate = RowSetProvider.newFactory().createCachedRowSet();

/**
* Instantiates a new MirthCachedRowSet object.
*
* @throws SQLException
* If a database access error occurs.
*/
public MirthCachedRowSet() throws SQLException {
super();
}
Expand Down
3 changes: 3 additions & 0 deletions server/src/com/mirth/connect/server/userutil/SourceMap.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@

import com.mirth.connect.donkey.server.Constants;

/**
* Collection implementing the Source Map.
*/
public class SourceMap implements Map<String, Object> {

private Map<String, Object> delegate;
Expand Down
3 changes: 3 additions & 0 deletions server/src/com/mirth/connect/userutil/AttachmentEntry.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@
* Web Service Sender, the variable must reference a list of AttachmentEntry objects.
*/
public class AttachmentEntry implements Serializable {
/** The name of the attachment entry. */
private String name;
/** The content of the attachment entry. */
private String content;
/** The MIME type of the attachment entry. */
private String mimeType;

/**
Expand Down
31 changes: 30 additions & 1 deletion server/src/com/mirth/connect/userutil/ContentType.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,36 @@
* POSTPROCESSOR_ERROR, RESPONSE_ERROR, SOURCE_MAP
*/
public enum ContentType {
RAW, PROCESSED_RAW, TRANSFORMED, ENCODED, SENT, RESPONSE, RESPONSE_TRANSFORMED, PROCESSED_RESPONSE, CONNECTOR_MAP, CHANNEL_MAP, RESPONSE_MAP, PROCESSING_ERROR, POSTPROCESSOR_ERROR, RESPONSE_ERROR, SOURCE_MAP;
/** The inbound message as received by the channel after attachment extraction but before preprocessor modification. */
RAW,
/** The inbound message after preprocessor script execution. */
PROCESSED_RAW,
/** The internal representation of the message after transformer execution. */
TRANSFORMED,
/** The message data deserialized from transformed data into the outbound data type. */
ENCODED,
/** Snapshot of destination connector properties before message dispatch attempt. */
SENT,
/** The response object returned by the destination connector after dispatch attempt. */
RESPONSE,
/** The internal representation of response content serialized into the response inbound data type. */
RESPONSE_TRANSFORMED,
/** The response content deserialized from internal representation into the response outbound data type. */
PROCESSED_RESPONSE,
/** Map containing connector-specific variables and data. */
CONNECTOR_MAP,
/** Map containing channel-specific variables and data. */
CHANNEL_MAP,
/** Map containing response-specific variables and data. */
RESPONSE_MAP,
/** Content containing error information from message processing. */
PROCESSING_ERROR,
/** Content containing error information from postprocessor execution. */
POSTPROCESSOR_ERROR,
/** Content containing error information from response processing. */
RESPONSE_ERROR,
/** Map containing source connector variables and data. */
SOURCE_MAP;

private ContentType() {}

Expand Down
10 changes: 10 additions & 0 deletions server/src/com/mirth/connect/userutil/MessageHeaders.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,20 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

/**
* A wrapper around a Map of HTTP headers that provides convenience methods for accessing header
* values.
*/
public class MessageHeaders {
private static Logger logger = LogManager.getLogger(MessageHeaders.class);
private Map<String, List<String>> delegate;

/**
* Instantiates a new MessageHeaders object that wraps the given Map of HTTP headers.
*
* @param delegate
* The Map of HTTP headers to wrap.
*/
public MessageHeaders(Map<String, List<String>> delegate) {
this.delegate = delegate;
}
Expand Down
10 changes: 10 additions & 0 deletions server/src/com/mirth/connect/userutil/MessageParameters.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,20 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

/**
* A wrapper around a Map of HTTP parameters that provides convenience methods for accessing
* parameter values.
*/
public class MessageParameters {
private static Logger logger = LogManager.getLogger(MessageParameters.class);
private Map<String, List<String>> delegate;

/**
* Instantiates a new MessageParameters object that wraps the given Map of HTTP parameters.
*
* @param delegate
* The Map of HTTP parameters to wrap.
*/
public MessageParameters(Map<String, List<String>> delegate) {
this.delegate = delegate;
}
Expand Down
15 changes: 14 additions & 1 deletion server/src/com/mirth/connect/userutil/Status.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,20 @@
* RECEIVED, FILTERED, TRANSFORMED, SENT, QUEUED, ERROR, PENDING
*/
public enum Status {
RECEIVED, FILTERED, TRANSFORMED, SENT, QUEUED, ERROR, PENDING;
/** The message has been received by the connector. */
RECEIVED,
/** The message has been filtered by the connector. */
FILTERED,
/** The message has been transformed by the connector. */
TRANSFORMED,
/** The message has been sent by the connector and received a successful response. */
SENT,
/** The message is queued for processing. */
QUEUED,
/** The message has encountered an error. */
ERROR,
/** The message is pending processing. */
PENDING;

private Status() {}

Expand Down