Examples of UserResource


Examples of com.example.helloworld.resources.UserResource

        final UserDAO dao = new UserDAO(hibernateBundle.getSessionFactory());
        final Client client = new JerseyClientBuilder(environment).using(configuration.getJerseyClient()).build(getName());
        final ClientSecretsConfiguration clientSecrets = configuration.getClientSecrets();
       
        environment.jersey().register(new ClientResource());
        environment.jersey().register(new UserResource(dao));
        environment.jersey().register(new AuthResource(client, dao, clientSecrets));
       
        environment.servlets().addFilter("AuthFilter", new AuthFilter())
          .addMappingForUrlPatterns(null, true, "/api/me");
    }
View Full Code Here

Examples of com.h2rd.refactoring.web.UserResource

    UserDao userDao;

    @Test
    public void getUsersTest() {

        userResource = new UserResource();
        userDao = UserDao.getUserDao();

        User user = new User();
        user.setName("fake user");
        user.setEmail("fake@user.com");
View Full Code Here

Examples of com.opengamma.web.analytics.rest.UserResource

      throw new OpenGammaRuntimeException("Neither " + marketDataSpecificationRepository().name() + " nor " + liveMarketDataProviderFactory().name() + " were specified");
    }
    repo.getRestComponents().publishResource(new WebUiResource(analyticsViewManager, connectionMgr));
    repo.getRestComponents().publishResource(new Compressor());
    repo.getRestComponents().publishResource(new LogResource());
    repo.getRestComponents().publishResource(new UserResource());
    repo.getRestComponents().publishResource(new BlotterResource(getSecurityMaster(), getPortfolioMaster(), getPositionMaster()));
    repo.getRestComponents().publishResource(new TimeSeriesResolverKeysResource(getConfigMaster()));
    repo.getRestComponents().publishHelper(new PrimitivesGridStructureMessageBodyWriter(columnWriter));
    repo.getRestComponents().publishHelper(new PortfolioGridStructureMessageBodyWriter(columnWriter));
    repo.getRestComponents().publishHelper(new DependencyGraphGridStructureMessageBodyWriter(columnWriter));
View Full Code Here

Examples of com.wesabe.grendel.resources.UserResource

     
      this.credentials = mock(Credentials.class);
      when(credentials.getPassword()).thenReturn("secret");
      when(credentials.buildSession(dao, "bob")).thenReturn(session);
     
      this.resource = new UserResource(dao, new Provider<SecureRandom>() {
        @Override
        public SecureRandom get() {
          return random;
        }
      });
View Full Code Here

Examples of org.apache.airavata.persistance.registry.jpa.resources.UserResource

            GatewayResource gatewayResource = new GatewayResource();
            gatewayResource.setGatewayName(RegistrySettings.getSetting("default.registry.gateway"));
            gatewayResource.setOwner(RegistrySettings.getSetting("default.registry.gateway"));
            gatewayResource.save();

            UserResource userResource = (UserResource) gatewayResource.create(ResourceType.USER);
            userResource.setUserName(RegistrySettings.getSetting("default.registry.user"));
            userResource.setPassword(RegistrySettings.getSetting("default.registry.password"));
            userResource.save();

            WorkerResource workerResource = (WorkerResource) gatewayResource.create(ResourceType.GATEWAY_WORKER);
            workerResource.setUser(userResource.getUserName());
            workerResource.save();
        } catch (RegistrySettingsException e) {
            logger.error("Unable to read properties", e);
        }
View Full Code Here

Examples of org.apache.airavata.persistance.registry.jpa.resources.UserResource

            GatewayResource gatewayResource = new GatewayResource();
            gatewayResource.setGatewayName(RegistrySettings.getSetting("default.registry.gateway"));
            gatewayResource.setOwner(RegistrySettings.getSetting("default.registry.gateway"));
            gatewayResource.save();

            UserResource userResource = (UserResource) gatewayResource.create(ResourceType.USER);
            userResource.setUserName(RegistrySettings.getSetting("default.registry.user"));
            userResource.setPassword(RegistrySettings.getSetting("default.registry.password"));
            userResource.save();

            WorkerResource workerResource = (WorkerResource) gatewayResource.create(ResourceType.GATEWAY_WORKER);
            workerResource.setUser(userResource.getUserName());
            workerResource.save();
        } catch (RegistrySettingsException e) {
            logger.error("Unable to read properties", e);
        }
    }
View Full Code Here

Examples of org.apache.airavata.persistance.registry.jpa.resources.UserResource

        try{
            GatewayResource gatewayResource = new GatewayResource();
            gatewayResource.setGatewayName(RegistrySettings.getSetting(REGISTRY_DEFAULT_GATEWAY_ID));
            gatewayResource.setOwner(RegistrySettings.getSetting(REGISTRY_DEFAULT_GATEWAY_ID));
            gatewayResource.save();
            UserResource userResource = (UserResource) gatewayResource.create(ResourceType.USER);
            userResource.setUserName(RegistrySettings.getSetting(REGISTRY_DEFAULT_USER));
            userResource.setPassword(RegistrySettings.getSetting(REGISTRY_DEFAULT_USER_PASSWORD));
            userResource.save();
            WorkerResource workerResource = (WorkerResource) gatewayResource.create(ResourceType.GATEWAY_WORKER);
            workerResource.setUser(userResource.getUserName());
            workerResource.save();
        } catch (RegistrySettingsException e) {
            logger.error("Unable to read properties", e);
        }
View Full Code Here

Examples of org.apache.airavata.persistance.registry.jpa.resources.UserResource

        try{
            GatewayResource gatewayResource = new GatewayResource();
            gatewayResource.setGatewayName(RegistrySettings.getSetting(REGISTRY_DEFAULT_GATEWAY_ID));
            gatewayResource.setOwner(RegistrySettings.getSetting(REGISTRY_DEFAULT_GATEWAY_ID));
            gatewayResource.save();
            UserResource userResource = (UserResource) gatewayResource.create(ResourceType.USER);
            userResource.setUserName(RegistrySettings.getSetting(REGISTRY_DEFAULT_USER));
            userResource.setPassword(RegistrySettings.getSetting(REGISTRY_DEFAULT_USER_PASSWORD));
            userResource.save();
            WorkerResource workerResource = (WorkerResource) gatewayResource.create(ResourceType.GATEWAY_WORKER);
            workerResource.setUser(userResource.getUserName());
            workerResource.save();
        } catch (RegistrySettingsException e) {
            logger.error("Unable to read properties", e);
        }
View Full Code Here

Examples of org.apache.airavata.persistance.registry.jpa.resources.UserResource

        GatewayResource gatewayResource = new GatewayResource();
        gatewayResource.setGatewayName((String) properties.get(GATEWAY_ID));
        gatewayResource.setOwner((String) properties.get(GATEWAY_ID));
        gatewayResource.save();

        UserResource userResource1 = (UserResource) gatewayResource.create(ResourceType.USER);
        userResource1.setUserName((String) properties.get(REGISTRY_USER));
        userResource1.setPassword((String) properties.get(REGISTRY_PASSWORD));
        userResource1.save();

        UserResource userResource2 = (UserResource) gatewayResource.create(ResourceType.USER);
        userResource2.setUserName("testUser");
        userResource2.setPassword("testPassword");
        userResource2.save();

        WorkerResource workerResource1 = (WorkerResource) gatewayResource.create(ResourceType.GATEWAY_WORKER);
        workerResource1.setUser(userResource1.getUserName());
        workerResource1.save();

        WorkerResource workerResource2 = (WorkerResource) gatewayResource.create(ResourceType.GATEWAY_WORKER);
        workerResource2.setUser(userResource2.getUserName());
        workerResource2.save();

    }
View Full Code Here

Examples of org.apache.airavata.persistance.registry.jpa.resources.UserResource

        GatewayResource gatewayResource = new GatewayResource();
        gatewayResource.setGatewayName((String) properties.get(GATEWAY_ID));
        gatewayResource.setOwner((String) properties.get(GATEWAY_ID));
        gatewayResource.save();

        UserResource userResource = (UserResource) gatewayResource.create(ResourceType.USER);
        userResource.setUserName((String) properties.get(REGISTRY_USER));
        userResource.setPassword((String) properties.get(REGISTRY_PASSWORD));
        userResource.save();

        WorkerResource workerResource = (WorkerResource) gatewayResource.create(ResourceType.GATEWAY_WORKER);
        workerResource.setUser(userResource.getUserName());
        workerResource.save();

    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.