Class AdminAbstractContentItemController
java.lang.Object
org.broadleafcommerce.common.web.controller.BroadleafAbstractController
org.broadleafcommerce.openadmin.web.controller.AdminAbstractController
org.broadleafcommerce.openadmin.web.controller.entity.AdminBasicEntityController
com.broadleafcommerce.advancedcms.admin.web.controller.AdminAbstractContentItemController
- Direct Known Subclasses:
AdminContentItemController,AdminOverrideContentItemController
public abstract class AdminAbstractContentItemController
extends org.broadleafcommerce.openadmin.web.controller.entity.AdminBasicEntityController
Defines methods for
ContentItems that are shared between normal ContentItems and OverrideContentItems.- Author:
- Andre Azzolini (apazzolini)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ContentItemServicestatic final Stringprotected org.broadleafcommerce.common.locale.service.LocaleServiceprotected org.broadleafcommerce.cms.structure.service.StructuredContentServiceprotected WidgetServiceprotected com.broadleafcommerce.enterprise.workflow.service.WorkflowSandBoxItemServiceprotected com.broadleafcommerce.enterprise.workflow.persistence.WorkflowStateManagerFields inherited from class org.broadleafcommerce.openadmin.web.controller.entity.AdminBasicEntityController
adminUserDao, adornedTargetAutoPopulateExtensionManager, ALTERNATE_ID_PROPERTY, CURRENT_FOLDER_ID, CUSTOM_CRITERIA, duplicator, dynamicEntityDao, genericEntityService, IS_SELECTIZE_REQUEST, LOG, multipleCatalogExtensionManager, rowLevelSecurityService, sandBoxHelperFields inherited from class org.broadleafcommerce.openadmin.web.controller.AdminAbstractController
adminNavigationService, adminRemoteSecurityService, CURRENT_ADMIN_MODULE_ATTRIBUTE_NAME, CURRENT_ADMIN_SECTION_ATTRIBUTE_NAME, customCriteriaService, DEFAULT_CONTAINER_VIEW, entityConfiguration, entityFormValidator, eps, extensionManager, FILTER_VALUE_SEPARATOR, FILTER_VALUE_SEPARATOR_REGEX, filterProductTypeExtensionManager, formService, MODAL_CONTAINER_VIEW, service, validationService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected String[]addNewOverrideStructuredContent(org.broadleafcommerce.openadmin.web.form.entity.EntityForm ef, String scType, List<org.broadleafcommerce.openadmin.dto.SectionCrumb> sectionCrumbs, Map<String, String> pathVars, jakarta.servlet.http.HttpServletRequest request, String id, org.springframework.validation.BindingResult result) protected String[]addNewStructuredContent(org.broadleafcommerce.openadmin.web.form.entity.EntityForm ef, String scType, List<org.broadleafcommerce.openadmin.dto.SectionCrumb> sectionCrumbs, Map<String, String> pathVars, jakarta.servlet.http.HttpServletRequest request, String id, com.broadleafcommerce.advancedcms.admin.web.controller.AdminAbstractContentItemController.NamesStructure namesStructure, org.springframework.validation.BindingResult result) protected String[]addNewStructuredContent(org.broadleafcommerce.openadmin.web.form.entity.EntityForm ef, String scType, List<org.broadleafcommerce.openadmin.dto.SectionCrumb> sectionCrumbs, Map<String, String> pathVars, jakarta.servlet.http.HttpServletRequest request, String id, org.springframework.validation.BindingResult result) protected voidaddTranslationPropertyName(org.broadleafcommerce.openadmin.web.form.entity.Field field, String id) protected booleancontainsHiddenFields(org.broadleafcommerce.openadmin.web.form.entity.Field field) protected voidconvertSCListGridToDynamicForms(org.broadleafcommerce.openadmin.web.form.entity.EntityForm form, org.broadleafcommerce.openadmin.web.form.component.ListGrid scs) protected voidcreateDynamicSCForm(org.broadleafcommerce.openadmin.web.form.entity.EntityForm form, String id, String type, String priority, String xrefId, Boolean readOnly) protected List<org.broadleafcommerce.openadmin.web.form.entity.EntityForm>extractSCFormsForPersistence(org.broadleafcommerce.openadmin.dto.ClassMetadata cmd, org.broadleafcommerce.openadmin.web.form.entity.EntityForm entityForm, String cefqcn, String entityType) protected voidextractStructuredContentForms(org.broadleafcommerce.openadmin.web.form.entity.EntityForm entityForm) protected Stringprotected StringgetFieldName(org.broadleafcommerce.openadmin.web.form.entity.Field field) protected List<org.broadleafcommerce.openadmin.dto.SectionCrumb>protected org.broadleafcommerce.cms.structure.domain.StructuredContentTypegetSCType(org.broadleafcommerce.openadmin.web.form.entity.EntityForm dynamicForm) protected List<org.broadleafcommerce.cms.structure.domain.StructuredContentType>protected Stringprotected StringgetTranslationPropertyName(String fieldName, String id) protected booleanpreventFieldGroupPersistence(String dynamicFormName, org.broadleafcommerce.openadmin.web.form.entity.EntityForm dynamicForm) protected voidprimeFieldGroup(String id, String type, String priority, String xrefId, String scTypeName, org.broadleafcommerce.openadmin.web.form.entity.FieldGroup fg, org.broadleafcommerce.cms.field.domain.FieldGroup group) protected voidremoveMasterGroupsFromDynamicForm(org.broadleafcommerce.openadmin.web.form.entity.EntityForm dynamicForm, org.broadleafcommerce.cms.structure.domain.StructuredContentType sct) When adding content data we only want to show Field groups that are not part of a master field group.protected voidThis method is used to find the container utilized by the created/current Content Item's sandbox workflow item, and set this as the override for the Structured Content Item so that these are grouped together for promotion/approval in the enterprise workflow.Methods inherited from class org.broadleafcommerce.openadmin.web.controller.entity.AdminBasicEntityController
addAddActionIfAllowed, addAuditableDisplayField, addAuditableDisplayFields, addCollectionItem, addCollectionItem, addEmptyCollectionItem, addEntity, addSelectizeCollectionItem, buildAddCollectionItemModel, buildAuditableDisplayField, buildDirtyList, buildSelectizeCustomCriteria, declareShouldIgnoreAdditionStatusFilter, determineEntityType, duplicateEntity, getCollectionFieldRecords, getCollectionValueDetails, getCurrentFolderId, getCurrentTabName, getCustomCriteria, getErrorDuplicatingResponse, getModalForBlankEntityType, getSelectizeCollectionOptions, getViewSubRecords, initBinder, isAddActionAllowed, isNotReadOnly, modifyEntityForm, postAddSubCollectionEntityHook, postUpdateSubCollectionEntityHook, reinitializeEntityForm, removeCollectionItem, removeCollectionItem, removeEntity, resolveAppropriateEntityView, saveEntity, saveEntityJson, setTypedEntityModelAttributes, setupViewEntityListBasicModel, showAddCollectionItem, showUpdateCollectionItem, showUpdateCollectionItem, showViewCollectionItem, showViewCollectionItem, showViewUpdateCollection, showViewUpdateCollection, showViewUpdateCollection, showViewUpdateCollection, updateCollectionItem, updateCollectionItem, updateCollectionItemSequence, updateCollectionItemSequence, viewAddEntityForm, viewCollectionItemDetails, viewCollectionItemTab, viewEntityForm, viewEntityList, viewEntityListSelectize, viewEntityTab, viewReadOnlyCollectionItemTabMethods inherited from class org.broadleafcommerce.openadmin.web.controller.AdminAbstractController
attachSectionSpecificInfo, attachSectionSpecificInfo, createSectionCrumb, declareForceUseAdditionStatusFilter, extractDynamicFormFields, getAddEntityTypes, getClassNameForSection, getCollectionListGrid, getCollectionListGrid, getCriteria, getDefaultEntityType, getDynamicFieldTemplateForm, getDynamicForm, getEntityForm, getEntityForm, getEntityForm, getFirstId, getLastId, getLowerCount, getMaxIndex, getMaxResults, getPageSize, getPersistencePackageRequest, getSectionCrumbs, getSectionCustomCriteria, getSectionKey, getSectionPersistencePackageRequest, getSectionPersistencePackageRequest, getSectionPersistencePackageRequest, getSectionPersistencePackageRequest, getSortDirections, getSortPropertyNames, getStartIndex, getUpperCount, modifyAddEntityForm, modifyCriteria, modifyEntityForm, populateJsonValidationErrors, setModelAttributes, setSpecializedNameForFields, translateErrorMessageMethods inherited from class org.broadleafcommerce.common.web.controller.BroadleafAbstractController
addDeepLink, getContextPath, isAjaxRequest, jsonResponse
-
Field Details
-
IS_MASTER_LABEL
- See Also:
-
widgetService
-
localeService
protected org.broadleafcommerce.common.locale.service.LocaleService localeService -
structuredContentService
protected org.broadleafcommerce.cms.structure.service.StructuredContentService structuredContentService -
contentItemService
-
workflowSandboxItemService
@Autowired(required=false) @Qualifier("blWorkflowSandBoxItemService") protected com.broadleafcommerce.enterprise.workflow.service.WorkflowSandBoxItemService workflowSandboxItemService -
workflowStateManager
@Autowired(required=false) @Qualifier("blWorkflowStateManager") protected com.broadleafcommerce.enterprise.workflow.persistence.WorkflowStateManager workflowStateManager
-
-
Constructor Details
-
AdminAbstractContentItemController
public AdminAbstractContentItemController()
-
-
Method Details
-
convertSCListGridToDynamicForms
protected void convertSCListGridToDynamicForms(org.broadleafcommerce.openadmin.web.form.entity.EntityForm form, org.broadleafcommerce.openadmin.web.form.component.ListGrid scs) throws org.broadleafcommerce.common.exception.ServiceException - Throws:
org.broadleafcommerce.common.exception.ServiceException
-
createDynamicSCForm
protected void createDynamicSCForm(org.broadleafcommerce.openadmin.web.form.entity.EntityForm form, String id, String type, String priority, String xrefId, Boolean readOnly) throws org.broadleafcommerce.common.exception.ServiceException - Throws:
org.broadleafcommerce.common.exception.ServiceException
-
primeFieldGroup
-
addTranslationPropertyName
protected void addTranslationPropertyName(org.broadleafcommerce.openadmin.web.form.entity.Field field, String id) - Parameters:
field-id-
-
getTranslationPropertyName
- Parameters:
fieldName-id-- Returns:
-
getTranslationId
- Parameters:
id-- Returns:
-
extractStructuredContentForms
protected void extractStructuredContentForms(org.broadleafcommerce.openadmin.web.form.entity.EntityForm entityForm) -
extractSCFormsForPersistence
-
preventFieldGroupPersistence
protected boolean preventFieldGroupPersistence(String dynamicFormName, org.broadleafcommerce.openadmin.web.form.entity.EntityForm dynamicForm) -
containsHiddenFields
protected boolean containsHiddenFields(org.broadleafcommerce.openadmin.web.form.entity.Field field) -
getSCTypesForWidget
-
getSCType
protected org.broadleafcommerce.cms.structure.domain.StructuredContentType getSCType(org.broadleafcommerce.openadmin.web.form.entity.EntityForm dynamicForm) -
getFieldName
-
getSCSectionCrumbs
-
addNewOverrideStructuredContent
protected String[] addNewOverrideStructuredContent(org.broadleafcommerce.openadmin.web.form.entity.EntityForm ef, String scType, List<org.broadleafcommerce.openadmin.dto.SectionCrumb> sectionCrumbs, Map<String, String> pathVars, jakarta.servlet.http.HttpServletRequest request, String id, org.springframework.validation.BindingResult result) throws org.broadleafcommerce.common.exception.ServiceException- Throws:
org.broadleafcommerce.common.exception.ServiceException
-
addNewStructuredContent
protected String[] addNewStructuredContent(org.broadleafcommerce.openadmin.web.form.entity.EntityForm ef, String scType, List<org.broadleafcommerce.openadmin.dto.SectionCrumb> sectionCrumbs, Map<String, String> pathVars, jakarta.servlet.http.HttpServletRequest request, String id, org.springframework.validation.BindingResult result) throws org.broadleafcommerce.common.exception.ServiceException- Throws:
org.broadleafcommerce.common.exception.ServiceException
-
addNewStructuredContent
protected String[] addNewStructuredContent(org.broadleafcommerce.openadmin.web.form.entity.EntityForm ef, String scType, List<org.broadleafcommerce.openadmin.dto.SectionCrumb> sectionCrumbs, Map<String, String> pathVars, jakarta.servlet.http.HttpServletRequest request, String id, com.broadleafcommerce.advancedcms.admin.web.controller.AdminAbstractContentItemController.NamesStructure namesStructure, org.springframework.validation.BindingResult result) throws org.broadleafcommerce.common.exception.ServiceException- Throws:
org.broadleafcommerce.common.exception.ServiceException
-
removeMasterGroupsFromDynamicForm
protected void removeMasterGroupsFromDynamicForm(org.broadleafcommerce.openadmin.web.form.entity.EntityForm dynamicForm, org.broadleafcommerce.cms.structure.domain.StructuredContentType sct) When adding content data we only want to show Field groups that are not part of a master field group.- Parameters:
dynamicForm-sct-
-
setItemContainerOverrideForEnterprise
This method is used to find the container utilized by the created/current Content Item's sandbox workflow item, and set this as the override for the Structured Content Item so that these are grouped together for promotion/approval in the enterprise workflow.- Parameters:
id- - ID of the Content Item you are looking up the container id of.
-
getContentItemName
-