ResourceConverterContext.java 3.82 KB
/*
 * Decompiled with CFR 0_118.
 * 
 * Could not load the following classes:
 *  org.apache.sling.api.request.RequestPathInfo
 *  org.apache.sling.api.resource.Resource
 */
package com.adobe.granite.rest.converter;

import com.adobe.granite.rest.filter.Filter;
import java.util.Map;
import org.apache.sling.api.request.RequestPathInfo;
import org.apache.sling.api.resource.Resource;

public class ResourceConverterContext {
    public static final int DEFAULT_LIMIT = 20;
    public static final boolean DEFAULT_USE_ABSOLUTE_URIS = true;
    public static final boolean DEFAULT_SHOW_ALL_PROPERTIES = false;
    private int offset = 0;
    private int limit = 20;
    private Filter<Resource> filter;
    private String scheme;
    private String serverName;
    private int serverPort;
    private String contextPath;
    private RequestPathInfo requestPathInfo;
    private Map<String, String[]> parameters;
    private String query;
    private boolean useAbsoluteURI = true;
    private boolean showAllProperties = false;
    private String[] showProperties;

    public int getOffset() {
        return this.offset;
    }

    public ResourceConverterContext setOffset(int offset) {
        this.offset = offset;
        return this;
    }

    public int getLimit() {
        return this.limit;
    }

    public ResourceConverterContext setLimit(int limit) {
        this.limit = limit;
        return this;
    }

    public Filter<Resource> getFilter() {
        return this.filter;
    }

    public ResourceConverterContext setFilter(Filter<Resource> filter) {
        this.filter = filter;
        return this;
    }

    public String getScheme() {
        return this.scheme;
    }

    public ResourceConverterContext setScheme(String scheme) {
        this.scheme = scheme;
        return this;
    }

    public String getServerName() {
        return this.serverName;
    }

    public ResourceConverterContext setServerName(String serverName) {
        this.serverName = serverName;
        return this;
    }

    public int getServerPort() {
        return this.serverPort;
    }

    public ResourceConverterContext setServerPort(int serverPort) {
        this.serverPort = serverPort;
        return this;
    }

    public String getContextPath() {
        return this.contextPath;
    }

    public ResourceConverterContext setContextPath(String contextPath) {
        this.contextPath = contextPath;
        return this;
    }

    public RequestPathInfo getRequestPathInfo() {
        return this.requestPathInfo;
    }

    public ResourceConverterContext setRequestPathInfo(RequestPathInfo requestPathInfo) {
        this.requestPathInfo = requestPathInfo;
        return this;
    }

    public Map<String, String[]> getParameters() {
        return this.parameters;
    }

    public ResourceConverterContext setParameters(Map<String, String[]> parameters) {
        this.parameters = parameters;
        return this;
    }

    public String getQuery() {
        return this.query;
    }

    public ResourceConverterContext setQuery(String query) {
        this.query = query;
        return this;
    }

    public boolean isAbsolutURI() {
        return this.useAbsoluteURI;
    }

    public ResourceConverterContext setAbsolutURI(boolean useAbsoluteURI) {
        this.useAbsoluteURI = useAbsoluteURI;
        return this;
    }

    public boolean isShowAllProperties() {
        return this.showAllProperties;
    }

    public ResourceConverterContext setShowAllProperties(boolean showAllProperties) {
        this.showAllProperties = showAllProperties;
        return this;
    }

    public String[] getShowProperties() {
        return this.showProperties == null ? new String[]{} : this.showProperties;
    }

    public ResourceConverterContext setShowProperties(String[] showProperties) {
        this.showProperties = showProperties;
        return this;
    }
}