Enum Collection.Hook

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<Collection.Hook>
    Enclosing class:
    Collection

    public static enum Collection.Hook
    extends java.lang.Enum<Collection.Hook>

    Groovy Hook scripts names.

    Each collection can have a set of Groovy scripts that are run at various stages of the search lifecycle.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String COLLECTION_KEY
      Name of the Groovy variable that will contain the collection, from within a cache Groovy script.
      static java.lang.String DOCUMENT_KEY
      Name of the Groovy variable that will contain the document (key + content + metadata), from within a cache Groovy script.
      static java.lang.String HOOK_NAME
      Name of the Groovy variable that will contain the name of the "current" hook script being run
      static java.lang.String SEARCH_TRANSACTION_KEY
      Name of the Groovy variable that will contain the search transaction, from whithin a Groovy script.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private Hook()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static Collection.Hook valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static Collection.Hook[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • SEARCH_TRANSACTION_KEY

        public static final java.lang.String SEARCH_TRANSACTION_KEY

        Name of the Groovy variable that will contain the search transaction, from whithin a Groovy script.

        See Also:
        Constant Field Values
      • COLLECTION_KEY

        public static final java.lang.String COLLECTION_KEY
        Name of the Groovy variable that will contain the collection, from within a cache Groovy script.
        See Also:
        Constant Field Values
      • DOCUMENT_KEY

        public static final java.lang.String DOCUMENT_KEY
        Name of the Groovy variable that will contain the document (key + content + metadata), from within a cache Groovy script.
        Since:
        v12.4
        See Also:
        Constant Field Values
      • HOOK_NAME

        public static final java.lang.String HOOK_NAME
        Name of the Groovy variable that will contain the name of the "current" hook script being run
        See Also:
        Constant Field Values
    • Constructor Detail

      • Hook

        private Hook()
    • Method Detail

      • values

        public static Collection.Hook[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Collection.Hook c : Collection.Hook.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Collection.Hook valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null