/** * Creates a clone of this scheduled job.<p> * * The clone will not be active in the scheduler until it is scheduled * with <code>{@link CmsScheduleManager#scheduleJob(org.opencms.file.CmsObject, CmsScheduledJobInfo)}</code>. * The job id returned by <code>{@link #getId()}</code> will be the same. * The <code>{@link #isActive()}</code> flag will be set to false. * The clones job instance class will be the same * if the <code>{@link #isReuseInstance()}</code> flag is set.<p> * * @see java.lang.Object#clone() */ @Override public Object clone() { CmsScheduledJobInfo result = new CmsScheduledJobInfo(); result.m_id = m_id; result.m_active = false; result.m_frozen = false; result.m_className = m_className; if (isReuseInstance()) { result.m_jobInstance = m_jobInstance; } result.m_reuseInstance = m_reuseInstance; result.m_context = (CmsContextInfo)m_context.clone(); result.m_cronExpression = m_cronExpression; result.m_jobName = m_jobName; result.m_parameters = new TreeMap(m_parameters); result.m_trigger = null; return result; }
/** * Creates a clone of this scheduled job.<p> * * The clone will not be active in the scheduler until it is scheduled * with <code>{@link CmsScheduleManager#scheduleJob(org.opencms.file.CmsObject, CmsScheduledJobInfo)}</code>. * The job id returned by <code>{@link #getId()}</code> will be the same. * The <code>{@link #isActive()}</code> flag will be set to false. * The clones job instance class will be the same * if the <code>{@link #isReuseInstance()}</code> flag is set.<p> * * @see java.lang.Object#clone() */ @Override public Object clone() { CmsScheduledJobInfo result = new CmsScheduledJobInfo(); result.m_id = m_id; result.m_active = false; result.m_frozen = false; result.m_className = m_className; if (isReuseInstance()) { result.m_jobInstance = m_jobInstance; } result.m_reuseInstance = m_reuseInstance; result.m_context = (CmsContextInfo)m_context.clone(); result.m_cronExpression = m_cronExpression; result.m_jobName = m_jobName; result.m_parameters = new TreeMap<String, String>(m_parameters); result.m_trigger = null; return result; }
/** * @see com.vaadin.data.Validator#validate(java.lang.Object) */ public void validate(Object value) throws InvalidValueException { CmsScheduledJobInfo info = new CmsScheduledJobInfo(); String name = (String)value; try { info.setJobName(name); } catch (CmsIllegalArgumentException e) { throw new InvalidValueException(e.getLocalizedMessage(A_CmsUI.get().getLocale())); } } }
m_jobInfo = new CmsScheduledJobInfo(); m_jobInfo.setContextInfo(new CmsContextInfo()); } else {
CmsScheduledJobInfo job = new CmsScheduledJobInfo();
/** * @see com.vaadin.data.Validator#validate(java.lang.Object) */ public void validate(Object value) throws InvalidValueException { CmsScheduledJobInfo info = new CmsScheduledJobInfo(); // Job name may be needed in exception try { info.setJobName(m_fieldJobName.getValue()); } catch (CmsRuntimeException e) { throw new InvalidValueException(e.getLocalizedMessage(A_CmsUI.get().getLocale())); } String stringValue = (String)value; try { info.setCronExpression(stringValue); } catch (CmsIllegalArgumentException e) { throw new InvalidValueException(e.getLocalizedMessage(A_CmsUI.get().getLocale())); } } }
/** * @see com.vaadin.data.Validator#validate(java.lang.Object) */ public void validate(Object value) throws InvalidValueException { CmsScheduledJobInfo info = new CmsScheduledJobInfo(); String stringValue = (String)value; // Job name may be needed in exception try { info.setJobName(m_fieldJobName.getValue()); } catch (CmsRuntimeException e) { throw new InvalidValueException(e.getLocalizedMessage(A_CmsUI.get().getLocale())); } try { info.setClassName(stringValue); } catch (CmsIllegalArgumentException e) { throw new InvalidValueException(e.getLocalizedMessage(A_CmsUI.get().getLocale())); } } }
CmsScheduledJobInfo job = new CmsScheduledJobInfo();
CmsScheduledJobInfo job = new CmsScheduledJobInfo();
job = new CmsScheduledJobInfo(); job.setContextInfo(new CmsContextInfo());