Remove all dynamic command with exceptions

@param exclude The commands that will not be removed
@throws DevFailed
485787
public void clearCommandsWithExclude(final String... exclude) throws DevFailed {
        final String[] toExclude = new String[exclude.length];
        for (int i = 0; i < toExclude.length; i++) {
            toExclude[i] = exclude[i].toLowerCase(Locale.ENGLISH);
        }
        for (final String cmdName : dynamicCommands.keySet()) {
            if (!ArrayUtils.contains(toExclude, cmdName)) {
                removeCommand(cmdName);
            }
        }
    }
280226
public DeviceDataHistory[] command_history(String cmdname, int nb) throws DevFailed {
        return deviceProxyDAO.command_history(this, cmdname, nb);
    }
1246323
public void deleteDevicePipeProperties(Database database, String deviceName,
                                         String pipeName, List<String> propertyNames) throws DevFailed {

        String[]    array = new String[propertyNames.size()+2];
        int i=0;
        array[i++] = deviceName;
        array[i++] = pipeName;
        for (String propertyName : propertyNames)
            array[i++] = propertyName;
        DeviceData  argIn = new DeviceData();
        argIn.insert(array);
        database.command_inout("DbDeleteDevicePipeProperty", argIn);
    }
165973
public synchronized void startCommandPolling(final CommandImpl command) throws DevFailed {
        addCommandPolling(command);
        LOGGER.debug("starting command {} for polling on device {}", command.getName(), deviceName);
        if (command.getPollingPeriod() != 0) {
            commandCacheMap.get(command).startRefresh(POLLING_POOL);
        }
    }
1043877
public DeviceData command_inout(String command, DeviceData argin) throws DevFailed {
		return iConnection.command_inout(this, command, argin);
	}
987624
@Command(name = "RestartServer")
    public void restartServer() throws DevFailed {
        xlogger.entry();
        tangoExporter.unexportAll();
        tangoExporter.exportAll();
        xlogger.exit();
    }
454171
public void removeTangoDataReadyListener(ITangoDataReadyListener listener)
            throws DevFailed {
        event_listeners.remove(ITangoDataReadyListener.class, listener);
        if (event_listeners.size() == 0)
            unsubscribe_event(event_identifier);

    }
257719
public void removeAttribute(final String attributeName) throws DevFailed {
        final AttributeImpl toRemove = dynamicAttributes.get(attributeName.toLowerCase(Locale.ENGLISH));
        if (toRemove == null)
            throw DevFailedUtils.newDevFailed("API_AttributeNotFound", "Attribute \'" + attributeName + "\' not found");
        if (toRemove.getBehavior() instanceof ForwardedAttribute) {
            final ForwardedAttribute att = (ForwardedAttribute) toRemove.getBehavior();
            final String lower = att.getRootName().toLowerCase(Locale.ENGLISH);
            forwardedAttributes.remove(lower);
        }
        deviceImpl.removeAttribute(toRemove);
        dynamicAttributes.remove(attributeName);
        deviceImpl.pushInterfaceChangeEvent(false);
    }
405614
@Override
    public DevCmdInfo[] command_list_query() throws DevFailed {
        MDC.setContextMap(contextMap);
        xlogger.entry();
        // checkInitialization();
        deviceMonitoring.startRequest("command_list_query");
        // Retrieve number of command and allocate memory to send back info
        final List<CommandImpl> cmdList = getCommandList();
        Collections.sort(cmdList);
        final DevCmdInfo[] back = new DevCmdInfo[commandList.size()];
        int i = 0;
        for (final CommandImpl cmd : cmdList) {
            final DevCmdInfo tmp = new DevCmdInfo();
            tmp.cmd_name = cmd.getName();
            tmp.cmd_tag = cmd.getTag();
            tmp.in_type = cmd.getInType().getTangoIDLType();
            tmp.out_type = cmd.getOutType().getTangoIDLType();
            tmp.in_type_desc = cmd.getInTypeDesc();
            tmp.out_type_desc = cmd.getOutTypeDesc();
            back[i++] = tmp;
        }
        xlogger.exit();
        return back;
    }
1134944
@Override
    public DevCmdHistory_4 command_inout_history_4(final String commandName, final int maxSize) throws DevFailed {
        MDC.setContextMap(contextMap);
        xlogger.entry();
        checkInitialization();
        final long request = deviceMonitoring.startRequest("command_inout_history_4 " + commandName);
        final CommandImpl command = getCommand(commandName);

        DevCmdHistory_4 history = null;
        try {
            history = command.getHistory().toDevCmdHistory4(maxSize);
        } catch (final Exception e) {
            deviceMonitoring.addError();
            if (e instanceof DevFailed) {
                throw (DevFailed) e;
            } else {
                // with CORBA, the stack trace is not visible by the client if
                // not inserted in DevFailed.
                throw DevFailedUtils.newDevFailed(e);
            }
        } finally {
            deviceMonitoring.endRequest(request);
        }
        return history;
    }
893254
public synchronized void removeCommand(final CommandImpl command) throws DevFailed {
        if (!command.getName().equalsIgnoreCase(INIT_CMD)) {
            pollingManager.removeCommandPolling(command.getName());
            commandList.remove(command);
        }

    }
47228
public void deleteDevicePipeProperty(String deviceName,
                                         String pipeName, String propertyName) throws DevFailed {
        ArrayList<String>   list = new ArrayList<String>(1);
        list.add(propertyName);
        databaseDAO.deleteDevicePipeProperties(this, deviceName, pipeName, list);
    }
1349062
public void removeAttribute(final String attributeName, final boolean clearAttributeProperties) throws DevFailed {
        removeAttribute(attributeName);
        if (clearAttributeProperties) {
            new AttributePropertiesManager(deviceImpl.getName()).removeAttributeProperties(attributeName);
        }
    }
592832
public void deleteAllPipeProperty(String pipeName) throws DevFailed {
        ArrayList<String> list = new ArrayList<String>(1);
        list.add(pipeName);
        deleteAllPipeProperty(list);
    }
66751
protected void unsubscribeTheEvent(EventCallBackStruct callbackStruct) throws DevFailed {
        ZMQutils.disConnectEvent(callbackStruct.device.get_tango_host(),
                callbackStruct.device.name(),
                callbackStruct.attr_name,
                callbackStruct.device.get_idl_version(),
                callbackStruct.event_name);
    }
1090927
public void removeCommand(final String commandName) throws DevFailed {
        final CommandImpl toRemove = dynamicCommands.get(commandName.toLowerCase(Locale.ENGLISH));
        deviceImpl.removeCommand(toRemove);
        dynamicCommands.remove(commandName);
        deviceImpl.pushInterfaceChangeEvent(false);
    }
1163550
public void deleteAllDevicePipeProperty(String deviceName, String[] pipeNames) throws DevFailed {
        ArrayList<String>   list = new ArrayList<String>(pipeNames.length);
        Collections.addAll(list, pipeNames);
        deleteAllDevicePipeProperty(deviceName, list);
    }