org.broadleafcommerce.common.presentation
Annotation Type AdminPresentationAdornedTargetCollection


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

Adorned target collections are a variant of the basic collection type (@see AdminPresentationCollection). This type of collection concept comes into play when you want to represent a "ToMany" association, but you also want to capture some additional data around the association. CrossSaleProductImpl is an example of this concept. CrossSaleProductImpl not only contains a product reference, but sequence and promotional message fields as well. We want the admin user to choose the desired product for the association and also specify the order and promotional message information to complete the interaction. The Adorned target concept embodied in this annotation makes this possible.

Author:
Jeff Fischer

Optional Element Summary
 String[] customCriteria
          Optional - only required if you need to specially handle crud operations for this specific collection on the server
 String dataSourceName
          Optional - unique name for the backing datasource.
 boolean excluded
          Optional - fields are not excluded by default
 String friendlyName
          Optional - field name will be used if not specified
 String[] gridVisibleFields
          Optional - only required when it is desirable to override the property prominence settings from the adorned target and the target object
 boolean ignoreAdornedProperties
          Optional - only required if the system should not query the user for the adorned property values.
 String[] maintainedAdornedTargetFields
          Optional - only required if the adorned target has fields (other than the sort property) that should be populated by the user
 AdminPresentationOperationTypes operationTypes
          Optional - only required if a special operation type is required for a CRUD operation.
 int order
          Optional - only required if you want to specify ordering for this field
 String parentObjectIdProperty
          Optional - only required if the primary key property of the parent entity is called something other than "id"
 String parentObjectProperty
          Optional - only required in the absence of a "mappedBy" property on the JPA annotation
 boolean readOnly
          Optional - only required if you want to make the field immutable Explicityly specify whether or not this field is mutable.
 String securityLevel
          Optional - only required if you wish to apply security to this field
 boolean sortAscending
          Optional - only required if the sort order should be descending
 String sortProperty
          Optional - only required if the adorned target has a field used for sorting
 String targetObjectIdProperty
          Optional - only required if the primary key property of the target entity is called something other than "id"
 String targetObjectProperty
          This is the field in the adorned target entity that refers to the target entity
 String targetUIElementId
          Optional - only required if you want the resulting collection grid element to appear somewhere other than below the main detail form
 

friendlyName

public abstract String friendlyName

Optional - field name will be used if not specified

The friendly name to present to a user for this field in a GUI. If supporting i18N, the friendly name may be a key to retrieve a localized friendly name using the GWT support for i18N.

Returns:
the friendly name
Default:
""

securityLevel

public abstract String securityLevel

Optional - only required if you wish to apply security to this field

If a security level is specified, it is registered with the SecurityManager. The SecurityManager checks the permission of the current user to determine if this field should be disabled based on the specified level.

Returns:
the security level
Default:
""

excluded

public abstract boolean excluded

Optional - fields are not excluded by default

Specify if this field should be excluded from inclusion in the admin presentation layer

Returns:
whether or not the field should be excluded
Default:
false

readOnly

public abstract boolean readOnly
Optional - only required if you want to make the field immutable Explicityly specify whether or not this field is mutable.

Returns:
whether or not this field is read only
Default:
false

parentObjectProperty

public abstract String parentObjectProperty

Optional - only required in the absence of a "mappedBy" property on the JPA annotation

This is the field in the adorned target entity that refers back to the parent entity

Returns:
the field that refers back to the parent entity
Default:
""

parentObjectIdProperty

public abstract String parentObjectIdProperty

Optional - only required if the primary key property of the parent entity is called something other than "id"

This is the field in the parent entity that represents its primary key

Returns:
primary key field of the parent entity
Default:
"id"

targetObjectProperty

public abstract String targetObjectProperty

This is the field in the adorned target entity that refers to the target entity

Returns:
target entity field of the adorned target
Default:
""

maintainedAdornedTargetFields

public abstract String[] maintainedAdornedTargetFields

Optional - only required if the adorned target has fields (other than the sort property) that should be populated by the user

List of fields to include in the add/update form for the adorned target entity.

Returns:
user populated fields on the adorned target
Default:
{}

gridVisibleFields

public abstract String[] gridVisibleFields

Optional - only required when it is desirable to override the property prominence settings from the adorned target and the target object

List of fields visible in the adorned target grid UI in the admin tool. Fields are referenced relative to the adorned target entity, or the target entity. For example, in CrossSaleProductImpl, to show the product name and promotionMesssage fields, the gridVisibleFields value would be : {"defaultSku.name", "promotionMessage"}

Returns:
List of fields visible in the adorned target grid UI in the admin tool
Default:
{}

targetObjectIdProperty

public abstract String targetObjectIdProperty

Optional - only required if the primary key property of the target entity is called something other than "id"

This is the field in the target entity that represents its primary key

Returns:
primary key field of the target entity
Default:
"id"

sortProperty

public abstract String sortProperty

Optional - only required if the adorned target has a field used for sorting

This is the field by which the adorned targets are sorted

Returns:
the sort field in the adorned target entity
Default:
""

sortAscending

public abstract boolean sortAscending

Optional - only required if the sort order should be descending

This is the sort direction for the adorned targets

Returns:
the sort direction
Default:
true

ignoreAdornedProperties

public abstract boolean ignoreAdornedProperties

Optional - only required if the system should not query the user for the adorned property values.

Defines whether or not the system should prompt the user for the adorned property values (if any) after searching for the target entity. This is an advanced feature and is rarely used.

Returns:
whether to ignore the adorned properties
Default:
false

order

public abstract int order

Optional - only required if you want to specify ordering for this field

The order in which this field will appear in a GUI relative to other collections from the same class

Returns:
the display order
Default:
99999

targetUIElementId

public abstract String targetUIElementId

Optional - only required if you want the resulting collection grid element to appear somewhere other than below the main detail form

Specify a UI element Id to which the collection grid should be added. This is useful if, for example, you want the resulting collection grid to appear in another tab, or some other location in the admin tool UI.

Returns:
UI element Id to which the collection grid should be added
Default:
""

dataSourceName

public abstract String dataSourceName

Optional - unique name for the backing datasource. If unspecified, the datasource name will be the JPA entity field name with "AdvancedCollectionDS" appended to the end.

The datasource can be retrieved programatically in admin code via PresenterSequenceSetupManager.getDataSource(..)

Returns:
unique name for the backing datasource
Default:
""

customCriteria

public abstract String[] customCriteria

Optional - only required if you need to specially handle crud operations for this specific collection on the server

Custom string values that will be passed to the server during CRUB operations on this collection. These criteria values can be detected in a custom persistence handler (@CustomPersistenceHandler) in order to engage special handling through custom server side code for this collection.

Returns:
the custom string array to pass to the server during CRUD operations
Default:
{}

operationTypes

public abstract AdminPresentationOperationTypes operationTypes

Optional - only required if a special operation type is required for a CRUD operation. This setting is not normally changed and is an advanced setting

The operation type for a CRUD operation

Returns:
the operation type
Default:
@org.broadleafcommerce.common.presentation.AdminPresentationOperationTypes(addType=org.broadleafcommerce.common.presentation.client.OperationType.ADORNEDTARGETLIST, fetchType=org.broadleafcommerce.common.presentation.client.OperationType.ADORNEDTARGETLIST, inspectType=org.broadleafcommerce.common.presentation.client.OperationType.BASIC, removeType=org.broadleafcommerce.common.presentation.client.OperationType.ADORNEDTARGETLIST, updateType=org.broadleafcommerce.common.presentation.client.OperationType.ADORNEDTARGETLIST)


Copyright © 2013. All Rights Reserved.