public class CreateGranularPrivilegesCommand
extends java.lang.Object
implements com.marklogic.appdeployer.command.Command, com.marklogic.appdeployer.command.UndoableCommand
Constructor and Description |
---|
CreateGranularPrivilegesCommand(HubConfig hubConfig) |
CreateGranularPrivilegesCommand(HubConfig hubConfig,
java.util.List<java.lang.String> groupNames) |
Modifier and Type | Method and Description |
---|---|
protected com.marklogic.mgmt.api.security.Privilege |
buildPrivilege(com.marklogic.mgmt.ManageClient client,
java.lang.String name,
java.lang.String action,
java.lang.String dhsName,
java.util.List<java.lang.String> existingPrivilegeNames,
java.lang.String role) |
protected java.util.List<com.marklogic.mgmt.api.security.Privilege> |
buildPrivilegesThatDhsMayHaveCreated(com.marklogic.mgmt.ManageClient client)
Some of the privileges that need to be created may already exist in DHS.
|
protected java.util.List<com.marklogic.mgmt.api.security.Privilege> |
buildScheduledTaskPrivileges()
Builds a list of privileges to create based on the groupNames configured on this object.
|
void |
execute(com.marklogic.appdeployer.command.CommandContext context) |
java.lang.Integer |
getExecuteSortOrder()
It is anticipated that these privileges can always be added at the end of a deployment because none of the steps
before that should depend on the privileges being added.
|
java.util.List<java.lang.String> |
getGroupNames() |
protected java.util.List<java.lang.String> |
getGroupNamesForScheduledTaskPrivileges() |
java.lang.Integer |
getUndoSortOrder() |
void |
undo(com.marklogic.appdeployer.command.CommandContext context) |
public CreateGranularPrivilegesCommand(HubConfig hubConfig)
public CreateGranularPrivilegesCommand(HubConfig hubConfig, java.util.List<java.lang.String> groupNames)
public java.lang.Integer getExecuteSortOrder()
getExecuteSortOrder
in interface com.marklogic.appdeployer.command.Command
public java.lang.Integer getUndoSortOrder()
getUndoSortOrder
in interface com.marklogic.appdeployer.command.UndoableCommand
public void execute(com.marklogic.appdeployer.command.CommandContext context)
execute
in interface com.marklogic.appdeployer.command.Command
public void undo(com.marklogic.appdeployer.command.CommandContext context)
undo
in interface com.marklogic.appdeployer.command.UndoableCommand
protected java.util.List<com.marklogic.mgmt.api.security.Privilege> buildPrivilegesThatDhsMayHaveCreated(com.marklogic.mgmt.ManageClient client)
client
- protected com.marklogic.mgmt.api.security.Privilege buildPrivilege(com.marklogic.mgmt.ManageClient client, java.lang.String name, java.lang.String action, java.lang.String dhsName, java.util.List<java.lang.String> existingPrivilegeNames, java.lang.String role)
protected java.util.List<com.marklogic.mgmt.api.security.Privilege> buildScheduledTaskPrivileges()
protected java.util.List<java.lang.String> getGroupNamesForScheduledTaskPrivileges()
public java.util.List<java.lang.String> getGroupNames()