|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ujoframework.core.UjoManager
public class UjoManager
General Ujo Manager
| Field Summary | |
|---|---|
protected static UjoManager |
instance
UjoManager instance |
static int |
PROPERTY_MODIFIER
Requested modifier of property definitions. |
| Constructor Summary | |
|---|---|
UjoManager()
Constructor. |
|
| Method Summary | ||
|---|---|---|
boolean |
assertAssign(UjoProperty property,
java.lang.Object value)
An assignable test. |
|
boolean |
assertDirect(UjoProperty property,
java.lang.Object value)
An assignable test. |
|
boolean |
assertDirectAssign(UjoProperty property,
java.lang.Object value)
An assignable test. |
|
Ujo |
clone(Ujo ujo,
int depth,
java.lang.Object context)
Clone the UjoCloneable object. |
|
int |
compare(UjoProperty p1,
UjoProperty p2)
Compare Ujo properties. |
|
void |
copy(Ujo source,
Ujo target)
Copy ALL properties of the source to target. |
|
void |
copy(Ujo source,
Ujo target,
UjoAction action,
UjoProperty... properties)
Copy selected properties from source to target. |
|
void |
copy(Ujo source,
Ujo target,
UjoProperty... properties)
Copy selected properties of the source to target. |
|
java.util.List<UjoPropertyRow> |
createPropertyList(Ujo content,
UjoAction action)
Create a list of UjoPropertyList |
|
java.lang.Object |
decodeValue(java.lang.Class type,
java.lang.String aValue)
Decode text value |
|
java.lang.Object |
decodeValue(UjoProperty property,
java.lang.String aValue)
Decode text value |
|
java.lang.Object |
decodeValue(UjoProperty property,
java.lang.String aValue,
java.lang.Class type)
Decode text value |
|
java.lang.String |
encodeValue(java.lang.Object value,
boolean regenerationTest)
Convert value to a String representation. |
|
boolean |
equals(java.lang.Object o1,
java.lang.Object o2)
Test if Object o1 equalsUjo o2. |
|
boolean |
equalsArray(java.lang.Object array1,
java.lang.Object array2)
Test if array1 equalsUjo to array2. |
|
boolean |
equalsUjo(Ujo u1,
Ujo u2)
Test if obj1 equalsUjo obj2. |
|
boolean |
equalsUjo(Ujo u1,
Ujo u2,
UjoPropertyList properties)
Test if obj1 equalsUjo obj2. |
|
UjoProperty |
findIndirectProperty(java.lang.Class ujoType,
java.lang.String names)
Find indirect property by the name |
|
UjoProperty |
findProperty(Ujo ujo,
java.lang.String name,
boolean throwException)
Deprecated. Use UjoPropertyList.findPropety(...) |
|
UjoProperty |
findProperty(Ujo ujo,
java.lang.String name,
UjoAction action,
boolean result,
boolean throwException)
Find a property by property name from parameter. |
|
UjoCoder |
getCoder()
UjoCoder |
|
int |
getHash(Ujo ujo)
Calculate a Hash Code. |
|
int |
getHash(Ujo ujo,
UjoPropertyList properties)
Calculate a Hash Code. |
|
static UjoManager |
getInstance()
Get a default initialization |
|
java.lang.reflect.Field |
getPropertyField(java.lang.Class type,
UjoProperty property)
Get a UjoProperty field. |
|
java.lang.reflect.Field |
getPropertyField(Ujo ujo,
UjoProperty property)
Get a UjoProperty field. |
|
java.lang.String |
getText(Ujo ujo,
UjoProperty property,
UjoAction action)
Get a text value from property |
|
|
getValue(Ujo ujo,
UjoProperty... props)
Get a value from an Ujo object by a chain of properties. |
|
static java.lang.Object |
getValue(Ujo ujo,
UjoProperty prop)
Deprecated. Use a expression prop.of(ujo) rather. |
|
UjoProperty |
getXmlElementBody(java.lang.Class type)
Returns a Element body of the class or the null if no property was found. |
|
void |
checkUniqueProperties(java.lang.Class<? extends Ujo> type)
Check ujo properties to a unique name. |
|
protected void |
checkUniqueProperties(java.lang.Class<? extends Ujo> type,
boolean enabled)
Check ujo properties to a unique name. |
|
protected boolean |
isAbstract(java.lang.Class type)
Returns true, if the class is abstract. |
|
boolean |
isPropertiesReversed()
Are properties reversed by default? |
|
boolean |
isTransientProperty(UjoProperty property)
Is the property an Transient? |
|
static boolean |
isUsable(java.lang.CharSequence text)
Returns true, if text is not null and is not empty. |
|
boolean |
isXmlAttribute(UjoProperty property)
Is the property an XML attribute? |
|
static void |
main(java.lang.String[] args)
Show an information about the framework |
|
static java.lang.String |
projectInfo()
Regurns information about current library. |
|
static java.lang.String |
projectVersion()
Regurns information about current library. |
|
UjoPropertyList |
readProperties(java.lang.Class type)
Read all properties. |
|
UjoProperty[] |
readPropertiesNocache(java.lang.Class type,
boolean sorted)
Returns all direct properties (see an method UjoProperty.isDirect() for more information). |
|
void |
revertArray(java.lang.Object[] array)
Returns a reversed order of objects. |
|
void |
setCoder(UjoCoder ujoCoder)
UjoCoder |
|
void |
setText(Ujo ujo,
UjoProperty property,
java.lang.String value,
java.lang.Class type,
UjoAction action)
Set a text value by property. |
|
Ujo |
setValue(Ujo ujo,
UjoPropertyList props,
java.lang.Object value)
Set a value to an Ujo object by a chain of properties. |
|
static void |
setValue(Ujo ujo,
UjoProperty prop,
java.lang.Object value)
Set a value to an Ujo object by a selected properties. |
|
protected void |
sortProperties(java.lang.Class type,
UjoProperty[] properties)
Sort properties. |
|
java.lang.String |
toString(Ujo ujo)
Print a String representation |
|
java.lang.String |
toString(Ujo ujo,
UjoPropertyList properties)
Print a String representation |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.util.Comparator |
|---|
equals |
| Field Detail |
|---|
public static final int PROPERTY_MODIFIER
protected static UjoManager instance
| Constructor Detail |
|---|
public UjoManager()
| Method Detail |
|---|
public static final UjoManager getInstance()
public void revertArray(java.lang.Object[] array)
public boolean isPropertiesReversed()
protected boolean isAbstract(java.lang.Class type)
public UjoPropertyList readProperties(java.lang.Class type)
public UjoProperty[] readPropertiesNocache(java.lang.Class type,
boolean sorted)
throws java.lang.IllegalStateException
type - Ujo classsorted - I want to sortd the result by a natural order.
java.lang.IllegalStateException
public int compare(UjoProperty p1,
UjoProperty p2)
compare in interface java.util.Comparator<UjoProperty>
protected void sortProperties(java.lang.Class type,
UjoProperty[] properties)
public int getHash(Ujo ujo)
public int getHash(Ujo ujo,
UjoPropertyList properties)
public boolean equals(java.lang.Object o1,
java.lang.Object o2)
o1 - First parametero2 - Second parameter
public boolean equalsUjo(Ujo u1,
Ujo u2)
u1 - First parameteru2 - Optional parameter
public boolean equalsUjo(Ujo u1,
Ujo u2,
UjoPropertyList properties)
u1 - First parameteru2 - Optional parameter
public boolean equalsArray(java.lang.Object array1,
java.lang.Object array2)
array1 - Mandatory parameterarray2 - Optional parameter
public Ujo clone(Ujo ujo,
int depth,
java.lang.Object context)
throws java.lang.IllegalStateException
ujo - An Ujo with no parameter constructor.depth - A depth of the cloning.context - Context of the action.
java.lang.IllegalStateExceptionUjoAction.ACTION_CLONE
public UjoProperty findProperty(Ujo ujo,
java.lang.String name,
boolean throwException)
throws java.lang.IllegalArgumentException
ujo - An Ujo objectname - A property name.throwException - If result not found an Exception is throwed, or a null can be returned.
java.lang.IllegalArgumentExceptionUjoPropertyList.find(org.ujoframework.Ujo, java.lang.String, boolean)
public UjoProperty findProperty(Ujo ujo,
java.lang.String name,
UjoAction action,
boolean result,
boolean throwException)
throws java.lang.IllegalArgumentException
ujo - An Ujo objectname - A property name.action - Action type UjoAction.ACTION_* .result - Required result of action.throwException - If result not found an Exception is throwed, or a null can be returned.
java.lang.IllegalArgumentExceptionUjoPropertyList.find(java.lang.String, boolean)
public UjoProperty findIndirectProperty(java.lang.Class ujoType,
java.lang.String names)
public java.lang.String toString(Ujo ujo)
public java.lang.String toString(Ujo ujo,
UjoPropertyList properties)
public static boolean isUsable(java.lang.CharSequence text)
public final UjoProperty getXmlElementBody(java.lang.Class type)
public final boolean isXmlAttribute(UjoProperty property)
public final boolean isTransientProperty(UjoProperty property)
public final java.lang.Object decodeValue(UjoProperty property,
java.lang.String aValue,
java.lang.Class type)
property - Property is used for a result classaValue - Text value to decode.type - Optional subtype class of the property type.
public final java.lang.Object decodeValue(UjoProperty property,
java.lang.String aValue)
property - Property is used for a result classaValue - Text value to decode.
public final java.lang.Object decodeValue(java.lang.Class type,
java.lang.String aValue)
type - Parameter is used for a result class.aValue - Text value to decode.
public final java.lang.String encodeValue(java.lang.Object value,
boolean regenerationTest)
public boolean assertDirectAssign(UjoProperty property,
java.lang.Object value)
throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public boolean assertDirect(UjoProperty property,
java.lang.Object value)
throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public boolean assertAssign(UjoProperty property,
java.lang.Object value)
throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public static void setValue(Ujo ujo,
UjoProperty prop,
java.lang.Object value)
public Ujo setValue(Ujo ujo,
UjoPropertyList props,
java.lang.Object value)
throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
@Deprecated
public static java.lang.Object getValue(Ujo ujo,
UjoProperty prop)
prop.of(ujo) rather.
public <VALUE> VALUE getValue(Ujo ujo,
UjoProperty... props)
public UjoCoder getCoder()
public void setCoder(UjoCoder ujoCoder)
public java.lang.String getText(Ujo ujo,
UjoProperty property,
UjoAction action)
public void setText(Ujo ujo,
UjoProperty property,
java.lang.String value,
java.lang.Class type,
UjoAction action)
ujo - Ujoproperty - Direct propertyvalue - Valuetype - Subtype of valueaction - Context action
public java.util.List<UjoPropertyRow> createPropertyList(Ujo content,
UjoAction action)
public void copy(Ujo source,
Ujo target,
UjoAction action,
UjoProperty... properties)
source - Source UJOtarget - Target UJOaction - An action of source.properties - If the value is null, then all properties of source will be used.
public void copy(Ujo source,
Ujo target,
UjoProperty... properties)
source - Source UJOtarget - Target UJOproperties - If the value is null, then all properties of source will be used.
public void copy(Ujo source,
Ujo target)
source - Source UJOtarget - Target UJO
public java.lang.reflect.Field getPropertyField(Ujo ujo,
UjoProperty property)
public java.lang.reflect.Field getPropertyField(java.lang.Class type,
UjoProperty property)
protected void checkUniqueProperties(java.lang.Class<? extends Ujo> type,
boolean enabled)
throws java.lang.IllegalStateException
java.lang.IllegalStateException - If an duplicity is found than an exception is throwed.
public void checkUniqueProperties(java.lang.Class<? extends Ujo> type)
throws java.lang.IllegalStateException
java.lang.IllegalStateException - If an duplicity is found than an exception is throwed.public static java.lang.String projectInfo()
public static java.lang.String projectVersion()
public static void main(java.lang.String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||