Interface PageState
-
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
DefaultPageState
public interface PageState extends Serializable
Page State runtime abstraction, which is part of aPageFlow
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addAllErrors(Map<String,Errors> errorsMap)
Errors
addErrors(String name, Errors errors)
void
clearAllErrors()
Clear all the application specificErrors
in thisPageState
.boolean
equals(Object o)
Compares the specified object with thisPageState
for equality.Map<String,Errors>
getErrorsMap()
String
getId()
Return the identifier of thisPageState
.int
getIndex()
Return the internal index, which is the same as definition order in the backend, of thePageState
.Map<String,String>
getMetadata()
Return an unmodifiable metadata map of thePageState
.String
getName()
Return the (human readable) name of thisPageState
.String
getPath()
Return the logical path info of thePageState
.int
hashCode()
Returns the hash code value for thisPageState
.boolean
isErrorsEmpty()
Return true if there's no application error at runtime in thisPageState
.Errors
removeErrors(String name)
-
-
-
Method Detail
-
getId
String getId()
Return the identifier of thisPageState
.- Returns:
- the identifier of this
PageState
-
getName
String getName()
Return the (human readable) name of thisPageState
.- Returns:
- the (human readable) name of this
PageState
-
getPath
String getPath()
Return the logical path info of thePageState
.This
path
info must be translated into a physical URI or client-side route information by an application. In the definition level, thispath
info doesn't imply any physical translations by itself.- Returns:
- the logical path info of the
PageState
-
getIndex
int getIndex()
Return the internal index, which is the same as definition order in the backend, of thePageState
.- Returns:
- the internal index, which is the same as definition order in the backend, of the
PageState
-
getMetadata
Map<String,String> getMetadata()
Return an unmodifiable metadata map of thePageState
.- Returns:
- an unmodifiable metadata map of the
PageState
-
isErrorsEmpty
boolean isErrorsEmpty()
Return true if there's no application error at runtime in thisPageState
.The application errors can be added, retrieved and removed by applications for an easier application development.
- Returns:
- true if there's no application error at runtime in this
PageState
-
addErrors
Errors addErrors(String name, Errors errors)
Add an application specificErrors
by thename
to thisPageState
.The
name
can be used by applications to distinguish the sources of errors. e.g, field name.
-
removeErrors
Errors removeErrors(String name)
Remove the application specificErrors
by thename
from thisPageState
.The
name
can be used by applications to distinguish the sources of errors. e.g, field name.- Parameters:
name
- application specific source name of the errors.- Returns:
- the previous
Errors
value associated withname
, or null if there was no mapping for thename
-
clearAllErrors
void clearAllErrors()
Clear all the application specificErrors
in thisPageState
.
-
equals
boolean equals(Object o)
Compares the specified object with thisPageState
for equality.
-
-