use of org.asqatasun.entity.parameterization.Parameter in project Asqatasun by Asqatasun.
the class CrawlerImpl method updateExcludeRelCanonicalRegardingRef.
/**
* This method update the relcanonical boolean regarding the referential.
* For a11y refs, the boolean has to be set to false.
*/
private void updateExcludeRelCanonicalRegardingRef() {
for (Parameter param : paramSet) {
if (param.getParameterElement().getParameterElementCode().equals("LEVEL")) {
String level = param.getValue().split(";")[0];
if (keepRelCanonicalRefList.contains(level)) {
LOGGER.info("Rel canonical pages are kept for ref " + level);
excludeRelCanonical = false;
} else {
LOGGER.info("Rel canonical pages are excluded for ref " + level);
}
break;
}
}
}
use of org.asqatasun.entity.parameterization.Parameter in project Asqatasun by Asqatasun.
the class MockParameterDataService method getParameter.
@Override
public Parameter getParameter(Audit audit, String string) {
Parameter param = new ParameterImpl();
param.setValue("1000");
return param;
}
use of org.asqatasun.entity.parameterization.Parameter in project Asqatasun by Asqatasun.
the class ParameterFactoryImpl method createParameter.
@Override
public Parameter createParameter(ParameterElement parameterElement, String value, Audit audit) {
Parameter parameter = createParameter(parameterElement, value);
audit.addParameter(parameter);
return parameter;
}
use of org.asqatasun.entity.parameterization.Parameter in project Asqatasun by Asqatasun.
the class CrawlerServiceImpl method crawlSite.
/**
* Calls the crawler component process then updates the site.
*
* @param siteUrl the site to crawl
* @param audit the current audit
*
* @return returns the site after modification
*/
@Override
public WebResource crawlSite(Audit audit, String siteUrl) {
Crawler crawler = getCrawlerInstance((Set<Parameter>) audit.getParameterSet(), true);
crawler.setSiteURL(siteUrl);
return crawl(crawler, audit, true);
}
use of org.asqatasun.entity.parameterization.Parameter in project Asqatasun by Asqatasun.
the class AuditSetUpCommandFactory method getPageAuditSetUpCommand.
/**
* @param contract
* @param url
* @param auditParamset
* @return an AuditSetUpCommand instance set for page audit
*/
public AuditSetUpCommand getPageAuditSetUpCommand(Contract contract, String url, Set<Parameter> auditParamset) {
AuditSetUpCommand pageAuditSetUpCommand = new AuditSetUpCommand();
pageAuditSetUpCommand.setScope(ScopeEnum.PAGE);
pageAuditSetUpCommand.setContractId(contract.getId());
pageAuditSetUpCommand.setRelaunch(true);
List<String> urlList = new ArrayList();
urlList.add(url);
pageAuditSetUpCommand.setUrlList(urlList);
for (Parameter param : auditParamset) {
String paramCode = param.getParameterElement().getParameterElementCode();
if (paramCode.equals(TgolKeyStore.LEVEL_PARAM_KEY)) {
pageAuditSetUpCommand.setLevel(param.getValue());
} else {
pageAuditSetUpCommand.setAuditParameter(paramCode, param.getValue());
}
}
return pageAuditSetUpCommand;
}
Aggregations