Search in sources :

Example 1 with ProcessRemarkService

use of org.asqatasun.service.ProcessRemarkService in project Asqatasun by Asqatasun.

the class Rgaa30Rule090104 method check.

@Override
protected void check(SSPHandler sspHandler, TestSolutionHandler testSolutionHandler) {
    super.check(sspHandler, testSolutionHandler);
    ProcessRemarkService prs = sspHandler.getProcessRemarkService();
    if (CollectionUtils.isNotEmpty(prs.getRemarkList())) {
        for (ProcessRemark pr : prs.getRemarkList()) {
            addElementNameEvidenceElementToOverrideTarget(prs, pr);
        }
    }
}
Also used : ProcessRemark(org.asqatasun.entity.audit.ProcessRemark) ProcessRemarkService(org.asqatasun.service.ProcessRemarkService)

Example 2 with ProcessRemarkService

use of org.asqatasun.service.ProcessRemarkService in project Asqatasun by Asqatasun.

the class Rgaa32016Rule090104 method check.

@Override
protected void check(SSPHandler sspHandler, TestSolutionHandler testSolutionHandler) {
    super.check(sspHandler, testSolutionHandler);
    ProcessRemarkService prs = sspHandler.getProcessRemarkService();
    if (CollectionUtils.isNotEmpty(prs.getRemarkList())) {
        for (ProcessRemark pr : prs.getRemarkList()) {
            addElementNameEvidenceElementToOverrideTarget(prs, pr);
        }
    }
}
Also used : ProcessRemark(org.asqatasun.entity.audit.ProcessRemark) ProcessRemarkService(org.asqatasun.service.ProcessRemarkService)

Example 3 with ProcessRemarkService

use of org.asqatasun.service.ProcessRemarkService in project Asqatasun by Asqatasun.

the class Rgaa22Rule10021 method check.

@Override
protected void check(SSPHandler sspHandler, TestSolutionHandler testSolutionHandler) {
    super.check(sspHandler, testSolutionHandler);
    ProcessRemarkService prs = sspHandler.getProcessRemarkService();
    if (CollectionUtils.isNotEmpty(prs.getRemarkList())) {
        for (ProcessRemark pr : prs.getRemarkList()) {
            addElementNameEvidenceElementToOverrideTarget(prs, pr);
        }
    }
}
Also used : ProcessRemark(org.asqatasun.entity.audit.ProcessRemark) ProcessRemarkService(org.asqatasun.service.ProcessRemarkService)

Example 4 with ProcessRemarkService

use of org.asqatasun.service.ProcessRemarkService in project Asqatasun by Asqatasun.

the class SeoRule01071 method processImpl.

@Override
protected ProcessResult processImpl(SSPHandler sspHandler) {
    ProcessRemarkService processRemarkService = sspHandler.getProcessRemarkService();
    processRemarkService.resetService();
    TestSolution testSolution = TestSolution.PASSED;
    try {
        URL url = new URL(sspHandler.getSSP().getURI());
        if (StringUtils.isNotBlank(url.getQuery())) {
            testSolution = TestSolution.FAILED;
        }
    } catch (MalformedURLException ex) {
        testSolution = TestSolution.NOT_APPLICABLE;
    }
    if (testSolution.equals(TestSolution.FAILED)) {
        processRemarkService.addProcessRemark(TestSolution.FAILED, RemarkMessageStore.URL_PARAMETERS_DETECTED);
    }
    return processResultDataService.getDefiniteResult(test, sspHandler.getPage(), testSolution, processRemarkService.getRemarkList());
}
Also used : MalformedURLException(java.net.MalformedURLException) TestSolution(org.asqatasun.entity.audit.TestSolution) URL(java.net.URL) ProcessRemarkService(org.asqatasun.service.ProcessRemarkService)

Example 5 with ProcessRemarkService

use of org.asqatasun.service.ProcessRemarkService in project Asqatasun by Asqatasun.

the class Aw22Rule09014 method check.

@Override
protected void check(SSPHandler sspHandler, TestSolutionHandler testSolutionHandler) {
    super.check(sspHandler, testSolutionHandler);
    ProcessRemarkService prs = sspHandler.getProcessRemarkService();
    if (CollectionUtils.isNotEmpty(prs.getRemarkList())) {
        for (ProcessRemark pr : prs.getRemarkList()) {
            addElementNameEvidenceElementToOverrideTarget(prs, pr);
        }
    }
}
Also used : ProcessRemark(org.asqatasun.entity.audit.ProcessRemark) ProcessRemarkService(org.asqatasun.service.ProcessRemarkService)

Aggregations

ProcessRemarkService (org.asqatasun.service.ProcessRemarkService)8 ProcessRemark (org.asqatasun.entity.audit.ProcessRemark)5 MalformedURLException (java.net.MalformedURLException)2 URL (java.net.URL)2 TestSolution (org.asqatasun.entity.audit.TestSolution)2 SSP (org.asqatasun.entity.audit.SSP)1 SSPHandler (org.asqatasun.processor.SSPHandler)1 TestSolutionHandler (org.asqatasun.ruleimplementation.TestSolutionHandler)1 Elements (org.jsoup.select.Elements)1