Page tree
Skip to end of metadata
Go to start of metadata


Steps to migrate DPUs from 1.5.5 release of UnifiedViews to UnifiedViews 2.0.0. Sample of the adjusted DPU:

  1. Adjust pom.xml:
    1. proper parent project for DPUs:
      1. <parent>
      2. Note: It is possible to create project/organisational specific pom.xml the DPUs will be using with project/org specific dependencies and other stuff; such pom.xml has uv-pom-dpu (see above) as parent, but the particular DPUs use the project/organisational specific pom.xml. The generally usable pom for DPUs "uv-pom-dpu" should NOT be adjusted with project specific things, it is a generic pom.xml for everyone.
    2. Adjust dependencies as in the sample pom.xml:
    3. Check that pom.xml looks similarly as: 
  2. Adjust main class of the DPU
    1. Main class for DPUs is AbstractDPU
      1. Sample: public class Zipper extends AbstractDpu<ZipperConfig_V1> {,
    2. Constructor of the main DPU class 
      1. See the example Zipper() { .. }, where the DPU constructor may have certain extensions allowed. 
    3. Main code (content of the method execute()) is put to the method innerExecute(), 
      see  protected void innerExecute() throws DPUException in 
    4. DPUContext can be accessed as: ctx.getExecMasterContext().getDpuContext()
    5. In order to migrate configuration prior to 1.6 in DPUs 2.0, public field must be declared:
      @ExtensionInitializer.Init(param = "eu.unifiedviews.plugins.transformer.zipper.ZipperConfig__V1")
      public ConfigurationUpdate _ConfigurationUpdate;
      "eu.unifiedviews.plugins.transformer.zipper.ZipperConfig__V1" should be replaced with "XStream-like" configuration class name. 
    6. getConfigurationDialog() function is no longer required.

  3. Adjust dialog class of the DPU
    1. Main class for dialogs is AbstractDialog
      1. Sample: public class ZipperVaadinDialog extends AbstractDialog<ZipperConfig_V1> {,
    2. Dialog for DPU is initialized within method buildDialogLayout(), see
  4. Localization (if needed, relevant mainly for EEA/eDem)
    1. in the new versions, it is not necessary to explicitely initialize Localization within DPU
    2. using localized message in the events, you may use ContextUtils.sendError(ctx, """");
    3. using localized message in GUI, you may use: desc.append("")); see 
    4. For working with messages and exception ContextUtils should be used, text passed through ContextUtilis are localized.
  5. Resources - following resources are required to be present:
    1. about.html - DPU description that is visible in configuration dialog, example:
    2. - localization
      1. basic version: 
      2. advanced (git support): where lined with is optional. If set then should be equal to name of git repository without final slash (
  • No labels