Class CreateOrUpdateGroup
- java.lang.Object
-
- org.nuxeo.ecm.automation.core.operations.users.CreateOrUpdateGroup
-
public class CreateOrUpdateGroup extends Object
Operation to create or update a group.- Since:
- 9.1
-
-
Field Summary
Fields Modifier and Type Field Description static String
CREATE
static String
CREATE_OR_UPDATE
protected OperationContext
ctx
protected static String
GROUP_COLON
static String
GROUP_DESCRIPTION
static String
GROUP_LABEL
static String
GROUP_NAME
static String
GROUP_SCHEMA
static String
GROUP_TENANTID
protected String
groupDescription
protected String
groupLabel
protected String
groupName
static String
ID
protected StringList
members
static String
MEMBERS
protected String
mode
static String
PARENT_GROUPS
protected StringList
parentGroups
protected Properties
properties
static String
SUB_GROUPS
protected StringList
subGroups
protected String
tenantId
static String
UPDATE
protected UserManager
userManager
-
Constructor Summary
Constructors Constructor Description CreateOrUpdateGroup()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
canCreateOrUpdateGroup(DocumentModel groupDoc)
protected void
checkCanCreateOrUpdateGroup(DocumentModel groupDoc)
protected Set<String>
computeAllGroups(NuxeoGroup group)
static String
getTenantGroupName(String groupName, String tenantId)
Use tenant_mytenant_mygroup instead of mygroup for groups having a tenant id.void
run()
-
-
-
Field Detail
-
ID
public static final String ID
- See Also:
- Constant Field Values
-
CREATE_OR_UPDATE
public static final String CREATE_OR_UPDATE
- See Also:
- Constant Field Values
-
CREATE
public static final String CREATE
- See Also:
- Constant Field Values
-
UPDATE
public static final String UPDATE
- See Also:
- Constant Field Values
-
GROUP_SCHEMA
public static final String GROUP_SCHEMA
- See Also:
- Constant Field Values
-
GROUP_COLON
protected static final String GROUP_COLON
- See Also:
- Constant Field Values
-
GROUP_NAME
public static final String GROUP_NAME
- See Also:
- Constant Field Values
-
GROUP_LABEL
public static final String GROUP_LABEL
- See Also:
- Constant Field Values
-
GROUP_DESCRIPTION
public static final String GROUP_DESCRIPTION
- See Also:
- Constant Field Values
-
MEMBERS
public static final String MEMBERS
- See Also:
- Constant Field Values
-
SUB_GROUPS
public static final String SUB_GROUPS
- See Also:
- Constant Field Values
-
PARENT_GROUPS
public static final String PARENT_GROUPS
- See Also:
- Constant Field Values
-
GROUP_TENANTID
public static final String GROUP_TENANTID
- See Also:
- Constant Field Values
-
userManager
protected UserManager userManager
-
ctx
protected OperationContext ctx
-
groupName
protected String groupName
-
tenantId
protected String tenantId
-
groupLabel
protected String groupLabel
-
groupDescription
protected String groupDescription
-
members
protected StringList members
-
subGroups
protected StringList subGroups
-
parentGroups
protected StringList parentGroups
-
properties
protected Properties properties
-
mode
protected String mode
-
-
Method Detail
-
run
public void run() throws OperationException
- Throws:
OperationException
-
getTenantGroupName
public static String getTenantGroupName(String groupName, String tenantId)
Use tenant_mytenant_mygroup instead of mygroup for groups having a tenant id.This is done explicitly instead of the implicit computation done in SQLSession.createEntry which is based on a tenant id deduced from the logged-in user.
-
checkCanCreateOrUpdateGroup
protected void checkCanCreateOrUpdateGroup(DocumentModel groupDoc)
-
canCreateOrUpdateGroup
protected boolean canCreateOrUpdateGroup(DocumentModel groupDoc)
-
computeAllGroups
protected Set<String> computeAllGroups(NuxeoGroup group)
-
-