Examples of DeepReadValueMapDecorator


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

            if (map == null) {
                map = new HashMap<String, Object>();
            }

            // .. and decorate the plain map
            valueMap = new DeepReadValueMapDecorator(this, new ValueMapDecorator(map));
        }

        return valueMap;
    }
View Full Code Here

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

    @Override
    public <AdapterType> AdapterType adaptTo(final Class<AdapterType> type) {
        if ( type == ValueMap.class || type == Map.class ) {
            final Map<String, Object> propMap = this.getPropertiesMap();
            return (AdapterType) new DeepReadValueMapDecorator(this, new ValueMapDecorator(propMap));
        }
        return super.adaptTo(type);
    }
View Full Code Here

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

    @Override
    public <AdapterType> AdapterType adaptTo(final Class<AdapterType> type) {
        if ( type == ValueMap.class || type == Map.class ) {
            final Map<String, Object> propMap = this.getPropertiesMap();
            return (AdapterType) new DeepReadValueMapDecorator(this, new ValueMapDecorator(propMap));
        }
        return super.adaptTo(type);
    }
View Full Code Here

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

    @Override
    public <AdapterType> AdapterType adaptTo(final Class<AdapterType> type) {
        if ( type == ValueMap.class || type == Map.class ) {
            final Map<String, Object> propMap = Collections.unmodifiableMap(this.properties);
            return (AdapterType) new DeepReadValueMapDecorator(this, new ValueMapDecorator(propMap));
        }
        return super.adaptTo(type);
    }
View Full Code Here

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

    @Override
    public <AdapterType> AdapterType adaptTo(final Class<AdapterType> type) {
        if ( type == ValueMap.class || type == Map.class ) {
            final Map<String, Object> propMap = this.getPropertiesMap();
            return (AdapterType) new DeepReadValueMapDecorator(this, new ValueMapDecorator(propMap));
        }
        return super.adaptTo(type);
    }
View Full Code Here

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

    @Override
    public <AdapterType> AdapterType adaptTo(final Class<AdapterType> type) {
        if ( type == ValueMap.class || type == Map.class ) {
            final Map<String, Object> propMap = this.getPropertiesMap();
            return (AdapterType) new DeepReadValueMapDecorator(this, new ValueMapDecorator(propMap));
        }
        return super.adaptTo(type);
    }
View Full Code Here

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

    @SuppressWarnings("unchecked")
    @Override
    public <AdapterType> AdapterType adaptTo(final Class<AdapterType> type) {
        if ( type == ValueMap.class || type == Map.class ) {
            this.dbObject = this.provider.getUpdatedDBObject(this.resourcePath, this.dbObject);
            return (AdapterType) new DeepReadValueMapDecorator(this, new ReadableValueMap(this.dbObject));
        } else if ( type == ModifiableValueMap.class ) {
            this.dbObject = this.provider.getUpdatedDBObject(this.resourcePath, this.dbObject);
            return (AdapterType) new DeepReadModifiableValueMapDecorator(this, new ChangeableValueMap(this));
        }
View Full Code Here

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

                   final String relativePath,
                   final List<Resource> mappedResources,
                   final List<ValueMap> valueMaps) {
        this.resolver = resolver;
        this.path = (relativePath.length() == 0 ? mergeRootPath : mergeRootPath + "/" + relativePath);
        this.properties = new DeepReadValueMapDecorator(this, new MergedValueMap(valueMaps));
        this.resourceType = this.properties.get(ResourceResolver.PROPERTY_RESOURCE_TYPE, (relativePath.length() == 0 ? "/" : relativePath));
        metadata.put(MergedResourceConstants.METADATA_FLAG, true);
        final String[] resourcePaths = new String[mappedResources.size()];
        int i = 0;
        for(final Resource rsrc : mappedResources) {
View Full Code Here

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

        private final ModifiableValueMap targetMap;

        private final ValueMap properties;

        public ModifiableProperties(final Resource rsrc, final ModifiableValueMap targetMap) {
            this.properties = new DeepReadValueMapDecorator(rsrc, new ValueMapDecorator(new HashMap<String, Object>(rsrc.getValueMap())));
            this.targetMap = targetMap;
        }
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.