From 5554be00251e88ce84b937995b23ea11b5d4f12e Mon Sep 17 00:00:00 2001 From: Rob Rudin Date: Mon, 3 Aug 2015 10:16:58 -0400 Subject: [PATCH] #38 Groups should be deleted at the end of an undeploy --- .../appdeployer/command/groups/CreateGroupsCommand.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main/java/com/marklogic/appdeployer/command/groups/CreateGroupsCommand.java b/src/main/java/com/marklogic/appdeployer/command/groups/CreateGroupsCommand.java index 810e32ad4..0b24a04df 100644 --- a/src/main/java/com/marklogic/appdeployer/command/groups/CreateGroupsCommand.java +++ b/src/main/java/com/marklogic/appdeployer/command/groups/CreateGroupsCommand.java @@ -24,4 +24,13 @@ protected ResourceManager getResourceManager(CommandContext context) { return new GroupManager(context.getManageClient()); } + /** + * While groups should be created right away, we don't want to undelete them until the very end, as we won't be + * able to delete one unless all of its app servers have been deleted. + */ + @Override + public Integer getUndoSortOrder() { + return Integer.MAX_VALUE; + } + }