Overview
Entity metadata is a simple facility in codeBeamer to manage generic metadata in global scope or around codeBeamer entities, like projects, documents, issues, and such. Using metadata, you can create, update, delete and query textual key-value pairs.
Primary uses:
- global scope: storing custom data for the whole codeBeamer instance. For example, the root path of the Subversion instance running externally.
- entity scope: storing custom data for one entity. For example, Facebook URLs for your projects.
To specify metadata types, uncomment and edit the
<metadata> entities in the
$CODEBEAMER_HOME/tomcat/webapps/cb/WEB-INF/classes/general.xml configuration file. When you have finished, you will need to restart codeBeamer to pick up the changes.
The definitions are simple:
<metadata key="com.intland.sap.sapdokumentnummer" displayName="SAP Document Number" entityType="5" />
- key: must be a unique identifier. We recommend using Fully Qualified Names
(FQN), similar to Internet addresses or fully qualified Java class names.
- displayName: primarily shown in the user interface.
- entityType: type of the entity you want this to apply.
User Interface
After you have configured some metadata types and restarted codeBeamer, new entries will appear in the Properties screen of documents, directories and wiki pages. (Currently, the user interface of this feature is limited only to these types.)
Programming
Learning the Internal API
Start reading the javadocs from the EntityMetadataManager class.
Tip: Storing Structured Data
As the value component of the key-value pairs is a string, you can use the
CLOB
pattern to serialize larger information to a string. For example, a simple, but powerful approach can be serializing your Java objects to XML with
Xstream
.