@Test(expected = IllegalStateException.class) public void testLifecycleNoConfigurationGetConstraintErrorMessage() { new UserManagerResolver().getConstraintErrorMessage(null, Locale.ENGLISH); }
@Override public String getConstraintErrorMessage(Object invalidValue, Locale locale) throws IllegalStateException { checkConfig(); if (isIncludingUsers() && isIncludingGroups()) { return Helper.getConstraintErrorMessage(this, "any", invalidValue, locale); } else if (!isIncludingUsers() && isIncludingGroups()) { return Helper.getConstraintErrorMessage(this, "group", invalidValue, locale); } else if (isIncludingUsers() && !isIncludingGroups()) { return Helper.getConstraintErrorMessage(this, "user", invalidValue, locale); } return String.format("%s cannot resolve reference %s", getName(), invalidValue); }
UserManagerResolver extends AbstractObjectResolver implements ObjectResolver { @Override public String getConstraintErrorMessage(Object invalidValue, Locale locale) throws IllegalStateException { checkConfig(); if (isIncludingUsers() && isIncludingGroups()) { return Helper.getConstraintErrorMessage(this, "any", invalidValue, locale); } else if (!isIncludingUsers() && isIncludingGroups()) { return Helper.getConstraintErrorMessage(this, "group", invalidValue, locale); } else if (isIncludingUsers() && !isIncludingGroups()) { return Helper.getConstraintErrorMessage(this, "user", invalidValue, locale); } return String.format("%s cannot resolve reference %s", getName(), invalidValue); } }
UserManagerResolver extends AbstractObjectResolver implements ObjectResolver { @Override public String getConstraintErrorMessage(Object invalidValue, Locale locale) throws IllegalStateException { checkConfig(); if (isIncludingUsers() && isIncludingGroups()) { return Helper.getConstraintErrorMessage(this, "any", invalidValue, locale); } else if (!isIncludingUsers() && isIncludingGroups()) { return Helper.getConstraintErrorMessage(this, "group", invalidValue, locale); } else if (isIncludingUsers() && !isIncludingGroups()) { return Helper.getConstraintErrorMessage(this, "user", invalidValue, locale); } return String.format("%s cannot resolve reference %s", getName(), invalidValue); }  }
UserManagerResolver extends AbstractObjectResolver implements ObjectResolver { @Override public String getConstraintErrorMessage(Object invalidValue, Locale locale) throws IllegalStateException { checkConfig(); if (isIncludingUsers() && isIncludingGroups()) { return Helper.getConstraintErrorMessage(this, "any", invalidValue, locale); } else if (!isIncludingUsers() && isIncludingGroups()) { return Helper.getConstraintErrorMessage(this, "group", invalidValue, locale); } else if (isIncludingUsers() && !isIncludingGroups()) { return Helper.getConstraintErrorMessage(this, "user", invalidValue, locale); } return String.format("%s cannot resolve reference %s", getName(), invalidValue); }  UserManager getUserManager(); @Override List<Class<?>> getManagedClasses(); @Override void configure(Map<String, String> parameters); @Override String getName(); @Override Object fetch(Object value); @SuppressWarnings("unchecked") @Override T fetch(Class<T> type, Object value); @Override Serializable getReference(Object entity); @Override String getConstraintErrorMessage(Object invalidValue, Locale locale); boolean isIncludingUsers(); boolean isIncludingGroups(); }
UserManagerResolver extends AbstractObjectResolver implements ObjectResolver { @Override public String getConstraintErrorMessage(Object invalidValue, Locale locale) throws IllegalStateException { checkConfig(); if (isIncludingUsers() && isIncludingGroups()) { return Helper.getConstraintErrorMessage(this, "any", invalidValue, locale); } else if (!isIncludingUsers() && isIncludingGroups()) { return Helper.getConstraintErrorMessage(this, "group", invalidValue, locale); } else if (isIncludingUsers() && !isIncludingGroups()) { return Helper.getConstraintErrorMessage(this, "user", invalidValue, locale); } return String.format("%s cannot resolve reference %s", getName(), invalidValue); }  UserManager getUserManager(); @Override List<Class<?>> getManagedClasses(); @Override void configure(Map<String, String> parameters); @Override String getName(); @Override Object fetch(Object value); @SuppressWarnings("unchecked") @Override T fetch(Class<T> type, Object value); @Override Serializable getReference(Object entity); @Override String getConstraintErrorMessage(Object invalidValue, Locale locale); boolean isIncludingUsers(); boolean isIncludingGroups(); static final String INPUT_PARAM_FILTER; static final String FILTER_GROUP; static final String FILTER_USER; static final String NAME; static final String PARAM_INCLUDE_USERS; static final String PARAM_INCLUDE_GROUPS; }