To extend JIRA Database Model, you willhave to follow blow steps :
package com.yourcompany.model; import com.minyaa.model.AbstractPluginModelManager; public class YourModelManager implements AbstractPluginModelManager { private static String entityModelFileName = "edit-webapp/WEB-INF/classes/entitydefs/entitymodel.yourcompany.xml"; private static String entityGroupModelFileName = "edit-webapp/WEB-INF/classes/entitydefs/entitygroup.yourcompany.xml"; public YourModelManager(final PluginModelManagerDirectory _pluginModelManagerDirectory) { super(_pluginModelManagerDirectory); } /** * @see com.minyaa.model.PluginModelManager.getEntityModelFileName() */ public String getEntityModelFileName() { return entityModelFileName; } /** * @see com.minyaa.model.PluginModelManager.getEntityGroupModelFileName() */ public String getEntityGroupModelFileName() { return entityGroupModelFileName; } /** * @see com.minyaa.model.PluginModelManager.getPluginKey() */ public String getPluginKey() { return "com.yourcompany.plugin"; } }
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE entitymodel PUBLIC "-//OFBiz//DTD Entity Model//EN" "http://oss.org.cn/ossdocs/applications/ofbiz/ofbiz-2.1.1-docs/website/dtds/entitymodel.dtd"> <entitymodel> <title>Entity Model for Your Plugin</title> <description>Entities added to store Your Data</description> <author>You</author> <version>X.Y</version> <entity entity-name="YourEntity" table-name="companyprefix_your_entity" package-name=""> ... </entity> </entitymodel>
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE entitygroup PUBLIC "-//OFBiz//DTD Entity Group//EN" "http://oss.org.cn/ossdocs/applications/ofbiz/ofbiz-2.1.1-docs/website/dtds/entitygroup.dtd"> <entitygroup> <entity-group group="default" entity="YourEntity"/> </entitygroup>
<atlassian-plugin key="jira.plugin.yourcompany.model" name="Your Company Plugin for Database Model Extension"> <plugin-info> <description>${pom.description}</description> <version>${pom.version}</version> <vendor name="${pom.organization.name}" url="${pom.organization.url}"/> </plugin-info> ... <component key="YourModelManager" name="YourModelManager" class="com.yourcompany.model.YourModelManager" /> ... </atlassian-plugin>