public String getGroupingObject(BindableDescriptor bindableDescriptor, AttributeDescriptor attributeDescriptor) { if (attributeDescriptor.metadata != null) { return attributeDescriptor.metadata.getGroup(); } else { return null; } } };
public AttributeLevel getGroupingObject(BindableDescriptor bindableDescriptor, AttributeDescriptor attributeDescriptor) { if (attributeDescriptor.metadata != null) { return attributeDescriptor.metadata.getLevel(); } else { return null; } } };
public String getDescription() { return metadata.getDescription(); }
metadata = new AttributeMetadata(); metadata.setLevel(level.value()); metadata.setGroup(group.value()); metadata.setLabel(label.value());
private static Map<String, AttributeMetadata> asAttributeMetadata(Set<AttributeInfo> attributes) { final Map<String, AttributeMetadata> map = new HashMap<String, AttributeMetadata>(); for (AttributeInfo attr : attributes) { map.put(attr.fieldName, new AttributeMetadata( attr.title, attr.label, attr.description, attr.group, attr.level)); } return map; } }
public String getTitle() { return metadata.getTitle(); }
public String getLabel() { return metadata.getLabel(); }
public AttributeLevel getLevel() { return metadata.getLevel(); }
public String getGroup() { return metadata.getGroup(); }
public boolean apply(AttributeDescriptor descriptor) { if (descriptor.metadata == null) { return false; } for (AttributeLevel level : levels) { if (level.equals(descriptor.metadata.getLevel())) { return true; } } return false; } }