public interface FieldProcessor
FieldProcessor
keeps track of the MetaData
and Linkpanel
s defined in the
DataConfig
of a Datasource
. It provides several methods
to add Message
s, which can be field-specific.Modifier and Type | Method and Description |
---|---|
void |
addErrorMessage(FieldDef field,
String message)
Adds a
Message of type MessageType.ERROR to the
given field. |
void |
addErrorMessage(String message)
Adds a
Message of type MessageType.ERROR . |
void |
addInvalidMessage(FieldDef field,
String message)
Adds a
Message of type MessageType.INVALID to the
given field. |
void |
addInvalidMessage(String message)
Adds a
Message of type MessageType.INVALID . |
void |
addLinkPanels(List<Linkpanel> panels)
Adds the given list of
Linkpanel s to this FieldProcessor |
void |
addNoticeMessage(FieldDef field,
String message)
Adds a
Message of type MessageType.NOTICE to the
given field. |
void |
addNoticeMessage(String message)
Adds a
Message of type MessageType.INVALID . |
void |
addOkMessage(FieldDef field,
String message)
Adds a
Message of type MessageType.OK to the given
field. |
void |
addOkMessage(String message)
Adds a
Message of type MessageType.OK . |
void |
clearFieldMessages()
Clears all
Message s which were previously added using
addXXMessage(FieldDef field, String message) . |
void |
clearFieldMessages(String... fieldBindings)
|
void |
clearMessages()
Clears all
Message s which were previously added using
addXXMessage(String message) . |
FieldDef |
getField(String fieldBinding)
Returns the
FieldDef with the given binding, if existing. |
List<FieldDef> |
getFields()
Returns all
FieldDef intions known by this FieldProcessor . |
Linkpanel |
getLinkPanel(String fieldName)
Returns the
Linkpanel with the given name, if existing. |
Messages |
getMessages()
|
MetaData |
getMetaData()
Returns the
MetaData of this FieldProcessor . |
org.springframework.data.domain.Pageable |
getPageable()
Returns the
Pageable for this FieldProcessor . |
String |
getReference()
|
boolean |
hasErrors()
|
boolean |
hasField(String fieldBinding)
Checks whether a
FieldDef with the given binding exists for this FieldProcessor . |
boolean |
hasFieldErrors()
Checks whether one of the fields has a
Message of type
MessageType.ERROR . |
List<FieldDef> getFields()
FieldDef
intions known by this FieldProcessor
.FieldDef getField(String fieldBinding)
FieldDef
with the given binding, if existing.fieldBinding
- the binding of the FieldDef
to returnFieldDef
with the given binding, or null
if no such FieldDef
existsFieldDef.getBinding()
MetaData getMetaData()
MetaData
of this FieldProcessor
.MetaData
boolean hasField(String fieldBinding)
FieldDef
with the given binding exists for this FieldProcessor
.fieldBinding
- the binding of the FieldDef
to checktrue
if such a FieldDef
exists, false
otherwise.getField(String)
String getReference()
boolean hasErrors()
true
if there are any Message
s of
MessageType.ERROR
, false
otherwiseaddErrorMessage(String)
,
addErrorMessage(FieldDef, String)
boolean hasFieldErrors()
Message
of type
MessageType.ERROR
.true
if any of the FieldProcessor
s FieldDef
s has a
Message
of type MessageType.ERROR
,
false
otherwiseaddErrorMessage(FieldDef, String)
void addOkMessage(String message)
Message
of type MessageType.OK
.message
- the message to addvoid addLinkPanels(List<Linkpanel> panels)
Linkpanel
s to this FieldProcessor
panels
- a list of Linkpanel
sLinkpanel getLinkPanel(String fieldName)
Linkpanel
with the given name, if existing.void addOkMessage(FieldDef field, String message)
Message
of type MessageType.OK
to the given
field.void addErrorMessage(String message)
Message
of type MessageType.ERROR
.message
- the message to addhasErrors()
void addErrorMessage(FieldDef field, String message)
Message
of type MessageType.ERROR
to the
given field.field
- the FieldDef
to add the Message
tomessage
- the message to addhasErrors()
,
hasFieldErrors()
void addInvalidMessage(String message)
Message
of type MessageType.INVALID
.message
- the message to addvoid addInvalidMessage(FieldDef field, String message)
Message
of type MessageType.INVALID
to the
given field.void addNoticeMessage(String message)
Message
of type MessageType.INVALID
.message
- the message to addvoid addNoticeMessage(FieldDef field, String message)
Message
of type MessageType.NOTICE
to the
given field.Messages getMessages()
Messages
-object containing all Message
s previously added
using addXXMessage(String message)
.Messages
instance containing the previously added Message
saddOkMessage(String)
,
addNoticeMessage(String)
,
addInvalidMessage(String)
,
addErrorMessage(String)
void clearMessages()
Message
s which were previously added using
addXXMessage(String message)
.void clearFieldMessages()
Message
s which were previously added using
addXXMessage(FieldDef field, String message)
.void clearFieldMessages(String... fieldBindings)
fieldBindings
- the bindings of the fields to clear the messages foraddOkMessage(FieldDef, String)
,
addNoticeMessage(FieldDef, String)
,
addInvalidMessage(FieldDef, String)
,
addErrorMessage(FieldDef, String)
,
FieldDef.getBinding()
org.springframework.data.domain.Pageable getPageable()
Pageable
for this FieldProcessor
.Pageable
Copyright © 2011–2018 aiticon GmbH. All rights reserved.