2016-02-03 10:20:22 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2016 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.
|
|
|
|
*/
|
|
|
|
|
2015-07-17 11:45:43 +00:00
|
|
|
package org.keycloak.models;
|
|
|
|
|
|
|
|
import org.keycloak.migration.MigrationModel;
|
|
|
|
import org.keycloak.provider.Provider;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
|
|
|
|
* @version $Revision: 1 $
|
|
|
|
*/
|
|
|
|
public interface RealmProvider extends Provider {
|
|
|
|
|
|
|
|
// Note: The reason there are so many query methods here is for layering a cache on top of an persistent KeycloakSession
|
|
|
|
MigrationModel getMigrationModel();
|
|
|
|
RealmModel createRealm(String name);
|
|
|
|
RealmModel createRealm(String id, String name);
|
|
|
|
RealmModel getRealm(String id);
|
|
|
|
RealmModel getRealmByName(String name);
|
|
|
|
|
2016-02-19 20:44:19 +00:00
|
|
|
ClientModel addClient(RealmModel realm, String clientId);
|
|
|
|
|
|
|
|
ClientModel addClient(RealmModel realm, String id, String clientId);
|
|
|
|
|
|
|
|
List<ClientModel> getClients(RealmModel realm);
|
|
|
|
|
2015-07-17 11:45:43 +00:00
|
|
|
ClientModel getClientById(String id, RealmModel realm);
|
2016-02-12 05:30:36 +00:00
|
|
|
ClientModel getClientByClientId(String clientId, RealmModel realm);
|
|
|
|
|
|
|
|
|
|
|
|
RoleModel getRoleById(String id, RealmModel realm);
|
2016-02-12 16:38:12 +00:00
|
|
|
|
|
|
|
boolean removeClient(String id, RealmModel realm);
|
|
|
|
|
2015-12-11 15:31:42 +00:00
|
|
|
ClientTemplateModel getClientTemplateById(String id, RealmModel realm);
|
2015-10-29 20:33:02 +00:00
|
|
|
GroupModel getGroupById(String id, RealmModel realm);
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-07-17 11:45:43 +00:00
|
|
|
List<RealmModel> getRealms();
|
|
|
|
boolean removeRealm(String id);
|
|
|
|
void close();
|
|
|
|
}
|