ScreensResourceConverter.java 1.7 KB
/*
 * Decompiled with CFR 0_118.
 * 
 * Could not load the following classes:
 *  com.adobe.granite.rest.converter.ResourceConverterContext
 *  com.adobe.granite.rest.converter.ResourceConverterException
 *  com.adobe.granite.rest.converter.siren.AbstractPageableSirenConverter
 *  com.adobe.reef.siren.Entity
 *  com.adobe.reef.siren.Link
 *  com.adobe.reef.siren.builder.BuilderException
 *  org.apache.sling.api.resource.Resource
 */
package com.adobe.cq.screens.impl.rest;

import com.adobe.granite.rest.converter.ResourceConverterContext;
import com.adobe.granite.rest.converter.ResourceConverterException;
import com.adobe.granite.rest.converter.siren.AbstractPageableSirenConverter;
import com.adobe.reef.siren.Entity;
import com.adobe.reef.siren.Link;
import com.adobe.reef.siren.builder.BuilderException;
import java.util.List;
import org.apache.sling.api.resource.Resource;

public class ScreensResourceConverter
extends AbstractPageableSirenConverter {
    public ScreensResourceConverter(Resource resource) {
        super(resource);
    }

    protected String[] getClazz() {
        return new String[]{"screens/root"};
    }

    protected Entity getEntity(ResourceConverterContext context, Resource child) throws ResourceConverterException {
        return null;
    }

    protected List<Link> getLinks(ResourceConverterContext context) throws BuilderException, ResourceConverterException {
        List links = super.getLinks(context);
        links.add(this.getLink("devices", this.buildURL(context, this.resource.getPath() + "/devices", ".json"), null));
        links.add(this.getLink("registration", this.buildURL(context, this.resource.getPath() + "/registration", ".json"), null));
        return links;
    }
}