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

@param       customResources new chunk custom  resources map to be added to chunk custom resources map
@return      a reference to this object.
Associates the specified chunk custom resource value with the specified key in chunk custom resources map . Chunk custom resources are used for building of QSUB command . Optional . @param customResources new chunk custom resources map to be added to chunk custom resources map @return a reference to this object .
public ChunkBuilder customResources(Map<String, String> customResources) {
            if (customResources == null) {
                throw new IllegalArgumentException("chunk custom resources map can not be null");
            }
            if (customResources.keySet().stream().anyMatch(Objects::isNull)) {
                throw new IllegalArgumentException("custom resources can not contain null key");
            }
            if (customResources.keySet().stream().map(key -> key.replace(" ", "")).anyMatch(String::isEmpty)) {
                throw new IllegalArgumentException("chunk custom resources can not contain empty as key");
            }
            if (customResources.values().stream().anyMatch(Objects::isNull)) {
                throw new IllegalArgumentException("chunk custom resources can not contain null value");
            }
            if (customResources.values().stream().map(key -> key.replace(" ", "")).anyMatch(String::isEmpty)) {
                throw new IllegalArgumentException("chunk custom resources map can not contain empty value");
            }
            if (this.customResources == null) {
                this.customResources = new HashMap<>();
            }
            this.customResources.putAll(customResources);
            return this;
        }
public ChunkBuilder customResources ( Map < String , String > customResources ) { if ( customResources == null ) { throw new IllegalArgumentException ( "chunk custom resources map can not be null" ) ; } if ( customResources . keySet ( ) . stream ( ) . anyMatch ( Objects :: isNull ) ) { throw new IllegalArgumentException ( "custom resources can not contain null key" ) ; } if ( customResources . keySet ( ) . stream ( ) . map ( key -> key . replace ( " " , "" ) ) . anyMatch ( String :: isEmpty ) ) { throw new IllegalArgumentException ( "chunk custom resources can not contain empty as key" ) ; } if ( customResources . values ( ) . stream ( ) . anyMatch ( Objects :: isNull ) ) { throw new IllegalArgumentException ( "chunk custom resources can not contain null value" ) ; } if ( customResources . values ( ) . stream ( ) . map ( key -> key . replace ( " " , "" ) ) . anyMatch ( String :: isEmpty ) ) { throw new IllegalArgumentException ( "chunk custom resources map can not contain empty value" ) ; } if ( this . customResources == null ) { this . customResources = new HashMap < > ( ) ; } this . customResources . putAll ( customResources ) ; return this ; }
Associates the specified chunk custom  resource value with the specified key in chunk custom  resources map.
Associates the specified chunk custom resource value with the specified key in chunk custom resources map .