Skip to content

Commit

Permalink
more management methods
Browse files Browse the repository at this point in the history
  • Loading branch information
chenson42 committed Oct 16, 2007
1 parent 9d777fb commit a82c219
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
8 changes: 8 additions & 0 deletions symmetric/pom.xml
Expand Up @@ -94,6 +94,14 @@
</roles>
<timezone>-5</timezone>
</contributor>
<contributor>
<name>Jon Krajewski</name>
<email>jkrajewski@users.sourceforge.net</email>
<roles>
<role>designer</role>
</roles>
<timezone>-5</timezone>
</contributor>
</contributors>
<distributionManagement>
<site>
Expand Down
Expand Up @@ -52,9 +52,9 @@ public class SymmetricManagementService {
private IPurgeService purgeService;

private INodeService nodeService;

private IDataService dataService;

private IOutgoingBatchService outgoingBatchService;

private IRegistrationService registrationService;
Expand Down Expand Up @@ -116,6 +116,21 @@ public boolean isInitialLoadComplete(String nodeId) {
return outgoingBatchService.isInitialLoadComplete(nodeId);
}

@ManagedOperation(description = "Enable or disable synchronization completely for a node")
@ManagedOperationParameters( {
@ManagedOperationParameter(name = "nodeId", description = "The node to enable or disable"),
@ManagedOperationParameter(name = "syncEnabled", description = "true is enabled, false is disabled") })
public boolean setSyncEnabledForNode(String nodeId, boolean syncEnabled) {
Node node = nodeService.findNode(nodeId);
if (node != null) {
node.setSyncEnabled(syncEnabled);
nodeService.updateNode(node);
return true;
} else {
return false;
}
}

@ManagedOperation(description = "Enable or disable a channel for a specific external id")
@ManagedOperationParameters( {
@ManagedOperationParameter(name = "ignore", description = "Set to true to enable and false to disable"),
Expand Down

0 comments on commit a82c219

Please sign in to comment.