private void readParameters ( ) { ItemRuleMap parameterItemRuleMap = getRequestRule ( ) . getParameterItemRuleMap ( ) ; if ( parameterItemRuleMap != null && ! parameterItemRuleMap . isEmpty ( ) ) { ItemRuleList parameterItemRuleList = new ItemRuleList ( parameterItemRuleMap . values ( ) ) ; determineSimpleMode ( parameterItemRuleList ) ; if ( procedural ) { console . setStyle ( "GREEN" ) ; console . writeLine ( "Required parameters:" ) ; console . styleOff ( ) ; if ( ! simpleInputMode ) { for ( ItemRule itemRule : parameterItemRuleList ) { Token [ ] tokens = itemRule . getAllTokens ( ) ; if ( tokens == null ) { Token t = new Token ( TokenType . PARAMETER , itemRule . getName ( ) ) ; t . setDefaultValue ( itemRule . getDefaultValue ( ) ) ; tokens = new Token [ ] { t } ; } String mandatoryMarker = itemRule . isMandatory ( ) ? " * " : " " ; console . setStyle ( "YELLOW" ) ; console . write ( mandatoryMarker ) ; console . styleOff ( ) ; console . setStyle ( "bold" ) ; console . write ( itemRule . getName ( ) ) ; console . styleOff ( ) ; console . write ( ": " ) ; writeToken ( tokens ) ; console . writeLine ( ) ; } } } readRequiredParameters ( parameterItemRuleList ) ; } }
Read required input parameters .