pbs-middleware-client/src/main/java/cz/muni/ll/middleware/client/jobs/domain/submitRequest/SubmitJobBuilder.java
/**
     * Method build {@code SubmitRequest} from values setup by builder.
     *
     * @return      SubmitRequest object.
     * @exception   IllegalArgumentException in case {@code template} and {@code connection} are {@code null}. At least must be set.
     * @exception   IllegalArgumentException in case {@code template} and {@code jobScript} are {@code null}. At least must be set.
     */
Method build  SubmitRequest from values setup by builder.
Method build SubmitRequest from values setup by builder .
public JobSubmit build() {
        if (templateId == null) {
            if (connection == null) {
                throw new IllegalStateException("Connection is mandatory if template id is not set!");
            }
            if (jobScript == null) {
                throw new IllegalStateException("Job script is mandatory if template id is not set!");
            }
        }
        if (this.resources == null) {
            this.resources = new Resources();
        }
        if (this.resources.getCustomResources() == null) {
            this.resources.setCustomResources(new HashMap<>());
        }
        return JobSubmit
                .builder()
                .templateId(this.templateId)
                .resources(this.resources)
                .queue(this.queue)
                .variables(this.variables)
                .workdir(this.workdir)
                .qsubPrefix(this.qsubPrefix)
                .jobScript(this.jobScript)
                .qsubSuffix(this.qsubSuffix)
                .stdout(this.stdout)
                .stderr(this.stderr)
                .arguments(this.arguments)
                .group(this.group)
                .jobName(this.jobName)
                .connection(this.connection)
                .handleStatusScript(this.handleStatusScript)
                .build();
    }
public JobSubmit build ( ) { if ( templateId == null ) { if ( connection == null ) { throw new IllegalStateException ( "Connection is mandatory if template id is not set!" ) ; } if ( jobScript == null ) { throw new IllegalStateException ( "Job script is mandatory if template id is not set!" ) ; } } if ( this . resources == null ) { this . resources = new Resources ( ) ; } if ( this . resources . getCustomResources ( ) == null ) { this . resources . setCustomResources ( new HashMap < > ( ) ) ; } return JobSubmit . builder ( ) . templateId ( this . templateId ) . resources ( this . resources ) . queue ( this . queue ) . variables ( this . variables ) . workdir ( this . workdir ) . qsubPrefix ( this . qsubPrefix ) . jobScript ( this . jobScript ) . qsubSuffix ( this . qsubSuffix ) . stdout ( this . stdout ) . stderr ( this . stderr ) . arguments ( this . arguments ) . group ( this . group ) . jobName ( this . jobName ) . connection ( this . connection ) . handleStatusScript ( this . handleStatusScript ) . build ( ) ; }
Method build {@code SubmitRequest} from values setup by builder.
Method build { @code SubmitRequest } from values setup by builder .
//                .jobStateCheckInterval(this.jobStateCheckInterval)