Added isPrivate to Spi

This commit is contained in:
Stian Thorgersen 2015-05-12 08:25:24 +02:00
parent 29c72c0744
commit 698660c92a
32 changed files with 189 additions and 0 deletions

View file

@ -9,6 +9,11 @@ import org.keycloak.provider.Spi;
*/ */
public class IdentityProviderMapperSpi implements Spi { public class IdentityProviderMapperSpi implements Spi {
@Override
public boolean isPrivate() {
return false;
}
@Override @Override
public String getName() { public String getName() {
return "identity-provider-mapper"; return "identity-provider-mapper";

View file

@ -28,6 +28,11 @@ public class IdentityProviderSpi implements Spi {
public static final String IDENTITY_PROVIDER_SPI_NAME = "identity_provider"; public static final String IDENTITY_PROVIDER_SPI_NAME = "identity_provider";
@Override
public boolean isPrivate() {
return false;
}
@Override @Override
public String getName() { public String getName() {
return IDENTITY_PROVIDER_SPI_NAME; return IDENTITY_PROVIDER_SPI_NAME;

View file

@ -9,6 +9,11 @@ import org.keycloak.provider.Spi;
*/ */
public class FileConnectionSpi implements Spi { public class FileConnectionSpi implements Spi {
@Override
public boolean isPrivate() {
return true;
}
@Override @Override
public String getName() { public String getName() {
return "connectionsFile"; return "connectionsFile";

View file

@ -9,6 +9,11 @@ import org.keycloak.provider.Spi;
*/ */
public class HttpClientSpi implements Spi { public class HttpClientSpi implements Spi {
@Override
public boolean isPrivate() {
return true;
}
@Override @Override
public String getName() { public String getName() {
return "connectionsHttpClient"; return "connectionsHttpClient";

View file

@ -9,6 +9,11 @@ import org.keycloak.provider.Spi;
*/ */
public class InfinispanConnectionSpi implements Spi { public class InfinispanConnectionSpi implements Spi {
@Override
public boolean isPrivate() {
return true;
}
@Override @Override
public String getName() { public String getName() {
return "connectionsInfinispan"; return "connectionsInfinispan";

View file

@ -9,6 +9,11 @@ import org.keycloak.provider.Spi;
*/ */
public class JpaConnectionSpi implements Spi { public class JpaConnectionSpi implements Spi {
@Override
public boolean isPrivate() {
return true;
}
@Override @Override
public String getName() { public String getName() {
return "connectionsJpa"; return "connectionsJpa";

View file

@ -9,6 +9,11 @@ import org.keycloak.provider.Spi;
*/ */
public class JpaUpdaterSpi implements Spi { public class JpaUpdaterSpi implements Spi {
@Override
public boolean isPrivate() {
return true;
}
@Override @Override
public String getName() { public String getName() {
return "connectionsJpaUpdater"; return "connectionsJpaUpdater";

View file

@ -9,6 +9,11 @@ import org.keycloak.provider.Spi;
*/ */
public class MongoConnectionSpi implements Spi { public class MongoConnectionSpi implements Spi {
@Override
public boolean isPrivate() {
return true;
}
@Override @Override
public String getName() { public String getName() {
return "connectionsMongo"; return "connectionsMongo";

View file

@ -9,6 +9,11 @@ import org.keycloak.provider.Spi;
*/ */
public class MongoUpdaterSpi implements Spi { public class MongoUpdaterSpi implements Spi {
@Override
public boolean isPrivate() {
return true;
}
@Override @Override
public String getName() { public String getName() {
return "connectionsMongoUpdater"; return "connectionsMongoUpdater";

View file

@ -9,6 +9,11 @@ import org.keycloak.provider.Spi;
*/ */
public class EventListenerSpi implements Spi { public class EventListenerSpi implements Spi {
@Override
public boolean isPrivate() {
return false;
}
@Override @Override
public String getName() { public String getName() {
return "eventsListener"; return "eventsListener";

View file

@ -9,6 +9,11 @@ import org.keycloak.provider.Spi;
*/ */
public class EventStoreSpi implements Spi { public class EventStoreSpi implements Spi {
@Override
public boolean isPrivate() {
return true;
}
@Override @Override
public String getName() { public String getName() {
return "eventsStore"; return "eventsStore";

View file

@ -9,6 +9,11 @@ import org.keycloak.provider.Spi;
*/ */
public class ExportSpi implements Spi { public class ExportSpi implements Spi {
@Override
public boolean isPrivate() {
return true;
}
@Override @Override
public String getName() { public String getName() {
return "export"; return "export";

View file

@ -9,6 +9,11 @@ import org.keycloak.provider.Spi;
*/ */
public class ImportSpi implements Spi { public class ImportSpi implements Spi {
@Override
public boolean isPrivate() {
return true;
}
@Override @Override
public String getName() { public String getName() {
return "import"; return "import";

View file

@ -9,6 +9,11 @@ import org.keycloak.provider.Spi;
*/ */
public class AccountSpi implements Spi { public class AccountSpi implements Spi {
@Override
public boolean isPrivate() {
return true;
}
@Override @Override
public String getName() { public String getName() {
return "account"; return "account";

View file

@ -8,6 +8,12 @@ import org.keycloak.provider.Spi;
* @author <a href="mailto:sthorger@redhat.com">Stian Thorgersen</a> * @author <a href="mailto:sthorger@redhat.com">Stian Thorgersen</a>
*/ */
public class ThemeSpi implements Spi { public class ThemeSpi implements Spi {
@Override
public boolean isPrivate() {
return true;
}
@Override @Override
public String getName() { public String getName() {
return "theme"; return "theme";

View file

@ -8,6 +8,12 @@ import org.keycloak.provider.Spi;
* @author <a href="mailto:sthorger@redhat.com">Stian Thorgersen</a> * @author <a href="mailto:sthorger@redhat.com">Stian Thorgersen</a>
*/ */
public class EmailSpi implements Spi { public class EmailSpi implements Spi {
@Override
public boolean isPrivate() {
return true;
}
@Override @Override
public String getName() { public String getName() {
return "email"; return "email";

View file

@ -8,6 +8,12 @@ import org.keycloak.provider.Spi;
* @author <a href="mailto:sthorger@redhat.com">Stian Thorgersen</a> * @author <a href="mailto:sthorger@redhat.com">Stian Thorgersen</a>
*/ */
public class LoginFormsSpi implements Spi { public class LoginFormsSpi implements Spi {
@Override
public boolean isPrivate() {
return true;
}
@Override @Override
public String getName() { public String getName() {
return "login"; return "login";

View file

@ -9,6 +9,11 @@ import org.keycloak.provider.Spi;
*/ */
public class MigrationSpi implements Spi { public class MigrationSpi implements Spi {
@Override
public boolean isPrivate() {
return true;
}
@Override @Override
public String getName() { public String getName() {
return "migration"; return "migration";

View file

@ -9,6 +9,11 @@ import org.keycloak.provider.Spi;
*/ */
public class RealmSpi implements Spi { public class RealmSpi implements Spi {
@Override
public boolean isPrivate() {
return true;
}
@Override @Override
public String getName() { public String getName() {
return "realm"; return "realm";

View file

@ -9,6 +9,11 @@ import org.keycloak.provider.Spi;
*/ */
public class UserFederationSpi implements Spi { public class UserFederationSpi implements Spi {
@Override
public boolean isPrivate() {
return false;
}
@Override @Override
public String getName() { public String getName() {
return "userFederation"; return "userFederation";

View file

@ -11,6 +11,11 @@ public class UserSessionSpi implements Spi {
public static final String NAME = "userSessions"; public static final String NAME = "userSessions";
@Override
public boolean isPrivate() {
return true;
}
@Override @Override
public String getName() { public String getName() {
return NAME; return NAME;

View file

@ -9,6 +9,11 @@ import org.keycloak.provider.Spi;
*/ */
public class UserSpi implements Spi { public class UserSpi implements Spi {
@Override
public boolean isPrivate() {
return true;
}
@Override @Override
public String getName() { public String getName() {
return "user"; return "user";

View file

@ -5,6 +5,7 @@ package org.keycloak.provider;
*/ */
public interface Spi { public interface Spi {
public boolean isPrivate();
public String getName(); public String getName();
public Class<? extends Provider> getProviderClass(); public Class<? extends Provider> getProviderClass();
public Class<? extends ProviderFactory> getProviderFactoryClass(); public Class<? extends ProviderFactory> getProviderFactoryClass();

View file

@ -10,6 +10,11 @@ import org.keycloak.provider.Spi;
*/ */
public class CacheRealmProviderSpi implements Spi { public class CacheRealmProviderSpi implements Spi {
@Override
public boolean isPrivate() {
return true;
}
@Override @Override
public String getName() { public String getName() {
return "realmCache"; return "realmCache";

View file

@ -10,6 +10,11 @@ import org.keycloak.provider.Spi;
*/ */
public class CacheUserProviderSpi implements Spi { public class CacheUserProviderSpi implements Spi {
@Override
public boolean isPrivate() {
return true;
}
@Override @Override
public String getName() { public String getName() {
return "userCache"; return "userCache";

View file

@ -9,6 +9,11 @@ import org.keycloak.provider.Spi;
*/ */
public class ClientImportSpi implements Spi { public class ClientImportSpi implements Spi {
@Override
public boolean isPrivate() {
return true;
}
@Override @Override
public String getName() { public String getName() {
return "client-import"; return "client-import";

View file

@ -9,6 +9,11 @@ import org.keycloak.provider.Spi;
*/ */
public class LoginProtocolSpi implements Spi { public class LoginProtocolSpi implements Spi {
@Override
public boolean isPrivate() {
return true;
}
@Override @Override
public String getName() { public String getName() {
return "login-protocol"; return "login-protocol";

View file

@ -9,6 +9,11 @@ import org.keycloak.provider.Spi;
*/ */
public class ProtocolMapperSpi implements Spi { public class ProtocolMapperSpi implements Spi {
@Override
public boolean isPrivate() {
return false;
}
@Override @Override
public String getName() { public String getName() {
return "protocol-mapper"; return "protocol-mapper";

View file

@ -9,6 +9,11 @@ import org.keycloak.provider.Spi;
*/ */
public class WellKnownSpi implements Spi { public class WellKnownSpi implements Spi {
@Override
public boolean isPrivate() {
return true;
}
@Override @Override
public String getName() { public String getName() {
return "well-known"; return "well-known";

View file

@ -28,6 +28,11 @@ public class SocialProviderSpi implements Spi {
public static final String SOCIAL_SPI_NAME = "social"; public static final String SOCIAL_SPI_NAME = "social";
@Override
public boolean isPrivate() {
return false;
}
@Override @Override
public String getName() { public String getName() {
return SOCIAL_SPI_NAME; return SOCIAL_SPI_NAME;

View file

@ -0,0 +1,34 @@
package org.keycloak.testsuite.utils;
import org.keycloak.provider.Spi;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
import java.util.ServiceLoader;
/**
* @author <a href="mailto:sthorger@redhat.com">Stian Thorgersen</a>
*/
public class ListSpi {
public static void main(String[] args) {
List<String> l = new LinkedList<>();
for (Spi s : ServiceLoader.load(Spi.class)) {
l.add(fixedLength(s.getName()) + s.isPrivate());
}
Collections.sort(l);
System.out.println(fixedLength("SPI") + "Private");
System.out.println("-------------------------------------");
for (String s : l) {
System.out.println(s);
}
}
public static String fixedLength(String s) {
while (s.length() < 30) {
s = s + " ";
}
return s;
}
}

View file

@ -8,6 +8,12 @@ import org.keycloak.provider.Spi;
* @author <a href="mailto:sthorger@redhat.com">Stian Thorgersen</a> * @author <a href="mailto:sthorger@redhat.com">Stian Thorgersen</a>
*/ */
public class TimerSpi implements Spi { public class TimerSpi implements Spi {
@Override
public boolean isPrivate() {
return true;
}
@Override @Override
public String getName() { public String getName() {
return "timer"; return "timer";