コード例 #1
0
 // copy constructor
 public JobStepData(JobStepData source)
 {
     this.originalName   = source.originalName;
     this.currentName    = source.currentName;
     this.alreadyCreated = source.alreadyCreated;
     this.deleted        = source.deleted;
     this.command        = source.command;
     this.commandExecutionSuccessCode = source.commandExecutionSuccessCode;
     this.databaseName     = source.databaseName;
     this.databaseUserName = source.databaseUserName;
     this.server           = source.server;
     this.id               = source.id;
     this.originalId       = source.originalId;
     this.failureAction    = source.failureAction;
     this.failStep         = source.failStep;
     this.failStepId       = source.failStepId;
     this.successAction    = source.successAction;
     this.successStep      = source.successStep;
     this.successStepId    = source.successStepId;
     this.priority         = source.priority;
     this.outputFileName   = source.outputFileName;
     this.appendToLogFile  = source.appendToLogFile;
     this.appendToStepHist = source.appendToStepHist;
     this.writeLogToTable  = source.writeLogToTable;
     this.appendLogToTable = source.appendLogToTable;
     this.retryAttempts    = source.retryAttempts;
     this.retryInterval    = source.retryInterval;
     this.subSystem        = source.subSystem;
     this.proxyName        = source.proxyName;
     this.urn              = source.urn;
     this.parent           = source.parent;
 }
コード例 #2
0
        private void CheckAndLoadJobSteps()
        {
            if (this.jobSteps != null)
            {
                return;
            }

            this.jobSteps = new JobStepsData(context, this);
        }
コード例 #3
0
 // existing job step
 public JobStepData(JobStep source, JobStepsData parent)
 {
     this.parent = parent;
     LoadData(source);
 }
コード例 #4
0
 // new job step with context
 public JobStepData(JobStepsData parent)
 {
     this.parent = parent;
     SetDefaults();
 }
コード例 #5
0
        public JobData(CDataContainer data, AgentJobInfo jobInfo = null, ConfigAction configAction = ConfigAction.Create)
        {
            this.context = data;

            // get the job information
            STParameters parameters = new STParameters(this.context.Document);

            parameters.GetParam("job", ref this.originalName);
            parameters.GetParam("jobid", ref this.jobIdString);
            parameters.GetParam("script", ref this.script);
            parameters.GetParam("scriptName", ref this.scriptName);

            // get the Urn
            string urn = string.Empty;

            parameters.GetParam("urn", ref urn);

            if (urn != null && urn.Length > 0)
            {
                this.urn = new Urn(urn);
            }

            bool isMsxJob = false;

            parameters.GetParam("msxjob", ref isMsxJob);

            //If this is an MSX, initially set TargetLocalServers to false;
            if (isMsxJob)
            {
                this.targetLocalServer = false;
            }
            // we are in properties mode.
            if (configAction == ConfigAction.Update)
            {
                this.mode = ActionMode.Edit;
                CheckAndLoadGeneralData();
            }
            else if (this.script.Length > 0)
            {
                // we are creating a new job, but prepopulating
                // one step with the script passed to us
                this.mode = ActionMode.Create;
                this.Name = this.scriptName;
                SetDefaults();
                this.jobSteps = new JobStepsData(context, script, this);
            }
            // creating a new job
            else
            {
                this.mode = ActionMode.Create;
                // set defaults that do not involve going to the server to retrieve
                SetDefaults();
            }

            // load AgentJobInfo data
            if (jobInfo != null)
            {
                this.currentName = jobInfo.Name;
                this.owner       = jobInfo.Owner;
                this.description = jobInfo.Description;
                this.enabled     = jobInfo.Enabled;
            }
        }