pbs-middleware-client/src/main/java/cz/muni/ll/middleware/client/jobs/domain/submitRequest/SubmitJobBuilder.java
/**
     * Associates the specified custom resource value with the specified key in custom resources map.
     * Custom resources are used for building of QSUB command. Optional.
     *
     * @param       key custom resource key with which the specified custom resource value is to be associated
     * @param       value custom resource value to be associated with the specified custom resource key
     * @return      a reference to this object.
     * @exception   IllegalArgumentException in case {@code key} is {@code null}
     * @exception   IllegalArgumentException in case {@code value} is {@code null}
     * @exception   IllegalArgumentException in case {@code key} is blank string
     * @exception   IllegalArgumentException in case {@code value} is blank string
     */
Associates the specified custom resource value with the specified key in custom resources map.
Custom resources are used for building of QSUB command. Optional.

@param       key custom resource key with which the specified custom resource value is to be associated
@param       value custom resource value to be associated with the specified custom resource key
@return      a reference to this object.
@exception   IllegalArgumentException in case  key is  null
@exception   IllegalArgumentException in case  value is  null
@exception   IllegalArgumentException in case  key is blank string
@exception   IllegalArgumentException in case  value is blank string
Associates the specified custom resource value with the specified key in custom resources map . Custom resources are used for building of QSUB command . Optional . @param key custom resource key with which the specified custom resource value is to be associated @param value custom resource value to be associated with the specified custom resource key @return a reference to this object . @exception IllegalArgumentException in case key is null @exception IllegalArgumentException in case value is null @exception IllegalArgumentException in case key is blank string @exception IllegalArgumentException in case value is blank string
public SubmitJobBuilder customResource(String key, String value) {
        if (key == null) {
            throw new IllegalArgumentException("custom resource key can not be null");
        }
        if (value == null) {
            throw new IllegalArgumentException("custom resource value can not be null");
        }
        if (key.replace(" ", "").isEmpty()) {
            throw new IllegalArgumentException("custom resource key can not be empty string");
        }
        if (value.replace(" ", "").isEmpty()) {
            throw new IllegalArgumentException("custom resource value can not be empty string");
        }
        if (resources == null) {
            this.resources = new Resources();
        }
        if (this.resources.getCustomResources() == null) {
            this.resources.setCustomResources(new HashMap<>());
        }
        this.resources.getCustomResources().put(key, value);
        return this;
    }
public SubmitJobBuilder customResource ( String key , String value ) { if ( key == null ) { throw new IllegalArgumentException ( "custom resource key can not be null" ) ; } if ( value == null ) { throw new IllegalArgumentException ( "custom resource value can not be null" ) ; } if ( key . replace ( " " , "" ) . isEmpty ( ) ) { throw new IllegalArgumentException ( "custom resource key can not be empty string" ) ; } if ( value . replace ( " " , "" ) . isEmpty ( ) ) { throw new IllegalArgumentException ( "custom resource value can not be empty string" ) ; } if ( resources == null ) { this . resources = new Resources ( ) ; } if ( this . resources . getCustomResources ( ) == null ) { this . resources . setCustomResources ( new HashMap < > ( ) ) ; } this . resources . getCustomResources ( ) . put ( key , value ) ; return this ; }
Associates the specified custom resource value with the specified key in custom resources map.
Associates the specified custom resource value with the specified key in custom resources map .