Esempio n. 1
0
 @Override
 public Audit auditSite(
     Contract contract,
     String siteUrl,
     final List<String> pageUrlList,
     String clientIp,
     Set<Parameter> parameterSet,
     Locale locale) {
   if (LOGGER.isDebugEnabled()) {
     LOGGER.debug("Group of pages audit");
     for (String str : pageUrlList) {
       LOGGER.debug("pageUrl " + str);
     }
     for (Parameter param : parameterSet) {
       LOGGER.debug(
           "param "
               + param.getValue()
               + " "
               + param.getParameterElement().getParameterElementCode());
     }
   }
   Act act = createAct(contract, ScopeEnum.GROUPOFPAGES, clientIp);
   AuditTimeoutThread auditPageThread =
       new AuditGroupOfPagesThread(
           siteUrl, pageUrlList, auditService, act, parameterSet, locale, delay);
   Audit audit = submitAuditAndLaunch(auditPageThread, act);
   return audit;
 }
Esempio n. 2
0
 @Override
 public Audit auditPageUpload(
     Contract contract,
     Map<String, String> fileMap,
     String clientIp,
     Set<Parameter> parameterSet,
     Locale locale) {
   if (LOGGER.isDebugEnabled()) {
     LOGGER.debug("auditPage Upload on " + fileMap.size() + " files");
     for (Parameter param : parameterSet) {
       LOGGER.debug(
           "param "
               + param.getValue()
               + " "
               + param.getParameterElement().getParameterElementCode());
     }
   }
   Act act;
   if (fileMap.size() > 1) {
     act = createAct(contract, ScopeEnum.GROUPOFFILES, clientIp);
   } else {
     act = createAct(contract, ScopeEnum.FILE, clientIp);
   }
   AuditTimeoutThread auditPageUploadThread =
       new AuditPageUploadThread(fileMap, auditService, act, parameterSet, locale, delay);
   Audit audit = submitAuditAndLaunch(auditPageUploadThread, act);
   return audit;
 }
Esempio n. 3
0
 @Override
 public void auditSite(
     Contract contract,
     String siteUrl,
     String clientIp,
     Set<Parameter> parameterSet,
     Locale locale) {
   if (LOGGER.isDebugEnabled()) {
     LOGGER.debug("Site audit on " + siteUrl);
     for (Parameter param : parameterSet) {
       LOGGER.debug(
           "param "
               + param.getValue()
               + " "
               + param.getParameterElement().getParameterElementCode());
     }
   }
   Act act = createAct(contract, ScopeEnum.DOMAIN, clientIp);
   AuditThread auditSiteThread =
       new AuditSiteThread(siteUrl, auditService, act, parameterSet, locale);
   threadPoolTaskExecutor.submit(auditSiteThread);
 }
Esempio n. 4
0
 @Override
 public Audit auditPage(
     Contract contract,
     String pageUrl,
     String clientIp,
     Set<Parameter> parameterSet,
     Locale locale) {
   if (LOGGER.isDebugEnabled()) {
     LOGGER.debug("Page audit on " + pageUrl);
     for (Parameter param : parameterSet) {
       LOGGER.debug(
           "param "
               + param.getValue()
               + " "
               + param.getParameterElement().getParameterElementCode());
     }
   }
   Act act = createAct(contract, ScopeEnum.PAGE, clientIp);
   AuditTimeoutThread auditPageThread =
       new AuditPageThread(pageUrl, auditService, act, parameterSet, locale, delay);
   Audit audit = submitAuditAndLaunch(auditPageThread, act);
   return audit;
 }
Esempio n. 5
0
 @Override
 public void auditScenario(
     Contract contract,
     Long idScenario,
     String clientIp,
     Set<Parameter> parameterSet,
     Locale locale) {
   if (LOGGER.isDebugEnabled()) {
     LOGGER.debug("Scenarion audit on scenario with id" + idScenario);
     for (Parameter param : parameterSet) {
       LOGGER.debug(
           "param "
               + param.getValue()
               + " "
               + param.getParameterElement().getParameterElementCode());
     }
   }
   Act act = createAct(contract, ScopeEnum.SCENARIO, clientIp);
   Scenario scenario = scenarioDataService.read(idScenario);
   AuditThread auditScenarioThread =
       new AuditScenarioThread(
           scenario.getLabel(), scenario.getContent(), auditService, act, parameterSet, locale);
   threadPoolTaskExecutor.submit(auditScenarioThread);
 }