class PermissionsManager {

  public boolean exists(String userId, String domainId, String instanceId, String action)
      throws ServerException, NotFoundException, ConflictException {
    return getDomain(domainId).getAllowedActions().contains(action)
        && getPermissionsDao(domainId).exists(userId, instanceId, action);
  }

  @Inject public  PermissionsManager(
      EventService eventService, Set<PermissionsDao<? extends AbstractPermissions>> daos);

}