public interface BeanModel<T>
PropertyModel
, the term "propertyName" is used for simplicitly.
However, a full property
expression may be utilized when adding new properties to an existing BeanModel.BeanModelSource
Modifier and Type | Method and Description |
---|---|
PropertyModel |
add(RelativePosition position,
java.lang.String existingPropertyName,
java.lang.String propertyName)
Adds a new property to the model (as with
add(String) ), ordered before or after an existing property. |
PropertyModel |
add(RelativePosition position,
java.lang.String existingPropertyName,
java.lang.String propertyName,
PropertyConduit conduit)
Adds a new property to the model, ordered before or after an existing property.
|
PropertyModel |
add(java.lang.String propertyName)
Adds a new property to the model, returning its mutable model for further refinement.
|
PropertyModel |
add(java.lang.String propertyName,
PropertyConduit conduit)
Adds a new, synthetic property to the model, returning its mutable model for further refinement.
|
PropertyModel |
addEmpty(java.lang.String propertyName)
Adds an empty property (one with no property conduit).
|
PropertyModel |
addExpression(java.lang.String propertyName,
java.lang.String expression)
Adds a new synthetic property to the model, returning its mutable model for further refinement.
|
BeanModel<T> |
exclude(java.lang.String... propertyNames)
Removes the named properties from the model, if present.
|
PropertyModel |
get(java.lang.String propertyName)
Returns the named model.
|
java.lang.Class<T> |
getBeanType()
Returns the type of bean for which this model was initially created.
|
PropertyModel |
getById(java.lang.String propertyId)
Returns the identified model.
|
java.util.List<java.lang.String> |
getPropertyNames()
Returns a list of the editable properties of the bean, in presentation order.
|
BeanModel<T> |
include(java.lang.String... propertyNames)
Re-orders the properties of the model into the specified order.
|
T |
newInstance()
Creates a new bean instance.
|
BeanModel<T> |
reorder(java.lang.String... propertyNames)
Re-orders the properties of the model into the specified order.
|
java.lang.Class<T> getBeanType()
T newInstance()
ObjectLocator.autobuild(Class)
,
so a public constructor will be used, and dependencies injected.java.util.List<java.lang.String> getPropertyNames()
PropertyModel get(java.lang.String propertyName)
propertyName
- name of property to retrieve model for (case is ignored)java.lang.RuntimeException
- if the bean editor model does not have a property model for the provided namePropertyModel getById(java.lang.String propertyId)
propertyId
- matched caselessly against PropertyModel.getId()
java.lang.RuntimeException
- if the bean editor model does not have a property model with the indicated idPropertyModel add(java.lang.String propertyName)
add(String, org.apache.tapestry5.PropertyConduit)
propertyName
- name of property to addjava.lang.RuntimeException
- if the property already existsPropertyModel addExpression(java.lang.String propertyName, java.lang.String expression)
propertyName
- name of property to addexpression
- expression for the propertyjava.lang.RuntimeException
- if the property already existsPropertyModel addEmpty(java.lang.String propertyName)
propertyName
- name of property to addjava.lang.RuntimeException
- if the property already existsPropertyModel add(RelativePosition position, java.lang.String existingPropertyName, java.lang.String propertyName)
add(String)
), ordered before or after an existing property.position
- controls whether the new property is ordered before or after the existing propertyexistingPropertyName
- the name of an existing property (this must exist)propertyName
- the new property to addjava.lang.RuntimeException
- if the existing property does not exist, or if the new property already does existPropertyModel add(RelativePosition position, java.lang.String existingPropertyName, java.lang.String propertyName, PropertyConduit conduit)
position
- controls whether the new property is ordered before or after the existing propertyexistingPropertyName
- the name of an existing property (this must exist)propertyName
- the new property to addconduit
- conduit used to read or update the property; this may be null for a synthetic or
placeholder propertyjava.lang.RuntimeException
- if the existing property does not exist, or if the new property already does existPropertyModel add(java.lang.String propertyName, PropertyConduit conduit)
propertyName
- name of property to addconduit
- the conduit used to read or update the property; this may be null for a synthetic or
placeholder property. Instead of passing null, please invoke addEmpty(String)
.java.lang.RuntimeException
- if the property already existsaddExpression(String, String)
BeanModel<T> exclude(java.lang.String... propertyNames)
propertyNames
- the names of properties to be removed (case insensitive)BeanModel<T> reorder(java.lang.String... propertyNames)
propertyNames
- property names in order they should be displayed (case insensitive)${project.version} - Copyright © 2003-2015 The Apache Software Foundation.