|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Ujo
UJO means a Unified Java Object and its implementations provides a similar service like a JavaBeans class.
Ujo is a basic inteface of the UJO Framework together with an interface UjoProperty .
Basic two methods are writeProperty(..) and readProperty(..) for a manipulation with a value;
next method readAuthorization(..) recommends an authorizaton for a required action, selected Property and context;
the last method returns all properties of current UJO object.
The fastest way to use the interface is to extend an abstract parrent:
import org.ujoframework.implementation.map.*; public class Person extends MapUjo { public static final UjoProperty<Person, String > NAME = newProperty("Name", String.class); public static final UjoProperty<Person, Boolean> MALE = newProperty("Male", Boolean.class); public static final UjoProperty<Person, Double > CASH = newProperty("Cash", 0d); public void addCash(double cash) { double newCash = CASH.of(this) + cash; CASH.setValue(this, newCash); } }
UjoProperty| Method Summary | |
|---|---|
boolean |
readAuthorization(UjoAction action,
UjoProperty property,
java.lang.Object value)
Get an authorization of the property for different actions. |
UjoPropertyList |
readProperties()
Returns all direct properties. |
java.lang.Object |
readValue(UjoProperty property)
It is a common method for reading all object values, however there is strongly recomended to use a method UjoProperty.getValue(org.ujoframework.Ujo)
to an external access for a better type safe. |
void |
writeValue(UjoProperty property,
java.lang.Object value)
It is a common method for writing all object values, however there is strongly recomended to use a method UjoProperty.setValue(Ujo,Object)
to an external access for a better type safe. |
| Method Detail |
|---|
java.lang.Object readValue(UjoProperty property)
UjoProperty.getValue(org.ujoframework.Ujo)
to an external access for a better type safe.
The method have got a strategy place for an implementation of several listeners and convertors.
property - Property must be a direct type only!
UjoProperty.getValue(org.ujoframework.Ujo),
UjoProperty.isDirect()
void writeValue(UjoProperty property,
java.lang.Object value)
UjoProperty.setValue(Ujo,Object)
to an external access for a better type safe.
The method have got a strategy place for an implementation of several listeners and validators.
property - Property must be a direct type only!UjoProperty.setValue(Ujo,Object),
UjoProperty.isDirect()UjoPropertyList readProperties()
UjoProperty.isDirect()
boolean readAuthorization(UjoAction action,
UjoProperty property,
java.lang.Object value)
action - Type of request. See constant(s) UjoAction.ACTION_* for more information.
The action must not be null, however there is allowed to use a dummy constant UjoAction.DUMMY.property - A property of the Ujovalue - A property value
UjoAction
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||