Package org.apache.vysper.xmpp.modules.extension.xep0050_adhoc_commands

Examples of org.apache.vysper.xmpp.modules.extension.xep0050_adhoc_commands.CommandInfo


    protected Collection<Entity> admins = new HashSet<Entity>();
    protected final Map<String, CommandInfo> allCommandInfos = new HashMap<String, CommandInfo>();

    public ServiceAdministrationModule() {
        /* XEP-133 4.1  */ allCommandInfos.put(COMMAND_NODE_ADD_USER, new CommandInfo(COMMAND_NODE_ADD_USER, "Add User"));
        /* XEP-133 4.7  */ allCommandInfos.put(COMMAND_CHANGE_USER_PASSWORD, new CommandInfo(COMMAND_CHANGE_USER_PASSWORD, "Change User Password"));
        /* XEP-133 4.15 */ allCommandInfos.put(COMMAND_GET_ONLINE_USERS_NUM, new CommandInfo(COMMAND_GET_ONLINE_USERS_NUM, "Get Number of Online Users"));
    }
View Full Code Here


        if (!admins.contains(infoRequest.getFrom())) {
            return Arrays.asList(allCommandInfos.get(COMMAND_CHANGE_USER_PASSWORD));
        }
        if (hintListAll) return allCommandInfos.values();

        final CommandInfo commandInfo = allCommandInfos.get(infoRequest.getNode());
        return (commandInfo == null) ? null : Arrays.asList(commandInfo);
    }
View Full Code Here

TOP

Related Classes of org.apache.vysper.xmpp.modules.extension.xep0050_adhoc_commands.CommandInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.