org.broadleafcommerce.common.presentation
Annotation Type AdminPresentationMapField


@Retention(value=RUNTIME)
@Target(value=FIELD)
public @interface AdminPresentationMapField

This annotation is used to describe a member of a Map structure that should be displayed as a regular field in the admin tool.

Author:
Jeff Fischer

Required Element Summary
 String fieldName
          Represents the field name for this field.
 AdminPresentation fieldPresentation
          Represents the metadata for this field.
 
Optional Element Summary
 String manyToField
          Optional - if the value is not primitive and contains a bi-directional reference back to the entity containing this map structure, you can declare the field name in the value class for this reference.
 CustomFieldSearchableTypes searchable
          Optional - if the map field value contains searchable information and should be included in Broadleaf search engine indexing and searching.
 Class<?> targetClass
          Optional - if the Map structure is using generics, then the system can usually infer the concrete type for the Map value.
 

Element Detail

fieldName

public abstract String fieldName

Represents the field name for this field.

Returns:
the name for this field

fieldPresentation

public abstract AdminPresentation fieldPresentation

Represents the metadata for this field. The AdminPresentation properties will be used by the system to determine how this field should be treated in the admin tool (e.g. date fields get a date picker in the UI)

Returns:
the descriptive metadata for this field

targetClass

public abstract Class<?> targetClass

Optional - if the Map structure is using generics, then the system can usually infer the concrete type for the Map value. However, if not using generics for the Map, or if the value cannot be clearly inferred, you can explicitly set the Map structure value type here. Map fields can only understand maps whose values are basic types (String, Long, Date, etc...). Complex types require additional support. Support is provided out-of-the-box for complex types ValueAssignable, Searchable and SimpleRule.

Returns:
the concrete type for the Map structure value
Default:
java.lang.Void.class

searchable

public abstract CustomFieldSearchableTypes searchable

Optional - if the map field value contains searchable information and should be included in Broadleaf search engine indexing and searching. If set, the map value class must implement the Searchable interface. Note, support for indexing and searching this field must be explicitly added to the Broadleaf search service as well.

Returns:
Whether or not this field is searchable with the Broadleaf search engine
Default:
org.broadleafcommerce.common.presentation.client.CustomFieldSearchableTypes.NOT_SPECIFIED

manyToField

public abstract String manyToField

Optional - if the value is not primitive and contains a bi-directional reference back to the entity containing this map structure, you can declare the field name in the value class for this reference. Note, if the map uses the JPA mappedBy property, the system will try to infer the manyToField value so you don't have to set it here.

Returns:
the parent entity referring field name
Default:
""


Copyright © 2013. All Rights Reserved.