@Override void applyGlobalTransformers(HttpServerExchange exchange, RequestContext context) { // execture global request tranformers getGlobalTransformers().stream() .filter(gt -> doesGlobalTransformerAppy(gt, exchange, context)) .forEachOrdered(gt -> { if (context.getContent() == null || context.getContent().isDocument()) { gt.transform( exchange, context, context.getContent()); } else if (context.getContent().isArray()) { context.getContent().asArray().forEach(doc -> { gt.transform( exchange, context, doc); }); } }); }
BsonArray _ids = args.asArray(); _ids.forEach(propertyName -> { if (propertyName.isString()) { propertiesToTransform.add(
BsonArray toremove = args.asArray(); toremove.forEach(_prop -> { if (_prop.isString()) { String prop = _prop.asString().getValue();
private void addAggregationsLinks( final RequestContext context, final Representation rep, final String requestPath) { BsonValue _aggregations = context .getCollectionProps() .get(AbstractAggregationOperation.AGGREGATIONS_ELEMENT_NAME); if (_aggregations != null && _aggregations.isArray()) { BsonArray aggregations = _aggregations.asArray(); aggregations.forEach(q -> { if (q.isDocument()) { BsonValue _uri = q.asDocument().get("uri"); if (_uri != null && _uri.isString()) { String uri = _uri.asString().getValue(); rep.addLink( new Link(uri, requestPath + "/" + RequestContext._AGGREGATIONS + "/" + uri)); } } }); } }
BsonArray countsArray = _count.asArray(); countsArray.forEach(countElement -> { if (countElement.isInt32()) { counts.add(countElement.asInt32().getValue()); .asArray(); mandatoryFieldsArray.forEach(element -> { if (element.isString()) { mandatoryFields.add(element .asArray(); optionalFieldsArray.forEach(element -> { if (element.isString()) { optionalFields.add(
tohash.forEach(_prop -> { if (_prop.isString()) { String prop = _prop.asString().getValue();