com.adobe.livecycle.output.client
Class Rule

java.lang.Object
  extended by com.adobe.livecycle.output.client.Rule
All Implemented Interfaces:
java.io.Serializable

public class Rule
extends java.lang.Object
implements java.io.Serializable

Enables the creation of search rules that results in the Output service searching the input data that is passed with the request and using a different form design based on the data content. To see this class used within a code example, see the Creating search rules using the Java API quick start in Programming with Adobe Experience Manager forms.

See Also:
Serialized Form

Constructor Summary
Rule()
          A standard constructor that creates a Rule object.
Rule(java.lang.String mPattern, java.lang.String mForm)
          A standard constructor that accepts a form design and a text pattern to search for.
 
Method Summary
 java.lang.String getForm()
          Returns the form design to use if the pattern is located within the input data.
 java.lang.String getPattern()
          Returns the text pattern for which the Output service searches.
 void setForm(java.lang.String form)
          Sets the form design to use if the pattern is located within the input data.
 void setPattern(java.lang.String pattern)
          Sets the text pattern for which the Output service searches.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Rule

public Rule()
A standard constructor that creates a Rule object.


Rule

public Rule(java.lang.String mPattern,
            java.lang.String mForm)
A standard constructor that accepts a form design and a text pattern to search for.

Parameters:
mPattern - A string value that represents the text pattern.
mForm - A string value that represents the form design.
Method Detail

getForm

public java.lang.String getForm()
Returns the form design to use if the pattern is located within the input data.

Returns:
A string value that specifies the form design that is used.

setForm

public void setForm(java.lang.String form)
Sets the form design to use if the pattern is located within the input data. Note that the form design must reside in the location that is specified by the content root. The content root is established by invoking the setContentRoot method.

To see this method used within a code example, see the Creating search rules using the Java API quick start in Programming with Adobe Experience Manager forms.

Parameters:
form - The form design to use if the pattern that is defined by this rule is located within the input data.
See Also:
setContentRoot

getPattern

public java.lang.String getPattern()
Returns the text pattern for which the Output service searches.

Returns:
A string value that represents the text pattern.

setPattern

public void setPattern(java.lang.String pattern)
Sets the text pattern for which the Output service searches. By passing a value to this method, you establish a text pattern that the Output service searches for in the input data. You can also set the lookAhead value to specify the number of bytes to use from the beginning of the input data to scan for the pattern. If the pattern is located, the form design that is specified by the setForm method is used. If you, for example, pass the value CoverLetter to this method, then the Output service searches the input data for CoverLetter.

To see this method used within a code example, see the Creating search rules using the Java API quick start in Programming with Adobe Experience Manager forms.

Parameters:
pattern - A string value that specifies the text patten.
See Also:
setLookAhead