AbstractReadOnlyClientScopeAdapter.java
/*
* Copyright 2018 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.keycloak.storage.client;
import org.keycloak.models.ClientScopeModel;
import org.keycloak.models.ProtocolMapperModel;
import org.keycloak.models.RoleModel;
public abstract class AbstractReadOnlyClientScopeAdapter implements ClientScopeModel {
@Override
public void setName(String name) {
}
@Override
public void setDescription(String description) {
}
@Override
public void setProtocol(String protocol) {
}
@Override
public void setAttribute(String name, String value) {
}
@Override
public void removeAttribute(String name) {
}
@Override
public ProtocolMapperModel addProtocolMapper(ProtocolMapperModel model) {
return null;
}
@Override
public void removeProtocolMapper(ProtocolMapperModel mapping) {
}
@Override
public void updateProtocolMapper(ProtocolMapperModel mapping) {
}
@Override
public void addScopeMapping(RoleModel role) {
}
@Override
public void deleteScopeMapping(RoleModel role) {
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || !(o instanceof ClientScopeModel)) return false;
ClientScopeModel that = (ClientScopeModel) o;
return that.getId().equals(getId());
}
@Override
public int hashCode() {
return getId().hashCode();
}
}