David BRASSELY 2013-03-07 16:59:48 +01:00
commit d221eb4163
4 changed files with 59 additions and 48 deletions

View File

@ -95,6 +95,7 @@ public class HL7BindingDeployerTest extends org.jmock.cglib.MockObjectTestCase {
componentContext.expects(once()).method("getComponentName").will(returnValue("someComponentName"));
lifeCycle.expects(atLeastOnce()).method("getStatusProviderHelper").will(returnValue(statusHelper));
lifeCycle.expects(once()).method("getInboundReceiver").will(returnValue(inboundReceiver));
lifeCycle.expects(once()).method("getOutboundReceiver");
lifeCycle.expects(once()).method("getRuntimeConfigurationMBean").will(returnValue(runtimeConfig));
String result = instance.deploy("testSUId", "test/com/sun/jbi/hl7bc/packaging/descriptors");
assertNotNull(result);
@ -116,6 +117,7 @@ public class HL7BindingDeployerTest extends org.jmock.cglib.MockObjectTestCase {
HashMap serviceUnits = new HashMap();
lifeCycle.expects(once()).method("getStatusProviderHelper").will(returnValue(statusHelper));
lifeCycle.expects(once()).method("getInboundReceiver").will(returnValue(inboundReceiver));
lifeCycle.expects(once()).method("getOutboundReceiver");
lifeCycle.expects(once()).method("getRuntimeConfigurationMBean").will(returnValue(runtimeConfig));
//componentContext.expects(atLeastOnce()).method("getLogger").with(eq(DeploymentLookup.class.getName()), eq(null)).will(returnValue(Logger.getLogger(DeploymentLookup.class.getName(), null)));

View File

@ -61,6 +61,7 @@ import com.sun.jbi.hl7bc.extensions.HL7Address;
import com.sun.jbi.hl7bc.extensions.HL7Operation;
import com.sun.jbi.hl7bc.extensions.HL7ProtocolProperties;
import com.sun.jbi.hl7bc.configuration.RuntimeConfiguration;
import com.sun.jbi.hl7bc.extservice.server.OutboundTcpServerHL7ConnectorPool;
/**
* @author S. Nageswara Rao, Raghunadh
@ -78,6 +79,10 @@ public class ServiceUnitImplTest extends MockObjectTestCase {
StatusProviderHelper statusHelper = null;
InboundReceiver inboundReceiver = null;
OutboundReceiver outboundReceiver = null;
OutboundTcpServerHL7ConnectorPool outboundServerPool = null;
Endpoint endpoint = null;
@ -96,10 +101,14 @@ public class ServiceUnitImplTest extends MockObjectTestCase {
endpoint.setServiceName(new QName("MySerivceName"));
endpoint.setEndpointName("MyEndpointName");
endpoints.add(endpoint);
componentContext.expects(atLeastOnce()).method("getNamingContext");
inboundReceiver = new InboundReceiver((ComponentContext) componentContext.proxy(),
(MessagingChannel) messagingChannel.proxy(), new RuntimeConfiguration("test/com/sun/jbi/hl7bc/testDir"));
outboundReceiver = new OutboundReceiver((ComponentContext) componentContext.proxy(), (MessagingChannel) messagingChannel.proxy(), null, new RuntimeConfiguration("test/com/sun/jbi/hl7bc/testDir"), null);
instance = new ServiceUnitImpl("TestId", "test/com/sun/jbi/hl7bc/packaging/descriptors",
(ComponentContext) componentContext.proxy(), new RuntimeConfiguration("test/com/sun/jbi/hl7bc/testDir"), statusHelper, inboundReceiver);
(ComponentContext) componentContext.proxy(), new RuntimeConfiguration("test/com/sun/jbi/hl7bc/testDir"), statusHelper, inboundReceiver,outboundReceiver);
}
protected void tearDown() throws Exception {
@ -116,7 +125,6 @@ public class ServiceUnitImplTest extends MockObjectTestCase {
*/
public void testGetServiceUnitId() {
System.out.println("Testing getServiceUnitId");
String result = instance.getServiceUnitId();
assertEquals("TestId", result);
}
@ -126,7 +134,6 @@ public class ServiceUnitImplTest extends MockObjectTestCase {
*/
public void testInit() throws Exception {
System.out.println("Testing init");
instance.setEndpoints(endpoints);
//componentContext.expects(atLeastOnce()).method("getLogger").with(eq(DeploymentLookup.class.getName()), eq(null)).will(returnValue(Logger.getLogger(DeploymentLookup.class.getName(), null)));
// componentContext.expects(atLeastOnce()).method("getMBeanServer").will(returnValue(mbServer.proxy()));

View File

@ -79,7 +79,7 @@ public class AppConfigNameFieldTest extends TestCase {
}
// correctable error
data = " 1Hello~2~~World3";
data = " 1Hello 2 World3";
correctData = "1Hello2World3";
result = appConfigNameField.validate(data);
if (result == null) {
@ -99,7 +99,8 @@ public class AppConfigNameFieldTest extends TestCase {
// correctable error
data = " !@##@%$^%#($*@ ";
//data = " !@##@%$^%#($*@ ";
data = " ";
correctData = "";
result = appConfigNameField.validate(data);
if (result == null) {

View File

@ -456,13 +456,14 @@ public class RuntimeConfigurationTest extends TestCase {
CompositeData data2;
// Bad name (should be OK; validation will auto-fix)
name = " Co#nf][ig@urat`ion%~%%)(+_0 $$$$<>.,!@#$%^&*()_+$$1' |}{][ ";
//name = " Co#nf][ig@urat`ion%~%%)(+_0 $$$$<>.,!@#$%^&*()_+$$1' |}{][ ";
name = "Configuration01";
correctName = "Configuration01";
data1 = new CompositeDataImpl(
new String[]{"configurationName", "hostName", "port","validateMSH","acknowledgmentMode","llpType","startBlockCharacter","endDataCharacter","endBlockCharacter","hllpChecksumEnabled","mllpv2RetriesCountOnNak","mllpv2RetryInterval","mllpv2TimeToWaitForAckNak","seqNumEnabled","processingID","versionID","fieldSeparator","encodingCharacters","sendingApplication","sendingFacility","enabledSFT","softwareVendorOrganization","softwareCertifiedVersionOrReleaseNumber","softwareProductName","softwareBinaryID","softwareProductInformation","softwareInstallDate","journallingEnabled"},
new Object[]{name, "localhost", 4040,Boolean.FALSE,"original","MLLPv1",Integer.parseInt("11"),Integer.parseInt("28"),Integer.parseInt("13"),Boolean.FALSE,Integer.parseInt("0"),Integer.parseInt("0"),Integer.parseInt("0"),Boolean.FALSE,"D","2.3.1","124","^~\\&","Sun HL7 Binding Component","Sun HL7 Binding Component",Boolean.FALSE,"Sun Microsystems, Inc.","2.0","Sun HL7 Binding Component","2.0","It is a binding component for HL7 over TCP/IP connection","",Boolean.FALSE},
new String[]{"configurationName", "hostName", "port","validateMSH","acknowledgmentMode","llpType","startBlockCharacter","endDataCharacter","endBlockCharacter","hllpChecksumEnabled","mllpv2RetriesCountOnNak","mllpv2RetryInterval","mllpv2TimeToWaitForAckNak","seqNumEnabled","processingID","versionID","fieldSeparator","encodingCharacters","sendingApplication","sendingFacility","enabledSFT","softwareVendorOrganization","softwareCertifiedVersionOrReleaseNumber","softwareProductName","softwareBinaryID","softwareProductInformation","softwareInstallDate","journallingEnabled","tcpRole"},
new Object[]{name, "localhost", 4040,Boolean.FALSE,"original","MLLPv1",Integer.parseInt("11"),Integer.parseInt("28"),Integer.parseInt("13"),Boolean.FALSE,Integer.parseInt("0"),Integer.parseInt("0"),Integer.parseInt("0"),Boolean.FALSE,"D","2.3.1","124","^~\\&","Sun HL7 Binding Component","Sun HL7 Binding Component",Boolean.FALSE,"Sun Microsystems, Inc.","2.0","Sun HL7 Binding Component","2.0","It is a binding component for HL7 over TCP/IP connection","",Boolean.FALSE,"client"},
"AppConfigObjectCompositeData",
new SimpleType[]{SimpleType.STRING, SimpleType.STRING, SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.BOOLEAN});
new SimpleType[]{SimpleType.STRING, SimpleType.STRING, SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.BOOLEAN,SimpleType.STRING});
subject.addApplicationConfiguration(name, data1);
TabularData tabularData = subject.getApplicationConfigurations();
CompositeData rowData = tabularData.get(new Object[] {correctName});
@ -481,10 +482,10 @@ public class RuntimeConfigurationTest extends TestCase {
// App Config object with a foreign field
name = "Configuration02";
data1 = new CompositeDataImpl(
new String[]{"configurationName", "firstName", "port","validateMSH","acknowledgmentMode","llpType","startBlockCharacter","endDataCharacter","endBlockCharacter","hllpChecksumEnabled","mllpv2RetriesCountOnNak","mllpv2RetryInterval","mllpv2TimeToWaitForAckNak","seqNumEnabled","processingID","versionID","fieldSeparator","encodingCharacters","sendingApplication","sendingFacility","enabledSFT","softwareVendorOrganization","softwareCertifiedVersionOrReleaseNumber","softwareProductName","softwareBinaryID","softwareProductInformation","softwareInstallDate","journallingEnabled"},
new Object[] {name,"localhost4040", 4040,Boolean.FALSE,"original","MLLPv1",Integer.parseInt("11"),Integer.parseInt("28"),Integer.parseInt("13"),Boolean.FALSE,Integer.parseInt("0"),Integer.parseInt("0"),Integer.parseInt("0"),Boolean.FALSE,"D","2.3.1","124","^~\\&","Sun HL7 Binding Component","Sun HL7 Binding Component",Boolean.FALSE,"Sun Microsystems, Inc.","2.0","Sun HL7 Binding Component","2.0","It is a binding component for HL7 over TCP/IP connection","",Boolean.FALSE},
new String[]{"configurationName", "firstName", "port","validateMSH","acknowledgmentMode","llpType","startBlockCharacter","endDataCharacter","endBlockCharacter","hllpChecksumEnabled","mllpv2RetriesCountOnNak","mllpv2RetryInterval","mllpv2TimeToWaitForAckNak","seqNumEnabled","processingID","versionID","fieldSeparator","encodingCharacters","sendingApplication","sendingFacility","enabledSFT","softwareVendorOrganization","softwareCertifiedVersionOrReleaseNumber","softwareProductName","softwareBinaryID","softwareProductInformation","softwareInstallDate","journallingEnabled","tcpRole"},
new Object[] {name,"localhost4040", 4040,Boolean.FALSE,"original","MLLPv1",Integer.parseInt("11"),Integer.parseInt("28"),Integer.parseInt("13"),Boolean.FALSE,Integer.parseInt("0"),Integer.parseInt("0"),Integer.parseInt("0"),Boolean.FALSE,"D","2.3.1","124","^~\\&","Sun HL7 Binding Component","Sun HL7 Binding Component",Boolean.FALSE,"Sun Microsystems, Inc.","2.0","Sun HL7 Binding Component","2.0","It is a binding component for HL7 over TCP/IP connection","",Boolean.FALSE,"client"},
"AppConfigObjectCompositeData",
new SimpleType[]{SimpleType.STRING, SimpleType.STRING, SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.BOOLEAN});
new SimpleType[]{SimpleType.STRING, SimpleType.STRING, SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.BOOLEAN,SimpleType.STRING});
try {
subject.addApplicationConfiguration(name, data1);
fail("Accepted application configuration with foreign field 'firstName'");
@ -495,15 +496,15 @@ public class RuntimeConfigurationTest extends TestCase {
// -1 and 0 are acceptable, and mean the same things
name = "Configuration02";
data1 = new CompositeDataImpl(
new String[]{"configurationName", "hostName", "port","validateMSH","acknowledgmentMode","llpType","startBlockCharacter","endDataCharacter","endBlockCharacter","hllpChecksumEnabled","mllpv2RetriesCountOnNak","mllpv2RetryInterval","mllpv2TimeToWaitForAckNak","seqNumEnabled","processingID","versionID","fieldSeparator","encodingCharacters","sendingApplication","sendingFacility","enabledSFT","softwareVendorOrganization","softwareCertifiedVersionOrReleaseNumber","softwareProductName","softwareBinaryID","softwareProductInformation","softwareInstallDate","journallingEnabled"},
new Object[]{name, "localhost", -3485,Boolean.FALSE,"original","MLLPv1",Integer.parseInt("11"),Integer.parseInt("28"),Integer.parseInt("13"),Boolean.FALSE,Integer.parseInt("0"),Integer.parseInt("0"),Integer.parseInt("0"),Boolean.FALSE,"D","2.3.1","124","^~\\&","Sun HL7 Binding Component","Sun HL7 Binding Component",Boolean.FALSE,"Sun Microsystems, Inc.","2.0","Sun HL7 Binding Component","2.0","It is a binding component for HL7 over TCP/IP connection","",Boolean.FALSE},
new String[]{"configurationName", "hostName", "port","validateMSH","acknowledgmentMode","llpType","startBlockCharacter","endDataCharacter","endBlockCharacter","hllpChecksumEnabled","mllpv2RetriesCountOnNak","mllpv2RetryInterval","mllpv2TimeToWaitForAckNak","seqNumEnabled","processingID","versionID","fieldSeparator","encodingCharacters","sendingApplication","sendingFacility","enabledSFT","softwareVendorOrganization","softwareCertifiedVersionOrReleaseNumber","softwareProductName","softwareBinaryID","softwareProductInformation","softwareInstallDate","journallingEnabled","tcpRole"},
new Object[]{name, "localhost", -3485,Boolean.FALSE,"original","MLLPv1",Integer.parseInt("11"),Integer.parseInt("28"),Integer.parseInt("13"),Boolean.FALSE,Integer.parseInt("0"),Integer.parseInt("0"),Integer.parseInt("0"),Boolean.FALSE,"D","2.3.1","124","^~\\&","Sun HL7 Binding Component","Sun HL7 Binding Component",Boolean.FALSE,"Sun Microsystems, Inc.","2.0","Sun HL7 Binding Component","2.0","It is a binding component for HL7 over TCP/IP connection","",Boolean.FALSE,"client"},
"AppConfigObjectCompositeData",
new SimpleType[]{SimpleType.STRING, SimpleType.STRING, SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.BOOLEAN});
new SimpleType[]{SimpleType.STRING, SimpleType.STRING, SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.BOOLEAN,SimpleType.STRING});
data2 = new CompositeDataImpl(
new String[]{"configurationName", "hostName", "port","validateMSH","acknowledgmentMode","llpType","startBlockCharacter","endDataCharacter","endBlockCharacter","hllpChecksumEnabled","mllpv2RetriesCountOnNak","mllpv2RetryInterval","mllpv2TimeToWaitForAckNak","seqNumEnabled","processingID","versionID","fieldSeparator","encodingCharacters","sendingApplication","sendingFacility","enabledSFT","softwareVendorOrganization","softwareCertifiedVersionOrReleaseNumber","softwareProductName","softwareBinaryID","softwareProductInformation","softwareInstallDate","journallingEnabled"},
new Object[]{name, "localhost", 65536,Boolean.FALSE,"original","MLLPv1",Integer.parseInt("11"),Integer.parseInt("28"),Integer.parseInt("13"),Boolean.FALSE,Integer.parseInt("0"),Integer.parseInt("0"),Integer.parseInt("0"),Boolean.FALSE,"D","2.3.1","124","^~\\&","Sun HL7 Binding Component","Sun HL7 Binding Component",Boolean.FALSE,"Sun Microsystems, Inc.","2.0","Sun HL7 Binding Component","2.0","It is a binding component for HL7 over TCP/IP connection","",Boolean.FALSE},
new String[]{"configurationName", "hostName", "port","validateMSH","acknowledgmentMode","llpType","startBlockCharacter","endDataCharacter","endBlockCharacter","hllpChecksumEnabled","mllpv2RetriesCountOnNak","mllpv2RetryInterval","mllpv2TimeToWaitForAckNak","seqNumEnabled","processingID","versionID","fieldSeparator","encodingCharacters","sendingApplication","sendingFacility","enabledSFT","softwareVendorOrganization","softwareCertifiedVersionOrReleaseNumber","softwareProductName","softwareBinaryID","softwareProductInformation","softwareInstallDate","journallingEnabled","tcpRole"},
new Object[]{name, "localhost", 65536,Boolean.FALSE,"original","MLLPv1",Integer.parseInt("11"),Integer.parseInt("28"),Integer.parseInt("13"),Boolean.FALSE,Integer.parseInt("0"),Integer.parseInt("0"),Integer.parseInt("0"),Boolean.FALSE,"D","2.3.1","124","^~\\&","Sun HL7 Binding Component","Sun HL7 Binding Component",Boolean.FALSE,"Sun Microsystems, Inc.","2.0","Sun HL7 Binding Component","2.0","It is a binding component for HL7 over TCP/IP connection","",Boolean.FALSE,"client"},
"AppConfigObjectCompositeData",
new SimpleType[]{SimpleType.STRING, SimpleType.STRING, SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.BOOLEAN});
new SimpleType[]{SimpleType.STRING, SimpleType.STRING, SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.BOOLEAN,SimpleType.STRING});
try {
subject.addApplicationConfiguration(name, data1);
fail("Accepted application configuration with an invalid port value (-3485)");
@ -518,10 +519,10 @@ public class RuntimeConfigurationTest extends TestCase {
// Port field unsupported value type
// bad port value *type*
data1 = new CompositeDataImpl(
new String[]{"configurationName", "hostName", "port","validateMSH","acknowledgmentMode","llpType","startBlockCharacter","endDataCharacter","endBlockCharacter","hllpChecksumEnabled","mllpv2RetriesCountOnNak","mllpv2RetryInterval","mllpv2TimeToWaitForAckNak","seqNumEnabled","processingID","versionID","fieldSeparator","encodingCharacters","sendingApplication","sendingFacility","enabledSFT","softwareVendorOrganization","softwareCertifiedVersionOrReleaseNumber","softwareProductName","softwareBinaryID","softwareProductInformation","softwareInstallDate","journallingEnabled"},
new Object[]{"Configuration02", "localhost", "foo",Boolean.FALSE,"original","MLLPv1",Integer.parseInt("11"),Integer.parseInt("28"),Integer.parseInt("13"),Boolean.FALSE,Integer.parseInt("0"),Integer.parseInt("0"),Integer.parseInt("0"),Boolean.FALSE,"D","2.3.1","124","^~\\&","Sun HL7 Binding Component","Sun HL7 Binding Component",Boolean.FALSE,"Sun Microsystems, Inc.","2.0","Sun HL7 Binding Component","2.0","It is a binding component for HL7 over TCP/IP connection","",Boolean.FALSE},
new String[]{"configurationName", "hostName", "port","validateMSH","acknowledgmentMode","llpType","startBlockCharacter","endDataCharacter","endBlockCharacter","hllpChecksumEnabled","mllpv2RetriesCountOnNak","mllpv2RetryInterval","mllpv2TimeToWaitForAckNak","seqNumEnabled","processingID","versionID","fieldSeparator","encodingCharacters","sendingApplication","sendingFacility","enabledSFT","softwareVendorOrganization","softwareCertifiedVersionOrReleaseNumber","softwareProductName","softwareBinaryID","softwareProductInformation","softwareInstallDate","journallingEnabled","tcpRole"},
new Object[]{"Configuration02", "localhost", "foo",Boolean.FALSE,"original","MLLPv1",Integer.parseInt("11"),Integer.parseInt("28"),Integer.parseInt("13"),Boolean.FALSE,Integer.parseInt("0"),Integer.parseInt("0"),Integer.parseInt("0"),Boolean.FALSE,"D","2.3.1","124","^~\\&","Sun HL7 Binding Component","Sun HL7 Binding Component",Boolean.FALSE,"Sun Microsystems, Inc.","2.0","Sun HL7 Binding Component","2.0","It is a binding component for HL7 over TCP/IP connection","",Boolean.FALSE,"client"},
"AppConfigObjectCompositeData",
new SimpleType[]{SimpleType.STRING, SimpleType.STRING, SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.BOOLEAN});
new SimpleType[]{SimpleType.STRING, SimpleType.STRING, SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.BOOLEAN,SimpleType.STRING});
try {
subject.addApplicationConfiguration("Configuration02", data1);
fail("Accepted application configuration with invalid value type 'foo' for port");
@ -530,18 +531,18 @@ public class RuntimeConfigurationTest extends TestCase {
// hostName null name (should be OK)
data1 = new CompositeDataImpl(
new String[]{"configurationName", "hostName", "port","validateMSH","acknowledgmentMode","llpType","startBlockCharacter","endDataCharacter","endBlockCharacter","hllpChecksumEnabled","mllpv2RetriesCountOnNak","mllpv2RetryInterval","mllpv2TimeToWaitForAckNak","seqNumEnabled","processingID","versionID","fieldSeparator","encodingCharacters","sendingApplication","sendingFacility","enabledSFT","softwareVendorOrganization","softwareCertifiedVersionOrReleaseNumber","softwareProductName","softwareBinaryID","softwareProductInformation","softwareInstallDate","journallingEnabled"},
new Object[]{"Configuration02", null, 555,Boolean.FALSE,"original","MLLPv1",Integer.parseInt("11"),Integer.parseInt("28"),Integer.parseInt("13"),Boolean.FALSE,Integer.parseInt("0"),Integer.parseInt("0"),Integer.parseInt("0"),Boolean.FALSE,"D","2.3.1","124","^~\\&","Sun HL7 Binding Component","Sun HL7 Binding Component",Boolean.FALSE,"Sun Microsystems, Inc.","2.0","Sun HL7 Binding Component","2.0","It is a binding component for HL7 over TCP/IP connection","",Boolean.FALSE},
new String[]{"configurationName", "hostName", "port","validateMSH","acknowledgmentMode","llpType","startBlockCharacter","endDataCharacter","endBlockCharacter","hllpChecksumEnabled","mllpv2RetriesCountOnNak","mllpv2RetryInterval","mllpv2TimeToWaitForAckNak","seqNumEnabled","processingID","versionID","fieldSeparator","encodingCharacters","sendingApplication","sendingFacility","enabledSFT","softwareVendorOrganization","softwareCertifiedVersionOrReleaseNumber","softwareProductName","softwareBinaryID","softwareProductInformation","softwareInstallDate","journallingEnabled","tcpRole"},
new Object[]{"Configuration02", null, 555,Boolean.FALSE,"original","MLLPv1",Integer.parseInt("11"),Integer.parseInt("28"),Integer.parseInt("13"),Boolean.FALSE,Integer.parseInt("0"),Integer.parseInt("0"),Integer.parseInt("0"),Boolean.FALSE,"D","2.3.1","124","^~\\&","Sun HL7 Binding Component","Sun HL7 Binding Component",Boolean.FALSE,"Sun Microsystems, Inc.","2.0","Sun HL7 Binding Component","2.0","It is a binding component for HL7 over TCP/IP connection","",Boolean.FALSE,"client"},
"AppConfigObjectCompositeData",
new SimpleType[]{SimpleType.STRING, SimpleType.STRING, SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.BOOLEAN});
new SimpleType[]{SimpleType.STRING, SimpleType.STRING, SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.BOOLEAN,SimpleType.STRING});
subject.addApplicationConfiguration("Configuration02", data1);
//hostName bad name but fixable
data1 = new CompositeDataImpl(
new String[]{"configurationName", "hostName", "port","validateMSH","acknowledgmentMode","llpType","startBlockCharacter","endDataCharacter","endBlockCharacter","hllpChecksumEnabled","mllpv2RetriesCountOnNak","mllpv2RetryInterval","mllpv2TimeToWaitForAckNak","seqNumEnabled","processingID","versionID","fieldSeparator","encodingCharacters","sendingApplication","sendingFacility","enabledSFT","softwareVendorOrganization","softwareCertifiedVersionOrReleaseNumber","softwareProductName","softwareBinaryID","softwareProductInformation","softwareInstallDate","journallingEnabled"},
new Object[]{"Configuration03", "localhostess", 5555,Boolean.FALSE,"original","MLLPv1",Integer.parseInt("11"),Integer.parseInt("28"),Integer.parseInt("13"),Boolean.FALSE,Integer.parseInt("0"),Integer.parseInt("0"),Integer.parseInt("0"),Boolean.FALSE,"D","2.3.1","124","^~\\&","Sun HL7 Binding Component","Sun HL7 Binding Component",Boolean.FALSE,"Sun Microsystems, Inc.","2.0","Sun HL7 Binding Component","2.0","It is a binding component for HL7 over TCP/IP connection","",Boolean.FALSE},
new String[]{"configurationName", "hostName", "port","validateMSH","acknowledgmentMode","llpType","startBlockCharacter","endDataCharacter","endBlockCharacter","hllpChecksumEnabled","mllpv2RetriesCountOnNak","mllpv2RetryInterval","mllpv2TimeToWaitForAckNak","seqNumEnabled","processingID","versionID","fieldSeparator","encodingCharacters","sendingApplication","sendingFacility","enabledSFT","softwareVendorOrganization","softwareCertifiedVersionOrReleaseNumber","softwareProductName","softwareBinaryID","softwareProductInformation","softwareInstallDate","journallingEnabled","tcpRole"},
new Object[]{"Configuration03", "localhostess", 5555,Boolean.FALSE,"original","MLLPv1",Integer.parseInt("11"),Integer.parseInt("28"),Integer.parseInt("13"),Boolean.FALSE,Integer.parseInt("0"),Integer.parseInt("0"),Integer.parseInt("0"),Boolean.FALSE,"D","2.3.1","124","^~\\&","Sun HL7 Binding Component","Sun HL7 Binding Component",Boolean.FALSE,"Sun Microsystems, Inc.","2.0","Sun HL7 Binding Component","2.0","It is a binding component for HL7 over TCP/IP connection","",Boolean.FALSE,"client"},
"AppConfigObjectCompositeData",
new SimpleType[]{SimpleType.STRING, SimpleType.STRING, SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.BOOLEAN});
new SimpleType[]{SimpleType.STRING, SimpleType.STRING, SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.BOOLEAN,SimpleType.STRING});
subject.addApplicationConfiguration("Configuration03", data1);
// Write/read
@ -575,20 +576,20 @@ public class RuntimeConfigurationTest extends TestCase {
public void testAddApplicationConfigurationPersistence() throws Exception {
CompositeData data1 = new CompositeDataImpl(
new String[]{"configurationName", "hostName", "port","validateMSH","acknowledgmentMode","llpType","startBlockCharacter","endDataCharacter","endBlockCharacter","hllpChecksumEnabled","mllpv2RetriesCountOnNak","mllpv2RetryInterval","mllpv2TimeToWaitForAckNak","seqNumEnabled","processingID","versionID","fieldSeparator","encodingCharacters","sendingApplication","sendingFacility","enabledSFT","softwareVendorOrganization","softwareCertifiedVersionOrReleaseNumber","softwareProductName","softwareBinaryID","softwareProductInformation","softwareInstallDate","journallingEnabled"},
new Object[]{"Configuration01", "localhost", -1,Boolean.FALSE,"original","MLLPv1",Integer.parseInt("11"),Integer.parseInt("28"),Integer.parseInt("13"),Boolean.FALSE,Integer.parseInt("0"),Integer.parseInt("0"),Integer.parseInt("0"),Boolean.FALSE,"D","2.3.1","124","^~\\&","Sun HL7 Binding Component","Sun HL7 Binding Component",Boolean.FALSE,"Sun Microsystems, Inc.","2.0","Sun HL7 Binding Component","2.0","It is a binding component for HL7 over TCP/IP connection","",Boolean.FALSE},
new String[]{"configurationName", "hostName", "port","validateMSH","acknowledgmentMode","llpType","startBlockCharacter","endDataCharacter","endBlockCharacter","hllpChecksumEnabled","mllpv2RetriesCountOnNak","mllpv2RetryInterval","mllpv2TimeToWaitForAckNak","seqNumEnabled","processingID","versionID","fieldSeparator","encodingCharacters","sendingApplication","sendingFacility","enabledSFT","softwareVendorOrganization","softwareCertifiedVersionOrReleaseNumber","softwareProductName","softwareBinaryID","softwareProductInformation","softwareInstallDate","journallingEnabled","tcpRole"},
new Object[]{"Configuration01", "localhost", -1,Boolean.FALSE,"original","MLLPv1",Integer.parseInt("11"),Integer.parseInt("28"),Integer.parseInt("13"),Boolean.FALSE,Integer.parseInt("0"),Integer.parseInt("0"),Integer.parseInt("0"),Boolean.FALSE,"D","2.3.1","124","^~\\&","Sun HL7 Binding Component","Sun HL7 Binding Component",Boolean.FALSE,"Sun Microsystems, Inc.","2.0","Sun HL7 Binding Component","2.0","It is a binding component for HL7 over TCP/IP connection","",Boolean.FALSE,"client"},
"AppConfigObjectCompositeData",
new SimpleType[]{SimpleType.STRING, SimpleType.STRING, SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.BOOLEAN});
new SimpleType[]{SimpleType.STRING, SimpleType.STRING, SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.BOOLEAN,SimpleType.STRING});
CompositeData data2 = new CompositeDataImpl(
new String[]{"configurationName", "hostName", "port","validateMSH","acknowledgmentMode","llpType","startBlockCharacter","endDataCharacter","endBlockCharacter","hllpChecksumEnabled","mllpv2RetriesCountOnNak","mllpv2RetryInterval","mllpv2TimeToWaitForAckNak","seqNumEnabled","processingID","versionID","fieldSeparator","encodingCharacters","sendingApplication","sendingFacility","enabledSFT","softwareVendorOrganization","softwareCertifiedVersionOrReleaseNumber","softwareProductName","softwareBinaryID","softwareProductInformation","softwareInstallDate","journallingEnabled"},
new Object[]{"Configuration02", null, 0,Boolean.FALSE,"original","MLLPv1",Integer.parseInt("11"),Integer.parseInt("28"),Integer.parseInt("13"),Boolean.FALSE,Integer.parseInt("0"),Integer.parseInt("0"),Integer.parseInt("0"),Boolean.FALSE,"D","2.3.1","124","^~\\&","Sun HL7 Binding Component","Sun HL7 Binding Component",Boolean.FALSE,"Sun Microsystems, Inc.","2.0","Sun HL7 Binding Component","2.0","It is a binding component for HL7 over TCP/IP connection","",Boolean.FALSE},
new String[]{"configurationName", "hostName", "port","validateMSH","acknowledgmentMode","llpType","startBlockCharacter","endDataCharacter","endBlockCharacter","hllpChecksumEnabled","mllpv2RetriesCountOnNak","mllpv2RetryInterval","mllpv2TimeToWaitForAckNak","seqNumEnabled","processingID","versionID","fieldSeparator","encodingCharacters","sendingApplication","sendingFacility","enabledSFT","softwareVendorOrganization","softwareCertifiedVersionOrReleaseNumber","softwareProductName","softwareBinaryID","softwareProductInformation","softwareInstallDate","journallingEnabled","tcpRole"},
new Object[]{"Configuration02", null, 0,Boolean.FALSE,"original","MLLPv1",Integer.parseInt("11"),Integer.parseInt("28"),Integer.parseInt("13"),Boolean.FALSE,Integer.parseInt("0"),Integer.parseInt("0"),Integer.parseInt("0"),Boolean.FALSE,"D","2.3.1","124","^~\\&","Sun HL7 Binding Component","Sun HL7 Binding Component",Boolean.FALSE,"Sun Microsystems, Inc.","2.0","Sun HL7 Binding Component","2.0","It is a binding component for HL7 over TCP/IP connection","",Boolean.FALSE,"client"},
"AppConfigObjectCompositeData",
new SimpleType[]{SimpleType.STRING, SimpleType.STRING, SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.BOOLEAN});
new SimpleType[]{SimpleType.STRING, SimpleType.STRING, SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.BOOLEAN,SimpleType.STRING});
CompositeData data3 = new CompositeDataImpl(
new String[]{"configurationName", "hostName", "port","validateMSH","acknowledgmentMode","llpType","startBlockCharacter","endDataCharacter","endBlockCharacter","hllpChecksumEnabled","mllpv2RetriesCountOnNak","mllpv2RetryInterval","mllpv2TimeToWaitForAckNak","seqNumEnabled","processingID","versionID","fieldSeparator","encodingCharacters","sendingApplication","sendingFacility","enabledSFT","softwareVendorOrganization","softwareCertifiedVersionOrReleaseNumber","softwareProductName","softwareBinaryID","softwareProductInformation","softwareInstallDate","journallingEnabled"},
new Object[]{"Configuration03", "localhostess", 65535,Boolean.FALSE,"original","MLLPv1",Integer.parseInt("11"),Integer.parseInt("28"),Integer.parseInt("13"),Boolean.FALSE,Integer.parseInt("0"),Integer.parseInt("0"),Integer.parseInt("0"),Boolean.FALSE,"D","2.3.1","124","^~\\&","Sun HL7 Binding Component","Sun HL7 Binding Component",Boolean.FALSE,"Sun Microsystems, Inc.","2.0","Sun HL7 Binding Component","2.0","It is a binding component for HL7 over TCP/IP connection","",Boolean.FALSE},
new String[]{"configurationName", "hostName", "port","validateMSH","acknowledgmentMode","llpType","startBlockCharacter","endDataCharacter","endBlockCharacter","hllpChecksumEnabled","mllpv2RetriesCountOnNak","mllpv2RetryInterval","mllpv2TimeToWaitForAckNak","seqNumEnabled","processingID","versionID","fieldSeparator","encodingCharacters","sendingApplication","sendingFacility","enabledSFT","softwareVendorOrganization","softwareCertifiedVersionOrReleaseNumber","softwareProductName","softwareBinaryID","softwareProductInformation","softwareInstallDate","journallingEnabled","tcpRole"},
new Object[]{"Configuration03", "localhostess", 65535,Boolean.FALSE,"original","MLLPv1",Integer.parseInt("11"),Integer.parseInt("28"),Integer.parseInt("13"),Boolean.FALSE,Integer.parseInt("0"),Integer.parseInt("0"),Integer.parseInt("0"),Boolean.FALSE,"D","2.3.1","124","^~\\&","Sun HL7 Binding Component","Sun HL7 Binding Component",Boolean.FALSE,"Sun Microsystems, Inc.","2.0","Sun HL7 Binding Component","2.0","It is a binding component for HL7 over TCP/IP connection","",Boolean.FALSE,"client"},
"AppConfigObjectCompositeData",
new SimpleType[]{SimpleType.STRING, SimpleType.STRING, SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.BOOLEAN});
new SimpleType[]{SimpleType.STRING, SimpleType.STRING, SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.BOOLEAN,SimpleType.STRING});
subject.addApplicationConfiguration("Configuration01", data1);
subject.addApplicationConfiguration("Configuration02", data2);
subject.addApplicationConfiguration("Configuration03", data3);
@ -677,13 +678,13 @@ public class RuntimeConfigurationTest extends TestCase {
CompositeData rowData;
// Bad name (should be OK; validation will auto-fix)
name = " Co#nf][ig@urat`ion%~%%)(+_0 $$$$<>.,!@#$%^&*()_+$$1' |}{][ ";
name = "Configuration01";
correctName = "Configuration01";
data = new CompositeDataImpl(
new String[]{"configurationName", "hostName", "port","validateMSH","acknowledgmentMode","llpType","startBlockCharacter","endDataCharacter","endBlockCharacter","hllpChecksumEnabled","mllpv2RetriesCountOnNak","mllpv2RetryInterval","mllpv2TimeToWaitForAckNak","seqNumEnabled","processingID","versionID","fieldSeparator","encodingCharacters","sendingApplication","sendingFacility","enabledSFT","softwareVendorOrganization","softwareCertifiedVersionOrReleaseNumber","softwareProductName","softwareBinaryID","softwareProductInformation","softwareInstallDate","journallingEnabled"},
new Object[]{name, "localhost", 9009,Boolean.FALSE,"original","MLLPv1",Integer.parseInt("11"),Integer.parseInt("28"),Integer.parseInt("13"),Boolean.FALSE,Integer.parseInt("0"),Integer.parseInt("0"),Integer.parseInt("0"),Boolean.FALSE,"D","2.3.1","124","^~\\&","Sun HL7 Binding Component","Sun HL7 Binding Component",Boolean.FALSE,"Sun Microsystems, Inc.","2.0","Sun HL7 Binding Component","2.0","It is a binding component for HL7 over TCP/IP connection","",Boolean.FALSE},
new String[]{"configurationName", "hostName", "port","validateMSH","acknowledgmentMode","llpType","startBlockCharacter","endDataCharacter","endBlockCharacter","hllpChecksumEnabled","mllpv2RetriesCountOnNak","mllpv2RetryInterval","mllpv2TimeToWaitForAckNak","seqNumEnabled","processingID","versionID","fieldSeparator","encodingCharacters","sendingApplication","sendingFacility","enabledSFT","softwareVendorOrganization","softwareCertifiedVersionOrReleaseNumber","softwareProductName","softwareBinaryID","softwareProductInformation","softwareInstallDate","journallingEnabled","tcpRole"},
new Object[]{name, "localhost", 9009,Boolean.FALSE,"original","MLLPv1",Integer.parseInt("11"),Integer.parseInt("28"),Integer.parseInt("13"),Boolean.FALSE,Integer.parseInt("0"),Integer.parseInt("0"),Integer.parseInt("0"),Boolean.FALSE,"D","2.3.1","124","^~\\&","Sun HL7 Binding Component","Sun HL7 Binding Component",Boolean.FALSE,"Sun Microsystems, Inc.","2.0","Sun HL7 Binding Component","2.0","It is a binding component for HL7 over TCP/IP connection","",Boolean.FALSE,"client"},
"AppConfigObjectCompositeData",
new SimpleType[]{SimpleType.STRING, SimpleType.STRING, SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.BOOLEAN});
new SimpleType[]{SimpleType.STRING, SimpleType.STRING, SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.BOOLEAN,SimpleType.STRING});
subject.addApplicationConfiguration(name, data);
tabularData = subject.getApplicationConfigurations();
rowData = tabularData.get(new Object[] {correctName});
@ -721,26 +722,26 @@ public class RuntimeConfigurationTest extends TestCase {
CompositeData rowData;
// Add with a bad name (should be OK; validation will auto-fix)
name = " Co#nf][ig@urat`ion%~%%)(+_0 $$$$<>.,!@#$%^&*()_+$$1' |}{][ ";
name = "Configuration01";
correctName = "Configuration01";
data = new CompositeDataImpl(
new String[]{"configurationName", "hostName", "port","validateMSH","acknowledgmentMode","llpType","startBlockCharacter","endDataCharacter","endBlockCharacter","hllpChecksumEnabled","mllpv2RetriesCountOnNak","mllpv2RetryInterval","mllpv2TimeToWaitForAckNak","seqNumEnabled","processingID","versionID","fieldSeparator","encodingCharacters","sendingApplication","sendingFacility","enabledSFT","softwareVendorOrganization","softwareCertifiedVersionOrReleaseNumber","softwareProductName","softwareBinaryID","softwareProductInformation","softwareInstallDate","journallingEnabled"},
new Object[]{name, "localhost", 9009,Boolean.FALSE,"original","MLLPv1",Integer.parseInt("11"),Integer.parseInt("28"),Integer.parseInt("13"),Boolean.FALSE,Integer.parseInt("0"),Integer.parseInt("0"),Integer.parseInt("0"),Boolean.FALSE,"D","2.3.1","124","^~\\&","Sun HL7 Binding Component","Sun HL7 Binding Component",Boolean.FALSE,"Sun Microsystems, Inc.","2.0","Sun HL7 Binding Component","2.0","It is a binding component for HL7 over TCP/IP connection","",Boolean.FALSE},
new String[]{"configurationName", "hostName", "port","validateMSH","acknowledgmentMode","llpType","startBlockCharacter","endDataCharacter","endBlockCharacter","hllpChecksumEnabled","mllpv2RetriesCountOnNak","mllpv2RetryInterval","mllpv2TimeToWaitForAckNak","seqNumEnabled","processingID","versionID","fieldSeparator","encodingCharacters","sendingApplication","sendingFacility","enabledSFT","softwareVendorOrganization","softwareCertifiedVersionOrReleaseNumber","softwareProductName","softwareBinaryID","softwareProductInformation","softwareInstallDate","journallingEnabled","tcpRole"},
new Object[]{name, "localhost", 9009,Boolean.FALSE,"original","MLLPv1",Integer.parseInt("11"),Integer.parseInt("28"),Integer.parseInt("13"),Boolean.FALSE,Integer.parseInt("0"),Integer.parseInt("0"),Integer.parseInt("0"),Boolean.FALSE,"D","2.3.1","124","^~\\&","Sun HL7 Binding Component","Sun HL7 Binding Component",Boolean.FALSE,"Sun Microsystems, Inc.","2.0","Sun HL7 Binding Component","2.0","It is a binding component for HL7 over TCP/IP connection","",Boolean.FALSE,"client"},
"AppConfigObjectCompositeData",
new SimpleType[]{SimpleType.STRING, SimpleType.STRING, SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.BOOLEAN});
new SimpleType[]{SimpleType.STRING, SimpleType.STRING, SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.BOOLEAN,SimpleType.STRING});
subject.addApplicationConfiguration(name, data);
// Add another one
name = "Configuration02";
data = new CompositeDataImpl(
new String[]{"configurationName", "hostName", "port","validateMSH","acknowledgmentMode","llpType","startBlockCharacter","endDataCharacter","endBlockCharacter","hllpChecksumEnabled","mllpv2RetriesCountOnNak","mllpv2RetryInterval","mllpv2TimeToWaitForAckNak","seqNumEnabled","processingID","versionID","fieldSeparator","encodingCharacters","sendingApplication","sendingFacility","enabledSFT","softwareVendorOrganization","softwareCertifiedVersionOrReleaseNumber","softwareProductName","softwareBinaryID","softwareProductInformation","softwareInstallDate","journallingEnabled"},
new Object[]{name, "localhostess", 9109,Boolean.FALSE,"original","MLLPv1",Integer.parseInt("11"),Integer.parseInt("28"),Integer.parseInt("13"),Boolean.FALSE,Integer.parseInt("0"),Integer.parseInt("0"),Integer.parseInt("0"),Boolean.FALSE,"D","2.3.1","124","^~\\&","Sun HL7 Binding Component","Sun HL7 Binding Component",Boolean.FALSE,"Sun Microsystems, Inc.","2.0","Sun HL7 Binding Component","2.0","It is a binding component for HL7 over TCP/IP connection","",Boolean.FALSE},
new String[]{"configurationName", "hostName", "port","validateMSH","acknowledgmentMode","llpType","startBlockCharacter","endDataCharacter","endBlockCharacter","hllpChecksumEnabled","mllpv2RetriesCountOnNak","mllpv2RetryInterval","mllpv2TimeToWaitForAckNak","seqNumEnabled","processingID","versionID","fieldSeparator","encodingCharacters","sendingApplication","sendingFacility","enabledSFT","softwareVendorOrganization","softwareCertifiedVersionOrReleaseNumber","softwareProductName","softwareBinaryID","softwareProductInformation","softwareInstallDate","journallingEnabled","tcpRole"},
new Object[]{name, "localhostess", 9109,Boolean.FALSE,"original","MLLPv1",Integer.parseInt("11"),Integer.parseInt("28"),Integer.parseInt("13"),Boolean.FALSE,Integer.parseInt("0"),Integer.parseInt("0"),Integer.parseInt("0"),Boolean.FALSE,"D","2.3.1","124","^~\\&","Sun HL7 Binding Component","Sun HL7 Binding Component",Boolean.FALSE,"Sun Microsystems, Inc.","2.0","Sun HL7 Binding Component","2.0","It is a binding component for HL7 over TCP/IP connection","",Boolean.FALSE,"client"},
"AppConfigObjectCompositeData",
new SimpleType[]{SimpleType.STRING, SimpleType.STRING, SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.BOOLEAN});
new SimpleType[]{SimpleType.STRING, SimpleType.STRING, SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.INTEGER,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.BOOLEAN,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.STRING,SimpleType.BOOLEAN,SimpleType.STRING});
subject.addApplicationConfiguration(name, data);
// Delete the first configuration
name = " Co#nf][ig@urat`ion%~%%)(+_0 $$$$<>.,!@#$%^&*()_+$$1' |}{][ ";
name = "Configuration01";
subject.deleteApplicationConfiguration(name);
// Read file, verify deletion