Merge pull request #1248 from stianst/master

Added isPrivate to Spi
This commit is contained in:
Stian Thorgersen 2015-05-12 08:25:56 +02:00
commit 7f9739cd4f
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 {
@Override
public boolean isPrivate() {
return false;
}
@Override
public String getName() {
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";
@Override
public boolean isPrivate() {
return false;
}
@Override
public String getName() {
return IDENTITY_PROVIDER_SPI_NAME;

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -28,6 +28,11 @@ public class SocialProviderSpi implements Spi {
public static final String SOCIAL_SPI_NAME = "social";
@Override
public boolean isPrivate() {
return false;
}
@Override
public String getName() {
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>
*/
public class TimerSpi implements Spi {
@Override
public boolean isPrivate() {
return true;
}
@Override
public String getName() {
return "timer";