Search in sources :

Example 1 with ContentPropertyBulkCommandContext

use of org.entando.entando.plugins.jacms.aps.system.services.content.command.common.ContentPropertyBulkCommandContext in project entando-core by entando.

the class ContentCategoryBulkAction method initBulkCommand.

private BaseContentPropertyBulkCommand<Category> initBulkCommand(List<Category> categories) {
    String commandBeanName = ApsAdminSystemConstants.DELETE == this.getStrutsAction() ? RemoveCategoryBulkCommand.BEAN_NAME : JoinCategoryBulkCommand.BEAN_NAME;
    WebApplicationContext applicationContext = ApsWebApplicationUtils.getWebApplicationContext(this.getRequest());
    BaseContentPropertyBulkCommand<Category> command = (BaseContentPropertyBulkCommand<Category>) applicationContext.getBean(commandBeanName);
    ContentPropertyBulkCommandContext<Category> context = new ContentPropertyBulkCommandContext<Category>(this.getSelectedIds(), categories, this.getCurrentUser(), new DefaultBulkCommandTracer<String>());
    command.init(context);
    return command;
}
Also used : BaseContentPropertyBulkCommand(org.entando.entando.plugins.jacms.aps.system.services.content.command.common.BaseContentPropertyBulkCommand) Category(com.agiletec.aps.system.services.category.Category) ContentPropertyBulkCommandContext(org.entando.entando.plugins.jacms.aps.system.services.content.command.common.ContentPropertyBulkCommandContext) WebApplicationContext(org.springframework.web.context.WebApplicationContext)

Example 2 with ContentPropertyBulkCommandContext

use of org.entando.entando.plugins.jacms.aps.system.services.content.command.common.ContentPropertyBulkCommandContext in project entando-core by entando.

the class ContentGroupBulkAction method initBulkCommand.

private BaseContentPropertyBulkCommand<String> initBulkCommand() {
    String commandBeanName = ApsAdminSystemConstants.DELETE == this.getStrutsAction() ? RemoveGroupBulkCommand.BEAN_NAME : JoinGroupBulkCommand.BEAN_NAME;
    WebApplicationContext applicationContext = ApsWebApplicationUtils.getWebApplicationContext(this.getRequest());
    BaseContentPropertyBulkCommand<String> command = (BaseContentPropertyBulkCommand<String>) applicationContext.getBean(commandBeanName);
    ContentPropertyBulkCommandContext<String> context = new ContentPropertyBulkCommandContext<String>(this.getSelectedIds(), this.getExtraGroupNames(), this.getCurrentUser(), new DefaultBulkCommandTracer<String>());
    command.init(context);
    return command;
}
Also used : BaseContentPropertyBulkCommand(org.entando.entando.plugins.jacms.aps.system.services.content.command.common.BaseContentPropertyBulkCommand) ContentPropertyBulkCommandContext(org.entando.entando.plugins.jacms.aps.system.services.content.command.common.ContentPropertyBulkCommandContext) WebApplicationContext(org.springframework.web.context.WebApplicationContext)

Aggregations

BaseContentPropertyBulkCommand (org.entando.entando.plugins.jacms.aps.system.services.content.command.common.BaseContentPropertyBulkCommand)2 ContentPropertyBulkCommandContext (org.entando.entando.plugins.jacms.aps.system.services.content.command.common.ContentPropertyBulkCommandContext)2 WebApplicationContext (org.springframework.web.context.WebApplicationContext)2 Category (com.agiletec.aps.system.services.category.Category)1