Difference between revisions of "Migration from 4.0 to 4.1"
From OpenKM Documentation
(→Example of conversion) |
|||
(2 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 | ||
Line 27: | Line 27: | ||
{{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 == | + | === Example of conversion === |
{| align="center" border="1" cellpadding="5" cellspacing="0" | {| align="center" border="1" cellpadding="5" cellspacing="0" | ||
| '''my_groups.cnd''' | | '''my_groups.cnd''' |
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>
|