001/*******************************************************************************
002 * Copyright 2017 The MIT Internet Trust Consortium
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 *   http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 *******************************************************************************/
016
017package org.mitre.openid.connect.service.impl;
018
019import java.util.Collection;
020import java.util.Collections;
021
022import org.mitre.oauth2.model.ClientDetailsEntity;
023import org.mitre.uma.model.ResourceSet;
024import org.mitre.uma.service.ResourceSetService;
025import org.springframework.stereotype.Service;
026
027/**
028 * Dummy resource set service that doesn't do anything; acts as a stub for the
029 * introspection service when the UMA functionality is disabled.
030 *
031 * @author jricher
032 *
033 */
034@Service
035public class DummyResourceSetService implements ResourceSetService {
036
037        @Override
038        public ResourceSet saveNew(ResourceSet rs) {
039                throw new UnsupportedOperationException();
040        }
041
042        @Override
043        public ResourceSet getById(Long id) {
044                throw new UnsupportedOperationException();
045        }
046
047        @Override
048        public ResourceSet update(ResourceSet oldRs, ResourceSet newRs) {
049                throw new UnsupportedOperationException();
050        }
051
052        @Override
053        public void remove(ResourceSet rs) {
054                throw new UnsupportedOperationException();
055        }
056
057        @Override
058        public Collection<ResourceSet> getAllForOwner(String owner) {
059                throw new UnsupportedOperationException();
060        }
061
062        @Override
063        public Collection<ResourceSet> getAllForOwnerAndClient(String owner, String authClientId) {
064                return Collections.emptySet();
065        }
066
067        @Override
068        public Collection<ResourceSet> getAllForClient(ClientDetailsEntity client) {
069                return Collections.emptySet();
070        }
071
072}