/** * A helper to help load known supported keys from a provided map. * * @param map The map of values. * @see #getMapKeys() * @see #toMap() */ protected AbstractSecurityToken loadFromMap(Map<String, String> map) { for (Keys key : getMapKeys()) { key.loadFromMap(this, map); } return this; }
/** * A helper to help load known supported keys from a provided map. * * @param map The map of values. * @see #getMapKeys() * @see #toMap() */ protected AbstractSecurityToken loadFromMap(Map<String, String> map) { for (Keys key : getMapKeys()) { key.loadFromMap(this, map); } return this; }
/** * A helper to help load known supported keys from a provided map. * * @param map The map of values. * @see #getMapKeys() * @see #toMap() */ protected AbstractSecurityToken loadFromMap(Map<String, String> map) { for (Keys key : getMapKeys()) { key.loadFromMap(this, map); } return this; }
/** * A {@link Map} representation of this {@link SecurityToken}. Implementors that * handle additional keys not contained in {@link Keys} should override and * supplement the functionality of this method. * * @return A map of serialized token values keyed according to {@link Keys}. * @see #getMapKeys() * @see #loadFromMap(Map) */ public Map<String, String> toMap() { Map<String, String> map = Maps.newHashMap(); for (Keys key : getMapKeys()) { String value = key.getValue(this); if (value != null) { map.put(key.getKey(), key.getValue(this)); } } return map; }
/** * A {@link Map} representation of this {@link SecurityToken}. Implementors that * handle additional keys not contained in {@link Keys} should override and * supplement the functionality of this method. * * @return A map of serialized token values keyed according to {@link Keys}. * @see #getMapKeys() * @see #loadFromMap(Map) */ public Map<String, String> toMap() { Map<String, String> map = Maps.newHashMap(); for (Keys key : getMapKeys()) { String value = key.getValue(this); if (value != null) { map.put(key.getKey(), key.getValue(this)); } } return map; }
/** * A {@link Map} representation of this {@link SecurityToken}. Implementors that * handle additional keys not contained in {@link Keys} should override and * supplement the functionality of this method. * * @return A map of serialized token values keyed according to {@link Keys}. * @see #getMapKeys() * @see #loadFromMap(Map) */ public Map<String, String> toMap() { Map<String, String> map = Maps.newHashMap(); for (Keys key : getMapKeys()) { String value = key.getValue(this); if (value != null) { map.put(key.getKey(), key.getValue(this)); } } return map; }