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 = ClassLoading.forName(jobClass, this); jinfo_ = new JobInfo(jobName, jobGroup, clazz); expression_ = props.getProperty("expression"); }
private void editSCVPreference(Application<Portlet> selectedPortlet, String prefValue, ExoProperties welcomeSCVCustomPreferences) throws Exception { // loads the scv preferences Portlet prefs = dataStorageService.load(selectedPortlet.getState(), ApplicationType.PORTLET); if (prefs == null) { if (LOG.isDebugEnabled()) { LOG.debug("The portlet prefs == null : portlet application " + selectedPortlet.getId()); } prefs = new Portlet(); } // edits the nodeIdentifier preference for (String preferenceName : welcomeSCVCustomPreferences.keySet()) { String preferenceValue = welcomeSCVCustomPreferences.get(preferenceName); if (preferenceValue.contains(SPACE_GROUP_ID_PREFERENCE)) { preferenceValue = preferenceValue.replace(SPACE_GROUP_ID_PREFERENCE, prefValue); } prefs.putPreference(new Preference(preferenceName, preferenceValue, false)); } }
if (addrsParam != null) for (Iterator it = addrsParam.getProperties().entrySet().iterator(); it.hasNext();)
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 = ClassLoading.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); }