/**
   * @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();
  }
Beispiel #2
0
    @Override
    protected void onPostExecute(String result) {
      // TODO Auto-generated method stub
      super.onPostExecute(result);

      Ed1.setText("");

      Ed2.setText("");

      Ed3.setText("");

      Ed4.setText("");

      if (done_is == true) {

        ConditionClas.Toastmethod(LogView.this, " " + MessageDisplay_Submit);
      }
      if (Methodcall.equalsIgnoreCase("submit")) {

        ConditionClas.Toastmethod(LogView.this, " " + MessageDisplay);

      } else if (Methodcall.equalsIgnoreCase("show")) {

        System.out.println("inside showLog_reps " + SiteList.Log_reps);
        System.out.println("inside show Exc_Namel " + SiteList.Exc_Name);
        System.out.println("inside showLog_Date " + SiteList.Log_Date);
        System.out.println("inside show Log_Ints " + SiteList.Log_Ints);
        System.out.println("inside show Log_Sets " + SiteList.Log_Sets);
        System.out.println("inside show exc_Name " + method(exc_Name));
        Log_reps.clear();

        Exc_Namel.clear();

        Log_Date.clear();

        Log_Ints.clear();

        Log_Sets.clear();

        for (int i = 0; i < SiteList.Exc_Name.size(); i++) {

          //					if(SiteList.Exc_Name.get(i).toLowerCase().
          //							contains(method(exc_Name).toLowerCase()))
          if (SiteList.Exces_Id.get(i).toLowerCase().contains(Id.toLowerCase())) {

            Log_reps.add(SiteList.Log_reps.get(i));

            Exc_Namel.add(SiteList.Exc_Name.get(i));

            Log_Date.add(SiteList.Log_Date.get(i));

            Log_Ints.add(SiteList.Log_Ints.get(i));

            Log_Sets.add(SiteList.Log_Sets.get(i));
          }
        }
        System.out.println("inside show");

        System.out.println("inside showLog_reps " + Log_reps);
        System.out.println("inside show Exc_Namel " + Exc_Namel);
        System.out.println("inside showLog_Date " + Log_Date);
        System.out.println("inside show Log_Ints " + Log_Ints);
        System.out.println("inside show Log_Sets " + Log_Sets);

        System.out.println("StatusStatusStatus " + Status);
        System.out.println("MessageDisplay    " + MessageDisplay);
        //				if (Status.equalsIgnoreCase("success"))
        //
        //				{
        System.out.println("inside if  ");
        System.out.println("MessageDisplay    " + MessageDisplay);

        Excercise.setAdapter(new CustomListExcercise());

        //					VideoList.setAdapter()
        VideoList.setAdapter(new CustomListVideo());

        //				}
        //
        //				else
        //
        //				{
        //					System.out.println(" in side elese " +
        //							"MessageDisplay    "+MessageDisplay);
        //
        //					twoValue[0] = " Error";
        //					VideoList.setAdapter(new ArrayAdapter<String>(LogView.this,
        //							android.R.layout.simple_list_item_1 ,
        //							android.R.id.text1 ,twoValue ));
        //					ConditionClas.Toastmethod(LogView.this, MessageDisplay);
        //
        //					Excercise.setAdapter(new ArrayAdapter<String>(LogView.this,
        //							android.R.layout.simple_list_item_1 ,
        //							android.R.id.text1 ,twoValue ));
        //					ConditionClas.Toastmethod(LogView.this, MessageDisplay);
        //
        //
        //				}

        /* This part checks is the log link hit was successful
         *  so on basis of that it shall set an adapter */

        if (StatusLog.equalsIgnoreCase("success")) {
          System.out.println("inside if StatusLog   ");
          if (MesageList.length() > 0) {

            //						SelectList.setAdapter(new CustomList());
            updateTable();

          } else {

            //						SelectList.setAdapter(new ArrayAdapter<String>(LogView.this,
            //								android.R.layout.simple_list_item_1 ,
            //								android.R.id.text1 ,SiteList.Error ));
          }
        }
      }
      dialog.dismiss();
    }