Class DropboxTargetDao


public class DropboxTargetDao extends GrouperProvisionerTargetDaoBase
Dropbox TargetDao -- manages Dropbox Business team groups, team members (entities), and group memberships through the Dropbox Team API (via DropboxApiCommands).

Object model. This DAO uses the "membership objects" model (like the Remedy DAO), not the group-centric retrieveAllData model TrueFoundry uses. Groups, entities, and memberships are retrieved through separate calls -- retrieveAllGroups(edu.internet2.middleware.grouper.app.provisioning.targetDao.TargetDaoRetrieveAllGroupsRequest), retrieveAllEntities(edu.internet2.middleware.grouper.app.provisioning.targetDao.TargetDaoRetrieveAllEntitiesRequest), and retrieveMembershipsByGroup(edu.internet2.middleware.grouper.app.provisioning.targetDao.TargetDaoRetrieveMembershipsByGroupRequest) (with retrieveAllMemberships(edu.internet2.middleware.grouper.app.provisioning.targetDao.TargetDaoRetrieveAllMembershipsRequest) looping all groups). Memberships are first-class objects whose matching id is the native group_id + team_member_id pair: a Dropbox membership has no id of its own. Plumbing/style (logging, timing in finally blocks, per-object setProvisioned) mirrors TrueFoundryTargetDao.

Identity. The provisioning group id is the native Dropbox group_id (e.g. "g:abc123"); the provisioning entity id is the native team_member_id (e.g. "dbmid:abc"). Matching against Grouper is configured on the externalId attribute of each. Memberships therefore reference their group and entity purely by these native ids.

Admin roles. Dropbox admin roles are an optional overlay. The translator (DropboxProvisioningTranslator) removes admin-role-folder groups from the set of target groups (so they are never created as Dropbox groups) and instead stamps each entity with an adminRole attribute (the highest tier the member earns, or DropboxProvisioningTranslator.MEMBER_ONLY). This DAO only ever reads, compares, or writes the adminRole dimension when DropboxProvisionerConfiguration.isManageAdminRoles() is true (an admin-role folder is configured). When it is false, the adminRole attribute is stripped from retrieved entities (so it is not treated as a target attribute) and the admin-role API is never called. Dropbox has no "list all roles" endpoint, so role NAME -> role_id resolution goes through DropboxApiCommands.retrieveAdminRoleNameToId(String), whose catalog is harvested while members are read.

Ignore filtering. Members whose email is in dropboxIgnoreUserEmails and groups whose name is in dropboxIgnoreGroupNames are filtered out of the retrieve methods (the same way TrueFoundry filters), so they are never created, updated, or deleted.