Difference between revisions of "Documentation/DevGuide/JavaBean/Customized Configuration"

From Apache OpenOffice Wiki
Jump to: navigation, search
(Initial author Sun Microsystems, Inc.)
 
(6 intermediate revisions by 4 users not shown)
Line 5: Line 5:
 
|NextPage=Documentation/DevGuide/JavaBean/Internal Architecture
 
|NextPage=Documentation/DevGuide/JavaBean/Internal Architecture
 
}}
 
}}
{{DISPLAYTITLE:Customized Configuration}}
+
{{Documentation/DevGuideLanguages|Documentation/DevGuide/JavaBean/{{SUBPAGENAME}}}}
Besides these default values, the Office Bean is configured to use other parameters. There are tree possibilities, starting the connection with an explicit UNO URL including path and pipe name parameters, creating the connection manually and handing this object to the <code>OOoBean</code> or creating the <code>OOoBean</code> with such a manually created connection object.
+
{{DISPLAYTITLE:Customized Configuration}}
 +
Besides these default values, the Office Bean can be configured to use other parameters. There are three possibilities:
 +
* starting the connection with an explicit UNO URL including path and pipe name parameters
 +
* creating the connection manually and handing this object to the <code>OOoBean</code>
 +
* creating the <code>OOoBean</code> with such a manually created connection object.
  
 
The first method that a developer uses to configure the Office Bean is through the UNO URL passed in the <code>setUnoUrl()</code> call. The syntax of the UNO URL is as follows:
 
The first method that a developer uses to configure the Office Bean is through the UNO URL passed in the <code>setUnoUrl()</code> call. The syntax of the UNO URL is as follows:
Line 18: Line 22:
  
 
Here is an example of how to use <code>setUnoUrl()</code> in code:
 
Here is an example of how to use <code>setUnoUrl()</code> in code:
 
+
<source lang="java">
 
   OfficeConnection officeConnection = new LocalOfficeConnection();
 
   OfficeConnection officeConnection = new LocalOfficeConnection();
 
   officeConnection.setUnoUrl(
 
   officeConnection.setUnoUrl(
 
   “uno:localoffice,path=/home/user/staroffice6.0/program;urp;StarOffice.NamingService”);
 
   “uno:localoffice,path=/home/user/staroffice6.0/program;urp;StarOffice.NamingService”);
 
   aBean = new OOoBean( officeConnection );
 
   aBean = new OOoBean( officeConnection );
 +
</source>
 +
{{Warn|In {{PRODUCTNAME}} {{OO1.1.0}} the properties mechanism was removed and cannot be used any longer. The following section about the Office Bean properties and the ''officebean.properties'' file are only valid for older {{PRODUCTNAME}} versions. Since {{PRODUCTNAME}} {{OO1.1.0}} the Office Bean uses an implicit find mechanism over the classpath for the office and the local Office Bean library so that no properties file is necessary.}}
  
{{Documentation/Caution|In {{PRODUCTNAME}} {{OO1.1.0}} the properties mechanism was removed and cannot be used any longer. The following section about the Office Bean properties and the ''officebean.properties'' file are only valid for older {{PRODUCTNAME}} versions. Since {{PRODUCTNAME}} {{OO1.1.0}} the Office Bean uses an implicit find mechanism over the classpath for the office and the local Office Bean library so that no properties file is necessary.}}
+
{{PDL1}}
  
{{PDL1}}
+
[[Category:Documentation/Developer's Guide/JavaBean for Office Components]]
[[Category: JavaBean for Office Components]]
+

Revision as of 07:31, 12 July 2018



Besides these default values, the Office Bean can be configured to use other parameters. There are three possibilities:

  • starting the connection with an explicit UNO URL including path and pipe name parameters
  • creating the connection manually and handing this object to the OOoBean
  • creating the OOoBean with such a manually created connection object.

The first method that a developer uses to configure the Office Bean is through the UNO URL passed in the setUnoUrl() call. The syntax of the UNO URL is as follows:

 url := 'uno:localoffice'[','<params>]';urp;StarOffice.NamingService'
 params := <path>[','<pipe>]
 path := 'path='<pathv>
 pipe := 'pipe='<pipev>
 pathv := platform_specific_path_to_the_local_office_distribution
 pipev := local_office_connection_pipe_name

Here is an example of how to use setUnoUrl() in code:

  OfficeConnection officeConnection = new LocalOfficeConnection();
  officeConnection.setUnoUrl(
  “uno:localoffice,path=/home/user/staroffice6.0/program;urp;StarOffice.NamingService);
  aBean = new OOoBean( officeConnection );
Documentation caution.png In OpenOffice.org 1.1.0 the properties mechanism was removed and cannot be used any longer. The following section about the Office Bean properties and the officebean.properties file are only valid for older OpenOffice.org versions. Since OpenOffice.org 1.1.0 the Office Bean uses an implicit find mechanism over the classpath for the office and the local Office Bean library so that no properties file is necessary.
Content on this page is licensed under the Public Documentation License (PDL).
Personal tools
In other languages