AbstractPageResource.java 1.63 KB
/*
 * Decompiled with CFR 0_118.
 * 
 * Could not load the following classes:
 *  org.apache.sling.api.resource.AbstractResource
 *  org.apache.sling.api.resource.Resource
 *  org.apache.sling.api.resource.ResourceMetadata
 *  org.apache.sling.api.resource.ResourceResolver
 *  org.slf4j.Logger
 *  org.slf4j.LoggerFactory
 */
package com.adobe.cq.rest.content.impl;

import org.apache.sling.api.resource.AbstractResource;
import org.apache.sling.api.resource.Resource;
import org.apache.sling.api.resource.ResourceMetadata;
import org.apache.sling.api.resource.ResourceResolver;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public abstract class AbstractPageResource
extends AbstractResource {
    protected Logger logger;
    protected ResourceMetadata resourceMetadata;
    protected Resource resource;
    protected String path;

    protected AbstractPageResource(Resource resource, String path) {
        this.logger = LoggerFactory.getLogger(this.getClass());
        this.resource = resource;
        this.path = path;
        this.resourceMetadata = new ResourceMetadata();
        this.resourceMetadata.setResolutionPath(path);
    }

    public ResourceResolver getResourceResolver() {
        return this.resource.getResourceResolver();
    }

    public String getPath() {
        return this.path;
    }

    public ResourceMetadata getResourceMetadata() {
        return this.resourceMetadata;
    }

    public String getResourceSuperType() {
        return null;
    }

    public Resource getWrappedResource() {
        return this.resource;
    }

    public String getWrappedResourcePath() {
        return this.resource.getPath();
    }
}