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

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


            }else{
                config = ResourceUtils.createConfiguration(key);
            }
            config.setConfigVal(value);
            config.setExpireDate(new Timestamp(expire.getTime()));
            config.save();
        }
    }

    public void addConfiguration(String key, String value, Date expire) {
        if (configurationRegistry != null){
View Full Code Here


            configurationRegistry.addConfiguration(key, value, expire);
        } else {
            ConfigurationResource config = ResourceUtils.createConfiguration(key);
            config.setConfigVal(value);
            config.setExpireDate(new Timestamp(expire.getTime()));
            config.save();
        }


    }
View Full Code Here

        Calendar calender = Calendar.getInstance();
        java.util.Date d = calender.getTime();
        Timestamp currentTime = new Timestamp(d.getTime());
        configuration.setExpireDate(currentTime);
        configuration.setCategoryID("SYSTEM");
        configuration.save();

        assertTrue("Configuration Save succuessful", ResourceUtils.isConfigurationExist("testConfigKey"));
        //remove test configuration
        ResourceUtils.removeConfiguration("testConfigKey");
    }
View Full Code Here

            }else{
                config = ResourceUtils.createConfiguration(key);
            }
            config.setConfigVal(value);
            config.setExpireDate(new Timestamp(expire.getTime()));
            config.save();
        }
    }

    public void addConfiguration(String key, String value, Date expire) throws RegistryException{
        if (configurationRegistry != null){
View Full Code Here

            configurationRegistry.addConfiguration(key, value, expire);
        } else {
            ConfigurationResource config = ResourceUtils.createConfiguration(key);
            config.setConfigVal(value);
            config.setExpireDate(new Timestamp(expire.getTime()));
            config.save();
        }


    }
View Full Code Here

        Calendar calender = Calendar.getInstance();
        java.util.Date d = calender.getTime();
        Timestamp currentTime = new Timestamp(d.getTime());
        configuration.setExpireDate(currentTime);
        configuration.setCategoryID("SYSTEM");
        configuration.save();

        assertTrue("Configuration Save succuessful", ResourceUtils.isConfigurationExist("testConfigKey"));
        //remove test configuration
        ResourceUtils.removeConfiguration("testConfigKey");
    }
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.