pl.bristleback.server.bristle.binding
Annotation Type Property


public @interface Property

This annotation describes a single bound property in binding operation, is is element of Bind annotation. It specifies name of property, method of extracting property value from token and additional validation information.

Created on: 2011-01-27 17:55:48

Author:
Wojciech Niemiec

Required Element Summary
 java.lang.String name
          Name of property to bind.
 
Optional Element Summary
 boolean required
          Defines whether this property is required.
 java.lang.Class<? extends PropertyValueResolver> valueResolver
          Gets resolver of this property.
 

Element Detail

name

public abstract java.lang.String name
Name of property to bind. Can be complex, like nestedObject.listOfBeans.property1.

Returns:
name of property.

required

public abstract boolean required
Defines whether this property is required. If set to true and value of this property cannot be found, binding error with type BindingErrorType.NOT_NULL_VIOLATION is added.

Returns:
true if this property is required, false otherwise.
Default:
false

valueResolver

public abstract java.lang.Class<? extends PropertyValueResolver> valueResolver
Gets resolver of this property. If resolver is not specified by user, default resolver will be chosen based on the type of property.

Returns:
property value resolver.
See Also:
BristleConfiguration.getDefaultValueResolver(Class)
Default:
pl.bristleback.server.bristle.binding.resolvers.PropertyValueResolver.class


Copyright © 2011. All Rights Reserved.