public class DefaultErrors extends AbstractObservable implements Errors
pcs
ERROR_COUNT_PROPERTY, HAS_ERRORS_PROPERTY
Constructor and Description |
---|
DefaultErrors(Class<?> objectClass) |
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
@Nonnull public String getObjectName()
getObjectName
in interface Errors
public boolean hasGlobalErrors()
hasGlobalErrors
in interface Errors
public boolean hasFieldErrors()
hasFieldErrors
in interface Errors
public 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 Errors
public int getFieldErrorCount(@Nonnull String field)
getFieldErrorCount
in interface Errors
@Nonnull public List<ObjectError> getGlobalErrors()
getGlobalErrors
in interface Errors
public int getGlobalErrorCount()
getGlobalErrorCount
in interface Errors
@Nullable public ObjectError getGlobalError()
getGlobalError
in interface Errors
public int getErrorCount()
getErrorCount
in interface Errors
@Nonnull public List<ObjectError> getAllErrors()
getAllErrors
in interface Errors
public void addError(@Nonnull ObjectError objectError)
protected void firePropertyChange(@Nonnull String propertyName, Object oldValue, Object newValue)
firePropertyChange
in class AbstractObservable
public void clearAllErrors()
clearAllErrors
in interface Errors
public void clearGlobalErrors()
clearGlobalErrors
in interface Errors
public void clearFieldErrors()
clearFieldErrors
in interface Errors
public void clearFieldErrors(@Nonnull String field)
clearFieldErrors
in interface Errors
public 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 Errors
public 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 Errors
public void rejectField(@Nonnull String field, @Nonnull String code, @Nonnull String defaultMessage)
rejectField
in interface Errors
public void rejectField(@Nonnull String field, Object rejectedValue, @Nonnull String code, @Nonnull Object[] args, @Nonnull String defaultMessage)
rejectField
in interface Errors