|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tapestry5.internal.beaneditor.BeanModelImpl<T>
public class BeanModelImpl<T>
Constructor Summary | |
---|---|
BeanModelImpl(Class<T> beanType,
PropertyConduitSource propertyConduitSource,
TypeCoercer typeCoercer,
Messages messages,
ObjectLocator locator)
|
Method Summary | |
---|---|
PropertyModel |
add(RelativePosition position,
String existingPropertyName,
String propertyName)
Adds a new property to the model (as with BeanModel.add(String) ), ordered before or after an existing property. |
PropertyModel |
add(RelativePosition position,
String existingPropertyName,
String propertyName,
PropertyConduit conduit)
Adds a new property to the model, ordered before or after an existing property. |
PropertyModel |
add(String propertyName)
Adds a new property to the model, returning its mutable model for further refinement. |
PropertyModel |
add(String propertyName,
PropertyConduit conduit)
Adds a new, synthetic property to the model, returning its mutable model for further refinement. |
PropertyModel |
addEmpty(String propertyName)
Adds an empty property (one with no property conduit). |
PropertyModel |
addExpression(String propertyName,
String expression)
Adds a new synthetic property to the model, returning its mutable model for further refinement. |
BeanModel<T> |
exclude(String... propertyNames)
Removes the named properties from the model, if present. |
PropertyModel |
get(String propertyName)
Returns the named model. |
Class<T> |
getBeanType()
Returns the type of bean for which this model was initially created. |
PropertyModel |
getById(String propertyId)
Returns the identified model. |
List<String> |
getPropertyNames()
Returns a list of the editable properties of the bean, in presentation order. |
BeanModel<T> |
include(String... propertyNames)
Re-orders the properties of the model into the specified order. |
T |
newInstance()
Creates a new bean instance. |
BeanModel<T> |
reorder(String... propertyNames)
Re-orders the properties of the model into the specified order. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BeanModelImpl(Class<T> beanType, PropertyConduitSource propertyConduitSource, TypeCoercer typeCoercer, Messages messages, ObjectLocator locator)
Method Detail |
---|
public Class<T> getBeanType()
BeanModel
getBeanType
in interface BeanModel<T>
public T newInstance()
BeanModel
ObjectLocator.autobuild(Class)
,
so a public constructor will be used, and dependencies injected.
newInstance
in interface BeanModel<T>
public PropertyModel add(String propertyName)
BeanModel
BeanModel.add(String, org.apache.tapestry5.PropertyConduit)
add
in interface BeanModel<T>
propertyName
- name of property to add
public PropertyModel addEmpty(String propertyName)
BeanModel
addEmpty
in interface BeanModel<T>
propertyName
- name of property to add
public PropertyModel addExpression(String propertyName, String expression)
BeanModel
addExpression
in interface BeanModel<T>
propertyName
- name of property to addexpression
- expression for the property
public PropertyModel add(RelativePosition position, String existingPropertyName, String propertyName, PropertyConduit conduit)
BeanModel
add
in interface BeanModel<T>
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 property
public PropertyModel add(RelativePosition position, String existingPropertyName, String propertyName)
BeanModel
BeanModel.add(String)
), ordered before or after an existing property.
add
in interface BeanModel<T>
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 add
public PropertyModel add(String propertyName, PropertyConduit conduit)
BeanModel
add
in interface BeanModel<T>
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 BeanModel.addEmpty(String)
.
BeanModel.addExpression(String, String)
public PropertyModel get(String propertyName)
BeanModel
get
in interface BeanModel<T>
propertyName
- name of property to retrieve model for (case is ignored)
public PropertyModel getById(String propertyId)
BeanModel
getById
in interface BeanModel<T>
propertyId
- matched caselessly against PropertyModel.getId()
public List<String> getPropertyNames()
BeanModel
getPropertyNames
in interface BeanModel<T>
public BeanModel<T> exclude(String... propertyNames)
BeanModel
exclude
in interface BeanModel<T>
propertyNames
- the names of properties to be removed (case insensitive)
public BeanModel<T> reorder(String... propertyNames)
BeanModel
reorder
in interface BeanModel<T>
propertyNames
- property names in order they should be displayed (case insensitive)
public BeanModel<T> include(String... propertyNames)
BeanModel
include
in interface BeanModel<T>
propertyNames
- the names of properties to be retained
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |