final Map < String , String > getExecutionProperties ( Object task ) { if ( task == null ) // NullPointerException is required per the JavaDoc API throw new NullPointerException ( Tr . formatMessage ( tc , "CWWKC1111.task.invalid" , ( Object ) null ) ) ; Map < String , String > execProps = task instanceof ManagedTask ? ( ( ManagedTask ) task ) . getExecutionProperties ( ) : null ; if ( execProps == null ) execProps = defaultExecutionProperties . get ( ) ; else { execProps = new TreeMap < String , String > ( execProps ) ; String tranProp = execProps . remove ( ManagedTask . TRANSACTION ) ; if ( tranProp != null && ! ManagedTask . SUSPEND . equals ( tranProp ) ) // USE_TRANSACTION_OF_EXECUTION_THREAD not valid for managed tasks throw new RejectedExecutionException ( Tr . formatMessage ( tc , "CWWKC1130.xprop.value.invalid" , name , ManagedTask . TRANSACTION , tranProp ) ) ; if ( ! execProps . containsKey ( WSContextService . DEFAULT_CONTEXT ) ) execProps . put ( WSContextService . DEFAULT_CONTEXT , WSContextService . UNCONFIGURED_CONTEXT_TYPES ) ; if ( ! execProps . containsKey ( WSContextService . TASK_OWNER ) ) execProps . put ( WSContextService . TASK_OWNER , name . get ( ) ) ; } return execProps ; }
Returns execution properties for the task .