class ZMSImpl implements Authorizer, KeyStore, ZMSHandler {

    void setRoleMemberExpiration(final AthenzDomain domain, final Role role, final RoleMember roleMember,
            final Membership membership, final String caller) {

        boolean bUser = ZMSUtils.isUserDomainPrincipal(roleMember.getMemberName(), userDomainPrefix,
                addlUserCheckDomainPrefixList);

        if (bUser) {
            Timestamp userAuthorityExpiry = getUserAuthorityExpiry(roleMember.memberName, role.getUserAuthorityExpiration(), caller);
            if (userAuthorityExpiry != null) {
                roleMember.setExpiration(userAuthorityExpiry);
            } else {
                roleMember.setExpiration(memberDueDateTimestamp(domain.getDomain().getMemberExpiryDays(),
                        role.getMemberExpiryDays(), membership.getExpiration()));
            }
        } else {
            roleMember.setExpiration(memberDueDateTimestamp(domain.getDomain().getServiceExpiryDays(),
                    role.getServiceExpiryDays(), membership.getExpiration()));
        }
    }

    public  ZMSImpl();

}