Class PluginCreateRuleBuilder

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected PluginCreateRule createRule()
      Provides an instance of Rule.
      R get()
      Provides an instance of Rule.
      java.lang.String getNamespaceURI()
      Returns the namespace URI for which this Rule is relevant, if any.
      java.lang.String getPattern()
      Returns the rule pattern associated to this builder.
      <T> PluginCreateRuleBuilder ofType​(java.lang.Class<T> type)
      Set the class which any specified plugin must be descended from.
      protected void reportError​(java.lang.String methodChain, java.lang.String message)  
      PluginCreateRuleBuilder setPluginClassAttribute​(java.lang.String attrName)
      Sets the xml attribute which the input xml uses to indicate to a PluginCreateRule which class should be instantiated.
      PluginCreateRuleBuilder setPluginClassAttribute​(java.lang.String namespaceUri, java.lang.String attrName)
      Sets the xml attribute which the input xml uses to indicate to a PluginCreateRule which class should be instantiated.
      PluginCreateRuleBuilder setPluginIdAttribute​(java.lang.String attrName)
      Sets the xml attribute which the input xml uses to indicate to a PluginCreateRule which plugin declaration is being referenced.
      PluginCreateRuleBuilder setPluginIdAttribute​(java.lang.String namespaceUri, java.lang.String attrName)
      Sets the xml attribute which the input xml uses to indicate to a PluginCreateRule which plugin declaration is being referenced.
      LinkedRuleBuilder then()
      Come back to the main LinkedRuleBuilder.
      <T> PluginCreateRuleBuilder usingDefaultPluginClass​(java.lang.Class<T> type)
      Set the class which will be used if the user doesn't specify any plugin-class or plugin-id.
      <RL extends RuleLoader>
      PluginCreateRuleBuilder
      usingRuleLoader​(RL ruleLoader)
      Set RuleLoader instance which knows how to load the custom rules associated with the default plugin.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • ofType

        public <T> PluginCreateRuleBuilder ofType​(java.lang.Class<T> type)
        Set the class which any specified plugin must be descended from.
        Type Parameters:
        T - Any Java type
        Parameters:
        type - the class which any specified plugin must be descended from
        Returns:
        this builder instance
      • usingDefaultPluginClass

        public <T> PluginCreateRuleBuilder usingDefaultPluginClass​(java.lang.Class<T> type)
        Set the class which will be used if the user doesn't specify any plugin-class or plugin-id.
        Type Parameters:
        T - Any Java type
        Parameters:
        type - the class which will be used if the user doesn't specify any plugin-class or plugin-id.
        Returns:
        this builder instance
      • usingRuleLoader

        public <RL extends RuleLoaderPluginCreateRuleBuilder usingRuleLoader​(RL ruleLoader)
        Set RuleLoader instance which knows how to load the custom rules associated with the default plugin.
        Type Parameters:
        RL - Any RuleLoader extension.
        Parameters:
        ruleLoader - the RuleLoader instance which knows how to load the custom rules associated with the default plugin.
        Returns:
        this builder instance
      • setPluginClassAttribute

        public PluginCreateRuleBuilder setPluginClassAttribute​(java.lang.String attrName)
        Sets the xml attribute which the input xml uses to indicate to a PluginCreateRule which class should be instantiated.
        Parameters:
        attrName - the xml attribute which the input xml uses to indicate to a PluginCreateRule which class should be instantiated.
        Returns:
        this builder instance
      • setPluginClassAttribute

        public PluginCreateRuleBuilder setPluginClassAttribute​(java.lang.String namespaceUri,
                                                               java.lang.String attrName)
        Sets the xml attribute which the input xml uses to indicate to a PluginCreateRule which class should be instantiated.
        Parameters:
        namespaceUri - The attribute NameSpace
        attrName - The attribute name
        Returns:
        this builder instance
      • setPluginIdAttribute

        public PluginCreateRuleBuilder setPluginIdAttribute​(java.lang.String attrName)
        Sets the xml attribute which the input xml uses to indicate to a PluginCreateRule which plugin declaration is being referenced.
        Parameters:
        attrName - The attribute name
        Returns:
        this builder instance
      • setPluginIdAttribute

        public PluginCreateRuleBuilder setPluginIdAttribute​(java.lang.String namespaceUri,
                                                            java.lang.String attrName)
        Sets the xml attribute which the input xml uses to indicate to a PluginCreateRule which plugin declaration is being referenced.
        Parameters:
        namespaceUri - The attribute NameSpace
        attrName - The attribute name
        Returns:
        this builder instance
      • getNamespaceURI

        public final java.lang.String getNamespaceURI()
        Returns the namespace URI for which this Rule is relevant, if any.
        Returns:
        The namespace URI for which this Rule is relevant, if any
      • get

        public final R get()
        Provides an instance of Rule. Must never return null.
        Specified by:
        get in interface RuleProvider<R extends Rule>
        Returns:
        an instance of Rule.
      • reportError

        protected final void reportError​(java.lang.String methodChain,
                                         java.lang.String message)
      • getPattern

        public final java.lang.String getPattern()
        Returns the rule pattern associated to this builder.
        Returns:
        The rule pattern associated to this builder