58 lines
1.4 KiB
Java
58 lines
1.4 KiB
Java
/*
|
|
*
|
|
*/
|
|
package io.kumare.iqr.mod.authentication;
|
|
|
|
// java
|
|
import io.kumare.iqr.mod.authentication.store.AuthenticationEntities;
|
|
import java.util.Arrays;
|
|
import java.util.List;
|
|
// base
|
|
import io.kumare.lib.base.server.spring.store.jpa.EntityDescriptor;
|
|
// app
|
|
import io.kumare.iqr.app.module.AppModuleController;
|
|
// module
|
|
import io.kumare.iqr.mod.authentication.store.authuser.AuthUserStore;
|
|
import io.kumare.iqr.mod.authentication.store.authuserrelation.AuthUserRelationStore;
|
|
|
|
/**
|
|
*
|
|
* @author afatecha
|
|
*/
|
|
public class AuthenticationController extends AppModuleController {
|
|
|
|
// ::: api
|
|
//
|
|
@Override
|
|
public boolean hasStore(String name) {
|
|
return AuthenticationEntities.hasDescriptor(name);
|
|
}
|
|
|
|
@Override
|
|
public EntityDescriptor getEntityDescriptor(Class entityClass) {
|
|
return AuthenticationEntities.descriptorOf(entityClass);
|
|
}
|
|
|
|
@Override
|
|
public EntityDescriptor getEntityDescriptor(String name) {
|
|
return AuthenticationEntities.descriptorOf(name);
|
|
}
|
|
|
|
@Override
|
|
public List<EntityDescriptor> getEntityDescriptors() {
|
|
return Arrays.asList(AuthenticationEntities.values());
|
|
}
|
|
|
|
// ::: stores
|
|
//
|
|
public AuthUserStore getAuthUserStore() {
|
|
return getService(AuthUserStore.class);
|
|
}
|
|
|
|
public AuthUserRelationStore getAuthUserRelationStore() {
|
|
return getService(AuthUserRelationStore.class);
|
|
}
|
|
|
|
|
|
}
|