Class CustomerSegmentAdornedFormBuilderExtensionHandler

java.lang.Object
org.broadleafcommerce.common.extension.AbstractExtensionHandler
org.broadleafcommerce.openadmin.web.service.AbstractFormBuilderExtensionHandler
com.broadleafcommerce.customersegment.admin.web.form.extension.CustomerSegmentAdornedFormBuilderExtensionHandler
All Implemented Interfaces:
org.broadleafcommerce.common.extension.ExtensionHandler, org.broadleafcommerce.openadmin.web.service.FormBuilderExtensionHandler

@Component("blCustomerSegmentAdornedFormBuilderExtensionHandler") public class CustomerSegmentAdornedFormBuilderExtensionHandler extends org.broadleafcommerce.openadmin.web.service.AbstractFormBuilderExtensionHandler
This extension handler adds some usability enhancements to CustomerSegment list grids. These enhancements include the ability to create new CustomerSegments from within the selectize lookups on ContentTargeter and Offer pages. Additionally, this will also add the "Active" column to CustomerSegment lookup list grids.
Author:
Chris Kittrell (ckittrell)
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected static final String
     
    protected static final String
     
    protected org.broadleafcommerce.openadmin.server.security.remote.SecurityVerifier
     
    protected org.broadleafcommerce.openadmin.web.service.FormBuilderExtensionManager
     
    protected static final String
     
    protected static final org.apache.commons.logging.Log
     
    protected org.broadleafcommerce.openadmin.server.security.service.AdminSecurityService
     

    Fields inherited from class org.broadleafcommerce.common.extension.AbstractExtensionHandler

    enabled, priority
  • Constructor Summary

    Constructors
  • Method Summary

    Modifier and Type
    Method
    Description
    org.broadleafcommerce.common.extension.ExtensionResultStatusType
    addAdditionalAdornedFormActions(org.broadleafcommerce.openadmin.web.form.entity.EntityForm entityForm)
    Changes the "Add" button to "Select".
    protected void
    attachActiveFlagHeader(org.broadleafcommerce.openadmin.web.form.component.ListGrid listGrid)
     
    protected void
    attachActiveFlagRecord(org.broadleafcommerce.openadmin.web.form.component.ListGridRecord record, org.broadleafcommerce.openadmin.dto.Entity entity)
     
    protected void
    attachCreateButton(org.broadleafcommerce.openadmin.web.form.component.ListGrid listGrid)
     
    protected boolean
    canHandle(org.broadleafcommerce.openadmin.dto.Entity entity)
     
    protected boolean
    canHandle(org.broadleafcommerce.openadmin.web.form.component.ListGrid listGrid)
     
    protected boolean
    canHandle(org.broadleafcommerce.openadmin.web.form.entity.EntityForm entityForm)
     
    void
     
    protected boolean
     
    protected boolean
    isClassAssignableFrom(Class<?> targetClass, String testClassName)
     
    protected boolean
    isCustomerSegment(org.broadleafcommerce.openadmin.dto.Entity entity)
     
    protected boolean
    isCustomerSegmentXref(org.broadleafcommerce.openadmin.web.form.component.ListGrid listGrid)
     
    protected boolean
    isCustomerSegmentXref(org.broadleafcommerce.openadmin.web.form.entity.EntityForm entityForm)
     
    org.broadleafcommerce.common.extension.ExtensionResultStatusType
    modifyListGrid(String className, org.broadleafcommerce.openadmin.web.form.component.ListGrid listGrid)
    Attaches the create button and active flag button to the list grid if the list grid is supported by canHandle(ListGrid).
    org.broadleafcommerce.common.extension.ExtensionResultStatusType
    modifyListGridRecord(String className, org.broadleafcommerce.openadmin.web.form.component.ListGridRecord record, org.broadleafcommerce.openadmin.dto.Entity entity)
    Attaches the active flag boolean to list grid record

    Methods inherited from class org.broadleafcommerce.openadmin.web.service.AbstractFormBuilderExtensionHandler

    addAdditionalFormActions, modifyDetailEntityForm, modifyPopulatedEntityForm, modifyUnpopulatedEntityForm

    Methods inherited from class org.broadleafcommerce.common.extension.AbstractExtensionHandler

    getPriority, isEnabled, setEnabled, setPriority

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.broadleafcommerce.common.extension.ExtensionHandler

    getPriority, isEnabled
  • Field Details

    • LOG

      protected static final org.apache.commons.logging.Log LOG
    • ACTIVE_FLAG_FIELD_NAME

      protected static final String ACTIVE_FLAG_FIELD_NAME
      See Also:
    • ACTIVE_FLAG_FIELD_FRIENDLY_NAME

      protected static final String ACTIVE_FLAG_FIELD_FRIENDLY_NAME
      See Also:
    • FILTER_OPERATOR_BOOLEAN

      protected static final String FILTER_OPERATOR_BOOLEAN
      See Also:
    • extensionManager

      protected org.broadleafcommerce.openadmin.web.service.FormBuilderExtensionManager extensionManager
    • adminRemoteSecurityService

      protected org.broadleafcommerce.openadmin.server.security.remote.SecurityVerifier adminRemoteSecurityService
    • securityService

      protected org.broadleafcommerce.openadmin.server.security.service.AdminSecurityService securityService
  • Constructor Details

    • CustomerSegmentAdornedFormBuilderExtensionHandler

      public CustomerSegmentAdornedFormBuilderExtensionHandler()
  • Method Details

    • init

      @PostConstruct public void init()
    • modifyListGrid

      public org.broadleafcommerce.common.extension.ExtensionResultStatusType modifyListGrid(String className, org.broadleafcommerce.openadmin.web.form.component.ListGrid listGrid)
      Attaches the create button and active flag button to the list grid if the list grid is supported by canHandle(ListGrid).
      Specified by:
      modifyListGrid in interface org.broadleafcommerce.openadmin.web.service.FormBuilderExtensionHandler
      Overrides:
      modifyListGrid in class org.broadleafcommerce.openadmin.web.service.AbstractFormBuilderExtensionHandler
      Parameters:
      className - the name of the class that the list grid contains
      listGrid - the list grid to modify
      Returns:
      whether the list grid was handled or not
    • modifyListGridRecord

      public org.broadleafcommerce.common.extension.ExtensionResultStatusType modifyListGridRecord(String className, org.broadleafcommerce.openadmin.web.form.component.ListGridRecord record, org.broadleafcommerce.openadmin.dto.Entity entity)
      Attaches the active flag boolean to list grid record
      Specified by:
      modifyListGridRecord in interface org.broadleafcommerce.openadmin.web.service.FormBuilderExtensionHandler
      Overrides:
      modifyListGridRecord in class org.broadleafcommerce.openadmin.web.service.AbstractFormBuilderExtensionHandler
      Parameters:
      className - the name of the class that the list grid contains
      record - the list grid record to modify
      entity - the entity represented in the list grid record
      Returns:
      whether the list grid record was handled or not
    • addAdditionalAdornedFormActions

      public org.broadleafcommerce.common.extension.ExtensionResultStatusType addAdditionalAdornedFormActions(org.broadleafcommerce.openadmin.web.form.entity.EntityForm entityForm)
      Changes the "Add" button to "Select".
      Specified by:
      addAdditionalAdornedFormActions in interface org.broadleafcommerce.openadmin.web.service.FormBuilderExtensionHandler
      Overrides:
      addAdditionalAdornedFormActions in class org.broadleafcommerce.openadmin.web.service.AbstractFormBuilderExtensionHandler
      Parameters:
      entityForm - the entity form to modify
      Returns:
      whether the entity entity form was handled or not
    • canHandle

      protected boolean canHandle(org.broadleafcommerce.openadmin.web.form.component.ListGrid listGrid)
    • isCustomerSegmentXref

      protected boolean isCustomerSegmentXref(org.broadleafcommerce.openadmin.web.form.component.ListGrid listGrid)
    • canHandle

      protected boolean canHandle(org.broadleafcommerce.openadmin.web.form.entity.EntityForm entityForm)
    • isCustomerSegmentXref

      protected boolean isCustomerSegmentXref(org.broadleafcommerce.openadmin.web.form.entity.EntityForm entityForm)
    • canHandle

      protected boolean canHandle(org.broadleafcommerce.openadmin.dto.Entity entity)
    • isCustomerSegment

      protected boolean isCustomerSegment(org.broadleafcommerce.openadmin.dto.Entity entity)
    • isClassAssignableFrom

      protected boolean isClassAssignableFrom(Class<?> targetClass, String testClassName)
    • isAdminUserQualified

      protected boolean isAdminUserQualified()
    • attachCreateButton

      protected void attachCreateButton(org.broadleafcommerce.openadmin.web.form.component.ListGrid listGrid)
    • attachActiveFlagHeader

      protected void attachActiveFlagHeader(org.broadleafcommerce.openadmin.web.form.component.ListGrid listGrid)
    • attachActiveFlagRecord

      protected void attachActiveFlagRecord(org.broadleafcommerce.openadmin.web.form.component.ListGridRecord record, org.broadleafcommerce.openadmin.dto.Entity entity)