Difference between revisions of "Documentation/DevGuide/Config/Installing a Custom Configuration Schema"

From Apache OpenOffice Wiki
Jump to: navigation, search
m (Robot: Changing Category:Configuration Management)
m (Robot: Changing Category:Documentation/Developers Guide/Configuration Management)
Line 23: Line 23:
 
{{PDL1}}
 
{{PDL1}}
  
[[Category:Documentation/Developers Guide/Configuration Management]]
+
[[Category:Documentation/Developer's Guide/Configuration Management]]

Revision as of 07:49, 5 June 2008



The easiest way to install configuration schema or data files is by using the Extension Manager to deploy configuration data as part of an extension. For details, see Extensions.

To manually install configuration data for an existing schema, use the API to import the data into the backend. You can use service com.sun.star.configuration.backend.LocalDataImporter to import configuration data from a file. If you need more control or want to import data that is not stored in a local file, then you can directly use the services com.sun.star.configuration.backend.MergeImporter and com.sun.star.configuration.backend.CopyImporter, which the LocalDataImporter itself uses internally.

Using these services, the configuration data is imported directly into the backend, bypassing any existing com.sun.star.configuration.ConfigurationProvider instances.

Template:Documentation/Note

If you can not use extensions, you can manually install schemas and associated data files into the standard, local file-based backend. The internal organization of that backend is described at http://util.openoffice.org/common/configuration/oor-registry.html.

To manually install a schema into the local file-based based backend, copy it to the schema subdirectory corresponding to the package the schema belongs to and make sure it has the proper name. For example, a schema for component org.myorg.MySettings, has the name "MySettings" and package "org.myorg". To install it, you have to create directory <OfficeInstallation>/share/registry/schema/org/myorg and copy the schema file there as MySettings.xcs.

To manually install the associated default configuration data, create the the corresponding configuration data directory <OfficeInstallation>/share/registry/data/org/myorg and place the file there as MySettings.xcu.

Content on this page is licensed under the Public Documentation License (PDL).
Personal tools