private void parseValue(final String name) { Principal principal = null; if (name != null && name.trim().length() != 0) { principal = cache.get(name); if (principal == null) { // create a new principal String id = type.name().toLowerCase() + "-" + name; principal = new Principal(id, name, type); cache.put(principal.getId(), principal); } } setValue(principal); }
public PrincipalSuggestion(final Principal principal) { super(principal.getName(), principal.getName()); this.principal = principal; }
public String asString() { return value != null ? value.getName() : ""; }