@Override public Marshaller build(Set<Class<?>> classes, MarshallingFormat format, ClassLoader classLoader) { if (format.equals(MarshallingFormat.XSTREAM)) { return new XStreamMarshaller(classes, classLoader) { @Override protected void buildMarshaller(Set<Class<?>> classes, ClassLoader classLoader) { xstream = XStreamUtils.createNonTrustingXStream(new PureJavaReflectionProvider(), new DomDriver("UTF-8", new XmlFriendlyNameCoder("_-", "_"))); xstream.addPermission(new WildcardTypePermission(new String[]{"org.kie.server.api.**"})); String[] voidDeny = {"void.class", "Void.class"}; xstream.denyTypes(voidDeny); } }; } return super.build(classes, format, classLoader); } }
protected Comparable<?> subtractOneMinuteFromDate(Date date) { Instant instant = Instant.from(date.toInstant()); instant = instant.minus(Duration.ofMinutes(1)); Date calculated = Date.from(instant); if (marshallingFormat.equals(MarshallingFormat.JAXB)) { return new JaxbDate(calculated); } return calculated; } }
handler = queryDataServiceBase; if (marshallingFormat.equals(MarshallingFormat.JAXB)) { wrapResults = true;
.isEveryProblemFactChangeProcessed(containerId, isEveryProblemFactChangeProcessedCommand.getSolverId()); if (marshallingFormat.equals(MarshallingFormat.JAXB)) { Object wrappedResult = ModelWrapper.wrap(everyProblemFactChangeProcessedResponse.getResult()); response = new ServiceResponse<>(everyProblemFactChangeProcessedResponse.getType(),