Class CollectionPropsInjector
java.lang.Object
org.restheart.mongodb.interceptors.CollectionPropsInjector
- All Implemented Interfaces:
ConfigurablePlugin,ExchangeTypeResolver<MongoRequest,MongoResponse>,Interceptor<MongoRequest,MongoResponse>,MongoInterceptor,Plugin
Injects the collection properties into the Request
It is also responsible of sending NOT_FOUND in case of requests involving not
existing collections (that are not PUT)
- Author:
- Andrea Di Cesare <andrea@softinstigate.com>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancheckCollection(MongoRequest request)protected voiddoesNotExists(MongoRequest request, MongoResponse response)voidhandle(MongoRequest request, MongoResponse response)voidinit(com.mongodb.MongoClient mclient)Makes sure that dbsDAO is instantiated after MongoClient initializationbooleanresolve(MongoRequest request, MongoResponse response)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.restheart.plugins.ExchangeTypeResolver
requestType, responseType
-
Constructor Details
-
CollectionPropsInjector
public CollectionPropsInjector()
-
-
Method Details
-
init
public void init(com.mongodb.MongoClient mclient)Makes sure that dbsDAO is instantiated after MongoClient initialization- Parameters:
mclient-
-
handle
- Specified by:
handlein interfaceInterceptor<MongoRequest,MongoResponse>- Parameters:
request-response-- Throws:
Exception
-
resolve
- Specified by:
resolvein interfaceInterceptor<MongoRequest,MongoResponse>
-
doesNotExists
- Parameters:
request-response-- Throws:
Exception
-
checkCollection
- Parameters:
request-- Returns:
-