Package org.apache.airavata.persistance.registry.jpa.resources

Examples of org.apache.airavata.persistance.registry.jpa.resources.UserResource.save()


            }
            try{
                GatewayResource gateway = (GatewayResource)ResourceUtils.createGateway(ServerSettings.getSystemUserGateway());
                gateway.save();
                UserResource user = ResourceUtils.createUser(ServerSettings.getSystemUser(), ServerSettings.getSystemUserPassword());
                user.save();
                WorkerResource workerResource = (WorkerResource)gateway.create(ResourceType.GATEWAY_WORKER);
                workerResource.setUser(user.getUserName());
                workerResource.save();
                ProjectResource projectResource = workerResource.createProject(DEFAULT_PROJECT_NAME);
                projectResource.setName(DEFAULT_PROJECT_NAME);
View Full Code Here


            gatewayResource.save();
           
            UserResource userResource = new UserResource();
            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();
           
View Full Code Here

//                Properties properties = Utils.loadProperties();
                GatewayResource gatewayResource = (GatewayResource)ResourceUtils.getGateway(getGatewayName());
                UserResource userResource = (UserResource) gatewayResource.create(ResourceType.USER);
                userResource.setUserName(getUsername());
                userResource.setPassword(getPassword());
                userResource.save();
                WorkerResource workerResource = (WorkerResource) gatewayResource.create(ResourceType.GATEWAY_WORKER);
                workerResource.setUser(userResource.getUserName());
                workerResource.save();
                setUserCreated(true);
//                JCRComponentRegistry registry = new JCRComponentRegistry(getUsername(),getPassword());
View Full Code Here

                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

            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) {
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.