ProjectDAMAssetContainerPredicate.java 1.25 KB
/*
 * Decompiled with CFR 0_118.
 * 
 * Could not load the following classes:
 *  com.day.cq.commons.predicate.AbstractNodePredicate
 *  javax.jcr.Node
 *  javax.jcr.RepositoryException
 *  org.apache.commons.collections.Predicate
 *  org.apache.felix.scr.annotations.Component
 *  org.apache.felix.scr.annotations.Properties
 *  org.apache.felix.scr.annotations.Property
 *  org.apache.felix.scr.annotations.Service
 */
package com.adobe.cq.projects.impl.predicate;

import com.day.cq.commons.predicate.AbstractNodePredicate;
import javax.jcr.Node;
import javax.jcr.RepositoryException;
import org.apache.commons.collections.Predicate;
import org.apache.felix.scr.annotations.Component;
import org.apache.felix.scr.annotations.Properties;
import org.apache.felix.scr.annotations.Property;
import org.apache.felix.scr.annotations.Service;

@Component(metatype=0)
@Service(value={Predicate.class})
@Properties(value={@Property(name="predicate.name", value={"project.assetcontainer"})})
public class ProjectDAMAssetContainerPredicate
extends AbstractNodePredicate
implements Predicate {
    public boolean evaluate(Node node) throws RepositoryException {
        return node.isNodeType("nt:hierarchyNode") && !node.isNodeType("nt:file") && !node.isNodeType("dam:Asset");
    }
}