Search in sources :

Example 76 with Page

use of org.asqatasun.entity.subject.Page in project Asqatasun by Asqatasun.

the class SeoRule06041Test method setUpWebResourceMap.

@Override
protected void setUpWebResourceMap() {
    // file:Site-Passed1
    Site site = getWebResourceFactory().createSite("file:Site-Passed1");
    getWebResourceMap().put("Seo.Test.6.4.1-1Passed-01", site);
    Page page = getWebResourceFactory().createPage(getTestcasesFilePath() + "SEO/SeoRule06041/Seo.Test.6.4.1-1Passed-01.html");
    site.addChild(page);
    getWebResourceMap().put("Seo.Test.6.4.1-page01", page);
    page = getWebResourceFactory().createPage(getTestcasesFilePath() + "SEO/SeoRule06041/Seo.Test.6.4.1-1Passed-02.html");
    site.addChild(page);
    getWebResourceMap().put("Seo.Test.6.4.1-page02", page);
    // file:Site-Failed1
    site = getWebResourceFactory().createSite("file:Site-Failed1");
    getWebResourceMap().put("Seo.Test.6.4.1-2Failed-01", site);
    page = getWebResourceFactory().createPage(getTestcasesFilePath() + "SEO/SeoRule06041/Seo.Test.6.4.1-2Failed-01.html");
    site.addChild(page);
    getWebResourceMap().put("Seo.Test.6.4.1-page03", page);
    page = getWebResourceFactory().createPage(getTestcasesFilePath() + "SEO/SeoRule06041/Seo.Test.6.4.1-2Failed-02.html");
    site.addChild(page);
    getWebResourceMap().put("Seo.Test.6.4.1-page04", page);
    // file:Site-NA1
    site = getWebResourceFactory().createSite("file:Site-NA1");
    getWebResourceMap().put("Seo.Test.6.4.1-4NA-01", site);
    page = getWebResourceFactory().createPage(getTestcasesFilePath() + "SEO/SeoRule06041/Seo.Test.6.4.1-4NA-01.html");
    site.addChild(page);
    getWebResourceMap().put("Seo.Test.6.4.1-page05", page);
    page = getWebResourceFactory().createPage(getTestcasesFilePath() + "SEO/SeoRule06041/Seo.Test.6.4.1-4NA-02.html");
    site.addChild(page);
    getWebResourceMap().put("Seo.Test.6.4.1-page06", page);
    // file:Site-Passed2
    site = getWebResourceFactory().createSite("file:Site-Passed2");
    getWebResourceMap().put("Seo.Test.6.4.1-1Passed-02", site);
    page = getWebResourceFactory().createPage(getTestcasesFilePath() + "SEO/SeoRule06041/Seo.Test.6.4.1-4NA-02.html");
    site.addChild(page);
    getWebResourceMap().put("Seo.Test.6.4.1-page07", page);
    page = getWebResourceFactory().createPage(getTestcasesFilePath() + "SEO/SeoRule06041/Seo.Test.6.4.1-1Passed-01.html");
    site.addChild(page);
    getWebResourceMap().put("Seo.Test.6.4.1-page08", page);
    // file:Site-Passed3
    site = getWebResourceFactory().createSite("file:Site-Passed3");
    getWebResourceMap().put("Seo.Test.6.4.1-1Passed-03", site);
    page = getWebResourceFactory().createPage(getTestcasesFilePath() + "SEO/SeoRule06041/Seo.Test.6.4.1-1Passed-03.html");
    site.addChild(page);
    getWebResourceMap().put("Seo.Test.6.4.1-page09", page);
    page = getWebResourceFactory().createPage(getTestcasesFilePath() + "SEO/SeoRule06041/Seo.Test.6.4.1-1Passed-04.html");
    site.addChild(page);
    getWebResourceMap().put("Seo.Test.6.4.1-page10", page);
    // file:Site-Failed2
    site = getWebResourceFactory().createSite("file:Site-Failed2");
    getWebResourceMap().put("Seo.Test.6.4.1-2Failed-02", site);
    page = getWebResourceFactory().createPage(getTestcasesFilePath() + "SEO/SeoRule06041/Seo.Test.6.4.1-2Failed-03.html");
    site.addChild(page);
    getWebResourceMap().put("Seo.Test.6.4.1-page11", page);
    page = getWebResourceFactory().createPage(getTestcasesFilePath() + "SEO/SeoRule06041/Seo.Test.6.4.1-2Failed-04.html");
    site.addChild(page);
    getWebResourceMap().put("Seo.Test.6.4.1-page12", page);
    page = getWebResourceFactory().createPage(getTestcasesFilePath() + "SEO/SeoRule06041/Seo.Test.6.4.1-2Failed-05.html");
    site.addChild(page);
    getWebResourceMap().put("Seo.Test.6.4.1-page13", page);
    // file:Site-Failed3
    site = getWebResourceFactory().createSite("file:Site-Failed3");
    getWebResourceMap().put("Seo.Test.6.4.1-2Failed-03", site);
    page = getWebResourceFactory().createPage(getTestcasesFilePath() + "SEO/SeoRule06041/Seo.Test.6.4.1-2Failed-06.html");
    site.addChild(page);
    getWebResourceMap().put("Seo.Test.6.4.1-page14", page);
    page = getWebResourceFactory().createPage(getTestcasesFilePath() + "SEO/SeoRule06041/Seo.Test.6.4.1-2Failed-07.html");
    site.addChild(page);
    getWebResourceMap().put("Seo.Test.6.4.1-page15", page);
    page = getWebResourceFactory().createPage(getTestcasesFilePath() + "SEO/SeoRule06041/Seo.Test.6.4.1-2Failed-08.html");
    site.addChild(page);
    getWebResourceMap().put("Seo.Test.6.4.1-page16", page);
    // file:Site-Failed4
    site = getWebResourceFactory().createSite("file:Site-Failed4");
    getWebResourceMap().put("Seo.Test.6.4.1-2Failed-04", site);
    page = getWebResourceFactory().createPage(getTestcasesFilePath() + "SEO/SeoRule06041/Seo.Test.6.4.1-2Failed-09.html");
    site.addChild(page);
    getWebResourceMap().put("Seo.Test.6.4.1-page17", page);
    page = getWebResourceFactory().createPage(getTestcasesFilePath() + "SEO/SeoRule06041/Seo.Test.6.4.1-2Failed-10.html");
    site.addChild(page);
    getWebResourceMap().put("Seo.Test.6.4.1-page18", page);
    page = getWebResourceFactory().createPage(getTestcasesFilePath() + "SEO/SeoRule06041/Seo.Test.6.4.1-2Failed-11.html");
    site.addChild(page);
    getWebResourceMap().put("Seo.Test.6.4.1-page19", page);
    page = getWebResourceFactory().createPage(getTestcasesFilePath() + "SEO/SeoRule06041/Seo.Test.6.4.1-2Failed-12.html");
    site.addChild(page);
    getWebResourceMap().put("Seo.Test.6.4.1-page20", page);
}
Also used : Site(org.asqatasun.entity.subject.Site) Page(org.asqatasun.entity.subject.Page)

Example 77 with Page

use of org.asqatasun.entity.subject.Page in project Asqatasun by Asqatasun.

the class AuditExportResultController method prepareSuccessfullAuditDataToExport.

/**
     * 
     * @param page
     * @param model
     * @param locale
     * @param exportFormat
     * @param request
     * @param response
     * @return
     * @throws IOException
     */
private void prepareSuccessfullAuditDataToExport(WebResource webResource, Model model, Locale locale, String exportFormat, HttpServletRequest request, HttpServletResponse response) throws NotSupportedExportFormatException {
    model.addAttribute(TgolKeyStore.LOCALE_KEY, locale);
    Scope scope = getSiteScope();
    if (webResource instanceof Page) {
        scope = getPageScope();
    }
    List<TestResult> testResultList = TestResultFactory.getInstance().getTestResultList(webResource, scope, getLocaleResolver().resolveLocale(request));
    AuditStatistics auditStatistics = getAuditStatistics(webResource, model, TgolKeyStore.TEST_DISPLAY_SCOPE_VALUE, //TODO a revoir dans le cas manuel 
    false);
    model.addAttribute(TgolKeyStore.STATISTICS_KEY, auditStatistics);
    try {
        exportService.export(response, webResource.getId(), auditStatistics, testResultList, locale, exportFormat);
    } catch (ColumnBuilderException | ClassNotFoundException | JRException ex) {
        LOGGER.error(ex);
    }
}
Also used : AuditStatistics(org.asqatasun.webapp.presentation.data.AuditStatistics) ColumnBuilderException(ar.com.fdvs.dj.domain.builders.ColumnBuilderException) Scope(org.asqatasun.entity.reference.Scope) JRException(net.sf.jasperreports.engine.JRException) Page(org.asqatasun.entity.subject.Page) TestResult(org.asqatasun.webapp.presentation.data.TestResult)

Aggregations

Page (org.asqatasun.entity.subject.Page)77 Site (org.asqatasun.entity.subject.Site)68 WebResource (org.asqatasun.entity.subject.WebResource)7 ArrayList (java.util.ArrayList)6 Query (javax.persistence.Query)6 Audit (org.asqatasun.entity.audit.Audit)4 ProcessResult (org.asqatasun.entity.audit.ProcessResult)4 List (java.util.List)3 Map (java.util.Map)3 SSP (org.asqatasun.entity.audit.SSP)3 Content (org.asqatasun.entity.audit.Content)2 DefiniteResult (org.asqatasun.entity.audit.DefiniteResult)2 ForbiddenPageException (org.asqatasun.webapp.exception.ForbiddenPageException)2 ColumnBuilderException (ar.com.fdvs.dj.domain.builders.ColumnBuilderException)1 IOException (java.io.IOException)1 JRException (net.sf.jasperreports.engine.JRException)1 PreProcessResult (org.asqatasun.entity.audit.PreProcessResult)1 Scope (org.asqatasun.entity.reference.Scope)1 ContentDataService (org.asqatasun.entity.service.audit.ContentDataService)1 WebResourceDataService (org.asqatasun.entity.service.subject.WebResourceDataService)1