Class AbstractAggregationOperation
- java.lang.Object
-
- org.restheart.mongodb.handlers.aggregation.AbstractAggregationOperation
-
- Direct Known Subclasses:
AggregationPipeline,MapReduce
public abstract class AbstractAggregationOperation extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAbstractAggregationOperation.TYPE
-
Field Summary
Fields Modifier and Type Field Description static StringAGGREGATIONS_ELEMENT_NAMEstatic StringTYPE_ELEMENT_NAMEstatic StringURI_ELEMENT_NAME
-
Constructor Summary
Constructors Constructor Description AbstractAggregationOperation(org.bson.BsonDocument properties)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected 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)AbstractAggregationOperation.TYPEgetType()StringgetUri()
-
-
-
Field Detail
-
AGGREGATIONS_ELEMENT_NAME
public static final String AGGREGATIONS_ELEMENT_NAME
- See Also:
- Constant Field Values
-
URI_ELEMENT_NAME
public static final String URI_ELEMENT_NAME
- See Also:
- Constant Field Values
-
TYPE_ELEMENT_NAME
public static final String TYPE_ELEMENT_NAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AbstractAggregationOperation
public AbstractAggregationOperation(org.bson.BsonDocument properties) throws InvalidMetadataException- Parameters:
properties-- Throws:
InvalidMetadataException
-
-
Method Detail
-
getFromJson
public static List<AbstractAggregationOperation> getFromJson(org.bson.BsonDocument collProps) throws InvalidMetadataException
- Parameters:
collProps-- Returns:
- Throws:
InvalidMetadataException
-
checkAggregationVariables
public static void checkAggregationVariables(org.bson.BsonValue aVars) throws SecurityExceptionchecks 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
public AbstractAggregationOperation.TYPE getType()
- Returns:
- the type
-
getUri
public String 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": "var") are replaced with the values defined in the avars URL query parameter
- Throws:
InvalidMetadataExceptionQueryVariableNotBoundException
-
-