private GuacamoleConfiguration getGuacamoleConfiguration ( RemoteAuthenticatedUser user , ModeledConnection connection ) { // Generate configuration from available data GuacamoleConfiguration config = new GuacamoleConfiguration ( ) ; // Set protocol from connection ConnectionModel model = connection . getModel ( ) ; config . setProtocol ( model . getProtocol ( ) ) ; // Set parameters from associated data Collection < ConnectionParameterModel > parameters = connectionParameterMapper . select ( connection . getIdentifier ( ) ) ; for ( ConnectionParameterModel parameter : parameters ) config . setParameter ( parameter . getName ( ) , parameter . getValue ( ) ) ; return config ; }
Returns a guacamole configuration containing the protocol and parameters from the given connection . If tokens are used in the connection parameter values credentials from the given user will be substituted appropriately .