|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface State
State of an object (POJO).
State
represent:
Property
Locale
used to alter the visual appearance of the values
State
objects offer services related to:
Properties
Actual State
objects are instantiated by Decorator
objects during POJO decoration.
created on Jun 22, 2005
Field Summary | |
---|---|
static int |
SORT_ASC
constant defining the sorting order is to be "ascending" |
static int |
SORT_BY_DESC
constant defining the collection is to be sorted by MethodMeta.getDescription() |
static int |
SORT_BY_NAME
constant defining the collection is to be sorted by MethodMeta.getName() |
static int |
SORT_BY_VALUE
constant defining the collection is to be sorted by Property.getValue() |
static int |
SORT_DESC
constant defining the sorting order is to be "descending" |
Method Summary | |
---|---|
java.lang.ClassLoader |
getClassLoader()
|
StateFormat |
getFormat()
get state's formatting object Formatting object is responsible to convey this State
object to a string representation. |
java.util.Locale |
getLocale()
|
java.lang.Object |
getObject()
|
Property |
getProperty(java.lang.String propertyName)
find the property with that name from the collection |
void |
sort(int leadField,
int order)
Sort the collection in given order |
java.lang.String |
toString()
print the collection of Properties
This representation may vary depending on the getFormat() object. |
void |
update()
Update the state of the object. |
Methods inherited from interface java.util.Collection |
---|
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray |
Field Detail |
---|
static final int SORT_BY_NAME
MethodMeta.getName()
static final int SORT_BY_DESC
MethodMeta.getDescription()
static final int SORT_BY_VALUE
Property.getValue()
static final int SORT_ASC
static final int SORT_DESC
Method Detail |
---|
java.lang.ClassLoader getClassLoader()
java.util.Locale getLocale()
java.lang.Object getObject()
StateFormat getFormat()
Formatting object is responsible to convey this State
object to a string representation. >Typical layout formats is to be
expected to be tabular text, XML, HTML or similar.
This object is used by toString()
too.
void sort(int leadField, int order)
leadField
- is one of SORT_BY_NAME
,SORT_BY_DESC
or SORT_BY_VALUE
order
- is one of SORT_ASC
or SORT_DESC
Property getProperty(java.lang.String propertyName)
propertyName
- as given by MethodMeta.getName()
.
void update() throws DecorationException
The idea of this method is to allow for state update is that is possible. This way State objects became reusable.
This method is subject to different implementation variations. For example, snapshot type of States might be able to refresh state but dynamic generally do not need this.
DecorationException
java.lang.String toString()
Properties
This representation may vary depending on the getFormat()
object.
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |