class DBService implements RolesProvider {

    boolean isTrustRoleForTenant(ObjectStoreConnection con, String provSvcDomain, String roleName,
            String rolePrefix, String resourceGroup, String tenantDomain) {
        
        // first make sure the role name starts with the given prefix
        
        if (!isTenantRolePrefixMatch(con, roleName, rolePrefix, resourceGroup, tenantDomain)) {
            return false;
        }
        
        Role role = con.getRole(provSvcDomain, roleName);
        if (role == null) {
            return false;
        }
        
        // ensure it is a trust role for the tenant
        
        String trustDom = role.getTrust();
        return trustDom != null && trustDom.equals(tenantDomain);

    }

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

}