Search in sources :

Example 1 with AdminServiceImpl

use of org.bimserver.webservices.impl.AdminServiceImpl in project BIMserver by opensourceBIM.

the class ServiceMap method get.

@SuppressWarnings("unchecked")
public <T extends PublicInterface> T get(Class<T> clazz) {
    PublicInterface publicInterface = interfaces.get(clazz);
    if (publicInterface != null) {
        return (T) publicInterface;
    }
    if (clazz == ServiceInterface.class) {
        publicInterface = new ServiceImpl(this);
    } else if (clazz == NewServicesInterface.class) {
        publicInterface = new NewServicesImpl(this);
    } else if (clazz == AuthInterface.class) {
        publicInterface = new AuthServiceImpl(this);
    } else if (clazz == AdminInterface.class) {
        publicInterface = new AdminServiceImpl(this);
    } else if (clazz == LowLevelInterface.class) {
        publicInterface = new LowLevelServiceImpl(this);
    } else if (clazz == MetaInterface.class) {
        publicInterface = new MetaServiceImpl(this);
    } else if (clazz == SettingsInterface.class) {
        publicInterface = new SettingsServiceImpl(this);
    } else if (clazz == RemoteServiceInterface.class) {
        publicInterface = new RemoteServiceImpl(bimServer, this);
    } else if (clazz == NotificationRegistryInterface.class) {
        publicInterface = new NotificationRegistryServiceImpl(this);
    } else if (clazz == NotificationInterface.class) {
        publicInterface = new NotificationInterfaceAdaptor();
    } else if (clazz == PluginInterface.class) {
        publicInterface = new PluginServiceImpl(this);
    } else if (clazz == OAuthInterface.class) {
        publicInterface = new OAuthServiceImpl(this);
    } else {
        throw new RuntimeException("Unknown interface: " + clazz.getName());
    }
    interfaces.put((Class<PublicInterface>) clazz, publicInterface);
    return (T) publicInterface;
}
Also used : RemoteServiceInterface(org.bimserver.shared.interfaces.RemoteServiceInterface) NewServicesInterface(org.bimserver.shared.interfaces.NewServicesInterface) AuthServiceImpl(org.bimserver.webservices.impl.AuthServiceImpl) AdminServiceImpl(org.bimserver.webservices.impl.AdminServiceImpl) OAuthServiceImpl(org.bimserver.webservices.impl.OAuthServiceImpl) LowLevelServiceImpl(org.bimserver.webservices.impl.LowLevelServiceImpl) MetaServiceImpl(org.bimserver.webservices.impl.MetaServiceImpl) ServiceImpl(org.bimserver.webservices.impl.ServiceImpl) PluginServiceImpl(org.bimserver.webservices.impl.PluginServiceImpl) RemoteServiceImpl(org.bimserver.webservices.impl.RemoteServiceImpl) NotificationRegistryServiceImpl(org.bimserver.webservices.impl.NotificationRegistryServiceImpl) SettingsServiceImpl(org.bimserver.webservices.impl.SettingsServiceImpl) OAuthInterface(org.bimserver.shared.interfaces.OAuthInterface) OAuthServiceImpl(org.bimserver.webservices.impl.OAuthServiceImpl) PluginServiceImpl(org.bimserver.webservices.impl.PluginServiceImpl) NotificationRegistryServiceImpl(org.bimserver.webservices.impl.NotificationRegistryServiceImpl) AdminInterface(org.bimserver.shared.interfaces.AdminInterface) AsyncAdminInterface(org.bimserver.shared.interfaces.async.AsyncAdminInterface) MetaInterface(org.bimserver.shared.interfaces.MetaInterface) AsyncMetaInterface(org.bimserver.shared.interfaces.async.AsyncMetaInterface) MetaServiceImpl(org.bimserver.webservices.impl.MetaServiceImpl) AdminServiceImpl(org.bimserver.webservices.impl.AdminServiceImpl) SettingsServiceImpl(org.bimserver.webservices.impl.SettingsServiceImpl) PublicInterface(org.bimserver.shared.interfaces.PublicInterface) NewServicesImpl(org.bimserver.webservices.impl.NewServicesImpl) LowLevelServiceImpl(org.bimserver.webservices.impl.LowLevelServiceImpl) RemoteServiceImpl(org.bimserver.webservices.impl.RemoteServiceImpl) AuthServiceImpl(org.bimserver.webservices.impl.AuthServiceImpl) OAuthServiceImpl(org.bimserver.webservices.impl.OAuthServiceImpl) NotificationInterface(org.bimserver.shared.interfaces.NotificationInterface) NotificationInterfaceAdaptor(org.bimserver.shared.interfaces.NotificationInterfaceAdaptor)

Aggregations

AdminInterface (org.bimserver.shared.interfaces.AdminInterface)1 MetaInterface (org.bimserver.shared.interfaces.MetaInterface)1 NewServicesInterface (org.bimserver.shared.interfaces.NewServicesInterface)1 NotificationInterface (org.bimserver.shared.interfaces.NotificationInterface)1 NotificationInterfaceAdaptor (org.bimserver.shared.interfaces.NotificationInterfaceAdaptor)1 OAuthInterface (org.bimserver.shared.interfaces.OAuthInterface)1 PublicInterface (org.bimserver.shared.interfaces.PublicInterface)1 RemoteServiceInterface (org.bimserver.shared.interfaces.RemoteServiceInterface)1 AsyncAdminInterface (org.bimserver.shared.interfaces.async.AsyncAdminInterface)1 AsyncMetaInterface (org.bimserver.shared.interfaces.async.AsyncMetaInterface)1 AdminServiceImpl (org.bimserver.webservices.impl.AdminServiceImpl)1 AuthServiceImpl (org.bimserver.webservices.impl.AuthServiceImpl)1 LowLevelServiceImpl (org.bimserver.webservices.impl.LowLevelServiceImpl)1 MetaServiceImpl (org.bimserver.webservices.impl.MetaServiceImpl)1 NewServicesImpl (org.bimserver.webservices.impl.NewServicesImpl)1 NotificationRegistryServiceImpl (org.bimserver.webservices.impl.NotificationRegistryServiceImpl)1 OAuthServiceImpl (org.bimserver.webservices.impl.OAuthServiceImpl)1 PluginServiceImpl (org.bimserver.webservices.impl.PluginServiceImpl)1 RemoteServiceImpl (org.bimserver.webservices.impl.RemoteServiceImpl)1 ServiceImpl (org.bimserver.webservices.impl.ServiceImpl)1