DispatcherFlushContentBuilder.java 2.18 KB
/*
 * Decompiled with CFR 0_118.
 * 
 * Could not load the following classes:
 *  javax.jcr.Session
 *  org.apache.felix.scr.annotations.Activate
 *  org.apache.felix.scr.annotations.Component
 *  org.apache.felix.scr.annotations.Properties
 *  org.apache.felix.scr.annotations.Property
 *  org.apache.felix.scr.annotations.Service
 *  org.apache.sling.commons.osgi.PropertiesUtil
 */
package com.day.cq.replication.impl.content;

import com.day.cq.replication.ContentBuilder;
import com.day.cq.replication.ReplicationAction;
import com.day.cq.replication.ReplicationContent;
import com.day.cq.replication.ReplicationContentFactory;
import com.day.cq.replication.ReplicationException;
import java.util.Map;
import javax.jcr.Session;
import org.apache.felix.scr.annotations.Activate;
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;
import org.apache.sling.commons.osgi.PropertiesUtil;

@Component
@Properties(value={@Property(name="service.description", value={"Adobe Granite Dispatcher Flush Content Builder"}), @Property(name="name", value={"flush"})})
@Service(value={ContentBuilder.class})
public class DispatcherFlushContentBuilder
implements ContentBuilder {
    public static final String NAME = "flush";
    public static final String TITLE = "Empty";
    private String name;

    @Activate
    protected void activate(Map<String, Object> props) {
        this.name = PropertiesUtil.toString((Object)props.get("name"), (String)"flush");
    }

    @Override
    public String getName() {
        return this.name;
    }

    @Override
    public ReplicationContent create(Session session, ReplicationAction action, ReplicationContentFactory factory) throws ReplicationException {
        return ReplicationContent.VOID;
    }

    @Override
    public ReplicationContent create(Session session, ReplicationAction action, ReplicationContentFactory contentFactory, Map<String, Object> parameters) throws ReplicationException {
        return this.create(session, action, contentFactory);
    }

    @Override
    public String getTitle() {
        return "Empty";
    }
}