private Collection<SharingProfileParameterModel> getParameterModels(ModeledSharingProfile sharingProfile) {

        Map<String, String> parameters = sharingProfile.getParameters();
        
        // Convert parameters to model objects
        Collection<SharingProfileParameterModel> parameterModels = new ArrayList<SharingProfileParameterModel>(parameters.size());
        for (Map.Entry<String, String> parameterEntry : parameters.entrySet()) {

            // Get parameter name and value
            String name = parameterEntry.getKey();
            String value = parameterEntry.getValue();

            // There is no need to insert empty parameters
            if (value == null || value.isEmpty())
                continue;
            
            // Produce model object from parameter
            SharingProfileParameterModel model = new SharingProfileParameterModel();
            model.setSharingProfileIdentifier(sharingProfile.getIdentifier());
            model.setName(name);
            model.setValue(value);

            // Add model to list
            parameterModels.add(model);
            
        }

        return parameterModels;

    }
Given an arbitrary Guacamole sharing profile, produces a collection of
parameter model objects containing the name/value pairs of that
sharing profile's parameters.

@param sharingProfile
    The sharing profile whose configuration should be used to produce the
    collection of parameter models.

@return
    A collection of parameter models containing the name/value pairs
    of the given sharing profile's parameters.
extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/sharingprofile/SharingProfileService.java