Posts

Showing posts from April, 2020

WCS Command Context initialization and cloning.

Command context will contain information regarding command object, You can retrieve user, store, language related information from command. The command context is set to the controller command when the command is invoked by the component facade. The command context should be used as a read-only object. You should not call its setter methods. Example to get Command context: private CommandContext getCommandContext() {         CommandContext commandContext = null;         ActivityToken activityToken = ((BusinessContextInternalService) BusinessContextServiceFactory                 .getBusinessContextService()).getActivityToken();         commandContext = ContextHelper.createCommandContext(activityToken );         return commandContext;     } Cloning Command Context: if you want to change any object value in command context then always recommended t...