@Value("${delta.events.enabled:false}")
private boolean isDeltaEventsEnabled;
+ private String serverBase;
+
@Autowired
private XmlFormatTransformer xmlFormatTransformer;
return this;
}
+ public HttpEntry setHttpEntryProperties(SchemaVersion version, String serverBase) {
+ this.version = version;
+ this.loader = loaderFactory.createLoaderForVersion(introspectorFactoryType, version);
+ this.dbEngine = new JanusGraphDBEngine(queryStyle, loader);
+
+ getDbEngine().startTransaction();
+ this.notification = new UEBNotification(loader, loaderFactory, schemaVersions);
+ if("true".equals(AAIConfig.get("aai.notification.depth.all.enabled", "true"))){
+ this.notificationDepth = AAIProperties.MAXIMUM_DEPTH;
+ } else {
+ this.notificationDepth = AAIProperties.MINIMUM_DEPTH;
+ }
+
+ this.serverBase = serverBase;
+ return this;
+ }
+
public HttpEntry setHttpEntryProperties(SchemaVersion version, UEBNotification notification) {
this.version = version;
this.loader = loaderFactory.createLoaderForVersion(introspectorFactoryType, version);
public Pair<Boolean, List<Pair<URI, Response>>> process(List<DBRequest> requests, String sourceOfTruth,
boolean enableResourceVersion) throws AAIException {
- DBSerializer serializer = new DBSerializer(version, dbEngine, introspectorFactoryType, sourceOfTruth, notificationDepth);
+ DBSerializer serializer = null;
+
+ if(serverBase != null){
+ serializer = new DBSerializer(version, dbEngine, introspectorFactoryType, sourceOfTruth, notificationDepth, serverBase);
+ } else {
+ serializer = new DBSerializer(version, dbEngine, introspectorFactoryType, sourceOfTruth, notificationDepth);
+ }
+
Response response;
Introspector obj;
QueryParser query;
}
} else {
FormatFactory ff =
- new FormatFactory(loader, serializer, schemaVersions, basePath + "/");
+ new FormatFactory(loader, serializer, schemaVersions, basePath + "/", serverBase);
Formatter formatter = ff.get(format, params);
result = formatter.output(vertices.stream().map(vertex -> (Object) vertex)
.collect(Collectors.toList())).toString();
}
} else {
FormatFactory ff =
- new FormatFactory(loader, serializer, schemaVersions, basePath + "/");
+ new FormatFactory(loader, serializer, schemaVersions, basePath + "/", serverBase);
Formatter formatter = ff.get(format, params);
result = formatter.output(vertices.stream().map(vertex -> (Object) vertex)
.collect(Collectors.toList())).toString();