/** * Updates the request time in the internal context information of the user with the current system time.<p> * * This is required before executing the job, otherwise the context information request time would be the time * the context object was initially created.<p> */ protected void updateContextRequestTime() { CmsContextInfo context = (CmsContextInfo)m_context.clone(); context.setRequestTime(System.currentTimeMillis()); context.freeze(); m_context = context; } }
/** * Updates the request time in the internal context information of the user with the current system time.<p> * * This is required before executing the job, otherwise the context information request time would be the time * the context object was initially created.<p> */ protected void updateContextRequestTime() { CmsContextInfo context = (CmsContextInfo)m_context.clone(); context.setRequestTime(System.currentTimeMillis()); context.freeze(); m_context = context; } }
/** * 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; }