Difference between revisions of "Documentation/DevGuide/Extensions/Extension Identifiers"

From Apache OpenOffice Wiki
Jump to: navigation, search
(added information regarding online update)
m
Line 5: Line 5:
 
}}
 
}}
 
{{DISPLAYTITLE:Extension Identifiers}}
 
{{DISPLAYTITLE:Extension Identifiers}}
Extensions now have unique identifiers. This removes the previous restriction that no two extensions with identical file names can be deployed. That is, two extensions with same file name but different identifiers can be installed but to extensions with the same identifiers cannot be installed at the same time. In the latter case, the already installed extension will be replaced.
+
Extensions now have unique identifiers. This removes the previous restriction that no two extensions with identical file names can be deployed. That is, two extensions with same file name but different identifiers can be installed but two extensions with the same identifiers cannot be installed at the same time. In the latter case, the already installed extension will be replaced.
  
 
The identifier plays also an important role for the on-line update. The Extension Manager uses it to determine if there is an update available. Therefore there must not exist two different extensions with the same identifier. This is also the case for extensions which are logically the same but support different platforms. If they did not have different identifiers then the Extension Manager could  update an extension with a new version which does not work on the user's platform.
 
The identifier plays also an important role for the on-line update. The Extension Manager uses it to determine if there is an update available. Therefore there must not exist two different extensions with the same identifier. This is also the case for extensions which are logically the same but support different platforms. If they did not have different identifiers then the Extension Manager could  update an extension with a new version which does not work on the user's platform.

Revision as of 16:34, 23 April 2008



Extensions now have unique identifiers. This removes the previous restriction that no two extensions with identical file names can be deployed. That is, two extensions with same file name but different identifiers can be installed but two extensions with the same identifiers cannot be installed at the same time. In the latter case, the already installed extension will be replaced.

The identifier plays also an important role for the on-line update. The Extension Manager uses it to determine if there is an update available. Therefore there must not exist two different extensions with the same identifier. This is also the case for extensions which are logically the same but support different platforms. If they did not have different identifiers then the Extension Manager could update an extension with a new version which does not work on the user's platform.


Technically, an extension identifier is a finite sequence of Unicode scalar values. Identifier identity is element-by-element identity of the sequences (no case folding, no normalization, etc.). It is assumed that extension writers cooperate to keep extension identifiers unique. By convention, use lowercase reversed-domain-name syntax (e.g., org.openoffice.) prefixes to generate unique (but still humanly comprehensible) identifiers. When you write an extension, use the reversed domain name of a site you control (and not org.openoffice.) as prefix. Identifiers starting with the prefix org.openoffice.legacy. are reserved for legacy extensions (see next).

The extension identifier is obtained from the description.xml contained in the extension. If the extension does not specify such an explicit identifier, then an implicit identifier is generated by prepending org.openoffice.legacy. to the (obvious sequence of Unicode scalar values representing the) file name of the extension. (Uniqueness of identifiers is then guaranteed by the assumption underlying legacy extension management that no two legacy extensions have the same file name.)

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