Difference between revisions of "Migration from 4.0 to 4.1"
From OpenKM Documentation
(7 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
− | |||
− | |||
* Stop the JBoss server. | * Stop the JBoss server. | ||
* Make a backup of your current repository and configuration files... because Murphy's laws :) | * Make a backup of your current repository and configuration files... because Murphy's laws :) | ||
+ | |||
+ | * Overwrite OpenKM.war file from version 4.1 to 4.0. | ||
* Rename your my_groups.cnd (perhaps you file has other name, but the extension should be .cnd) to PropertyGroups.cnd | * Rename your my_groups.cnd (perhaps you file has other name, but the extension should be .cnd) to PropertyGroups.cnd | ||
− | * Remember that in OpenKM 4.0 the Property Groups definitions was splitted in two files: the metadata description and the translations. Create a file PropertyGroups.xml which contents should be the combination of old PropertyGroupValues.properties | + | * Remember that in OpenKM 4.0 the Property Groups definitions was splitted in two files: the metadata description and the translations. Create a file PropertyGroups.xml which contents should be the combination of old PropertyGroupValues.properties (metadata description) and PropertyGroupsBundle.properties (translations) in the new XML-based format. Refer to [[Property Groups definition]] for more info on this format. |
− | (metadata description) and PropertyGroupsBundle.properties (translations) in the new XML-based format. Refer to [Property Groups] for more info on this format. | ||
* These are the equivalences: | * These are the equivalences: | ||
{| align="center" border="1" cellpadding="5" cellspacing="0" | {| align="center" border="1" cellpadding="5" cellspacing="0" | ||
− | ! | + | ! Type || XML |
|- | |- | ||
− | | 1 | + | | align="center" | 1 || <input label="xxx" name="okp:yyy" /> |
|- | |- | ||
− | | 2 | + | | align="center" | 2 || <textarea label="xxx" name="okp:yyy" /> |
|- | |- | ||
− | | 3 | + | | align="center" | 3 || <select label="xxx" name="okp:yyy" type="simple"><br/> <option label="xxx" value="yyy" /><br/> ...<br/></select> |
|- | |- | ||
− | | 4 | + | | align="center" | 4 || <select label="xxx" name="okp:yyy" type="multiple"><br/> <option label="xxx" value="yyy" /><br/> ...<br/></select> |
|} | |} | ||
Line 27: | Line 26: | ||
{{Note|You don't have to register your Property Groups again.}} | {{Note|You don't have to register your Property Groups again.}} | ||
+ | |||
+ | === Example of conversion === | ||
+ | {| align="center" border="1" cellpadding="5" cellspacing="0" | ||
+ | | '''my_groups.cnd''' | ||
+ | <source lang="text"> | ||
+ | <okm = 'http://www.openkm.org/1.0'> | ||
+ | <okg = 'http://www.openkm.org/group/1.0'> | ||
+ | <okp = 'http://www.openkm.org/group/property/1.0'> | ||
+ | |||
+ | [okg:tecnologia] mixin | ||
+ | - okp:tecnologia.tipo (string) = '' multiple autocreated | ||
+ | - okp:tecnologia.lenguaje (string) = '' autocreated | ||
+ | - okp:tecnologia.descripcion (string) = '' autocreated | ||
+ | - okp:tecnologia.comentario (string) = '' autocreated | ||
+ | </source> | ||
+ | | '''PropertyGroups.cnd''' (content unchanged, because is the same) | ||
+ | <source lang="text"> | ||
+ | <okm = 'http://www.openkm.org/1.0'> | ||
+ | <okg = 'http://www.openkm.org/group/1.0'> | ||
+ | <okp = 'http://www.openkm.org/group/property/1.0'> | ||
+ | |||
+ | [okg:tecnologia] mixin | ||
+ | - okp:tecnologia.tipo (string) = '' multiple autocreated | ||
+ | - okp:tecnologia.lenguaje (string) = '' autocreated | ||
+ | - okp:tecnologia.descripcion (string) = '' autocreated | ||
+ | - okp:tecnologia.comentario (string) = '' autocreated | ||
+ | </source> | ||
+ | |- | ||
+ | | '''PropertyGroupValues.properties''' | ||
+ | <source lang="java"> | ||
+ | # Tecnología | ||
+ | okp\:tecnologia.tipo=0,4,uno,dos,tres | ||
+ | okp\:tecnologia.lenguaje=1,3,java,c,c#,c++,python | ||
+ | okp\:tecnologia.descripcion=2,1 | ||
+ | okp\:tecnologia.comentario=3,2 | ||
+ | </source> | ||
+ | |||
+ | '''PropertyGroupBundle.properties''' | ||
+ | <source lang="java"> | ||
+ | # Tecnología | ||
+ | okg\:tecnologia=Tecnología | ||
+ | okp\:tecnologia.tipo=Tipo | ||
+ | okp\:tecnologia.tipo.uno=Tipo Uno | ||
+ | okp\:tecnologia.tipo.dos=Tipo Dos | ||
+ | okp\:tecnologia.tipo.tres=Tipo Tres | ||
+ | okp\:tecnologia.lenguaje=Lenguaje | ||
+ | okp\:tecnologia.lenguaje.java=Java | ||
+ | okp\:tecnologia.lenguaje.c=C | ||
+ | okp\:tecnologia.lenguaje.c++=C++ | ||
+ | okp\:tecnologia.lenguaje.python=Python | ||
+ | okp\:tecnologia.descripcion=Descripción | ||
+ | okp\:tecnologia.comentario=Comentario | ||
+ | </source> | ||
+ | | '''PropertyGroups.xml''' | ||
+ | <source lang="xml"> | ||
+ | <?xml version="1.0" encoding="UTF-8"?> | ||
+ | <!DOCTYPE property-groups PUBLIC "-//OpenKM//DTD Property Groups 1.0//EN" | ||
+ | "http://www.openkm.com/dtd/property-groups-1.0.dtd"> | ||
+ | <property-groups> | ||
+ | |||
+ | <!-- Tecnología --> | ||
+ | <property-group label="Tecnología" name="okg:tecnologia"> | ||
+ | <select label="Tipo" name="okp:tecnologia.tipo" type="multiple"> | ||
+ | <option label="Tipo Uno" value="okp:tecnologia.tipo.uno" /> | ||
+ | <option label="Tipo Dos" value="okp:tecnologia.tipo.dos" /> | ||
+ | <option label="Tipo Tres" value="okp:tecnologia.tipo.tres" /> | ||
+ | </select> | ||
+ | <select label="Lenguaje" name="okp:tecnologia.lenguaje" type="simple"> | ||
+ | <option label="Java" value="okp:tecnologia.lenguaje.java" /> | ||
+ | <option label="C" value="okp:tecnologia.lenguaje.c" /> | ||
+ | <option label="C++" value="okp:tecnologia.lenguaje.c++" /> | ||
+ | <option label="Python" value="okp:tecnologia.lenguaje.python" /> | ||
+ | </select> | ||
+ | <input label="Descripcion" name="okp:tecnologia.descripcion" /> | ||
+ | <textarea label="Description" name="okp:tecnologia.comentario" /> | ||
+ | </property-group> | ||
+ | |||
+ | </property-groups> | ||
+ | </source> | ||
+ | |} | ||
[[Category: Migration Guide]] | [[Category: Migration Guide]] |
Latest revision as of 09:07, 26 July 2010
- Stop the JBoss server.
- Make a backup of your current repository and configuration files... because Murphy's laws :)
- Overwrite OpenKM.war file from version 4.1 to 4.0.
- Rename your my_groups.cnd (perhaps you file has other name, but the extension should be .cnd) to PropertyGroups.cnd
- Remember that in OpenKM 4.0 the Property Groups definitions was splitted in two files: the metadata description and the translations. Create a file PropertyGroups.xml which contents should be the combination of old PropertyGroupValues.properties (metadata description) and PropertyGroupsBundle.properties (translations) in the new XML-based format. Refer to Property Groups definition for more info on this format.
- These are the equivalences:
Type | XML |
---|---|
1 | <input label="xxx" name="okp:yyy" /> |
2 | <textarea label="xxx" name="okp:yyy" /> |
3 | <select label="xxx" name="okp:yyy" type="simple"> <option label="xxx" value="yyy" /> ... </select> |
4 | <select label="xxx" name="okp:yyy" type="multiple"> <option label="xxx" value="yyy" /> ... </select> |
- Starts the JBoss server again.
You don't have to register your Property Groups again. |
Example of conversion
my_groups.cnd
<okm = 'http://www.openkm.org/1.0'>
<okg = 'http://www.openkm.org/group/1.0'>
<okp = 'http://www.openkm.org/group/property/1.0'>
[okg:tecnologia] mixin
- okp:tecnologia.tipo (string) = '' multiple autocreated
- okp:tecnologia.lenguaje (string) = '' autocreated
- okp:tecnologia.descripcion (string) = '' autocreated
- okp:tecnologia.comentario (string) = '' autocreated
|
PropertyGroups.cnd (content unchanged, because is the same)
<okm = 'http://www.openkm.org/1.0'>
<okg = 'http://www.openkm.org/group/1.0'>
<okp = 'http://www.openkm.org/group/property/1.0'>
[okg:tecnologia] mixin
- okp:tecnologia.tipo (string) = '' multiple autocreated
- okp:tecnologia.lenguaje (string) = '' autocreated
- okp:tecnologia.descripcion (string) = '' autocreated
- okp:tecnologia.comentario (string) = '' autocreated
|
PropertyGroupValues.properties
# Tecnología
okp\:tecnologia.tipo=0,4,uno,dos,tres
okp\:tecnologia.lenguaje=1,3,java,c,c#,c++,python
okp\:tecnologia.descripcion=2,1
okp\:tecnologia.comentario=3,2
PropertyGroupBundle.properties # Tecnología
okg\:tecnologia=Tecnología
okp\:tecnologia.tipo=Tipo
okp\:tecnologia.tipo.uno=Tipo Uno
okp\:tecnologia.tipo.dos=Tipo Dos
okp\:tecnologia.tipo.tres=Tipo Tres
okp\:tecnologia.lenguaje=Lenguaje
okp\:tecnologia.lenguaje.java=Java
okp\:tecnologia.lenguaje.c=C
okp\:tecnologia.lenguaje.c++=C++
okp\:tecnologia.lenguaje.python=Python
okp\:tecnologia.descripcion=Descripción
okp\:tecnologia.comentario=Comentario
|
PropertyGroups.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE property-groups PUBLIC "-//OpenKM//DTD Property Groups 1.0//EN"
"http://www.openkm.com/dtd/property-groups-1.0.dtd">
<property-groups>
<!-- Tecnología -->
<property-group label="Tecnología" name="okg:tecnologia">
<select label="Tipo" name="okp:tecnologia.tipo" type="multiple">
<option label="Tipo Uno" value="okp:tecnologia.tipo.uno" />
<option label="Tipo Dos" value="okp:tecnologia.tipo.dos" />
<option label="Tipo Tres" value="okp:tecnologia.tipo.tres" />
</select>
<select label="Lenguaje" name="okp:tecnologia.lenguaje" type="simple">
<option label="Java" value="okp:tecnologia.lenguaje.java" />
<option label="C" value="okp:tecnologia.lenguaje.c" />
<option label="C++" value="okp:tecnologia.lenguaje.c++" />
<option label="Python" value="okp:tecnologia.lenguaje.python" />
</select>
<input label="Descripcion" name="okp:tecnologia.descripcion" />
<textarea label="Description" name="okp:tecnologia.comentario" />
</property-group>
</property-groups>
|