Class UserTypeDuplicateEvent
This event encapsulates the request to duplicate an existing user type, creating a new
user type with the same permissions and authentication policies as the original.
The event takes a BOUserTypeDuplicate object as input, which contains both
the new user type properties (code and description) and the ID of the original user
type to copy permissions and policies from.
Input: BOUserTypeDuplicate containing:
boUserType- The new user type with desired code and descriptionoriginalUserTypeId- The ID of the user type to copy permissions and policies from
Output: BOUserTypeDuplicate containing the newly created user type and the original user type ID.
Processing: This event is processed by BTUserTypeDuplicate,
which performs the following operations:
- Creates a new user type with the provided properties
- Copies all permission grants from the original user type
- Copies the authentication policy from the original user type
- Invalidates the user types cache
Required Permission: foundation.base.usertype.edit
Usage Example:
BOUserType newUserType = new BOUserType();
newUserType.setCode("NEW_ADMIN");
newUserType.setDescription(new LocalizedString().add(Lang.DEVELOP_LANG, "New Administrator"));
BOUserTypeDuplicate input = new BOUserTypeDuplicate();
input.setBoUserType(newUserType);
input.setOriginalUserTypeId(123L); // ID of the user type to copy from
UserTypeDuplicateEvent event = new UserTypeDuplicateEvent(input);
BOUserTypeDuplicate result = event.launch();
- Since:
- 12.0
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class overit.geocall.bl.GenericEvent
GenericEvent.Step<O> -
Field Summary
Fields inherited from class overit.geocall.bl.SimpleBusinessEvent
inputFields inherited from class overit.geocall.bl.GenericEvent
executorService, journal, streamJournal -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new user type duplication event. -
Method Summary
Methods inherited from class overit.geocall.bl.SimpleBusinessEvent
getInputMethods inherited from class overit.geocall.bl.BusinessEvent
doLaunchMethods inherited from class overit.geocall.bl.GenericEvent
clearEvents, defineInterruptor, defineResult, getJournal, getResult, getSpouts, getStreamJournal, isInternal, launch, launch, launchAsync, launchAsync, register, registerSpouts
-
Constructor Details
-
UserTypeDuplicateEvent
Creates a new user type duplication event.The input object must contain both the new user type properties (code and description) and the ID of the original user type to copy permissions and authentication policies from.
- Parameters:
input- theBOUserTypeDuplicateobject containing the new user type and the original user type ID to duplicate from
-