Examples of ValueMapDecorator


Examples of org.apache.sling.api.wrappers.ValueMapDecorator

    }

    @SuppressWarnings("unchecked")
    public <AdapterType> AdapterType adaptTo(Class<AdapterType> type) {
        if (type == ValueMap.class) {
            ValueMap map = new ValueMapDecorator(new HashMap<String, Object>());
            if (resourceType != null) {
                map.put("resourceType", resourceType);
            }
            if (resourceSuperType != null) {
                map.put("resourceSuperType", resourceSuperType);
            }
            for (String key : this.properties.keySet()) {
                map.put(key,this.properties.get(key));
            }
            return (AdapterType) map;
        }
        throw new UnsupportedOperationException("AdaptTo " + type.getSimpleName() + " not implemented");
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.