SocialGraphServlet.java 1.91 KB
/*
 * Decompiled with CFR 0_118.
 * 
 * Could not load the following classes:
 *  javax.servlet.ServletException
 *  org.apache.felix.scr.annotations.sling.SlingServlet
 *  org.apache.sling.api.SlingHttpServletRequest
 *  org.apache.sling.api.SlingHttpServletResponse
 *  org.apache.sling.api.servlets.SlingAllMethodsServlet
 */
package com.adobe.granite.socialgraph.impl.rest;

import com.adobe.granite.socialgraph.impl.rest.DeleteServlet;
import com.adobe.granite.socialgraph.impl.rest.GetServlet;
import com.adobe.granite.socialgraph.impl.rest.PostServlet;
import java.io.IOException;
import javax.servlet.ServletException;
import org.apache.felix.scr.annotations.sling.SlingServlet;
import org.apache.sling.api.SlingHttpServletRequest;
import org.apache.sling.api.SlingHttpServletResponse;
import org.apache.sling.api.servlets.SlingAllMethodsServlet;

@SlingServlet(paths={"/bin/granite/social"}, extensions={"graph"})
public class SocialGraphServlet
extends SlingAllMethodsServlet {
    private final GetServlet getServlet = new GetServlet();
    private final PostServlet postServlet = new PostServlet();
    private final DeleteServlet deleteServlet = new DeleteServlet();

    protected void doGet(SlingHttpServletRequest request, SlingHttpServletResponse response) throws ServletException, IOException {
        this.getServlet.doGet(request, response);
    }

    protected void doPost(SlingHttpServletRequest request, SlingHttpServletResponse response) throws ServletException, IOException {
        this.postServlet.doPost(request, response);
    }

    protected void doPut(SlingHttpServletRequest request, SlingHttpServletResponse response) throws ServletException, IOException {
        this.postServlet.doPut(request, response);
    }

    protected void doDelete(SlingHttpServletRequest request, SlingHttpServletResponse response) throws ServletException, IOException {
        this.deleteServlet.doDelete(request, response);
    }
}