KEYCLOAK-12213 Fix minor warnings with modificators for methods and fields in module "server-spi"

This commit is contained in:
Andrei Arlou 2019-11-23 10:36:00 +03:00 committed by Stian Thorgersen
parent 363c789ab9
commit 71b17375de
14 changed files with 40 additions and 40 deletions

View file

@ -23,7 +23,7 @@ package org.keycloak.models;
*/ */
public class ClaimTypeModel { public class ClaimTypeModel {
public static enum ValueType { public enum ValueType {
BOOLEAN, BOOLEAN,
INT, INT,
STRING, STRING,

View file

@ -127,10 +127,10 @@ public interface ClientModel extends ClientScopeModel, RoleContainerModel, Prot
* *
* @return * @return
*/ */
public String getAuthenticationFlowBindingOverride(String binding); String getAuthenticationFlowBindingOverride(String binding);
public Map<String, String> getAuthenticationFlowBindingOverrides(); Map<String, String> getAuthenticationFlowBindingOverrides();
public void removeAuthenticationFlowBindingOverride(String binding); void removeAuthenticationFlowBindingOverride(String binding);
public void setAuthenticationFlowBindingOverride(String binding, String flowId); void setAuthenticationFlowBindingOverride(String binding, String flowId);
boolean isFrontchannelLogout(); boolean isFrontchannelLogout();
void setFrontchannelLogout(boolean flag); void setFrontchannelLogout(boolean flag);

View file

@ -62,7 +62,7 @@ public class CredentialValidationOutput {
throw new IllegalStateException("Not supported yet"); throw new IllegalStateException("Not supported yet");
} }
public static enum Status { public enum Status {
AUTHENTICATED, FAILED, CONTINUE AUTHENTICATED, FAILED, CONTINUE
} }
} }

View file

@ -24,6 +24,6 @@ package org.keycloak.models;
*/ */
public interface KeycloakSessionTask { public interface KeycloakSessionTask {
public void run(KeycloakSession session); void run(KeycloakSession session);
} }

View file

@ -328,8 +328,8 @@ public interface RealmModel extends RoleContainerModel {
IdentityProviderMapperModel addIdentityProviderMapper(IdentityProviderMapperModel model); IdentityProviderMapperModel addIdentityProviderMapper(IdentityProviderMapperModel model);
void removeIdentityProviderMapper(IdentityProviderMapperModel mapping); void removeIdentityProviderMapper(IdentityProviderMapperModel mapping);
void updateIdentityProviderMapper(IdentityProviderMapperModel mapping); void updateIdentityProviderMapper(IdentityProviderMapperModel mapping);
public IdentityProviderMapperModel getIdentityProviderMapperById(String id); IdentityProviderMapperModel getIdentityProviderMapperById(String id);
public IdentityProviderMapperModel getIdentityProviderMapperByName(String brokerAlias, String name); IdentityProviderMapperModel getIdentityProviderMapperByName(String brokerAlias, String name);
/** /**

View file

@ -150,7 +150,7 @@ public interface UserModel extends RoleMapperModel {
String getServiceAccountClientLink(); String getServiceAccountClientLink();
void setServiceAccountClientLink(String clientInternalId); void setServiceAccountClientLink(String clientInternalId);
public static enum RequiredAction { enum RequiredAction {
VERIFY_EMAIL, UPDATE_PROFILE, CONFIGURE_TOTP, UPDATE_PASSWORD, TERMS_AND_CONDITIONS VERIFY_EMAIL, UPDATE_PROFILE, CONFIGURE_TOTP, UPDATE_PASSWORD, TERMS_AND_CONDITIONS
} }
} }

View file

@ -38,8 +38,8 @@ public interface UserProvider extends Provider,
UserBulkUpdateProvider { UserBulkUpdateProvider {
// Note: The reason there are so many query methods here is for layering a cache on top of an persistent KeycloakSession // Note: The reason there are so many query methods here is for layering a cache on top of an persistent KeycloakSession
public void addFederatedIdentity(RealmModel realm, UserModel user, FederatedIdentityModel socialLink); void addFederatedIdentity(RealmModel realm, UserModel user, FederatedIdentityModel socialLink);
public boolean removeFederatedIdentity(RealmModel realm, UserModel user, String socialProvider); boolean removeFederatedIdentity(RealmModel realm, UserModel user, String socialProvider);
void updateFederatedIdentity(RealmModel realm, UserModel federatedUser, FederatedIdentityModel federatedIdentityModel); void updateFederatedIdentity(RealmModel realm, UserModel federatedUser, FederatedIdentityModel federatedIdentityModel);
Set<FederatedIdentityModel> getFederatedIdentities(UserModel user, RealmModel realm); Set<FederatedIdentityModel> getFederatedIdentities(UserModel user, RealmModel realm);
FederatedIdentityModel getFederatedIdentity(UserModel user, String socialProvider, RealmModel realm); FederatedIdentityModel getFederatedIdentity(UserModel user, String socialProvider, RealmModel realm);

View file

@ -74,10 +74,10 @@ public interface UserSessionModel {
void removeAuthenticatedClientSessions(Collection<String> removedClientUUIDS); void removeAuthenticatedClientSessions(Collection<String> removedClientUUIDS);
public String getNote(String name); String getNote(String name);
public void setNote(String name, String value); void setNote(String name, String value);
public void removeNote(String name); void removeNote(String name);
public Map<String, String> getNotes(); Map<String, String> getNotes();
State getState(); State getState();
void setState(State state); void setState(State state);
@ -85,7 +85,7 @@ public interface UserSessionModel {
// Will completely restart whole state of user session. It will just keep same ID. // Will completely restart whole state of user session. It will just keep same ID.
void restartSession(RealmModel realm, UserModel user, String loginUsername, String ipAddress, String authMethod, boolean rememberMe, String brokerSessionId, String brokerUserId); void restartSession(RealmModel realm, UserModel user, String loginUsername, String ipAddress, String authMethod, boolean rememberMe, String brokerSessionId, String brokerUserId);
public static enum State { enum State {
LOGGED_IN, LOGGED_IN,
LOGGING_OUT, LOGGING_OUT,
LOGGED_OUT LOGGED_OUT

View file

@ -12,10 +12,10 @@ import java.io.IOException;
public class OTPCredentialModel extends CredentialModel { public class OTPCredentialModel extends CredentialModel {
public final static String TYPE = "otp"; public static final String TYPE = "otp";
public final static String TOTP = "totp"; public static final String TOTP = "totp";
public final static String HOTP = "hotp"; public static final String HOTP = "hotp";
private final OTPCredentialData credentialData; private final OTPCredentialData credentialData;
private final OTPSecretData secretData; private final OTPSecretData secretData;

View file

@ -9,8 +9,8 @@ import java.io.IOException;
public class PasswordCredentialModel extends CredentialModel { public class PasswordCredentialModel extends CredentialModel {
public final static String TYPE = "password"; public static final String TYPE = "password";
public final static String PASSWORD_HISTORY = "password-history"; public static final String PASSWORD_HISTORY = "password-history";
private final PasswordCredentialData credentialData; private final PasswordCredentialData credentialData;
private final PasswordSecretData secretData; private final PasswordSecretData secretData;

View file

@ -31,7 +31,7 @@ import org.keycloak.util.JsonSerialization;
*/ */
public class WebAuthnCredentialModel extends CredentialModel { public class WebAuthnCredentialModel extends CredentialModel {
public final static String TYPE = "webauthn"; public static final String TYPE = "webauthn";
private final WebAuthnCredentialData credentialData; private final WebAuthnCredentialData credentialData;
private final WebAuthnSecretData secretData; private final WebAuthnSecretData secretData;

View file

@ -31,27 +31,27 @@ import org.keycloak.models.KeycloakSessionFactory;
*/ */
public interface ProviderFactory<T extends Provider> { public interface ProviderFactory<T extends Provider> {
public T create(KeycloakSession session); T create(KeycloakSession session);
/** /**
* Only called once when the factory is first created. This config is pulled from keycloak_server.json * Only called once when the factory is first created. This config is pulled from keycloak_server.json
* *
* @param config * @param config
*/ */
public void init(Config.Scope config); void init(Config.Scope config);
/** /**
* Called after all provider factories have been initialized * Called after all provider factories have been initialized
*/ */
public void postInit(KeycloakSessionFactory factory); void postInit(KeycloakSessionFactory factory);
/** /**
* This is called when the server shuts down. * This is called when the server shuts down.
* *
*/ */
public void close(); void close();
public String getId(); String getId();
default int order() { default int order() {
return 0; return 0;

View file

@ -27,19 +27,19 @@ import org.keycloak.models.RealmModel;
*/ */
public interface CommonClientSessionModel { public interface CommonClientSessionModel {
public String getRedirectUri(); String getRedirectUri();
public void setRedirectUri(String uri); void setRedirectUri(String uri);
public RealmModel getRealm(); RealmModel getRealm();
public ClientModel getClient(); ClientModel getClient();
public String getAction(); String getAction();
public void setAction(String action); void setAction(String action);
public String getProtocol(); String getProtocol();
public void setProtocol(String method); void setProtocol(String method);
public static enum Action { enum Action {
OAUTH_GRANT, OAUTH_GRANT,
AUTHENTICATE, AUTHENTICATE,
LOGGED_OUT, LOGGED_OUT,
@ -47,7 +47,7 @@ public interface CommonClientSessionModel {
REQUIRED_ACTIONS REQUIRED_ACTIONS
} }
public enum ExecutionStatus { enum ExecutionStatus {
FAILED, FAILED,
SUCCESS, SUCCESS,
SETUP_REQUIRED, SETUP_REQUIRED,

View file

@ -28,8 +28,8 @@ import java.util.Set;
*/ */
public interface UserBrokerLinkFederatedStorage { public interface UserBrokerLinkFederatedStorage {
String getUserByFederatedIdentity(FederatedIdentityModel socialLink, RealmModel realm); String getUserByFederatedIdentity(FederatedIdentityModel socialLink, RealmModel realm);
public void addFederatedIdentity(RealmModel realm, String userId, FederatedIdentityModel socialLink); void addFederatedIdentity(RealmModel realm, String userId, FederatedIdentityModel socialLink);
public boolean removeFederatedIdentity(RealmModel realm, String userId, String socialProvider); boolean removeFederatedIdentity(RealmModel realm, String userId, String socialProvider);
void updateFederatedIdentity(RealmModel realm, String userId, FederatedIdentityModel federatedIdentityModel); void updateFederatedIdentity(RealmModel realm, String userId, FederatedIdentityModel federatedIdentityModel);
Set<FederatedIdentityModel> getFederatedIdentities(String userId, RealmModel realm); Set<FederatedIdentityModel> getFederatedIdentities(String userId, RealmModel realm);
FederatedIdentityModel getFederatedIdentity(String userId, String socialProvider, RealmModel realm); FederatedIdentityModel getFederatedIdentity(String userId, String socialProvider, RealmModel realm);