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

From Apache OpenOffice Wiki
Jump to: navigation, search
m (1 revision(s))
 
(5 intermediate revisions by 3 users not shown)
Line 3: Line 3:
 
|ShowPrevNext=block
 
|ShowPrevNext=block
 
|PrevPage=Documentation/DevGuide/Config/Preparing a Custom Configuration Schema
 
|PrevPage=Documentation/DevGuide/Config/Preparing a Custom Configuration Schema
|NextPage=Documentation/DevGuide/Config/Adding a Backend Data Store
+
|NextPage=Documentation/DevGuide/JavaBean/JavaBean_for_Office_Components
 
}}
 
}}
{{DISPLAYTITLE:Installing Custom Configuration Data}}
+
{{Documentation/DevGuideLanguages|Documentation/DevGuide/Config/{{SUBPAGENAME}}}}
 +
{{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.
+
{{PDL1}}
 
 
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].
+
[[Category:Documentation/Developer's Guide/Configuration Management]]
 
 
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}}
 
[[Category: Configuration Management]]
 

Latest revision as of 10:11, 23 November 2010

Personal tools
In other languages