Skip to content

Commit

Permalink
Modified the autoStart property from boolean to string.
Browse files Browse the repository at this point in the history
  • Loading branch information
aaron-mcgrath-adp committed Jul 29, 2024
1 parent d45715e commit 0d42931
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion interlok-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ jar {
"Implementation-Version": project.version,
"Implementation-Vendor-Id": project.group,
"Implementation-Vendor": organizationName,
"Add-Opens": "java.base/java.lang java.base/java.util",
"Add-Opens": "java.base/java.lang java.base/java.util java.management/javax.management",
"Main-Class": "com.adaptris.interlok.boot.InterlokLauncher")
}
from ("$project.buildDir/spring-boot-loader") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public class ChannelManager extends ComponentManagerImpl<Channel> implements Cha
private transient Set<WorkflowRuntimeManager> workflowManagers;
private transient ObjectName myObjectName = null;
private transient Set<ChildRuntimeInfoComponent> childRuntimeInfoComponents;
private transient boolean autoStart;
private transient String autoStart;

private ChannelManager() {
super();
Expand All @@ -65,7 +65,7 @@ public ChannelManager(Channel c, AdapterManager owner) throws MalformedObjectNam
this();
channel = c;
parent = owner;
autoStart = BooleanUtils.toBooleanDefaultIfNull(c.getAutoStart(), true);
autoStart = Boolean.toString(BooleanUtils.toBooleanDefaultIfNull(c.getAutoStart(), true));
initMembers();
if (!skipBackRef) {
parent.addChild(this);
Expand Down Expand Up @@ -246,7 +246,7 @@ public String getParentId() {
}

@Override
public boolean getAutoStart() {
public String getAutoStart() {
return autoStart;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ public interface ChannelManagerMBean extends AdapterComponentMBean, ParentRuntim
boolean removeWorkflow(String id) throws CoreException, IllegalStateException, MalformedObjectNameException;

/**
* Will return the configured auto-start boolean.
* Will return the configured auto-start boolean in string form.
* Auto-start determines if this channel should be started when the Adapter starts.
*
* @return true if the channel is set to start with the Adapter
* @return "true" if the channel is set to start with the Adapter
*/
boolean getAutoStart();
String getAutoStart();

}
Original file line number Diff line number Diff line change
Expand Up @@ -2267,8 +2267,8 @@ public String getWrappedComponentClassname() {
}

@Override
public boolean getAutoStart() {
return true;
public String getAutoStart() {
return "true";
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ public void testGetAutoStart() throws Exception {
try {
AdapterManager adapterManager = new AdapterManager(adapter);
ChannelManager channelManager = new ChannelManager(channel, adapterManager);
assertFalse(channelManager.getAutoStart());
assertFalse(Boolean.parseBoolean(channelManager.getAutoStart()));
}
finally {
adapter.requestClose();
Expand All @@ -184,7 +184,7 @@ public void testGetDefaultAutoStart() throws Exception {
try {
AdapterManager adapterManager = new AdapterManager(adapter);
ChannelManager channelManager = new ChannelManager(channel, adapterManager);
assertTrue(channelManager.getAutoStart());
assertTrue(Boolean.parseBoolean(channelManager.getAutoStart()));
}
finally {
adapter.requestClose();
Expand Down

0 comments on commit 0d42931

Please sign in to comment.