public GroupParser getGroupParser() throws GuacamoleException {
        switch (getGroupFormat()) {

            // Simple, plain-text groups
            case PLAIN:
                return new PlainGroupParser();

            // LDAP DNs
            case LDAP:
                return new LDAPGroupParser(getGroupLDAPAttribute(), getGroupLDAPBaseDN());

            default:
                throw new GuacamoleServerException("Unsupported CAS group format: " + getGroupFormat());

        }
    }
Returns a GroupParser instance that can be used to parse CAS group
names. The parser returned will take into account the configured CAS
group format, as well as any configured LDAP-specific restrictions.

@return
    A GroupParser instance that can be used to parse CAS group names as
    configured in guacamole.properties.

@throws GuacamoleException
    If guacamole.properties cannot be parsed.
extensions/guacamole-auth-sso/modules/guacamole-auth-sso-cas/src/main/java/org/apache/guacamole/auth/cas/conf/ConfigurationService.java