Mentions légales du service

Skip to content
Snippets Groups Projects

Develop

Merged Malo Toudic requested to merge develop into master
12 files
+ 762
94
Compare changes
  • Side-by-side
  • Inline
Files
12
@@ -3,7 +3,10 @@ package net.ihe.gazelle.contentanalyzer.app;
import net.ihe.gazelle.common.application.action.ApplicationPreferenceManager;
import net.ihe.gazelle.contentanalyzer.business.McaApi;
import net.ihe.gazelle.contentanalyzer.business.exceptions.UnexpectedAnalysisException;
import net.ihe.gazelle.contentanalyzer.business.model.*;
import net.ihe.gazelle.contentanalyzer.business.model.AnalyzedObject;
import net.ihe.gazelle.contentanalyzer.business.model.AnalyzedObjectPart;
import net.ihe.gazelle.contentanalyzer.business.model.ValidationObject;
import net.ihe.gazelle.contentanalyzer.business.model.ValidationType;
import net.ihe.gazelle.contentanalyzer.business.model.config.McaConfigDAO;
import net.ihe.gazelle.contentanalyzer.business.model.config.MimeTypeConfigEnum;
import net.ihe.gazelle.contentanalyzer.business.model.config.ZipStructureInterface;
@@ -310,30 +313,26 @@ public class AnalyzerBeanBusiness {
init(analyzedObject, toolOid, externalId, proxyType);
}
public String validate(final String objectPath, final ValidationType validationType, final int startOffset,
public ValidationObject createValidationObject(final byte[] content, final ValidationType validationType, final int startOffset,
final int endOffset, final String oid) throws UnexpectedAnalysisException{
final String encodedObjectPath = this.getEncodedFilePath(objectPath);
ValidationObject validationObject = new ValidationObject(oid, startOffset, endOffset, content);
String url = "/validate.seam?startOffset=" + startOffset + "&endOffset=" + endOffset +
"&messageContentAnalyzerOid=" + oid + "&filePath=" + encodedObjectPath ;
if(validationType != null){
url = url + "&validationType=" + validationType.name();
validationObject.setValidationType(validationType.name());
}
if (getToolOID() != null && !getToolOID().isEmpty()) {
url += "&toolOid=" + getToolOID();
validationObject.setToolOid(getToolOID());
}
// Get the tool externalId if exist (To send back the result)
if (getExternalId() != null && !getExternalId().isEmpty()) {
url += "&externalId=" + getExternalId();
validationObject.setUniqueKey(getExternalId());
}
// Get the proxy type if exist and add it(To send back the result)
if (getProxyType() != null && !getProxyType().isEmpty()) {
url += "&proxyType=" + getProxyType();
validationObject.setType(getProxyType());
}
return url;
return validationObject;
}
///////////////////////////////////////////////////////////////////////////////
Loading