Examples of ConnectionGroup


Examples of net.sourceforge.guacamole.net.auth.mysql.model.ConnectionGroup

           
            return connectionGroup;
        }
       
        // Query connection by ID
        ConnectionGroup connectionGroup = connectionGroupDAO.selectByPrimaryKey(id);

        // If no connection found, return null
        if(connectionGroup == null)
            return null;
View Full Code Here

Examples of net.sourceforge.guacamole.net.auth.mysql.model.ConnectionGroup

     */
    public MySQLConnectionGroup createConnectionGroup(String name, int userID,
            Integer parentID, String type) {

        // Initialize database connection
        ConnectionGroup connectionGroup = new ConnectionGroup();
        connectionGroup.setConnection_group_name(name);
        connectionGroup.setParent_id(parentID);
        connectionGroup.setType(type);

        // Create connection
        connectionGroupDAO.insert(connectionGroup);
        return toMySQLConnectionGroup(connectionGroup, userID);

View Full Code Here

Examples of net.sourceforge.guacamole.net.auth.mysql.model.ConnectionGroup

     *                             This connection must already exist.
     */
    public void updateConnectionGroup(MySQLConnectionGroup mySQLConnectionGroup) {

        // Populate connection
        ConnectionGroup connectionGroup = new ConnectionGroup();
        connectionGroup.setConnection_group_id(mySQLConnectionGroup.getConnectionGroupID());
        connectionGroup.setParent_id(mySQLConnectionGroup.getParentID());
        connectionGroup.setConnection_group_name(mySQLConnectionGroup.getName());
       
        switch(mySQLConnectionGroup.getType()) {
            case BALANCING :
                connectionGroup.setType(MySQLConstants.CONNECTION_GROUP_BALANCING);
                break;
            case ORGANIZATIONAL:
                connectionGroup.setType(MySQLConstants.CONNECTION_GROUP_ORGANIZATIONAL);
                break;
        }

        // Update the connection group in the database
        connectionGroupDAO.updateByPrimaryKey(connectionGroup);
View Full Code Here

Examples of org.glyptodon.guacamole.net.auth.ConnectionGroup

        // For each entry, write corresponding connection element
        for (String identifier : identifiers) {

            // Write each group
            ConnectionGroup group = directory.get(identifier);
            writeConnectionGroup(self, xml, group);

        }

        // End connections
View Full Code Here

Examples of org.glyptodon.guacamole.net.auth.ConnectionGroup

       
        // Set encoding
        response.setCharacterEncoding("UTF-8");

        // Get root group
        ConnectionGroup root = context.getRootConnectionGroup();

        // Write actual XML
        try {

            // Get self
View Full Code Here

Examples of org.glyptodon.guacamole.net.auth.ConnectionGroup

        // For each entry, write corresponding connection element
        for (String identifier : identifiers) {

            // Write each group
            ConnectionGroup group = directory.get(identifier);
            writeConnectionGroup(self, xml, group);

        }

        // End connections
View Full Code Here

Examples of org.glyptodon.guacamole.net.auth.ConnectionGroup

       
        // Set encoding
        response.setCharacterEncoding("UTF-8");

        // Get root group
        ConnectionGroup root = context.getRootConnectionGroup();

        // Write actual XML
        try {

            // Get self
View Full Code Here

Examples of org.glyptodon.guacamole.net.auth.ConnectionGroup

     */
    static Directory<String, Connection> findConnectionDirectory(
            UserContext context, String parentID) throws GuacamoleException {
       
        // Find the correct connection directory
        ConnectionGroup rootGroup = context.getRootConnectionGroup();
        Directory<String, Connection> directory;
       
        Directory<String, ConnectionGroup> connectionGroupDirectory =
            rootGroup.getConnectionGroupDirectory();

        ConnectionGroup parentGroup = connectionGroupDirectory.get(parentID);

        if(parentGroup == null)
            return null;

        directory = parentGroup.getConnectionDirectory();
       
        return directory;
    }
View Full Code Here

Examples of org.glyptodon.guacamole.net.auth.ConnectionGroup

                // Get connection group directory
                Directory<String, ConnectionGroup> directory =
                    context.getRootConnectionGroup().getConnectionGroupDirectory();

                // Get authorized connection group
                ConnectionGroup group = directory.get(id);
                if (group == null) {
                    logger.info("Connection group \"{}\" does not exist for user \"{}\".", id, context.self().getUsername());
                    throw new GuacamoleSecurityException("Requested connection group is not authorized.");
                }

                // Connect socket
                socket = group.connect(info);
                logger.info("User \"{}\" successfully connected to group \"{}\".", context.self().getUsername(), id);
                break;
            }

            // Fail if unsupported type
View Full Code Here

Examples of org.glyptodon.guacamole.net.auth.ConnectionGroup

       
        if(directory == null)
            throw new GuacamoleException("Connection group directory not found.");

        // Create connection skeleton
        ConnectionGroup connectionGroup = new DummyConnectionGroup();
        connectionGroup.setName(name);
       
        if("balancing".equals(type))
            connectionGroup.setType(ConnectionGroup.Type.BALANCING);
        else if("organizational".equals(type))
            connectionGroup.setType(ConnectionGroup.Type.ORGANIZATIONAL);

        // Add connection
        directory.add(connectionGroup);

    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.