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
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected static final Stringprotected org.broadleafcommerce.openadmin.server.security.remote.SecurityVerifierprotected org.broadleafcommerce.openadmin.web.service.FormBuilderExtensionManagerprotected static final Stringprotected static final org.apache.commons.logging.Logprotected org.broadleafcommerce.openadmin.server.security.service.AdminSecurityServiceFields inherited from class org.broadleafcommerce.common.extension.AbstractExtensionHandler
enabled, priority -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.broadleafcommerce.common.extension.ExtensionResultStatusTypeaddAdditionalAdornedFormActions(org.broadleafcommerce.openadmin.web.form.entity.EntityForm entityForm) Changes the "Add" button to "Select".protected voidattachActiveFlagHeader(org.broadleafcommerce.openadmin.web.form.component.ListGrid listGrid) protected voidattachActiveFlagRecord(org.broadleafcommerce.openadmin.web.form.component.ListGridRecord record, org.broadleafcommerce.openadmin.dto.Entity entity) protected voidattachCreateButton(org.broadleafcommerce.openadmin.web.form.component.ListGrid listGrid) protected booleancanHandle(org.broadleafcommerce.openadmin.dto.Entity entity) protected booleancanHandle(org.broadleafcommerce.openadmin.web.form.component.ListGrid listGrid) protected booleancanHandle(org.broadleafcommerce.openadmin.web.form.entity.EntityForm entityForm) voidinit()protected booleanprotected booleanisClassAssignableFrom(Class<?> targetClass, String testClassName) protected booleanisCustomerSegment(org.broadleafcommerce.openadmin.dto.Entity entity) protected booleanisCustomerSegmentXref(org.broadleafcommerce.openadmin.web.form.component.ListGrid listGrid) protected booleanisCustomerSegmentXref(org.broadleafcommerce.openadmin.web.form.entity.EntityForm entityForm) org.broadleafcommerce.common.extension.ExtensionResultStatusTypemodifyListGrid(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 bycanHandle(ListGrid).org.broadleafcommerce.common.extension.ExtensionResultStatusTypemodifyListGridRecord(String className, org.broadleafcommerce.openadmin.web.form.component.ListGridRecord record, org.broadleafcommerce.openadmin.dto.Entity entity) Attaches the active flag boolean to list grid recordMethods inherited from class org.broadleafcommerce.openadmin.web.service.AbstractFormBuilderExtensionHandler
addAdditionalFormActions, modifyDetailEntityForm, modifyPopulatedEntityForm, modifyUnpopulatedEntityFormMethods inherited from class org.broadleafcommerce.common.extension.AbstractExtensionHandler
getPriority, isEnabled, setEnabled, setPriorityMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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
- See Also:
-
ACTIVE_FLAG_FIELD_FRIENDLY_NAME
- See Also:
-
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 bycanHandle(ListGrid).- Specified by:
modifyListGridin interfaceorg.broadleafcommerce.openadmin.web.service.FormBuilderExtensionHandler- Overrides:
modifyListGridin classorg.broadleafcommerce.openadmin.web.service.AbstractFormBuilderExtensionHandler- Parameters:
className- the name of the class that the list grid containslistGrid- 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:
modifyListGridRecordin interfaceorg.broadleafcommerce.openadmin.web.service.FormBuilderExtensionHandler- Overrides:
modifyListGridRecordin classorg.broadleafcommerce.openadmin.web.service.AbstractFormBuilderExtensionHandler- Parameters:
className- the name of the class that the list grid containsrecord- the list grid record to modifyentity- 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:
addAdditionalAdornedFormActionsin interfaceorg.broadleafcommerce.openadmin.web.service.FormBuilderExtensionHandler- Overrides:
addAdditionalAdornedFormActionsin classorg.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
-
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)
-