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

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


                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);
                projectResource.setGateway(gateway);
                projectResource.save();
            } catch (ApplicationSettingsException e) {
View Full Code Here


            userResource.setPassword(RegistrySettings.getSetting("default.registry.password"));
            userResource.save();

            WorkerResource workerResource = (WorkerResource) gatewayResource.create(ResourceType.GATEWAY_WORKER);
            workerResource.setUser(userResource.getUserName());
            workerResource.save();
           
            ProjectResource projectResource = (ProjectResource)workerResource.create(ResourceType.PROJECT);
            projectResource.setGateway(gatewayResource);
            projectResource.setId("default");
            projectResource.setName("default");
View Full Code Here

                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());
            } catch (Exception e) {
                e.printStackTrace();
                engine.getGUI().getErrorWindow().error(e.getMessage());
View Full Code Here

                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);
            }
        } catch (Exception e) {
            logger.error(e.getMessage(), e);
View Full Code Here

            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

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.