class ZMSImpl implements Authorizer, KeyStore, ZMSHandler {

    void validateRoleMemberPrincipal(final String memberName, int principalType, final String userAuthorityFilter,
                                     final String userAuthorityExpiration, Boolean roleAuditEnabled,
                                     boolean disallowGroups, final String caller) {

        switch (Principal.Type.getType(principalType)) {

            case USER:

                // if the account contains a wildcard then we're going
                // to let the user authority decide if it's valid or not

                validateUserPrincipal(memberName, validateUserRoleMembers, userAuthorityFilter, caller);
                break;

            case SERVICE:

                if (validateServiceRoleMembers) {

                    // if the account contains a wildcard character then
                    // we're going to assume it's valid

                    if (memberName.indexOf('*') == -1) {
                        validateServicePrincipal(memberName, caller);
                    }
                }

                break;

            case GROUP:

                if (disallowGroups) {
                    throw ZMSUtils.requestError("Group principals are not allowed in the role", caller);
                }

                validateGroupPrincipal(memberName, userAuthorityFilter, userAuthorityExpiration, roleAuditEnabled, caller);
                break;

            default:

                throw ZMSUtils.requestError("Principal " + memberName + " is not valid", caller);
        }
    }

    public  ZMSImpl();

}