/** * Controls if the job instance class is reused for this job, * of if a new instance is generated every time the job is run.<p> * * @param reuseInstance must be true if the job instance class is to be reused */ public void setReuseInstance(boolean reuseInstance) { checkFrozen(); m_reuseInstance = reuseInstance; }
/** * Sets the active state of this job.<p> * * @param active the active state to set */ public void setActive(boolean active) { checkFrozen(); m_active = active; }
/** * Sets the is used for scheduling this job.<p> * * This is an internal operation that should only by performed by the * <code>{@link CmsScheduleManager}</code>, never by using this API directly.<p> * * @param id the id to set */ protected void setId(String id) { checkFrozen(); m_id = id; }
/** * Sets the active state of this job.<p> * * @param active the active state to set */ public void setActive(boolean active) { checkFrozen(); m_active = active; }
/** * Sets the is used for scheduling this job.<p> * * This is an internal operation that should only by performed by the * <code>{@link CmsScheduleManager}</code>, never by using this API directly.<p> * * @param id the id to set */ protected void setId(String id) { checkFrozen(); m_id = id; }
/** * Sets the Quartz trigger used for scheduling this job.<p> * * This is an internal operation that should only by performed by the * <code>{@link CmsScheduleManager}</code>, never by using this API directly.<p> * * @param trigger the Quartz trigger to set */ protected void setTrigger(Trigger trigger) { checkFrozen(); m_trigger = trigger; }
/** * Sets the Quartz trigger used for scheduling this job.<p> * * This is an internal operation that should only by performed by the * <code>{@link CmsScheduleManager}</code>, never by using this API directly.<p> * * @param trigger the Quartz trigger to set */ protected void setTrigger(Trigger trigger) { checkFrozen(); m_trigger = trigger; }
/** * Controls if the job instance class is reused for this job, * of if a new instance is generated every time the job is run.<p> * * @param reuseInstance must be true if the job instance class is to be reused */ public void setReuseInstance(boolean reuseInstance) { checkFrozen(); m_reuseInstance = reuseInstance; }
/** * @see org.opencms.configuration.I_CmsConfigurationParameterHandler#addConfigurationParameter(java.lang.String, java.lang.String) */ public void addConfigurationParameter(String paramName, String paramValue) { checkFrozen(); // add the configured parameter m_parameters.put(paramName, paramValue); if (LOG.isDebugEnabled()) { LOG.debug(org.opencms.configuration.Messages.get().getBundle().key( org.opencms.configuration.Messages.LOG_ADD_CONFIG_PARAM_3, paramName, paramValue, this)); } }
/** * @see org.opencms.configuration.I_CmsConfigurationParameterHandler#addConfigurationParameter(java.lang.String, java.lang.String) */ public void addConfigurationParameter(String paramName, String paramValue) { checkFrozen(); // add the configured parameter m_parameters.put(paramName, paramValue); if (LOG.isDebugEnabled()) { LOG.debug( org.opencms.configuration.Messages.get().getBundle().key( org.opencms.configuration.Messages.LOG_ADD_CONFIG_PARAM_3, paramName, paramValue, this)); } }
/** * Sets the job name.<p> * * @param jobName the job name to set */ public void setJobName(String jobName) { checkFrozen(); if (CmsStringUtil.isEmpty(jobName) || !jobName.trim().equals(jobName)) { throw new CmsIllegalArgumentException(Messages.get().container(Messages.ERR_BAD_JOB_NAME_1, jobName)); } m_jobName = jobName; }
/** * Sets the job name.<p> * * @param jobName the job name to set */ public void setJobName(String jobName) { checkFrozen(); if (CmsStringUtil.isEmpty(jobName) || !jobName.trim().equals(jobName)) { throw new CmsIllegalArgumentException(Messages.get().container(Messages.ERR_BAD_JOB_NAME_1, jobName)); } m_jobName = jobName; }
/** * Sets the job parameters.<p> * * @param parameters the parameters to set */ public void setParameters(SortedMap<String, String> parameters) { checkFrozen(); if (parameters == null) { throw new CmsIllegalArgumentException(Messages.get().container(Messages.ERR_BAD_JOB_PARAMS_0)); } // make sure the parameters are a sorted map m_parameters = new TreeMap<String, String>(parameters); }
/** * Sets the job parameters.<p> * * @param parameters the parameters to set */ public void setParameters(SortedMap parameters) { checkFrozen(); if (parameters == null) { throw new CmsIllegalArgumentException(Messages.get().container(Messages.ERR_BAD_JOB_PARAMS_0)); } // make sure the parameters are a sorted map m_parameters = new TreeMap(parameters); }
/** * Sets the context information for the user executing the job.<p> * * This will also "freeze" the context information that is set.<p> * * @param contextInfo the context information for the user executing the job * * @see CmsContextInfo#freeze() */ public void setContextInfo(CmsContextInfo contextInfo) { checkFrozen(); if (contextInfo == null) { throw new CmsIllegalArgumentException(Messages.get().container(Messages.ERR_BAD_CONTEXT_INFO_0)); } m_context = contextInfo; }
/** * Sets the context information for the user executing the job.<p> * * This will also "freeze" the context information that is set.<p> * * @param contextInfo the context information for the user executing the job * * @see CmsContextInfo#freeze() */ public void setContextInfo(CmsContextInfo contextInfo) { checkFrozen(); if (contextInfo == null) { throw new CmsIllegalArgumentException(Messages.get().container(Messages.ERR_BAD_CONTEXT_INFO_0)); } m_context = contextInfo; }
/** * Sets the cron expression for this job entry.<p> * * @param cronExpression the cron expression to set */ public void setCronExpression(String cronExpression) { checkFrozen(); try { // check if the cron expression is valid new CronTrigger().setCronExpression(cronExpression); } catch (Exception e) { throw new CmsIllegalArgumentException( Messages.get().container(Messages.ERR_BAD_CRON_EXPRESSION_2, getJobName(), cronExpression)); } m_cronExpression = cronExpression; }
/** * Sets the cron expression for this job entry.<p> * * @param cronExpression the cron expression to set */ public void setCronExpression(String cronExpression) { checkFrozen(); try { // check if the cron expression is valid new CronTrigger().setCronExpression(cronExpression); } catch (Exception e) { throw new CmsIllegalArgumentException(Messages.get().container( Messages.ERR_BAD_CRON_EXPRESSION_2, getJobName(), cronExpression)); } m_cronExpression = cronExpression; }
checkFrozen(); if (className != null) {
checkFrozen(); if (!CmsStringUtil.isValidJavaClassName(className)) { CmsMessageContainer message = Messages.get().container(Messages.ERR_BAD_JOB_CLASS_NAME_1, className);