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 StringCREATEstatic StringCREATE_OR_UPDATEprotected OperationContextctxprotected static StringGROUP_COLONstatic StringGROUP_DESCRIPTIONstatic StringGROUP_LABELstatic StringGROUP_NAMEstatic StringGROUP_SCHEMAstatic StringGROUP_TENANTIDprotected StringgroupDescriptionprotected StringgroupLabelprotected StringgroupNamestatic StringIDprotected StringListmembersstatic StringMEMBERSprotected Stringmodestatic StringPARENT_GROUPSprotected StringListparentGroupsprotected Propertiespropertiesstatic StringSUB_GROUPSprotected StringListsubGroupsprotected StringtenantIdstatic StringUPDATEprotected UserManageruserManager
-
Constructor Summary
Constructors Constructor Description CreateOrUpdateGroup()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancanCreateOrUpdateGroup(DocumentModel groupDoc)protected voidcheckCanCreateOrUpdateGroup(DocumentModel groupDoc)protected Set<String>computeAllGroups(NuxeoGroup group)static StringgetTenantGroupName(String groupName, String tenantId)Use tenant_mytenant_mygroup instead of mygroup for groups having a tenant id.voidrun()
-
-
-
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)
-
-