All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.dynamicextensionsalfresco.resources.ContentCompareStrategy Maven / Gradle / Ivy

Go to download

Adds an OSGi container to alfresco repository supporting dynamic code reloading, classpath isolation and a bunch of other useful features

There is a newer version: 3.1.0
Show newest version
package com.github.dynamicextensionsalfresco.resources;

import org.alfresco.service.cmr.repository.NodeRef;
import org.springframework.core.io.Resource;

import java.io.IOException;

/**
 * @author Laurent Van der Linden
 */
public class ContentCompareStrategy implements UpdateStrategy {
    private final ResourceHelper resourceHelper;

    public ContentCompareStrategy(ResourceHelper resourceHelper) {
        this.resourceHelper = resourceHelper;
    }

    @Override
    public boolean updateNode(Resource resource, NodeRef nodeRef) {
        try {
            return resourceHelper.nodeDiffersFromResource(resource, nodeRef);
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy