public class DefaultErrors extends AbstractObservable implements Errors
pcsERROR_COUNT_PROPERTY, HAS_ERRORS_PROPERTY| Constructor and Description |
|---|
DefaultErrors(Class<?> objectClass) |
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener@Nonnull public String getObjectName()
getObjectName in interface Errorspublic boolean hasGlobalErrors()
hasGlobalErrors in interface Errorspublic boolean hasFieldErrors()
hasFieldErrors in interface Errorspublic boolean hasFieldErrors(@Nonnull String field)
hasFieldErrors in interface Errors@Nullable public FieldObjectError getFieldError(@Nonnull String field)
getFieldError in interface Errors@Nonnull public List<FieldObjectError> getFieldErrors(@Nonnull String field)
getFieldErrors in interface Errorspublic int getFieldErrorCount(@Nonnull String field)
getFieldErrorCount in interface Errors@Nonnull public List<ObjectError> getGlobalErrors()
getGlobalErrors in interface Errorspublic int getGlobalErrorCount()
getGlobalErrorCount in interface Errors@Nullable public ObjectError getGlobalError()
getGlobalError in interface Errorspublic int getErrorCount()
getErrorCount in interface Errors@Nonnull public List<ObjectError> getAllErrors()
getAllErrors in interface Errorspublic void addError(@Nonnull ObjectError objectError)
protected void firePropertyChange(@Nonnull String propertyName, Object oldValue, Object newValue)
firePropertyChange in class AbstractObservablepublic void clearAllErrors()
clearAllErrors in interface Errorspublic void clearGlobalErrors()
clearGlobalErrors in interface Errorspublic void clearFieldErrors()
clearFieldErrors in interface Errorspublic void clearFieldErrors(@Nonnull String field)
clearFieldErrors in interface Errorspublic MessageCodesResolver getMessageCodesResolver()
public void setMessageCodesResolver(MessageCodesResolver messageCodesResolver)
@Nonnull public String[] resolveMessageCodes(@Nonnull String code)
resolveMessageCodes in interface Errors@Nonnull public String[] resolveMessageCodes(@Nonnull String code, @Nonnull String field, @Nonnull Class<?> fieldType)
resolveMessageCodes in interface Errorspublic void reject(@Nonnull String code, @Nonnull Object[] args, @Nonnull String defaultMessage)
public void rejectField(@Nonnull String field, @Nonnull String code, @Nonnull Object[] args, @Nonnull String defaultMessage)
rejectField in interface Errorspublic void rejectField(@Nonnull String field, @Nonnull String code, @Nonnull String defaultMessage)
rejectField in interface Errorspublic void rejectField(@Nonnull String field, Object rejectedValue, @Nonnull String code, @Nonnull Object[] args, @Nonnull String defaultMessage)
rejectField in interface Errors