Package org.exoplatform.commons.utils

Examples of org.exoplatform.commons.utils.ExoProperties


public class TestValidation
{
   public TestValidation(InitParams params)
   {
      PropertiesParam pp = params.getPropertiesParam("properties-param");
      ExoProperties ep = pp.getProperties();
      check(ep.containsKey("p1"));
      check(ep.containsKey("p2"));
      check(ep.containsKey("p3"));
      pp = params.getPropertiesParam("properties-param2");
      ep = pp.getProperties();
      check(ep.containsKey("p1"));
      check(ep.containsKey("p2"));
      check(ep.containsKey("p3"));
      MyBean bean = (MyBean)params.getObjectParam("object-param").getObject();
      check(bean.value.equals("value"));
      bean = (MyBean)params.getObjectParam("object-param2").getObject();
      check(bean.value.equals("value"));
      ValueParam vp = params.getValueParam("value-param");
View Full Code Here


  
   private JobDataMap jdatamap_;

   public CronJob(InitParams params) throws Exception
   {
      ExoProperties props = params.getPropertiesParam("cronjob.info").getProperties();

      String jobName = props.getProperty("jobName");
      String jobGroup = props.getProperty("groupName");
      String jobClass = props.getProperty("job");
      Class<?> clazz = Tools.forName(jobClass, this);
      jinfo_ = new JobInfo(jobName, jobGroup, clazz);

      expression_ = props.getProperty("expression");
   }
View Full Code Here

   private JobDataMap jdatamap_;

   public PeriodJob(InitParams params) throws Exception
   {
      ExoProperties props = params.getPropertiesParam("job.info").getProperties();

      String jobName = props.getProperty("jobName");
      String jobGroup = props.getProperty("groupName");
      String jobClass = props.getProperty("job");
      Class<?> clazz = Tools.forName(jobClass, this);
      jinfo_ = new JobInfo(jobName, jobGroup, clazz);

      Date startTime = getDate(props.getProperty("startTime"));
      Date endTime = getDate(props.getProperty("endTime"));
      int repeatCount = Integer.parseInt(props.getProperty("repeatCount"));
      long repeatInterval = Integer.parseInt(props.getProperty("period"));
      pjinfo_ = new PeriodInfo(startTime, endTime, repeatCount, repeatInterval);
   }
View Full Code Here

      if (params != null)
      {
         PropertiesParam param = params.getPropertiesParam("add.system.properties");
         if (param != null)
         {
            ExoProperties props = param.getProperties();
            Iterator i = props.entrySet().iterator();
            while (i.hasNext())
            {
               Map.Entry entry = (Map.Entry)i.next();
               PrivilegedSystemHelper.setProperty((String)entry.getKey(), (String)entry.getValue());
            }
View Full Code Here

TOP

Related Classes of org.exoplatform.commons.utils.ExoProperties

Copyright © 2018 www.massapicom. 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.