public interface UserServiceObjectContextBuilder
Once an object is registered through this interface, it should be used
in the other containers provided by UserService
, with
the following protocol:
UserServicePaneWriter.setCurrentObject(ObjectKey)
must first be called,
to identify the current object. Then widgets can be added, for instance by invoking
addFormNode(Path)
.
ValueContext
and its sub-interfaces should be used. See
UserServiceObjectContext
and UserServiceObjectContextForInputValidation
.
UserServiceTransactionManager
.
Modifier and Type | Method and Description |
---|---|
BeanDefinition |
createBeanDefinition()
Returns a new empty definition that can be used to
register a dynamic object (an object not mapped to a JavaBean).
|
BeanDefinition |
createBeanDefinition(Class<?> aClassToInstantiate)
Returns a new empty definition mapped to a JavaBean.
|
void |
registerBean(ObjectKey anObjectKey,
BeanDefinition aBeanDefinition)
Registers a non-persistent bean object.
|
void |
registerBean(ObjectKey anObjectKey,
BeanDefinition aBeanDefinition,
Object anObject)
Registers a non-persistent bean object.
|
void |
registerNewDuplicatedRecord(ObjectKey anObjectKey,
Adaptation aRecord)
Registers a new duplicated record in the object context.
|
void |
registerNewRecord(ObjectKey anObjectKey,
AdaptationTable aTable)
Registers a new record in the object context.
|
void |
registerRecordOrDataSet(ObjectKey anObjectKey,
Adaptation aRecordOrDataSet)
Registers an existing record or dataset in the object context.
|
void |
unregisterAllObjects()
Unregisters all objects from the object context.
|
void |
unregisterObject(ObjectKey anObjectKey)
Unregisters an object from the object context.
|
BeanDefinition createBeanDefinition()
One or more dynamic object(s) mapped to the definition should then
be registered using the method registerBean(ObjectKey, BeanDefinition)
.
BeanDefinition createBeanDefinition(Class<?> aClassToInstantiate)
One or more JavaBean object(s) mapped to the definition should then
be registered using the methods registerBean(ObjectKey, BeanDefinition)
or registerBean(ObjectKey, BeanDefinition, Object)
.
aClassToInstantiate
- the class of the JavaBean to instantiate and to map to the element.void registerBean(ObjectKey anObjectKey, BeanDefinition aBeanDefinition)
anObjectKey
- the object key. If an object with the same key name already exists,
it will be overridden.aBeanDefinition
- the bean definition of the object.void registerBean(ObjectKey anObjectKey, BeanDefinition aBeanDefinition, Object anObject)
anObjectKey
- the object key. If an object with the same key name already exists,
it will be overridden.aBeanDefinition
- the definition of the bean.anObject
- the instance of the object. Must be of the type specified by the bean
definition. If null
, a new instance of the object will be
created using the defaults specified in the schema definition.void registerRecordOrDataSet(ObjectKey anObjectKey, Adaptation aRecordOrDataSet)
anObjectKey
- the object key. If an object with the same key name already
exists, it will be overridden.aRecordOrDataSet
- the record or dataset.UserServiceTransactionManager.save(ObjectKey...)
void registerNewRecord(ObjectKey anObjectKey, AdaptationTable aTable)
anObjectKey
- the object key. If an object with the same key name already
exists, it will be overridden.aTable
- the table that will own the new record.UserServiceTransactionManager.save(ObjectKey...)
void registerNewDuplicatedRecord(ObjectKey anObjectKey, Adaptation aRecord)
anObjectKey
- the object key. If an object with the same key name already
exists, it will be overridden.aRecord
- the record to be duplicated.void unregisterObject(ObjectKey anObjectKey)
anObjectKey
- the object's key.void unregisterAllObjects()