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 forAddNamedView
which 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 Object
doOperation(AddNamedView operation, Context context, Store store)
Adds aNamedViewDetail
to the NamedViewCache.String
getSuffixCacheName()
-
-
-
Constructor Detail
-
AddNamedViewHandler
public AddNamedViewHandler(String suffixNamedViewCacheName)
-
AddNamedViewHandler
public AddNamedViewHandler(NamedViewCache cache)
-
-
Method Detail
-
getSuffixCacheName
public String getSuffixCacheName()
- Specified by:
getSuffixCacheName
in interfaceAddToCacheHandler<AddNamedView>
-
doOperation
public Object doOperation(AddNamedView operation, Context context, Store store) throws OperationException
Adds aNamedViewDetail
to the NamedViewCache. If no cache is specified it will created a newNamedViewCache
. TheAddNamedView
name 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 theNamedViewDetail
according to an overwrite flag.- Specified by:
doOperation
in interfaceOperationHandler<AddNamedView>
- Parameters:
operation
- theOperation
containing theNamedView
to be added to cachecontext
- theContext
store
- theStore
the operation should be run on- Returns:
- null (since the output is void)
- Throws:
OperationException
- if the addition to the cache fails
-
-