Package floobits.common.protocol

Examples of floobits.common.protocol.FlooUser


                context.shutdown();
            }
        };
        LinkedList<String> connectedUsersList = new LinkedList<String>();
        for (Map.Entry<Integer, FlooUser> userEntry : state.users.entrySet()) {
            FlooUser user = userEntry.getValue();
            connectedUsersList.add(String.format("%s, %s", user.username, user.client));
        }
        context.dialogResolveConflicts(stompLocal, stompRemote, state.readOnly, flee, conflictedPathsArray,
                connectedUsersList.toArray(new String[connectedUsersList.size()]));
    }
View Full Code Here


    void _on_request_perms(JsonObject obj) {
        Flog.log("got perms receive %s", obj);
        RequestPerms requestPerms = new Gson().fromJson(obj, (Type)RequestPerms.class);
        final int userId = requestPerms.user_id;
        final FlooUser u = state.getUser(userId);
        if (u == null) {
            Flog.info("Unknown user for id %s. Not handling request_perms event.", userId);
            return;
        }
        context.dialogPermsRequest(u.username, new RunLater<String>() {
View Full Code Here

            }
        });
    }

    void _on_join(JsonObject obj) {
        FlooUser u = new Gson().fromJson(obj, (Type) FlooUser.class);
        state.addUser(u);
    }
View Full Code Here

            return null;
        }
        return bufs.get(id);
    }
    public String getUsername(int userId) {
        FlooUser user = users.get(userId);
        if (user == null) {
            return "";
        }
        return user.username;
    }
View Full Code Here

        context.statusMessage(String.format("%s joined the workspace on %s (%s).", flooser.username, flooser.platform, flooser.client));
        context.setUsers(users);
    }

    public void removeUser(int userId) {
        FlooUser u = users.get(userId);
        if (users.remove(userId) != null) {
            context.setUsers(users);
        }
        if (u == null) {
            return;
View Full Code Here

    public int getMyConnectionId() {
        return connectionId;
    }

    public void changePermsForUser(int userId, String[] permissions) {
        FlooUser user = getUser(userId);
        if (user == null) {
            return;
        }
        List<String> givenPerms = java.util.Arrays.asList(permissions);
        Set<String> translatedPermsSet = new HashSet<String>();
View Full Code Here

        adminMenuItem.addActionListener(new ClientChatActionListener() {
            @Override
            public void clientActionPerformed(FlooHandler flooHandler, ClientModelItem client) {
                final int userId = client.userId;
                Flog.info("Opening up permission dialog for %s", client.username);
                FlooUser user = flooHandler.state.getUser(client.userId);
                if (user == null) {
                    return;
                }
                List<String> permissions = java.util.Arrays.asList(user.perms);
                SetPermissionsDialog setPermissionsDialog = new SetPermissionsDialog(
View Full Code Here

TOP

Related Classes of floobits.common.protocol.FlooUser

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.