Implement DeliveryRequestFactory Interface Register your custom DeliveryRequestFactory to the DeliveryManager

8-40 Developers Guide for Oracle Business Intelligence Publisher

8.21 Configuration File Support

The delivery systems supports a configuration file to set default servers, default properties, and custom delivery channels. The location of the configuration file is {XDO_TOP}resourcexdodelivery.cfg where {XDO_TOP} is a Java system property that points to the physical directory. This system property can be set in two ways: ■ Pass -DXDO_TOP=pathtoxdotop to the Java startup parameter ■ Use a Java API in your code, such as java.lang.System.getProperties.putXDO_TOP, pathtoxdotop The system property must be defined before constructing a DeliveryManager object. Following is a sample configuration file: Example 8–40 Sample Configuration File ?xml version=1.0 encoding=UTF-8? config xmlns=http:xmlns.oracle.comoxpdeliveryconfig - ======================================================== - - servers section - - List your pre-defined servers here. - - ======================================================== - servers server name=myprinter1 type=ipp_printer default=true uriipp:myprinter1.oracle.com:631printersmyprinter1uri server server name=myprinter2 type=ipp_printer hostmyprinter2.oracle.comhost port631port uriipp:myprinter2.oracle.com:631printersmyprinter2uri authTypebasicauthType usernamexdousername passwordxdopassword server server name=myfax1 type=ipp_fax default=true hostmyfax1.oracle.comhost port631port uriipp:myfax1.oracle.com:631printersmyfax1uri server server name=mysmtp1 type=smtp_email default=true hostmyprinter1.oracle.comhost port25port server server name=mysmtp2 type=smtp_email hostmysmtp12.oracle.comhost port25port usernamexdousername passwordxdopassword Using the Delivery Manager Java APIs 8-41 server servers - ======================================================== - - properties section - - List the system properties here. - - ======================================================== - properties property name=ds-temp-dirtmpproperty property name=ds-bufferingtrueproperty properties - ======================================================== - - channels section - - List the custom delivery channels here. - - ======================================================== - channels channel name=fileoracle.apps.xdo.delivery.file.FileDeliveryRequestFactorychannel channels config

8.21.1 Defining Multiple Servers for a Delivery Channel

You can define multiple server entries for each delivery channel. For example, the preceding sample configuration file has two server entries for the ipp_printer delivery channel myprinter1 and myprinter2. Load a server entry for a delivery request by calling DeliveryRequest.setServer method. Following is an example: Example 8–41 Sample Code for Defining Multiple Servers for a Delivery Channel create delivery manager instance DeliveryManager dm = new DeliveryManager; create a delivery request DeliveryRequest req = dm.createRequestDeliveryManager.TYPE_IPP_PRINTER; load myprinter1 setting req.setServermyprinter1;

8.21.2 Specifying a Default Server for a Delivery Channel

To define a default server for a delivery channel, specify default=true. In the configuration file example above, myprinter1 is defined as the default sever for the ipp_printer delivery channel. If a user does not specify the server properties for ipp_printer delivery, the server properties under the default server will be used.

8.21.3 Supported Configuration File Properties and Elements

The following properties are supported in the properties section: ■ ds-temp-dir: temporary directory location. ■ ds-buffering: specify true or false for buffering mode. ■ ds-ca-cert-file: specify the SSL certification file location.