Class ChangeStreamOperation
java.lang.Object
org.restheart.mongodb.handlers.changestreams.ChangeStreamOperation
- Author:
- Andrea Di Cesare <andrea@softinstigate.com>, Omar Trasatti <omar@softinstigate.com>
-
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<ChangeStreamOperation>getFromJson(org.bson.BsonDocument collProps) List<org.bson.BsonDocument>getResolvedStagesAsList(org.bson.BsonDocument vars) org.bson.BsonArraygetUri()
-
Field Details
-
STREAM_ELEMENT_NAME
- See Also:
-
URI_ELEMENT_NAME
- See Also:
-
STAGES_ELEMENT_NAME
- See Also:
-
-
Constructor Details
-
ChangeStreamOperation
- Parameters:
properties-- Throws:
InvalidMetadataException
-
-
Method Details
-
getFromJson
public static List<ChangeStreamOperation> 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
-
getUri
- Returns:
- the uri
-
getStages
public org.bson.BsonArray getStages()- Returns:
- the stages
-
getResolvedStagesAsList
public List<org.bson.BsonDocument> getResolvedStagesAsList(org.bson.BsonDocument vars) throws InvalidMetadataException, QueryVariableNotBoundException - Parameters:
vars- RequestContext.getAggregationVars()- Returns:
- the stages, with unescaped operators and bound variables
- Throws:
InvalidMetadataExceptionQueryVariableNotBoundException
-
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
-