mil.dod.th.ose.gui.webapp/src/mil/dod/th/ose/gui/webapp/asset/AssetGetCommandMgrImpl.java
private List<CommandTypeEnum> retrieveGetOnlyCommands(final CommandCapabilities capabilities)
    {
        final List<CommandTypeEnum> list = new ArrayList<CommandTypeEnum>();
        for (CommandTypeEnum commandType : capabilities.getSupportedCommands())
        {
            if (commandType.toString().startsWith(AssetCommandUtil.GET_COMMAND_PREFIX))
            {
                final String type = commandType.toString().replaceFirst(AssetCommandUtil.GET_COMMAND_PREFIX,
                        AssetCommandUtil.SET_COMMAND_PREFIX);
                
                try
                {
                    //if can't find set command then want to use it.
                    final CommandTypeEnum command = CommandTypeEnum.valueOf(type);

                    //include commands that are complex or don't follow the standard get/set command format
                    if (command.equals(CommandTypeEnum.SET_TUNE_SETTINGS_COMMAND)
                            || command.equals(CommandTypeEnum.SET_LIFT_COMMAND))
                    {
                        list.add(commandType);
                    }
                }
                catch (final IllegalArgumentException exception)
                {
                    list.add(commandType);
                }
            }
        }
        
        return list;
    }
/**
     * Method finds the get commands that do not have corresponding set commands.
     * @param capabilities
     *  the given command capabilities that might contain supported commands which
     *  are get commands
     * @return
     *  the list of get commands that do not have corresponding set commands; if no 
     *  get commands exist are empty
     */
Method finds the get commands that do not have corresponding set commands.
@param capabilities
the given command capabilities that might contain supported commands which
are get commands
@return
the list of get commands that do not have corresponding set commands; if no
get commands exist are empty
Method finds the get commands that do not have corresponding set commands . @param capabilities the given command capabilities that might contain supported commands which are get commands @return the list of get commands that do not have corresponding set commands ; if no get commands exist are empty
private List<CommandTypeEnum> retrieveGetOnlyCommands(final CommandCapabilities capabilities)
    {
        final List<CommandTypeEnum> list = new ArrayList<CommandTypeEnum>();
        for (CommandTypeEnum commandType : capabilities.getSupportedCommands())
        {
            if (commandType.toString().startsWith(AssetCommandUtil.GET_COMMAND_PREFIX))
            {
                final String type = commandType.toString().replaceFirst(AssetCommandUtil.GET_COMMAND_PREFIX,
                        AssetCommandUtil.SET_COMMAND_PREFIX);
                try
                {
                    final CommandTypeEnum command = CommandTypeEnum.valueOf(type);
                    if (command.equals(CommandTypeEnum.SET_TUNE_SETTINGS_COMMAND)
                            || command.equals(CommandTypeEnum.SET_LIFT_COMMAND))
                    {
                        list.add(commandType);
                    }
                }
                catch (final IllegalArgumentException exception)
                {
                    list.add(commandType);
                }
            }
        }
        return list;
    }
private List < CommandTypeEnum > retrieveGetOnlyCommands ( final CommandCapabilities capabilities ) { final List < CommandTypeEnum > list = new ArrayList < CommandTypeEnum > ( ) ; for ( CommandTypeEnum commandType : capabilities . getSupportedCommands ( ) ) { if ( commandType . toString ( ) . startsWith ( AssetCommandUtil . GET_COMMAND_PREFIX ) ) { final String type = commandType . toString ( ) . replaceFirst ( AssetCommandUtil . GET_COMMAND_PREFIX , AssetCommandUtil . SET_COMMAND_PREFIX ) ; try { final CommandTypeEnum command = CommandTypeEnum . valueOf ( type ) ; if ( command . equals ( CommandTypeEnum . SET_TUNE_SETTINGS_COMMAND ) || command . equals ( CommandTypeEnum . SET_LIFT_COMMAND ) ) { list . add ( commandType ) ; } } catch ( final IllegalArgumentException exception ) { list . add ( commandType ) ; } } } return list ; }
Method finds the get commands that do not have corresponding set commands.
Method finds the get commands that do not have corresponding set commands .
//if can't find set command then want to use it. //include commands that are complex or don't follow the standard get/set command format