Search in sources :

Example 6 with GroupMetadata

use of org.broadleafcommerce.openadmin.dto.GroupMetadata in project BroadleafCommerce by BroadleafCommerce.

the class BasicEntityMetadataProvider method applyGroupMetadataOverrideViaXml.

private void applyGroupMetadataOverrideViaXml(String overrideKey, GroupMetadataOverride override, Map<String, TabMetadata> metadata) {
    String[] keySplit = overrideKey.split("-@-");
    String tabName = keySplit[0];
    String groupName = keySplit[1];
    GroupMetadata group = getGroupFromMetadata(groupName, metadata);
    if (group != null) {
        if (override.getName() != null) {
            group.setGroupName(override.getName());
        }
        if (override.getOrder() != null) {
            group.setGroupOrder(override.getOrder());
        }
        if (override.getUntitled() != null) {
            group.setUntitled(override.getUntitled());
        }
        if (override.getColumn() != null) {
            group.setColumn(override.getColumn());
        }
        if (override.getCollapsed() != null) {
            group.setCollapsed(override.getCollapsed());
        }
        if (override.getTooltip() != null) {
            group.setTooltip(override.getTooltip());
        }
    } else {
        buildGroupFromMetadataOverride(groupName, tabName, override, metadata);
    }
}
Also used : GroupMetadata(org.broadleafcommerce.openadmin.dto.GroupMetadata)

Aggregations

GroupMetadata (org.broadleafcommerce.openadmin.dto.GroupMetadata)6 TabMetadata (org.broadleafcommerce.openadmin.dto.TabMetadata)4 AdminGroupPresentation (org.broadleafcommerce.common.presentation.AdminGroupPresentation)1 AdminGroupPresentationOverride (org.broadleafcommerce.common.presentation.override.AdminGroupPresentationOverride)1 AdminTabPresentationOverride (org.broadleafcommerce.common.presentation.override.AdminTabPresentationOverride)1 BasicFieldMetadata (org.broadleafcommerce.openadmin.dto.BasicFieldMetadata)1 FieldMetadata (org.broadleafcommerce.openadmin.dto.FieldMetadata)1 Property (org.broadleafcommerce.openadmin.dto.Property)1 FieldMetadataOverride (org.broadleafcommerce.openadmin.dto.override.FieldMetadataOverride)1 GroupMetadataOverride (org.broadleafcommerce.openadmin.dto.override.GroupMetadataOverride)1 MetadataOverride (org.broadleafcommerce.openadmin.dto.override.MetadataOverride)1