Class AbstractAggregationOperation
java.lang.Object
org.restheart.mongodb.handlers.aggregation.AbstractAggregationOperation
- Direct Known Subclasses:
AggregationPipeline,MapReduce
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.bson.BsonValuebindAggregationVariables(org.bson.BsonValue obj, org.bson.BsonDocument aVars) static voidcheckAggregationVariables(org.bson.BsonValue aVars) checks if the aggregation variable start with $ this is not allowed since the client would be able to modify the aggregation stagesstatic List<AbstractAggregationOperation>getFromJson(org.bson.BsonDocument collProps) getType()getUri()
-
Field Details
-
AGGREGATIONS_ELEMENT_NAME
- See Also:
-
URI_ELEMENT_NAME
- See Also:
-
TYPE_ELEMENT_NAME
- See Also:
-
-
Constructor Details
-
AbstractAggregationOperation
public AbstractAggregationOperation(org.bson.BsonDocument properties) throws InvalidMetadataException - Parameters:
properties-- Throws:
InvalidMetadataException
-
-
Method Details
-
getFromJson
public static List<AbstractAggregationOperation> getFromJson(org.bson.BsonDocument collProps) throws InvalidMetadataException - Parameters:
collProps-- Returns:
- Throws:
InvalidMetadataException
-
checkAggregationVariables
checks if the aggregation variable start with $ this is not allowed since the client would be able to modify the aggregation stages- Parameters:
aVars- RequestContext.getAggregationVars()- Throws:
SecurityException
-
getType
- Returns:
- the type
-
getUri
- Returns:
- the uri
-
bindAggregationVariables
protected org.bson.BsonValue bindAggregationVariables(org.bson.BsonValue obj, org.bson.BsonDocument aVars) throws InvalidMetadataException, QueryVariableNotBoundException - Parameters:
obj-aVars- RequestContext.getAggregationVars()- Returns:
- the json object where the variables
{"_$var": "name" }or{"_$var": [ "name", "defaultValue" ] }are replaced with the values defined in the avars URL query parameter - Throws:
InvalidMetadataExceptionQueryVariableNotBoundException
-