mil.dod.th.ose.shell/src/mil/dod/th/ose/shell/PowerManagerCommands.java
@Descriptor("Enables the PlatformPowerManager")
    public void enable(final CommandSession session) throws IOException
    {
        final PrintStream out = session.getConsole();
        final Configuration config = m_ConfigAdmin.getConfiguration(PlatformPowerManager.CONFIG_PID, null);
        Dictionary<String, Object> dict = config.getProperties();
        
        Boolean enabled = null;
        if (dict == null)
        {
            dict = new Hashtable<String, Object>();
        }
        else
        {
            enabled = (Boolean)dict.get(PlatformPowerManager.CONFIG_PROP_ENABLED);
        }
        
        if (enabled == null || !enabled)
        {
            dict.put(PlatformPowerManager.CONFIG_PROP_ENABLED, true);
            config.update(dict);
            
            if (m_PlatformPowerManager == null)
            {
                out.format("Warning!! The configuration property has been set to enabled "
                        + "but the PlatformPowerManager is not present%n");
            }
        }
        else
        {
            out.format("The PlatformPowerManager is already enabled.%n");
        }
    }
/**
     * Method to enable the {@link PlatformPowerManager}.
     * @param session
     *  command session that is executing the command
     * @throws IOException 
     *  if a configuration for the platform power manager cannot be retrieved
     */
Method to enable the  PlatformPowerManager.
@param session
command session that is executing the command
@throws IOException
if a configuration for the platform power manager cannot be retrieved
Method to enable the PlatformPowerManager . @param session command session that is executing the command @throws IOException if a configuration for the platform power manager cannot be retrieved
@Descriptor("Enables the PlatformPowerManager")
    public void enable(final CommandSession session) throws IOException
    {
        final PrintStream out = session.getConsole();
        final Configuration config = m_ConfigAdmin.getConfiguration(PlatformPowerManager.CONFIG_PID, null);
        Dictionary<String, Object> dict = config.getProperties();
        Boolean enabled = null;
        if (dict == null)
        {
            dict = new Hashtable<String, Object>();
        }
        else
        {
            enabled = (Boolean)dict.get(PlatformPowerManager.CONFIG_PROP_ENABLED);
        }
        if (enabled == null || !enabled)
        {
            dict.put(PlatformPowerManager.CONFIG_PROP_ENABLED, true);
            config.update(dict);
            if (m_PlatformPowerManager == null)
            {
                out.format("Warning!! The configuration property has been set to enabled "
                        + "but the PlatformPowerManager is not present%n");
            }
        }
        else
        {
            out.format("The PlatformPowerManager is already enabled.%n");
        }
    }
@ Descriptor ( "Enables the PlatformPowerManager" ) public void enable ( final CommandSession session ) throws IOException { final PrintStream out = session . getConsole ( ) ; final Configuration config = m_ConfigAdmin . getConfiguration ( PlatformPowerManager . CONFIG_PID , null ) ; Dictionary < String , Object > dict = config . getProperties ( ) ; Boolean enabled = null ; if ( dict == null ) { dict = new Hashtable < String , Object > ( ) ; } else { enabled = ( Boolean ) dict . get ( PlatformPowerManager . CONFIG_PROP_ENABLED ) ; } if ( enabled == null || ! enabled ) { dict . put ( PlatformPowerManager . CONFIG_PROP_ENABLED , true ) ; config . update ( dict ) ; if ( m_PlatformPowerManager == null ) { out . format ( "Warning!! The configuration property has been set to enabled " + "but the PlatformPowerManager is not present%n" ) ; } } else { out . format ( "The PlatformPowerManager is already enabled.%n" ) ; } }
Method to enable the {@link PlatformPowerManager}.
Method to enable the { @link PlatformPowerManager } .