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

From Apache OpenOffice Wiki
Jump to: navigation, search
m (FINAL VERSION FOR L10N)
(adapted to configmgr re-write)
Line 8: Line 8:
 
  {{DISPLAYTITLE:Installing Custom Configuration Data}}
 
  {{DISPLAYTITLE:Installing Custom Configuration Data}}
 
<!--<idltopic>com.sun.star.configuration.backend.LocalDataImporter;com.sun.star.configuration.backend.MergeImporter;com.sun.star.configuration.backend.CopyImporter</idltopic>-->
 
<!--<idltopic>com.sun.star.configuration.backend.LocalDataImporter;com.sun.star.configuration.backend.MergeImporter;com.sun.star.configuration.backend.CopyImporter</idltopic>-->
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 [[Documentation/DevGuide/Extensions/Extensions|Extensions]].
+
The only supported 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 [[Documentation/DevGuide/Extensions/Extensions|Extensions]].  
 
+
To manually install configuration data for an existing schema, use the API to import the data into the backend. You can use service <idl>com.sun.star.configuration.backend.LocalDataImporter</idl> 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 <idl>com.sun.star.configuration.backend.MergeImporter</idl> and <idl>com.sun.star.configuration.backend.CopyImporter</idl>, which the <idls>com.sun.star.configuration.backend.LocalDataImporter</idls> itself uses internally.
+
 
+
Using these services, the configuration data is imported directly into the backend, bypassing any existing <idl>com.sun.star.configuration.ConfigurationProvider</idl> instances.
+
 
+
{{Documentation/Note|After importing configuration data, a running {{PRODUCTNAME}} instance should be terminated and restarted to make sure that the new data becomes visible despite internal caching.}}
+
 
+
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 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 <code>org.myorg.MySettings</code>, has the name "<code>MySettings</code>" and package "<code>org.myorg</code>". 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''.  
+
  
 
{{PDL1}}
 
{{PDL1}}
  
 
[[Category:Documentation/Developer's Guide/Configuration Management]]
 
[[Category:Documentation/Developer's Guide/Configuration Management]]

Revision as of 12:55, 23 June 2010



The only supported 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.

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