class DBService implements RolesProvider {

    void executePutGroupMembershipDecision(ResourceContext ctx, final String domainName, Group group,
                                           GroupMember groupMember, final String auditRef) {

        // our exception handling code does the check for retry count
        // and throws the exception it had received when the retry
        // count reaches 0

        for (int retryCount = defaultRetryCount; ; retryCount--) {

            try (ObjectStoreConnection con = store.getConnection(false, true)) {

                String principal = getPrincipalName(ctx);

                // make sure the role auditing requirements are met

                checkObjectAuditEnabled(con, group.getAuditEnabled(), group.getName(),
                        auditRef, ctx.getApiName(), principal);

                // process our confirm group member support

                final String groupName = ZMSUtils.extractGroupName(domainName, group.getName());
                if (!con.confirmGroupMember(domainName, groupName, groupMember, principal, auditRef)) {
                    con.rollbackChanges();
                    throw ZMSUtils.requestError("unable to apply group membership decision for member: " +
                            groupMember.getMemberName() + " and group: " + groupName, ctx.getApiName());
                }

                // update our domain time-stamp and save changes

                con.updateGroupModTimestamp(domainName, groupName);
                saveChanges(con, domainName);

                // audit log the request

                StringBuilder auditDetails = new StringBuilder(ZMSConsts.STRING_BLDR_SIZE_DEFAULT);
                auditLogGroupMember(auditDetails, groupMember, true);

                auditLogRequest(ctx, domainName, auditRef, ctx.getApiName(), ZMSConsts.HTTP_PUT,
                        groupName, auditDetails.toString());

                return;

            } catch (ResourceException ex) {

                // otherwise check if we need to retry or return failure

                if (!shouldRetryOperation(ex, retryCount)) {
                    throw ex;
                }
            }
        }
    }

    public  DBService(ObjectStore store, AuditLogger auditLogger, ZMSConfig zmsConfig, AuditReferenceValidator auditReferenceValidator);

}