Content Pipeline Guide > Java Reference > Interfaces > FilterControl
  
FilterControl
FilterControl specifies the filter control interface used by the publishing framework to configure and control the filter. The control interface uses methods to initialize and run filters (if it is a source), as well as to set output and resource handlers.
public interface FilterControl {
/**
* Sets the object that handles the filter's SAX events.
* The output goes to the default (or unnamed) pipe.
* @param outputHandler is a SAXInterfaceProvider object
* that can be used to get the handles to the desired
* SAX interfaces that handle the filter's SAX events.
*/
void setOutputHandler(SAXInterfaceProvider outputHandler);
/**
* Sets the object that handles the filter SAX events for
* the given pipename.
*
* @param pipeName is the name of the output pipe.
* @param outputHandler is a SAXInterfaceProvider that can
* be used to get the handles to the desired SAX interfaces
* that handle the filter's SAX events.
*/
void setOutputHandler(String pipeName, SAXInterfaceProvider
outputHandler);
/**
* Gets the output handler object for the unnamed
* (or default) pipe.
* @returns is a SAXInterfaceProvider that is the output
* handler.
*/
SAXInterfaceProvider getOutputHandler();
/**
* Gets the output handler object for the named pipe.
* @returns is a SAXInterfaceProvider that is the output
* handler.
*/
SAXInterfaceProvider getOutputHandler(String pipeName);

/**
* Sets the ErrorHandler object. If the filter implements the
* ErrorHandler interface, this method can ignore the object
* passed in.
*/
void setErrorHandlerResource(ErrorHandler theErrorHandler);

/**
* Initializes the filter with the given set of parameters.
*
* @param parameters is an object implementing the Map
* interface that contains name value pairs representing the
* filter's parameters.
* @throws is an exception if there is any problem with the
* initialization such as missing or illegal parameters.
*/
void initFilter(java.util.Map parameters) throws Exception;
/**
* Releases all resources used by the filter. The adapter
* can be destroyed after this method is called with no
* danger of resource leakage.
*/
void destroyFilter();
/**
* Runs the filter. This method only applies for filters
* that can generate SAX events. It is recommended that the
* implementing class throw an UnsupportedOperationException
* if the runFilter method does not apply.
* @throws is an exception if there is a problem running
* the filter.
*/
void runFilter() throws Exception;
/**
* Sets the EntityResolver object that the adapter can pass
* to the filter for the filter's entity resolution needs.
* The adapter can ignore the resolver if its filter
* implements the EntityResolver interface.
*/
void setEntityResolverResource(EntityResolver theResolver);
/**
* Sets the EntityResolver2 object that the adapter can pass
* to the filter for the filter's entity resolution needs.
* The adapter can ignore the resolver if its filter
* implements the EntityResolver2 interface.
*/
void setEntityResolver2Resource(EntityResolver2 theResolver);
/**
* Informs the adapter that the filter's parameter has
* changed to the new value. The adapter passes the
* information on to the filter if the filter's class
* matches the filterClass passed in.
* @param filterClass is the name of the class of the filter
* instance to which this parameter is intended.
* @param key is the name of the parameter
* @param value is the new value.
*/
void parameterChanged(String filterClass, String key, String
newValue);
/**
* Indicates the beginning of a named region. The name of the
* region is specified in the name parameter. The data parameter
* is a string that will be associated with the region.
* @param name is the name of the region.
* @param data is any data associated with the region. The
* format of the data is user defined.
*/
void regionBegin(String name, String data);
/**
* Indicates the end of the region. The regionBegin method is
* guaranteed to have been called with the same name.
* @param name is the name of the region.
*/
void regionEnd(String name);
/**
* Command to set the current location from the file being
* processed.
*
*/
void setFileLocation(String systemid, int line, int column);
/**
* Command to set the current location where the source of the
* document is Arbortext.
* @param location is the location as a string. The format of the
* string is described in Arbortext Editor help.
*/
void setEpicLocation(String location);
}// FilterControl