com.ibm.tivoli.maximo.report.cognos.metadata.generator

Class ActionLogGen

  • java.lang.Object
    • com.ibm.tivoli.maximo.report.cognos.metadata.generator.ActionLogGen


  • public class ActionLogGen
    extends java.lang.Object
    This class is responsible for generating the Cognos action log script based on templates for the different atcions.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String ROS_APP 
      static java.lang.String ROS_SITEORGTYPE 
    • Constructor Summary

      Constructors 
      Constructor and Description
      ActionLogGen(PrintWriter out)
      Initialize the ActionLogGen with the writer to write the generated output on it.
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method and Description
      void generateAddProjectLocale(java.lang.String locale, java.lang.String defaultLocale)
      This method is responsible for the generation of the add project locale actions.
      void generateAllowCrossProductJoin()
      This method is responsible for the generation of the allow croos product join actions.
      void generateCreateNamespace(java.lang.String namespace, java.lang.String parentNamespace)
      This method is responsible for the generation of the creation of a new namespace.
      void generateCreatePackage(java.lang.String packageName, java.lang.String excludedNamespace, java.lang.String topLevelNamespace)
      Deprecated. 
      Replaced by generateCreatePackage(packageName, excludedNamespace, topLevelNamespace, defaultLocale, translations)
      void generateCreatePackage(java.lang.String packageName, java.lang.String excludedNamespace, java.lang.String topLevelNamespace, java.lang.String defaultLocale, java.util.List languages)
      This method is responsible for the generation of package creation actions.
      void generateDBImport(java.lang.String parentNamespace, java.lang.String databaseType, java.lang.String dataSourceName, java.lang.String schema, java.util.Set tables, java.util.Set views, java.lang.String databaseName)
      This method is responsible for the generation of the DBImport and DBRelease actions.
      The DBImport action is the action responsible for creating the source query subjects.
      void generateEvaluateQuerySubject(java.lang.String parentNamespace, java.lang.String querySubjectName)
      This method is responsible for the generation of the object evaluation action.
      void generateHideQueryItem(java.lang.String parentNamespace, java.lang.String querySubjectName, java.lang.String queryItemName)
      This method is responsible for the generation of the hide query item action.
      void generateModelNameTranslation(java.lang.String modelName, java.lang.String nameTranslation, int localeIndex)
      This method is responsible for the generation of modify actions that localize the model name.
      void generateModelQueryItem(java.lang.String parentNamespace, java.lang.String querySubjectName, java.lang.String queryItemName, java.lang.String basedOnNamespace, java.lang.String sourceQuerySubjectName, java.lang.String queryItemDescription, java.lang.String dataSourceQueryItemName)
      Deprecated. 
      Replaced by generateModelQueryItem(parentNamespace, querySubjectName, queryItemName, basedOnNamespace, sourceQuerySubjectName, queryItemDescription, dataSourceQueryItemName, defaultLocale
      void generateModelQueryItem(java.lang.String parentNamespace, java.lang.String querySubjectName, java.lang.String queryItemName, java.lang.String basedOnNamespace, java.lang.String sourceQuerySubjectName, java.lang.String queryItemDescription, java.lang.String dataSourceQueryItemName, java.lang.String defaultLocale)
      This method is responsible for the generation of the model query item creation action.
      void generateModelQueryItemDescTranslation(java.lang.String parentNamespace, java.lang.String querySubjectName, java.lang.String queryItemName, java.lang.String descTranslation, int localeIndex)
      This method is responsible for the generation of the model query item description and screen tip translation actions.
      void generateModelQueryItemNameTranslation(java.lang.String parentNamespace, java.lang.String querySubjectName, java.lang.String queryItemName, java.lang.String nameTranslation, int localeIndex)
      This method is responsible for the generation of the model query item name translation actions.
      void generateModelQuerySubject(java.lang.String parentNamespace, java.lang.String querySubjectName)
      Deprecated. 
      Replaced by generateModelQuerySubject(parentNamespace, querySubjectName, defaultLocale)
      void generateModelQuerySubject(java.lang.String parentNamespace, java.lang.String querySubjectName, java.lang.String defaultLocale)
      This method is responsible for the generation of the model query subject creation action.
      void generateModelQuerySubjectTranslations(java.lang.String parentNamespace, java.lang.String querySubjectName, java.lang.String nameTranslation, int localeIndex)
      This method is responsible for the generation of the model query subject translation actions.
      void generateNamespaceTranslation(java.lang.String namespace, java.lang.String nameTranslation, int localeIndex)
      This method is responsible for the generation of namespace translation actions.
      void generatePackageNameTranslations(java.lang.String packageName, java.lang.String nameTranslation, int localeIndex)
      This method is responsible for the generation of modify actions that provide package name translations.
      void generateProjectInitialization(java.lang.String projectName, java.lang.String topLevelNamespace)
      Deprecated. 
      Replaced by generateProjectInitialization(projectName, topLevelNamespace, defaultLocale)
      void generateProjectInitialization(java.lang.String projectName, java.lang.String topLevelNamespace, java.lang.String defaultLocale)
      Deprecated. 
      Replaced by generateProjectInitialization(projectName, topLevelNamespace, defaultLocale, queryMode)
      void generateProjectInitialization(java.lang.String projectName, java.lang.String topLevelNamespace, java.lang.String defaultLocale, java.lang.String queryMode)
      This method is responsible for the generation of the project initialization actions.
      void generatePublishPackage(java.lang.String packageName, java.lang.String contentStorePackageLocation)
      This method is responsible for the generation of the package publishing action.
      void generateRelationship(java.lang.String topLevelNamespace, java.lang.String parentNamespace, java.lang.String leftQuerySubjectName, java.lang.String leftMinCardinality, java.lang.String leftMaxCardinality, java.lang.String rightQuerySubjectName, java.lang.String rightMinCardinality, java.lang.String rightMaxCardinality, java.lang.String relationshipName, java.util.List leftQueryItems, java.util.List rightQueryItems)
      This method is responsible for the generation of the relationship actions.
      void generateRelationship(java.lang.String topLevelNamespace, java.lang.String parentNamespace, java.lang.String leftQuerySubjectName, java.lang.String leftMinCardinality, java.lang.String leftMaxCardinality, java.lang.String rightQuerySubjectName, java.lang.String rightMinCardinality, java.lang.String rightMaxCardinality, java.lang.String relationshipName, java.lang.String cognosRelationship) 
      void generateReorderByNameQuerySubject(java.lang.String parentNamespace, java.lang.String querySubjectName)
      This method is responsible for the generation of the object evaluation action.
      void generateScriptHeader()
      This method is responsible for generation the header of the BMTActionLog file used by the BMTActionLogPlayer.exe provided with Cognos installation.
      void generateScriptTail()
      This method is responsible for the generation of the tail of the BMTActionLog file used by the BMTActionLogPlayer.exe provided with Cognos installation.
      void generateSetQueryProcessingToLocal(java.lang.String dataSourceName)
      This method is responsible for the generation of the setting of the query processing to local.
      void generateTransactionHeader()
      This method is responsible for the generation of the transaction header.
      void generateTransactionHeader(boolean useSavedAttribute)
      This method is responsible for the generation of the transaction header.
      void generateTransactionTail()
      This method is responsible for the generation of the transaction tail.
      int getQuerySubjectSequence()
      This method is responsible for getting the sequence number for the action.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ActionLogGen

        public ActionLogGen(PrintWriter out)
        Initialize the ActionLogGen with the writer to write the generated output on it.
        Parameters:
        out - the writer to write the generated output on it.
    • Method Detail

      • generateScriptHeader

        public void generateScriptHeader()
        This method is responsible for generation the header of the BMTActionLog file used by the BMTActionLogPlayer.exe provided with Cognos installation.
      • generateScriptTail

        public void generateScriptTail()
        This method is responsible for the generation of the tail of the BMTActionLog file used by the BMTActionLogPlayer.exe provided with Cognos installation.
      • generateTransactionHeader

        public void generateTransactionHeader()
        This method is responsible for the generation of the transaction header.
      • generateTransactionHeader

        public void generateTransactionHeader(boolean useSavedAttribute)
        This method is responsible for the generation of the transaction header.
        Parameters:
        useSavedAttribute - should the save attribute be included
      • generateTransactionTail

        public void generateTransactionTail()
        This method is responsible for the generation of the transaction tail.
      • generateProjectInitialization

        public void generateProjectInitialization(java.lang.String projectName,
                                                  java.lang.String topLevelNamespace)
        Deprecated. Replaced by generateProjectInitialization(projectName, topLevelNamespace, defaultLocale)
      • generateProjectInitialization

        public void generateProjectInitialization(java.lang.String projectName,
                                                  java.lang.String topLevelNamespace,
                                                  java.lang.String defaultLocale)
        Deprecated. Replaced by generateProjectInitialization(projectName, topLevelNamespace, defaultLocale, queryMode)
      • generateProjectInitialization

        public void generateProjectInitialization(java.lang.String projectName,
                                                  java.lang.String topLevelNamespace,
                                                  java.lang.String defaultLocale,
                                                  java.lang.String queryMode)
        This method is responsible for the generation of the project initialization actions.
        The actions are:
        1. Set the project default locale.
        2. Set the project active locale.
        3. Set the project name.
        4. Set the model name.
        Parameters:
        projectName - the project name
        topLevelNamespace - the model name
        defaultLocale - the default locale
        queryMode - the query mode
      • generateCreateNamespace

        public void generateCreateNamespace(java.lang.String namespace,
                                            java.lang.String parentNamespace)
        This method is responsible for the generation of the creation of a new namespace.
        Parameters:
        namespace - the new namespace
        parentNamespace - the parent namespace
      • generateDBImport

        public void generateDBImport(java.lang.String parentNamespace,
                                     java.lang.String databaseType,
                                     java.lang.String dataSourceName,
                                     java.lang.String schema,
                                     java.util.Set tables,
                                     java.util.Set views,
                                     java.lang.String databaseName)
        This method is responsible for the generation of the DBImport and DBRelease actions.
        The DBImport action is the action responsible for creating the source query subjects.
        Parameters:
        parentNamespace - the parent namespace
        databaseType - the database type (DB2, Oracle "OR" or SQL-Server "SS")
        dataSourceName - the name of the data source configured on Cognos to connect to the Maximo database
        schema - the name of the Maximo database schema
        tables - the tables to be used as source for the query subjects
        views - the views to be used as source for the query subjects
        databaseName - the Maximo database name, only needed if the database type is SQL-Server
      • generateModelQuerySubject

        public void generateModelQuerySubject(java.lang.String parentNamespace,
                                              java.lang.String querySubjectName)
        Deprecated. Replaced by generateModelQuerySubject(parentNamespace, querySubjectName, defaultLocale)
      • generateModelQuerySubject

        public void generateModelQuerySubject(java.lang.String parentNamespace,
                                              java.lang.String querySubjectName,
                                              java.lang.String defaultLocale)
        This method is responsible for the generation of the model query subject creation action.
        Parameters:
        parentNamespace - the parent namespace
        querySubjectName - the query subject name
        defaultLocale - the default locale
      • generateModelQueryItem

        public void generateModelQueryItem(java.lang.String parentNamespace,
                                           java.lang.String querySubjectName,
                                           java.lang.String queryItemName,
                                           java.lang.String basedOnNamespace,
                                           java.lang.String sourceQuerySubjectName,
                                           java.lang.String queryItemDescription,
                                           java.lang.String dataSourceQueryItemName)
        Deprecated. Replaced by generateModelQueryItem(parentNamespace, querySubjectName, queryItemName, basedOnNamespace, sourceQuerySubjectName, queryItemDescription, dataSourceQueryItemName, defaultLocale
      • generateModelQueryItem

        public void generateModelQueryItem(java.lang.String parentNamespace,
                                           java.lang.String querySubjectName,
                                           java.lang.String queryItemName,
                                           java.lang.String basedOnNamespace,
                                           java.lang.String sourceQuerySubjectName,
                                           java.lang.String queryItemDescription,
                                           java.lang.String dataSourceQueryItemName,
                                           java.lang.String defaultLocale)
        This method is responsible for the generation of the model query item creation action.
        Parameters:
        parentNamespace - the parent namespace
        querySubjectName - the model query subject name
        queryItemName - the query item name
        basedOnNamespace - the namespace of the source query subject
        sourceQuerySubjectName - the name of the source query subject
        queryItemDescription - the description of the query item
        dataSourceQueryItemName - the name of the source query item
        defaultLocale - the design language for the project
      • generateHideQueryItem

        public void generateHideQueryItem(java.lang.String parentNamespace,
                                          java.lang.String querySubjectName,
                                          java.lang.String queryItemName)
        This method is responsible for the generation of the hide query item action.
        Parameters:
        parentNamespace - the parent namespace
        querySubjectName - the name of the query subject
        queryItemName - the name of the query item
      • generateEvaluateQuerySubject

        public void generateEvaluateQuerySubject(java.lang.String parentNamespace,
                                                 java.lang.String querySubjectName)
        This method is responsible for the generation of the object evaluation action.
        Parameters:
        parentNamespace - the parent namespace
        querySubjectName - the name of the query subject
      • generateReorderByNameQuerySubject

        public void generateReorderByNameQuerySubject(java.lang.String parentNamespace,
                                                      java.lang.String querySubjectName)
        This method is responsible for the generation of the object evaluation action.
        Parameters:
        parentNamespace - the parent namespace
        querySubjectName - the name of the query subject
      • generateRelationship

        public void generateRelationship(java.lang.String topLevelNamespace,
                                         java.lang.String parentNamespace,
                                         java.lang.String leftQuerySubjectName,
                                         java.lang.String leftMinCardinality,
                                         java.lang.String leftMaxCardinality,
                                         java.lang.String rightQuerySubjectName,
                                         java.lang.String rightMinCardinality,
                                         java.lang.String rightMaxCardinality,
                                         java.lang.String relationshipName,
                                         java.util.List leftQueryItems,
                                         java.util.List rightQueryItems)
        This method is responsible for the generation of the relationship actions.
        Parameters:
        topLevelNamespace - the model name
        parentNamespace - the parent namespace
        leftQuerySubjectName - the name of the left query subject
        leftMinCardinality - the minimum cardinality for the left query subject
        leftMaxCardinality - the maximum cardinality for the left query subject
        rightQuerySubjectName - the name of the right query subject
        rightMinCardinality - the minimum cardinality for the right query subject
        rightMaxCardinality - the maximum cardinality for the right query subject
        relationshipName - the relationship name
        leftQueryItems - the query items of the left query subject
        rightQueryItems - the query items of the right query subject
      • generateRelationship

        public void generateRelationship(java.lang.String topLevelNamespace,
                                         java.lang.String parentNamespace,
                                         java.lang.String leftQuerySubjectName,
                                         java.lang.String leftMinCardinality,
                                         java.lang.String leftMaxCardinality,
                                         java.lang.String rightQuerySubjectName,
                                         java.lang.String rightMinCardinality,
                                         java.lang.String rightMaxCardinality,
                                         java.lang.String relationshipName,
                                         java.lang.String cognosRelationship)
      • generateAllowCrossProductJoin

        public void generateAllowCrossProductJoin()
        This method is responsible for the generation of the allow croos product join actions.
      • generateSetQueryProcessingToLocal

        public void generateSetQueryProcessingToLocal(java.lang.String dataSourceName)
        This method is responsible for the generation of the setting of the query processing to local.
      • generateCreatePackage

        public void generateCreatePackage(java.lang.String packageName,
                                          java.lang.String excludedNamespace,
                                          java.lang.String topLevelNamespace)
        Deprecated. Replaced by generateCreatePackage(packageName, excludedNamespace, topLevelNamespace, defaultLocale, translations)
      • generateCreatePackage

        public void generateCreatePackage(java.lang.String packageName,
                                          java.lang.String excludedNamespace,
                                          java.lang.String topLevelNamespace,
                                          java.lang.String defaultLocale,
                                          java.util.List languages)
        This method is responsible for the generation of package creation actions.
        Parameters:
        packageName -
        excludedNamespace -
        topLevelNamespace -
        defaultLocale -
        languages -
      • generatePublishPackage

        public void generatePublishPackage(java.lang.String packageName,
                                           java.lang.String contentStorePackageLocation)
        This method is responsible for the generation of the package publishing action.
        Parameters:
        packageName -
        contentStorePackageLocation -
      • generateAddProjectLocale

        public void generateAddProjectLocale(java.lang.String locale,
                                             java.lang.String defaultLocale)
        This method is responsible for the generation of the add project locale actions.
        Parameters:
        locale - the locale to add to the project
        defaultLocale - the design language for the project
      • generatePackageNameTranslations

        public void generatePackageNameTranslations(java.lang.String packageName,
                                                    java.lang.String nameTranslation,
                                                    int localeIndex)
        This method is responsible for the generation of modify actions that provide package name translations.
        Parameters:
        packageName - the package name
        nameTranslation - the package name translation
        localeIndex - the index of the locale for this translation
      • generateModelNameTranslation

        public void generateModelNameTranslation(java.lang.String modelName,
                                                 java.lang.String nameTranslation,
                                                 int localeIndex)
        This method is responsible for the generation of modify actions that localize the model name. Currently, the default model name is used for all languages. This is only visible if the project is imported into Framework Manager.
        Parameters:
        modelName - the model name
        localeIndex - the index of the locale for this translation
      • generateNamespaceTranslation

        public void generateNamespaceTranslation(java.lang.String namespace,
                                                 java.lang.String nameTranslation,
                                                 int localeIndex)
        This method is responsible for the generation of namespace translation actions.
        Parameters:
        namespace - the new namespace
        parentNamespace - the parent namespace
        localeIndex - the index of the locale for this translation
      • generateModelQuerySubjectTranslations

        public void generateModelQuerySubjectTranslations(java.lang.String parentNamespace,
                                                          java.lang.String querySubjectName,
                                                          java.lang.String nameTranslation,
                                                          int localeIndex)
        This method is responsible for the generation of the model query subject translation actions.
        Parameters:
        parentNamespace - the parent namespace
        querySubjectName - the query subject name
        nameTranslation - the query subject name translation
        localeIndex - the index of the locale for this translation
      • generateModelQueryItemNameTranslation

        public void generateModelQueryItemNameTranslation(java.lang.String parentNamespace,
                                                          java.lang.String querySubjectName,
                                                          java.lang.String queryItemName,
                                                          java.lang.String nameTranslation,
                                                          int localeIndex)
        This method is responsible for the generation of the model query item name translation actions.
        Parameters:
        parentNamespace - the parent namespace
        querySubjectName - the query subject name
        queryItemName - the query item name
        nameTranslation - the query item name translation
        localeIndex - the index of the locale for this translation
      • generateModelQueryItemDescTranslation

        public void generateModelQueryItemDescTranslation(java.lang.String parentNamespace,
                                                          java.lang.String querySubjectName,
                                                          java.lang.String queryItemName,
                                                          java.lang.String descTranslation,
                                                          int localeIndex)
        This method is responsible for the generation of the model query item description and screen tip translation actions.
        Parameters:
        parentNamespace - the parent namespace
        querySubjectName - the query subject name
        queryItemName - the query item name
        descTranslation - the query item description translation
        localeIndex - the index of the locale for this translation
      • getQuerySubjectSequence

        public int getQuerySubjectSequence()
        This method is responsible for getting the sequence number for the action.
        Returns:
        the query subject sequence number