Search in sources :

Example 26 with Page

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

the class Aw22Rule12011Test method setUpWebResourceMap.

@Override
protected void setUpWebResourceMap() {
    getWebResourceMap().put("AW22.Test.12.1.1-4NA-01", getWebResourceFactory().createPage(getTestcasesFilePath() + "accessiweb22/Aw22Rule12011/AW22.Test.12.1.1-3NMI-01.html"));
    Site site = getWebResourceFactory().createSite("file:Site-NotTested");
    getWebResourceMap().put("AW22.Test.12.1.1-5NT-01", site);
    Page page = getWebResourceFactory().createPage(getTestcasesFilePath() + "accessiweb22/Aw22Rule12011/AW22.Test.12.1.1-3NMI-01.html");
    site.addChild(page);
    getWebResourceMap().put("AW22.Test.12.1.1-5NT-01-page1", page);
    page = getWebResourceFactory().createPage(getTestcasesFilePath() + "accessiweb22/Aw22Rule12011/AW22.Test.12.1.1-3NMI-01.html");
    site.addChild(page);
    getWebResourceMap().put("AW22.Test.12.1.1-5NT-01-page1", page);
}
Also used : Site(org.asqatasun.entity.subject.Site) Page(org.asqatasun.entity.subject.Page)

Example 27 with Page

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

the class Aw22Rule12021Test method setUpWebResourceMap.

@Override
protected void setUpWebResourceMap() {
    getWebResourceMap().put("AW22.Test.12.2.1-4NA-01", getWebResourceFactory().createPage(getTestcasesFilePath() + "accessiweb22/Aw22Rule12021/AW22.Test.12.2.1-3NMI-01.html"));
    Site site = getWebResourceFactory().createSite("file:Site-NotTested");
    getWebResourceMap().put("AW22.Test.12.2.1-5NT-01", site);
    Page page = getWebResourceFactory().createPage(getTestcasesFilePath() + "accessiweb22/Aw22Rule12021/AW22.Test.12.2.1-3NMI-01.html");
    site.addChild(page);
    getWebResourceMap().put("AW22.Test.12.2.1-5NT-01-page1", page);
    page = getWebResourceFactory().createPage(getTestcasesFilePath() + "accessiweb22/Aw22Rule12021/AW22.Test.12.2.1-3NMI-01.html");
    site.addChild(page);
    getWebResourceMap().put("AW22.Test.12.2.1-5NT-01-page1", page);
}
Also used : Site(org.asqatasun.entity.subject.Site) Page(org.asqatasun.entity.subject.Page)

Example 28 with Page

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

the class Rgaa30Rule110302Test method setUpWebResourceMap.

@Override
protected void setUpWebResourceMap() {
    getWebResourceMap().put("Rgaa30.Test.11.03.02-4NA-01", getWebResourceFactory().createPage(getTestcasesFilePath() + "rgaa30/Rgaa30Rule110302/Rgaa30.Test.11.03.02-3NMI-01.html"));
    Site site = getWebResourceFactory().createSite("file:Site-NotTested");
    getWebResourceMap().put("Rgaa30.Test.11.03.02-5NT-01", site);
    Page page = getWebResourceFactory().createPage(getTestcasesFilePath() + "rgaa30/Rgaa30Rule110302/Rgaa30.Test.11.03.02-3NMI-01.html");
    site.addChild(page);
    getWebResourceMap().put("Rgaa30.Test.11.03.02-5NT-01-page1", page);
    page = getWebResourceFactory().createPage(getTestcasesFilePath() + "rgaa30/Rgaa30Rule110302/Rgaa30.Test.11.03.02-3NMI-01.html");
    site.addChild(page);
    getWebResourceMap().put("Rgaa30.Test.11.03.02-5NT-01-page1", page);
}
Also used : Site(org.asqatasun.entity.subject.Site) Page(org.asqatasun.entity.subject.Page)

Example 29 with Page

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

the class ContentDAOImpl method findNumberOfOrphanRelatedContentFromWebResource.

@Override
public Long findNumberOfOrphanRelatedContentFromWebResource(WebResource webResource) {
    if (webResource instanceof Page) {
        Query query = entityManager.createQuery(SELECT_DISTINCT_RELATED_CONTENT + RelatedContentImpl.class.getName() + RELATED_CONTENT_KEY + JOIN_PARENT_CONTENT_SET + JOIN_WR + WEB_RESOURCE_CONDITION + " AND rc.httpStatusCode =:httpStatusCode");
        query.setParameter(WEB_RESOURCE_KEY, webResource);
        query.setParameter(HTTP_STATUS_CODE_KEY, DEFAULT_HTTP_STATUS_VALUE);
        return (Long) query.getSingleResult();
    } else if (webResource instanceof Site) {
        Query query = entityManager.createQuery(SELECT_DISTINCT_RELATED_CONTENT + RelatedContentImpl.class.getName() + RELATED_CONTENT_KEY + JOIN_PARENT_CONTENT_SET + JOIN_WR + " JOIN w.parent p" + " WHERE p=:webResource" + " AND rc.httpStatusCode =:httpStatusCode");
        query.setParameter(WEB_RESOURCE_KEY, webResource);
        query.setParameter(HTTP_STATUS_CODE_KEY, DEFAULT_HTTP_STATUS_VALUE);
        return (Long) query.getSingleResult();
    }
    return (long) 0;
}
Also used : Site(org.asqatasun.entity.subject.Site) Query(javax.persistence.Query) Page(org.asqatasun.entity.subject.Page)

Example 30 with Page

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

the class ContentDAOImpl method findNumberOfSSPFromWebResource.

@Override
public Long findNumberOfSSPFromWebResource(WebResource webResource, int httpStatusCode) {
    if (webResource != null) {
        StringBuilder strb = new StringBuilder();
        strb.append(SELECT_DISTINCT_SSP);
        strb.append(SSPImpl.class.getName());
        strb.append(" s");
        strb.append(JOIN_WR);
        if (webResource instanceof Page) {
            strb.append(" WHERE w.id=:idWebResource");
        } else if (webResource instanceof Site) {
            strb.append(" WHERE w.parent.id=:idWebResource");
        }
        if (httpStatusCode != -1) {
            strb.append(HTTP_STATUS_CONDITION);
        } else {
            strb.append(" AND s.httpStatusCode!=:httpStatusCode");
        }
        Query query = entityManager.createQuery(strb.toString());
        query.setParameter(ID_WEB_RESOURCE_KEY, webResource.getId());
        query.setParameter(HTTP_STATUS_CODE_KEY, httpStatusCode);
        return (Long) query.getSingleResult();
    } else {
        return (long) 0;
    }
}
Also used : Site(org.asqatasun.entity.subject.Site) Query(javax.persistence.Query) Page(org.asqatasun.entity.subject.Page)

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