Class AddNamedOperationHandler

    • Field Detail

      • DEFAULT_IS_NESTED_NAMED_OPERATIONS_ALLOWED

        public static final Boolean DEFAULT_IS_NESTED_NAMED_OPERATIONS_ALLOWED
    • Constructor Detail

      • AddNamedOperationHandler

        public AddNamedOperationHandler​(String suffixNamedOperationCacheName,
                                        Boolean isNestedNamedOperationsAllowed)
      • AddNamedOperationHandler

        public AddNamedOperationHandler​(NamedOperationCache cache,
                                        Boolean isNestedNamedOperationsAllowed)
    • Method Detail

      • isNestedNamedOperationsAllowed

        public boolean isNestedNamedOperationsAllowed()
      • doOperation

        public Void doOperation​(AddNamedOperation operation,
                                Context context,
                                Store store)
                         throws OperationException
        Adds a NamedOperation to a cache which must be specified in the operation declarations file. An NamedOperationDetail is built using the fields on the AddNamedOperation. The operation name and operation chain fields 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 the NamedOperation according toa an overwrite flag.
        Specified by:
        doOperation in interface OperationHandler<AddNamedOperation>
        Parameters:
        operation - the Operation to be executed
        context - the operation chain context, containing the user who executed the operation
        store - the Store the operation should be run on
        Returns:
        null (since the output is void)
        Throws:
        OperationException - if the operation on the cache fails