public Map < String , String > retrieveParameters ( ModeledAuthenticatedUser user , String identifier ) { Map < String , String > parameterMap = new HashMap < String , String > ( ) ; // Determine whether we have permission to read parameters boolean canRetrieveParameters ; try { canRetrieveParameters = hasObjectPermission ( user , identifier , ObjectPermission . Type . UPDATE ) ; } // Provide empty (but mutable) map if unable to check permissions catch ( GuacamoleException e ) { return parameterMap ; } // Populate parameter map if we have permission to do so if ( canRetrieveParameters ) { for ( ConnectionParameterModel parameter : parameterMapper . select ( identifier ) ) parameterMap . put ( parameter . getName ( ) , parameter . getValue ( ) ) ; } return parameterMap ; }
Retrieves all parameters visible to the given user and associated with the connection having the given identifier . If the given user has no access to such parameters or no such connection exists the returned map will be empty .