Skip to content

Commit d934af2

Browse files
mgaffigantonygermano
authored andcommitted
Add missing javadoc for User API classes
Signed-off-by: Tony Germano <[email protected]>
1 parent 077f607 commit d934af2

File tree

10 files changed

+117
-3
lines changed

10 files changed

+117
-3
lines changed

server/src/com/mirth/connect/server/userutil/DatabaseConnectionFactory.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ public class DatabaseConnectionFactory {
3131
private Map<String, CustomDriverInfo> customDriverInfoMap;
3232
private Logger logger = LogManager.getLogger(getClass());
3333

34+
/**
35+
* Instantiates a new DatabaseConnectionFactory with the specified MirthContextFactory.
36+
*
37+
* @param contextFactory
38+
* The MirthContextFactory to use when creating database connections.
39+
*/
3440
public DatabaseConnectionFactory(MirthContextFactory contextFactory) {
3541
this.contextFactory = contextFactory;
3642
}

server/src/com/mirth/connect/server/userutil/DeployedState.java

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,28 @@
1616
* STOPPED
1717
*/
1818
public enum DeployedState {
19-
UNDEPLOYED, DEPLOYING, UNDEPLOYING, STARTING, STARTED, PAUSING, PAUSED, STOPPING, STOPPED, SYNCING, UNKNOWN;
19+
/** The channel is disabled or not yet deployed. */
20+
UNDEPLOYED,
21+
/** The channel is in the process of being deployed. */
22+
DEPLOYING,
23+
/** The channel is in the process of being undeployed. */
24+
UNDEPLOYING,
25+
/** The channel is in the process of starting. */
26+
STARTING,
27+
/** The channel is running. */
28+
STARTED,
29+
/** The channel is in the process of pausing. */
30+
PAUSING,
31+
/** The channel is paused. */
32+
PAUSED,
33+
/** The channel is in the process of stopping. */
34+
STOPPING,
35+
/** The channel is stopped. */
36+
STOPPED,
37+
/** The channel is in the process of syncing. */
38+
SYNCING,
39+
/** The channel state is unknown. */
40+
UNKNOWN;
2041

2142
private DeployedState() {}
2243

server/src/com/mirth/connect/server/userutil/EncryptedData.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,15 @@ public class EncryptedData {
1717
private String header;
1818
private byte[] encryptedData;
1919

20+
/**
21+
* Instantiates a new EncryptedData object with the specified header and encrypted data.
22+
*
23+
* @param header
24+
* The meta-information about the encrypted data, including the algorithm and
25+
* initialization vector used.
26+
* @param encryptedData
27+
* The encrypted data as a byte array.
28+
*/
2029
public EncryptedData(String header, byte[] encryptedData) {
2130
this.header = header;
2231
this.encryptedData = encryptedData;
@@ -25,13 +34,17 @@ public EncryptedData(String header, byte[] encryptedData) {
2534
/**
2635
* Returns the meta-information about the encrypted data. Includes the algorithm and
2736
* initialization vector used.
37+
*
38+
* @return The header information as a string.
2839
*/
2940
public String getHeader() {
3041
return header;
3142
}
3243

3344
/**
3445
* Returns the encrypted data as a byte array.
46+
*
47+
* @return The encrypted data.
3548
*/
3649
public byte[] getEncryptedData() {
3750
return encryptedData;

server/src/com/mirth/connect/server/userutil/MirthCachedRowSet.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ public class MirthCachedRowSet implements CachedRowSet {
5656
private RowSetMetaDataImpl RowSetMD;
5757
private CachedRowSet delegate = RowSetProvider.newFactory().createCachedRowSet();
5858

59+
/**
60+
* Instantiates a new MirthCachedRowSet object.
61+
*
62+
* @throws SQLException
63+
* If a database access error occurs.
64+
*/
5965
public MirthCachedRowSet() throws SQLException {
6066
super();
6167
}

server/src/com/mirth/connect/server/userutil/SourceMap.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616

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

19+
/**
20+
* Collection implementing the Source Map.
21+
*/
1922
public class SourceMap implements Map<String, Object> {
2023

2124
private Map<String, Object> delegate;

server/src/com/mirth/connect/userutil/AttachmentEntry.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,11 @@
1919
* Web Service Sender, the variable must reference a list of AttachmentEntry objects.
2020
*/
2121
public class AttachmentEntry implements Serializable {
22+
/** The name of the attachment entry. */
2223
private String name;
24+
/** The content of the attachment entry. */
2325
private String content;
26+
/** The MIME type of the attachment entry. */
2427
private String mimeType;
2528

2629
/**

server/src/com/mirth/connect/userutil/ContentType.java

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,36 @@
1919
* POSTPROCESSOR_ERROR, RESPONSE_ERROR, SOURCE_MAP
2020
*/
2121
public enum ContentType {
22-
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;
22+
/** The inbound message as received by the channel after attachment extraction but before preprocessor modification. */
23+
RAW,
24+
/** The inbound message after preprocessor script execution. */
25+
PROCESSED_RAW,
26+
/** The internal representation of the message after transformer execution. */
27+
TRANSFORMED,
28+
/** The message data deserialized from transformed data into the outbound data type. */
29+
ENCODED,
30+
/** Snapshot of destination connector properties before message dispatch attempt. */
31+
SENT,
32+
/** The response object returned by the destination connector after dispatch attempt. */
33+
RESPONSE,
34+
/** The internal representation of response content serialized into the response inbound data type. */
35+
RESPONSE_TRANSFORMED,
36+
/** The response content deserialized from internal representation into the response outbound data type. */
37+
PROCESSED_RESPONSE,
38+
/** Map containing connector-specific variables and data. */
39+
CONNECTOR_MAP,
40+
/** Map containing channel-specific variables and data. */
41+
CHANNEL_MAP,
42+
/** Map containing response-specific variables and data. */
43+
RESPONSE_MAP,
44+
/** Content containing error information from message processing. */
45+
PROCESSING_ERROR,
46+
/** Content containing error information from postprocessor execution. */
47+
POSTPROCESSOR_ERROR,
48+
/** Content containing error information from response processing. */
49+
RESPONSE_ERROR,
50+
/** Map containing source connector variables and data. */
51+
SOURCE_MAP;
2352

2453
private ContentType() {}
2554

server/src/com/mirth/connect/userutil/MessageHeaders.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,20 @@
1818
import org.apache.logging.log4j.LogManager;
1919
import org.apache.logging.log4j.Logger;
2020

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

29+
/**
30+
* Instantiates a new MessageHeaders object that wraps the given Map of HTTP headers.
31+
*
32+
* @param delegate
33+
* The Map of HTTP headers to wrap.
34+
*/
2535
public MessageHeaders(Map<String, List<String>> delegate) {
2636
this.delegate = delegate;
2737
}

server/src/com/mirth/connect/userutil/MessageParameters.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,20 @@
1818
import org.apache.logging.log4j.LogManager;
1919
import org.apache.logging.log4j.Logger;
2020

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

29+
/**
30+
* Instantiates a new MessageParameters object that wraps the given Map of HTTP parameters.
31+
*
32+
* @param delegate
33+
* The Map of HTTP parameters to wrap.
34+
*/
2535
public MessageParameters(Map<String, List<String>> delegate) {
2636
this.delegate = delegate;
2737
}

server/src/com/mirth/connect/userutil/Status.java

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,20 @@
1515
* RECEIVED, FILTERED, TRANSFORMED, SENT, QUEUED, ERROR, PENDING
1616
*/
1717
public enum Status {
18-
RECEIVED, FILTERED, TRANSFORMED, SENT, QUEUED, ERROR, PENDING;
18+
/** The message has been received by the connector. */
19+
RECEIVED,
20+
/** The message has been filtered by the connector. */
21+
FILTERED,
22+
/** The message has been transformed by the connector. */
23+
TRANSFORMED,
24+
/** The message has been sent by the connector and received a successful response. */
25+
SENT,
26+
/** The message is queued for processing. */
27+
QUEUED,
28+
/** The message has encountered an error. */
29+
ERROR,
30+
/** The message is pending processing. */
31+
PENDING;
1932

2033
private Status() {}
2134

0 commit comments

Comments
 (0)