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

    Fields
    Modifier and Type
    Field
    Description
     
    static final String
     
    protected org.broadleafcommerce.common.locale.service.LocaleService
     
    protected org.broadleafcommerce.cms.structure.service.StructuredContentService
     
    protected WidgetService
     
    protected com.broadleafcommerce.enterprise.workflow.service.WorkflowSandBoxItemService
     
    protected com.broadleafcommerce.enterprise.workflow.persistence.WorkflowStateManager
     

    Fields 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, sandBoxHelper

    Fields 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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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)
     
    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 void
    addTranslationPropertyName(org.broadleafcommerce.openadmin.web.form.entity.Field field, String id)
     
    protected boolean
    containsHiddenFields(org.broadleafcommerce.openadmin.web.form.entity.Field field)
     
    protected void
    convertSCListGridToDynamicForms(org.broadleafcommerce.openadmin.web.form.entity.EntityForm form, org.broadleafcommerce.openadmin.web.form.component.ListGrid scs)
     
    protected void
    createDynamicSCForm(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 void
    extractStructuredContentForms(org.broadleafcommerce.openadmin.web.form.entity.EntityForm entityForm)
     
    protected String
     
    protected String
    getFieldName(org.broadleafcommerce.openadmin.web.form.entity.Field field)
     
    protected List<org.broadleafcommerce.openadmin.dto.SectionCrumb>
     
    protected org.broadleafcommerce.cms.structure.domain.StructuredContentType
    getSCType(org.broadleafcommerce.openadmin.web.form.entity.EntityForm dynamicForm)
     
    protected List<org.broadleafcommerce.cms.structure.domain.StructuredContentType>
     
    protected String
     
    protected String
     
    protected boolean
    preventFieldGroupPersistence(String dynamicFormName, org.broadleafcommerce.openadmin.web.form.entity.EntityForm dynamicForm)
     
    protected void
    primeFieldGroup(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 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.
    protected void
    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.

    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, viewReadOnlyCollectionItemTab

    Methods 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, translateErrorMessage

    Methods inherited from class org.broadleafcommerce.common.web.controller.BroadleafAbstractController

    addDeepLink, getContextPath, isAjaxRequest, jsonResponse

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • IS_MASTER_LABEL

      public static final String IS_MASTER_LABEL
      See Also:
    • widgetService

      protected WidgetService widgetService
    • localeService

      protected org.broadleafcommerce.common.locale.service.LocaleService localeService
    • structuredContentService

      protected org.broadleafcommerce.cms.structure.service.StructuredContentService structuredContentService
    • contentItemService

      protected ContentItemService 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

      protected void primeFieldGroup(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)
    • addTranslationPropertyName

      protected void addTranslationPropertyName(org.broadleafcommerce.openadmin.web.form.entity.Field field, String id)
      Parameters:
      field -
      id -
    • getTranslationPropertyName

      protected String getTranslationPropertyName(String fieldName, String id)
      Parameters:
      fieldName -
      id -
      Returns:
    • getTranslationId

      protected String getTranslationId(String id)
      Parameters:
      id -
      Returns:
    • extractStructuredContentForms

      protected void extractStructuredContentForms(org.broadleafcommerce.openadmin.web.form.entity.EntityForm entityForm)
    • extractSCFormsForPersistence

      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)
    • 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

      protected List<org.broadleafcommerce.cms.structure.domain.StructuredContentType> getSCTypesForWidget(String id)
    • getSCType

      protected org.broadleafcommerce.cms.structure.domain.StructuredContentType getSCType(org.broadleafcommerce.openadmin.web.form.entity.EntityForm dynamicForm)
    • getFieldName

      protected String getFieldName(org.broadleafcommerce.openadmin.web.form.entity.Field field)
    • getSCSectionCrumbs

      protected List<org.broadleafcommerce.openadmin.dto.SectionCrumb> getSCSectionCrumbs(String id)
    • 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

      protected void setItemContainerOverrideForEnterprise(String id)
      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

      protected String getContentItemName(String id)