/**
   * @param authenticatedUser
   * @param analysisTypes
   * @param guid
   * @param dataGroups
   * @param limits
   * @param serviceTypes
   * @param userIdFilters
   * @return list of videos or null if none was found
   * @throws IllegalArgumentException
   */
  public static VideoList searchByGUID(
      UserIdentity authenticatedUser,
      EnumSet<AnalysisType> analysisTypes,
      String guid,
      DataGroups dataGroups,
      Limits limits,
      EnumSet<ServiceType> serviceTypes,
      long[] userIdFilters)
      throws IllegalArgumentException {
    if (VideoList.isEmpty(
        ServiceInitializer.getDAOHandler()
            .getDAO(VideoDAO.class)
            .search(
                authenticatedUser,
                null,
                Collections.nCopies(1, guid),
                null,
                null,
                null,
                null))) { // do not use serviceTypes or userIdFilters for existence check of
                          // reference video
      throw new IllegalArgumentException(
          "Invalid " + Definitions.PARAMETER_GUID + " or permission denied.");
    }

    return VideoSearchTask.getTaskByGUID(
            authenticatedUser, analysisTypes, dataGroups, guid, limits, serviceTypes, userIdFilters)
        .execute();
  }
 /**
  * @param authenticatedUser
  * @param objects
  * @param dataGroups
  * @param limits
  * @param serviceTypes
  * @param userIdFilters
  * @return list of videos or null if none was found
  * @throws IllegalArgumentException on bad input data
  */
 public static VideoList similarVideosByObject(
     UserIdentity authenticatedUser,
     MediaObjectList objects,
     DataGroups dataGroups,
     Limits limits,
     EnumSet<ServiceType> serviceTypes,
     long[] userIdFilters)
     throws IllegalArgumentException {
   if (!MediaObjectList.isEmpty(objects)) {
     return ServiceInitializer.getDAOHandler()
         .getDAO(VideoDAO.class)
         .search(
             authenticatedUser, dataGroups, null, limits, objects, serviceTypes, userIdFilters);
   } else {
     throw new IllegalArgumentException("Empty object list.");
   }
 }