com.github.dynamicextensionsalfresco.resources.ContentCompareStrategy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of annotations-runtime Show documentation
Show all versions of annotations-runtime Show documentation
Adds an OSGi container to alfresco repository supporting dynamic code reloading, classpath isolation and a bunch of other useful features
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