Skip navigation links

Package com.orchestranetworks.addon.hmfh

Provides classes and interfaces to use {addon.label} services: export, import and compare.

See: Description

Package com.orchestranetworks.addon.hmfh Description

Provides classes and interfaces to use {addon.label} services: export, import and compare.

It's possible to hide extension tab on Extra custom dimensions:
Step 1: Create your Access rule class that extends AccessRule interface (For example: HiddenExtensionAccessRule.java)

        if (adaptation.isHistory())
        {
            return AccessPermission.getHidden();
        }
        Path datasetExtensionPath = Path
            .parse("./root/Hyperion/Financial/Properties/datasetExtension");
        Adaptation dataset = adaptation.isSchemaInstance() ? adaptation
            : adaptation.getContainer();
        SchemaNode rootNote = dataset.getSchemaNode();
        if (rootNote.getNode(datasetExtensionPath) == null
            || dataset.get(datasetExtensionPath) == null)
        {
            return AccessPermission.getHidden();
        }
        return AccessPermission.getReadWrite();

Step 2: Create your Schema extension class that implements SchemaExtensionsForAdvancedIntegration (For example: CustomSchemaExtension.java)

        extensionContext.setAccessRuleOnNodeAndAllDescendants(
                Path.parse("./root/Hyperion/Financial/Custom1/extension"),
                true,
                new HiddenExtensionAccessRule());

Step 3: Attach the CustomSchemaExtension file to the Special extensions of the Custom data model.

Classes to access Compare service.

 

It's possible to get the UIHttpManagerComponent to display the Configuration screen of Compare service:
        DimensionsComparisonSpec compareSpec = new DimensionsComparisonSpec(
                                sourceDataset,
                                targetDataset,
                                application,
                                dimension,
                                NumberOfComparingItemsPerPage.parse(itemsPerPage));
        UIHttpManagerComponent component = DimensionsComparison.getComparisonService(
                                compareSpec,
                                DimensionsComparisonDisplayMode.NORMAL_COMPARISON_SERVICE,
                                context);

It's possible to get the UIHttpManagerComponent to display the result page of Compare service:
        DimensionsComparisonSpec compareSpec = new DimensionsComparisonSpec(
                                sourceDataset,
                                targetDataset,
                                application,
                                dimension,
                                NumberOfComparingItemsPerPage.parse(itemsPerPage));
        UIHttpManagerComponent component = DimensionsComparison.getComparisonService(
                                compareSpec,
                                DimensionsComparisonDisplayMode.COMPARISON_RESULT_ONLY,
                                context);

Classes and interfaces to execute export and import services.

 

It's possible to defines the display format of the boolean values as True/False or Yes/No on exports:
        HmfhExportSpec exportSpec = new HmfhExportSpec();
        exportSpec.setBooleanFormat(new NativeBooleanFormat());
        exportSpec.setApplication("HFM");
        exportSpec.setExportType("export");
        exportSpec.setVersion("9.50");
        exportSpec.setCurrentDataset(dataset);
        exportSpec.setCurrentLocale(Locale.US);
        exportSpec.setDatasetMapping(datasetMapping);
        
        ArrayList<String> dimensions = new ArrayList<String>();
        dimensions.add("Account");      
        exportSpec.setDimensions(dimensions);
        

        List<FileExtension> fileExtensions = new ArrayList<FileExtension>();
        fileExtensions.add(FileExtension.XML);
        exportSpec.setFileExtensions(fileExtensions);
        
        Procedure proc = new Procedure()
        {
                public void execute(ProcedureContext pContext) throws Exception
                {
                        HmfhExportResult exportResult = HmfhFactory.getHmfhExport().execute(
                                exportSpec,
                                pContext);
                }
        }

The {addon.label} import service:
        HmfhImportSpec importSpec = new HmfhImportSpec();
        File resource = new File(directory);
        importSpec.setApplication("HFM");
        importSpec.setFilePath(resource.getAbsolutePath());
        importSpec.setFileName(resource.getName());
        importSpec.setImportType(ImportType.DELETE_BEFORE_IMPORT);
        importSpec.setCurrentDataset(dataset);
        importSpec.setDatasetMapping(datasetMapping);
        
        ArrayList<String> dimensions = new ArrayList<String>();
        dimensions.add("Account");
        importSpec.setDimensions(dimensions);
        
        Procedure proc = new Procedure()
        {
                public void execute(ProcedureContext pContext) throws Exception
                {
                        HmfhImportResult importResult = HmfhFactory.getHmfhImport().execute(
                                importSpec,
                                pContext);
                }
        }

The {addon.label} export service:
        HmfhExportSpec exportSpec = new HmfhExportSpec();
        exportSpec.setApplication("HFM");
        exportSpec.setExportType("export");
        exportSpec.setVersion("9.50");
        exportSpec.setCurrentDataset(dataset);
        exportSpec.setCurrentLocale(Locale.US);
        exportSpec.setDatasetMapping(datasetMapping);
        
        ArrayList<String> dimensions = new ArrayList<String>();
        dimensions.add("Account");      
        exportSpec.setDimensions(dimensions);
        

        List<FileExtension> fileExtensions = new ArrayList<FileExtension>();
        fileExtensions.add(FileExtension.XML);
        exportSpec.setFileExtensions(fileExtensions);
        
        Procedure proc = new Procedure()
        {
                public void execute(ProcedureContext pContext) throws Exception
                {
                        HmfhExportResult exportResult = HmfhFactory.getHmfhExport().execute(
                                exportSpec,
                                pContext);
                }
        }

It's also possible to declare in exportSpec some starting nodes to export:
                exportSpec.setExportFromStartingNodes();
                
                List<String> dimensions = new ArrayList<String>();
                dimensions.add("Account");
                dimensions.add("Custom1");
                dimensions.add("Version");
                dimensions.add("Entity");
                dimensions.add("Period");
                exportSpec.setDimensions(dimensions);
                exportSpec.setVersion("9.50");
                exportSpec.setCurrentDataset(dataset);
                exportSpec.setCurrentLocale(Locale.US);
                exportSpec.setDatasetMapping(datasetMapping);

                exportSpec.getStartingNodes().addStartingNode(
                        "Account",
                        new HmfhHierarchyNodeBean(
                                PrimaryKey.parseString("#root"),
                                PrimaryKey.parseString("Account0")));
                exportSpec.getStartingNodes()
                        .addStartingNode(
                                "Account",
                                new HmfhHierarchyNodeBean(
                                        PrimaryKey.parseString("#root"),
                                        PrimaryKey.parseString("Account1")));
                exportSpec.getStartingNodes()
                        .addStartingNode(
                                "Account",
                                new HmfhHierarchyNodeBean(
                                        PrimaryKey.parseString("AnotherRoot"),
                                        PrimaryKey.parseString("AnotherAccount")));
                exportSpec.getStartingNodes().addStartingNode(
                        "Custom1",
                        new HmfhHierarchyNodeBean(null, PrimaryKey.parseString("Custom1_top1")));
                exportSpec.getStartingNodes().addStartingNode(
                        "Custom1",
                        new HmfhHierarchyNodeBean(null, PrimaryKey.parseString("Custom1_top2")));

On the Extension data model: Uses or extends the DefaultExtensionTableTrigger class as a trigger for each table to automatically fill the primary key for new extension records using values from the corresponding dimension record.
Skip navigation links

Add-ons Version 4.5.9.

Copyright TIBCO Software Inc. 2001-2022. All rights reserved.
All third party product and company names and third party marks mentioned in this document are the property of their respective owners and are mentioned for identification.