001package com.identityworksllc.iiq.common.auth;
002
003import org.glassfish.jersey.uri.internal.JerseyUriBuilder;
004
005import javax.ws.rs.core.MultivaluedHashMap;
006import javax.ws.rs.core.MultivaluedMap;
007import javax.ws.rs.core.PathSegment;
008import javax.ws.rs.core.UriBuilder;
009import javax.ws.rs.core.UriInfo;
010import java.net.URI;
011import java.util.ArrayList;
012import java.util.List;
013
014/**
015 * A dummy UriInfo implementation so that the BaseListResource that all plugin
016 * resources depend on doesn't crash. This class obviously is not expected to do
017 * anything other than simply exist.
018 */
019public class DummyUriInfo implements UriInfo {
020    @Override
021    public URI getAbsolutePath() {
022        return null;
023    }
024
025    @Override
026    public UriBuilder getAbsolutePathBuilder() {
027        return new JerseyUriBuilder();
028    }
029
030    @Override
031    public URI getBaseUri() {
032        return null;
033    }
034
035    @Override
036    public UriBuilder getBaseUriBuilder() {
037        return new JerseyUriBuilder();
038    }
039
040    @Override
041    public List<Object> getMatchedResources() {
042        return null;
043    }
044
045    @Override
046    public List<String> getMatchedURIs() {
047        return null;
048    }
049
050    @Override
051    public List<String> getMatchedURIs(boolean decode) {
052        return null;
053    }
054
055    @Override
056    public String getPath() {
057        return null;
058    }
059
060    @Override
061    public String getPath(boolean decode) {
062        return null;
063    }
064
065    @Override
066    public MultivaluedMap<String, String> getPathParameters() {
067        return new MultivaluedHashMap<>();
068    }
069
070    @Override
071    public MultivaluedMap<String, String> getPathParameters(boolean decode) {
072        return new MultivaluedHashMap<>();
073    }
074
075    @Override
076    public List<PathSegment> getPathSegments() {
077        return new ArrayList<>();
078    }
079
080    @Override
081    public List<PathSegment> getPathSegments(boolean decode) {
082        return new ArrayList<>();
083    }
084
085    @Override
086    public MultivaluedMap<String, String> getQueryParameters() {
087        return new MultivaluedHashMap<>();
088    }
089
090    @Override
091    public MultivaluedMap<String, String> getQueryParameters(boolean decode) {
092        return new MultivaluedHashMap<>();
093    }
094
095    @Override
096    public URI getRequestUri() {
097        return null;
098    }
099
100    @Override
101    public UriBuilder getRequestUriBuilder() {
102        return null;
103    }
104
105    @Override
106    public URI relativize(URI uri) {
107        return null;
108    }
109
110    @Override
111    public URI resolve(URI uri) {
112        return null;
113    }
114}