protected abstract Class<H> getClazz();
protected abstract H createEmpty();
protected UserIdentifier getUser() {
final UserIdentifier fromCookie = um.readIdentifier();
if (identifier == null) {
LOG.debug("Using identifier from cookie: {}", fromCookie);
identifier = fromCookie;
} else {
// make sure that there is only one user identifier pro http session
// if it's not the case overwrite new one with existing one
if (!fromCookie.equals(identifier)) {
LOG.debug("Replacing {} with {}", fromCookie, identifier);
um.storeIdentifier(identifier);
}
}
return identifier;