Class AddNamedViewHandler
- java.lang.Object
-
- uk.gov.gchq.gaffer.store.operation.handler.named.AddNamedViewHandler
-
- All Implemented Interfaces:
AddToCacheHandler<AddNamedView>,OperationHandler<AddNamedView>
public class AddNamedViewHandler extends Object implements AddToCacheHandler<AddNamedView>
Operation handler forAddNamedViewwhich adds a NamedViewDetail to the cache.
-
-
Constructor Summary
Constructors Constructor Description AddNamedViewHandler(String suffixNamedViewCacheName)AddNamedViewHandler(NamedViewCache cache)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectdoOperation(AddNamedView operation, Context context, Store store)Adds aNamedViewDetailto the NamedViewCache.StringgetSuffixCacheName()
-
-
-
Constructor Detail
-
AddNamedViewHandler
public AddNamedViewHandler(String suffixNamedViewCacheName)
-
AddNamedViewHandler
public AddNamedViewHandler(NamedViewCache cache)
-
-
Method Detail
-
getSuffixCacheName
public String getSuffixCacheName()
- Specified by:
getSuffixCacheNamein interfaceAddToCacheHandler<AddNamedView>
-
doOperation
public Object doOperation(AddNamedView operation, Context context, Store store) throws OperationException
Adds aNamedViewDetailto the NamedViewCache. If no cache is specified it will created a newNamedViewCache. TheAddNamedViewname field must be set and cannot be left empty, or the build() method will fail and a runtime exception will be thrown. The handler then adds/overwrites theNamedViewDetailaccording to an overwrite flag.- Specified by:
doOperationin interfaceOperationHandler<AddNamedView>- Parameters:
operation- theOperationcontaining theNamedViewto be added to cachecontext- theContextstore- theStorethe operation should be run on- Returns:
- null (since the output is void)
- Throws:
OperationException- if the addition to the cache fails
-
-