Difference between revisions of "Property Groups"
Line 1: | Line 1: | ||
− | This is easy and powerful for building custom properties. You can | + | This is an easy and powerful way for building custom properties. You can use this feature to add information to documents. For example, if you store the invoices in a folder you can add a property group to set the client name and the quantity. You will see this important data without opening the documents. Also you can search by these custom properties later. |
{{Advice|'''New feature in OpenKM 4.1'''}} | {{Advice|'''New feature in OpenKM 4.1'''}} | ||
Line 5: | Line 5: | ||
Refer to [[Property Groups definition]] where you can see the new way to describe Property Groups. | Refer to [[Property Groups definition]] where you can see the new way to describe Property Groups. | ||
− | To try this | + | To try this, login as okmAdmin and go to Administration → Utilities → Register property groups. Set full path with the location of the local file ''PropertyGroups.cnd'' and click on the register button. The properties will be registered. |
Line 17: | Line 17: | ||
* Remove property group → [[File:Remove_property_group.gif]] | * Remove property group → [[File:Remove_property_group.gif]] | ||
− | And the properties will be shown in the information area. You can edit the values of the properties using the Change button. Then you can change these values. | + | And the properties will be shown in the information area. You can edit the values of the properties using the Change button. Then you can change these values. You can also remove a property group from a document by clicking the Delete button. |
Line 23: | Line 23: | ||
=== OpenKM 4.0 and older === | === OpenKM 4.0 and older === | ||
− | You need to create some file, for example '''PropertyGroup.cnd''' and insert some values in other | + | You need to create some file, for example '''PropertyGroup.cnd''' and insert some values in two other files '''PropertyGroupBundle.properties''' and '''PropertyGroupValues.properties'''. |
* $JBOSS_HOME/PropertyGroup.cnd | * $JBOSS_HOME/PropertyGroup.cnd | ||
Line 48: | Line 48: | ||
</source> | </source> | ||
− | * '''PropertyGroupValues.properties''': In this file you can see the | + | * '''PropertyGroupValues.properties''': In this file you can see the property values, for example for parameter (okp\:technology.type=4,one,two,three) has 3 values (one, two, three) the first number indicates the order, the second one the type (1 = list, 2 = input, 3 = select multiple, 4 = Text area) |
<source lang="java"> | <source lang="java"> | ||
Line 59: | Line 59: | ||
</source> | </source> | ||
− | * '''PropertyGroupBundle.properties''': This file contains general translations for each value | + | * '''PropertyGroupBundle.properties''': This file contains general translations for each value. You can have more files for each language like PropertyGroupBundle_ES.properties etc. |
<source lang="java"> | <source lang="java"> | ||
Line 82: | Line 82: | ||
</source> | </source> | ||
− | OpenKM tries to find the correct language in your property files. If it does not exist | + | OpenKM tries to find the correct language in your property files. If it does not exist it uses ''PropertyBundle.properties''. |
[[Category: Installation Guide]] | [[Category: Installation Guide]] |
Revision as of 13:27, 15 November 2011
This is an easy and powerful way for building custom properties. You can use this feature to add information to documents. For example, if you store the invoices in a folder you can add a property group to set the client name and the quantity. You will see this important data without opening the documents. Also you can search by these custom properties later.
New feature in OpenKM 4.1 |
Refer to Property Groups definition where you can see the new way to describe Property Groups.
To try this, login as okmAdmin and go to Administration → Utilities → Register property groups. Set full path with the location of the local file PropertyGroups.cnd and click on the register button. The properties will be registered.
REGISTERED GROUPS CANNOT NOT BE UNREGISTERED. They can always be updated but they cannot be deleted after registration !!! Try it out on a test installation first. |
The users can assign a property group to a document using these toolbar buttons:
And the properties will be shown in the information area. You can edit the values of the properties using the Change button. Then you can change these values. You can also remove a property group from a document by clicking the Delete button.
OpenKM 4.0 and older
You need to create some file, for example PropertyGroup.cnd and insert some values in two other files PropertyGroupBundle.properties and PropertyGroupValues.properties.
- $JBOSS_HOME/PropertyGroup.cnd
- $JBOSS_HOME/PropertyGroupBundle.properties
- $JBOSS_HOME/PropertyGroupValues.properties
About files:
- PropertyGroup.cnd: There are general definitions on each parameter (for example the parameter okp:technology.type)
<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:technology] mixin
- okp:technology.type (string) = '' multiple autocreated
- okp:technology.language (string) = '' autocreated
- okp:technology.description (string) = '' autocreated
- okp:technology.comment (string) = '' autocreated
[okg:consulting] mixin
- okp:consulting.type (string) = '' autocreated
- okp:consulting.comment (string) = '' autocreated
- PropertyGroupValues.properties: In this file you can see the property values, for example for parameter (okp\:technology.type=4,one,two,three) has 3 values (one, two, three) the first number indicates the order, the second one the type (1 = list, 2 = input, 3 = select multiple, 4 = Text area)
okp\:technology.type=1,4,one,two,three
okp\:technology.language=2,3,java,c,c#,c++,python
okp\:technology.description=3,1
okp\:technology.comment=4,2
okp\:consulting.type=1,3,one,two,three
okp\:consulting.comment=2,2
- PropertyGroupBundle.properties: This file contains general translations for each value. You can have more files for each language like PropertyGroupBundle_ES.properties etc.
okg\:technology=Tecnology
okp\:technology.type=Type
okp\:technology.type.one=Type One
okp\:technology.type.two=Type Two
okp\:technology.type.three=Type Three
okp\:technology.language=Language
okp\:technology.language.java=Java
okp\:technology.language.c=C
okp\:technology.language.c++=C++
okp\:technology.language.python=Python
okp\:tecnology.description=Description
okp\:technology.comment=Comment
okg\:consulting=Consulting
okp\:consulting.type=Type
okp\:consulting.type.one=Type One
okp\:consulting.type.two=Type Two
okp\:consulting.type.three=Type Three
okp\:consulting.comment=Comment
OpenKM tries to find the correct language in your property files. If it does not exist it uses PropertyBundle.properties.