org.broadleafcommerce.openadmin.server.dao.provider.metadata
Class PasswordFieldMetadataProvider

java.lang.Object
  extended by org.broadleafcommerce.openadmin.server.dao.provider.metadata.AbstractFieldMetadataProvider
      extended by org.broadleafcommerce.openadmin.server.dao.provider.metadata.PasswordFieldMetadataProvider
All Implemented Interfaces:
FieldMetadataProvider, org.springframework.core.Ordered

@Component(value="blPasswordFieldMetadataProvider")
@Scope(value="prototype")
public class PasswordFieldMetadataProvider
extends AbstractFieldMetadataProvider
implements FieldMetadataProvider

Adds a new 'passwordConfirm' field to the metadata as well as ensures that the field type for the password field is actually a password

Author:
Phillip Verheyden (phillipuniverse)

Field Summary
 
Fields inherited from class org.broadleafcommerce.openadmin.server.dao.provider.metadata.AbstractFieldMetadataProvider
entityConfiguration, metadataOverrides
 
Fields inherited from interface org.broadleafcommerce.openadmin.server.dao.provider.metadata.FieldMetadataProvider
ADORNED_TARGET, BASIC, COLLECTION, MAP, MAP_FIELD
 
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
 
Constructor Summary
PasswordFieldMetadataProvider()
           
 
Method Summary
 FieldProviderResponse addMetadata(AddMetadataRequest addMetadataRequest, Map<String,FieldMetadata> metadata)
          Contribute to metadata inspection for the Field instance in the request.
 FieldProviderResponse addMetadataFromFieldType(AddMetadataFromFieldTypeRequest addMetadataFromFieldTypeRequest, Map<String,FieldMetadata> metadata)
          Contribute to metadata inspection for the Field instance in the request.
 FieldProviderResponse addMetadataFromMappingData(AddMetadataFromMappingDataRequest addMetadataFromMappingDataRequest, FieldMetadata metadata)
          Contribute to metadata inspection using Hibernate column information.
 int getOrder()
           
 FieldProviderResponse lateStageAddMetadata(LateStageAddMetadataRequest addMetadataRequest, Map<String,FieldMetadata> metadata)
          Contribute to metadata inspection for the Field instance in the request.
 FieldProviderResponse overrideViaAnnotation(OverrideViaAnnotationRequest overrideViaAnnotationRequest, Map<String,FieldMetadata> metadata)
          Contribute to metadata inspection for the entity in the request.
 FieldProviderResponse overrideViaXml(OverrideViaXmlRequest overrideViaXmlRequest, Map<String,FieldMetadata> metadata)
          Contribute to metadata inspection for the ceiling entity and config key.
 
Methods inherited from class org.broadleafcommerce.openadmin.server.dao.provider.metadata.AbstractFieldMetadataProvider
buildFieldInfo, convertType, getAdminPresentationEntries, getBasicJavaType, getTargetedOverride, setClassOwnership, setMetadataOverrides, setupBroadleafEnumeration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PasswordFieldMetadataProvider

public PasswordFieldMetadataProvider()
Method Detail

getOrder

public int getOrder()
Specified by:
getOrder in interface org.springframework.core.Ordered

addMetadataFromFieldType

public FieldProviderResponse addMetadataFromFieldType(AddMetadataFromFieldTypeRequest addMetadataFromFieldTypeRequest,
                                                      Map<String,FieldMetadata> metadata)
Description copied from interface: FieldMetadataProvider
Contribute to metadata inspection for the Field instance in the request. Implementations should add values to the metadata parameter. This is metadata based on the field type.

Specified by:
addMetadataFromFieldType in interface FieldMetadataProvider
Parameters:
addMetadataFromFieldTypeRequest - contains the requested field, property name and support classes.
metadata - implementations should add values for the field here
Returns:
whether or not this implementation adjusted metadata

addMetadata

public FieldProviderResponse addMetadata(AddMetadataRequest addMetadataRequest,
                                         Map<String,FieldMetadata> metadata)
Description copied from interface: FieldMetadataProvider
Contribute to metadata inspection for the Field instance in the request. Implementations should add values to the metadata parameter.

Specified by:
addMetadata in interface FieldMetadataProvider
Parameters:
addMetadataRequest - contains the requested field and support classes.
metadata - implementations should add metadata for the requested field here
Returns:
whether or not this implementation adjusted metadata

lateStageAddMetadata

public FieldProviderResponse lateStageAddMetadata(LateStageAddMetadataRequest addMetadataRequest,
                                                  Map<String,FieldMetadata> metadata)
Description copied from interface: FieldMetadataProvider
Contribute to metadata inspection for the Field instance in the request. Implementations should add values to the metadata parameter. This method differs from FieldMetadataProvider.addMetadata(AddMetadataRequest, Map) in that it will be invoked after the cacheable properties are assembled. It is therefore useful in scenarios where you may want to contribute properties to metadata that are dynamic and should not be cached normally.

Specified by:
lateStageAddMetadata in interface FieldMetadataProvider
metadata - implementations should add metadata for the requested field here
Returns:
whether or not this implementation adjusted metadata

overrideViaAnnotation

public FieldProviderResponse overrideViaAnnotation(OverrideViaAnnotationRequest overrideViaAnnotationRequest,
                                                   Map<String,FieldMetadata> metadata)
Description copied from interface: FieldMetadataProvider
Contribute to metadata inspection for the entity in the request. Implementations should override values in the metadata parameter.

Specified by:
overrideViaAnnotation in interface FieldMetadataProvider
Parameters:
overrideViaAnnotationRequest - contains the requested entity and support classes.
metadata - implementations should override metadata here
Returns:
whether or not this implementation adjusted metadata

overrideViaXml

public FieldProviderResponse overrideViaXml(OverrideViaXmlRequest overrideViaXmlRequest,
                                            Map<String,FieldMetadata> metadata)
Description copied from interface: FieldMetadataProvider
Contribute to metadata inspection for the ceiling entity and config key. Implementations should override values in the metadata parameter.

Specified by:
overrideViaXml in interface FieldMetadataProvider
Parameters:
overrideViaXmlRequest - contains the requested config key, ceiling entity and support classes.
metadata - implementations should override metadata here
Returns:
whether or not this implementation adjusted metadata

addMetadataFromMappingData

public FieldProviderResponse addMetadataFromMappingData(AddMetadataFromMappingDataRequest addMetadataFromMappingDataRequest,
                                                        FieldMetadata metadata)
Description copied from interface: FieldMetadataProvider
Contribute to metadata inspection using Hibernate column information. Implementations should impact values in the metadata parameter.

Specified by:
addMetadataFromMappingData in interface FieldMetadataProvider
Parameters:
addMetadataFromMappingDataRequest - contains the requested Hibernate type and support classes.
metadata - implementations should impact values for the metadata for the field here
Returns:
whether or not this implementation adjusted metadata


Copyright © 2013. All Rights Reserved.