use of org.bimserver.webservices.impl.PluginServiceImpl 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;
}
Aggregations