@Override public void putAll(Map<? extends String, ? extends Object> m) { this.properties.putAll(m); }
@Override public final void putAll(final Map<? extends String, ?> map) { this.metaDataMap.putAll(map); }
public SynthesizedResource putProperties(Map<String, Object> properties) { synthProperties.putAll(properties); return this; // yeah, i like fluent APIs }
@Override public final void putAll(final Map<? extends String, ?> map) { this.metaDataMap.putAll(map); }
public SynthesizedResource putProperties(Map<String, Object> properties) { synthProperties.putAll(properties); return this; // yeah, i like fluent APIs }
void resetTo(Map<String, ? extends Object> newData) { Map<String, ? extends Object> tmp = new HashMap(newData); this.metaDataMap.clear(); this.metaDataMap.putAll(tmp); } }
/** * Custom properties that my be used by application-specific markup builders or processors. * @param map Property map. Is merged with properties already set. * @return this */ public @NotNull MediaArgs properties(Map<String, Object> map) { if (map == null) { throw new IllegalArgumentException("Map argument must not be null."); } getProperties().putAll(map); return this; }
/** * Custom properties that my be used by application-specific markup builders or processors. * @param map Property map. Is merged with properties already set. * @return this */ public @NotNull LinkArgs properties(Map<String, Object> map) { if (map == null) { throw new IllegalArgumentException("Map argument must not be null."); } getProperties().putAll(map); return this; }
void resetTo(Map<String, ? extends Object> newData) { Map<String, ? extends Object> tmp = new HashMap(newData); this.metaDataMap.clear(); this.metaDataMap.putAll(tmp); } }
@Override public ValueMap getValueMap() { ValueMap properties = new ValueMapDecorator(new HashMap<>()); if (this.model != null) { properties.putAll(this.model); } return properties; }
/** * Collect and combine the image transformers and their params. * * @param selectedNamedImageTransformers the named transformers and their params * @return the combined named image transformers and their params */ protected final ValueMap getImageTransformersWithParams( final List<NamedImageTransformer> selectedNamedImageTransformers) { final ValueMap params = new ValueMapDecorator(new LinkedHashMap<String, Object>()); for (final NamedImageTransformer namedImageTransformer : selectedNamedImageTransformers) { params.putAll(namedImageTransformer.getImageTransforms()); } return params; }
/** * @return Properties from resource containing target link. The value map is a copy * of the original map so it is safe to change the property values contained in the map. */ public ValueMap getResourceProperties() { if (this.resourceProperties == null) { // create a copy of the original map this.resourceProperties = new ValueMapDecorator(new HashMap<String, Object>()); if (this.resource != null) { this.resourceProperties.putAll(resource.getValueMap()); } } return this.resourceProperties; }
/** * @return Properties from resource containing rich text. The value map is a copy * of the original map so it is safe to change the property values contained in the map. */ public ValueMap getResourceProperties() { if (this.resourceProperties == null) { // create a copy of the original map this.resourceProperties = new ValueMapDecorator(new HashMap<String, Object>()); if (this.resource != null) { this.resourceProperties.putAll(resource.getValueMap()); } } return this.resourceProperties; }
/** * Collect and combine the image transformers and their params. * * @param selectedNamedImageTransformers the named transformers and their params * @return the combined named image transformers and their params */ protected final ValueMap getImageTransformersWithParams( final List<NamedImageTransformer> selectedNamedImageTransformers) { final ValueMap params = new ValueMapDecorator(new LinkedHashMap<String, Object>()); for (final NamedImageTransformer namedImageTransformer : selectedNamedImageTransformers) { params.putAll(namedImageTransformer.getImageTransforms()); } return params; }
/** * @return Properties from resource containing target link. The value map is a copy * of the original map so it is safe to change the property values contained in the map. */ public ValueMap getResourceProperties() { if (this.resourceProperties == null) { // create a copy of the original map this.resourceProperties = new ValueMapDecorator(new HashMap<String, Object>()); if (this.resource != null) { this.resourceProperties.putAll(resource.getValueMap()); } } return this.resourceProperties; }
private JsonObject getJSONResults(Command cmd, SlingHttpServletRequest request, final Collection<Result> results) { final JsonObject json = new JsonObject(); JsonArray resultArray = new JsonArray(); json.add(KEY_RESULTS, resultArray); final ValueMap requestConfig = new ValueMapDecorator(new HashMap<String, Object>()); // Collect all items collected from OSGi Properties requestConfig.putAll(this.config); // Add Request specific configurations requestConfig.put(AuthoringUIMode.class.getName(), authoringUIModeService.getAuthoringUIMode(request)); for (final Result result : results) { final JsonObject tmp = resultBuilder.toJSON(cmd, result, requestConfig); if (tmp != null) { resultArray.add(tmp); } } return json; }
private JSONObject getJSONResults(Command cmd, SlingHttpServletRequest request, final Collection<Result> results) throws JSONException { final JSONObject json = new JSONObject(); json.put(KEY_RESULTS, new JSONArray()); final ValueMap requestConfig = new ValueMapDecorator(new HashMap<String, Object>()); // Collect all items collected from OSGi Properties requestConfig.putAll(this.config); // Add Request specific configurations requestConfig.put(AuthoringUIMode.class.getName(), authoringUIModeService.getAuthoringUIMode(request)); for (final Result result : results) { final JSONObject tmp = resultBuilder.toJSON(cmd, result, requestConfig); if (tmp != null) { json.accumulate(KEY_RESULTS, tmp); } } return json; }