private Map<String, String> mapForPhase(String phaseName) { HasPhaseOptions phase = getPM().getPhase(phaseName); if (phase == null) { return null; } return mapForPhase(phase); }
public void setPhaseOptionIfUnset(String phaseName, String option) { Map<String, String> optionMap = mapForPhase(phaseName); if (optionMap == null) { throw new RuntimeException("No such phase " + phaseName); } if (optionMap.containsKey(getKey(option))) { return; } if (!declaresOption(phaseName, getKey(option))) { throw new RuntimeException("No option " + option + " for phase " + phaseName); } optionMap.put(getKey(option), getValue(option)); }
public boolean setPhaseOption(HasPhaseOptions phase, String option) { Map<String, String> optionMap = mapForPhase(phase); if (!checkParentEnabled(phase.getPhaseName())) { return false; } if (optionMap == null) { logger.debug("" + "Option " + option + " given for nonexistent" + " phase " + phase.getPhaseName()); return false; } String key = getKey(option); if (key.equals("enabled") && getValue(option).equals("true")) { resetRadioPack(phase.getPhaseName()); } if (declaresOption(phase, key)) { optionMap.put(key, getValue(option)); return true; } logger.debug("" + "Invalid option " + option + " for phase " + phase.getPhaseName()); return false; }
private Map<String, String> mapForPhase( String phaseName ) { HasPhaseOptions phase = getPM().getPhase( phaseName ); if( phase == null ) return null; return mapForPhase( phase ); }
private Map<String, String> mapForPhase( String phaseName ) { HasPhaseOptions phase = getPM().getPhase( phaseName ); if( phase == null ) return null; return mapForPhase( phase ); }
public void setPhaseOptionIfUnset( String phaseName, String option ) { Map<String, String> optionMap = mapForPhase( phaseName ); if( optionMap == null ) throw new RuntimeException( "No such phase "+phaseName ); if( optionMap.containsKey( getKey( option ) ) ) return; if( !declaresOption( phaseName, getKey( option ) ) ) throw new RuntimeException( "No option "+option+" for phase "+phaseName ); optionMap.put( getKey( option ), getValue( option ) ); }
public void setPhaseOptionIfUnset( String phaseName, String option ) { Map<String, String> optionMap = mapForPhase( phaseName ); if( optionMap == null ) throw new RuntimeException( "No such phase "+phaseName ); if( optionMap.containsKey( getKey( option ) ) ) return; if( !declaresOption( phaseName, getKey( option ) ) ) throw new RuntimeException( "No option "+option+" for phase "+phaseName ); optionMap.put( getKey( option ), getValue( option ) ); }
public boolean setPhaseOption( HasPhaseOptions phase, String option ) { Map<String, String> optionMap = mapForPhase( phase ); if( !checkParentEnabled( phase.getPhaseName() ) ) return false; if( optionMap == null ) { G.v().out.println( "Option "+option+" given for nonexistent" +" phase "+phase.getPhaseName() ); return false; } String key = getKey( option ); if( key.equals( "enabled" ) && getValue( option ).equals( "true" ) ) { resetRadioPack( phase.getPhaseName() ); } if( declaresOption( phase, key ) ) { optionMap.put( key, getValue( option ) ); return true; } G.v().out.println( "Invalid option "+option+" for phase "+phase.getPhaseName() ); return false; }
public boolean setPhaseOption( HasPhaseOptions phase, String option ) { Map<String, String> optionMap = mapForPhase( phase ); if( !checkParentEnabled( phase.getPhaseName() ) ) return false; if( optionMap == null ) { G.v().out.println( "Option "+option+" given for nonexistent" +" phase "+phase.getPhaseName() ); return false; } String key = getKey( option ); if( key.equals( "enabled" ) && getValue( option ).equals( "true" ) ) { resetRadioPack( phase.getPhaseName() ); } if( declaresOption( phase, key ) ) { optionMap.put( key, getValue( option ) ); return true; } G.v().out.println( "Invalid option "+option+" for phase "+phase.getPhaseName() ); return false; }