psdi.dm

Class DMPackageDef

    • Constructor Detail

      • DMPackageDef

        public DMPackageDef(MboSet ms)
                     throws java.rmi.RemoteException
        Construct the PkgDefinition object
        Throws:
        java.rmi.RemoteException
    • Method Detail

      • init

        public void init()
                  throws MXException
        Description copied from class: Mbo
        Called by the framework when the Mbo has been constructed and the MboValues have been initialized. This can be overridden by the programmer to provide any custom initialization they would like to do.
        Overrides:
        init in class Mbo
        Throws:
        MXException
      • extractPkgData

        public void extractPkgData(MboRemote newPkg)
                            throws MXException,
                                   java.rmi.RemoteException
        Extracts the package's records. If it's "change" type package, extract records from change tracking. Otherwise extract a snapshot from db.
        Specified by:
        extractPkgData in interface DMPackageDefRemote
        Parameters:
        newPkg - The newly created package which the records are for.
        Throws:
        MXException
        java.rmi.RemoteException
      • loadCFGDATAGrpsForPkg

        public boolean loadCFGDATAGrpsForPkg(MboRemote pkgMbo,
                                             java.util.List grpV,
                                             UserInfo msgUI)
                                      throws java.lang.Exception
        Write all CFGDATA type records in staging table
        Parameters:
        pkgMbo -
        Throws:
        MXException
        java.rmi.RemoteException
        java.lang.Exception
      • getDMCfgDataObjGroupInOrder

        public MboSetRemote getDMCfgDataObjGroupInOrder(java.util.List cfgGroups)
                                                 throws MXException,
                                                        java.rmi.RemoteException
        Return the cfgdata groups in the package in ascending order.
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • loadDDMETADATAGrpForPkg

        public boolean loadDDMETADATAGrpForPkg(MboRemote pkgMbo,
                                               UserInfo msgUI)
                                        throws java.lang.Exception
        Write all DDMETADATA type records in staging table
        Parameters:
        pkgMbo -
        Throws:
        MXException
        java.rmi.RemoteException
        java.lang.Exception
      • loadPKGMETADATAGrpForPkg

        public void loadPKGMETADATAGrpForPkg(MboRemote pkgMbo,
                                             boolean reCreatePkgMeta,
                                             UserInfo msgUI)
                                      throws java.lang.Exception
        Write all PKGMETADATA type records in staging table
        Specified by:
        loadPKGMETADATAGrpForPkg in interface DMPackageDefRemote
        Parameters:
        pkgMbo -
        Throws:
        MXException
        java.rmi.RemoteException
        java.lang.Exception
      • loadManifestForPkg

        public void loadManifestForPkg(MboRemote newPkg)
                                throws java.lang.Exception
        Write manifest record in staging table
        Parameters:
        newPkg -
        Throws:
        MXException
        java.rmi.RemoteException
        java.lang.Exception
      • loadAllGroupsForPkg

        public java.util.List loadAllGroupsForPkg()
                                           throws MXException,
                                                  java.rmi.RemoteException
        Load all groups for a package, including dependent groups. For a snapshot package, if DD group is not explicitly included in the package, do not include it in this list.
        Specified by:
        loadAllGroupsForPkg in interface DMPackageDefRemote
        Throws:
        MXException
        java.rmi.RemoteException
      • skipCopyField

        protected boolean skipCopyField(MboValueInfo mvi)
                                 throws java.rmi.RemoteException,
                                        MXException
        Overrides the skipCopyField() in the Mbo. While this DMPACKAGEDEF MBO is being copied, this method checks if each attribute needs to be copied by using the data from the static HashSet skipFieldCopy. This method also checks whether certain attributes whose "to copy or not to copy" status is instance-specific and cannot be added to the static HashSet should be copied for this object.
        Overrides:
        skipCopyField in class Mbo
        Parameters:
        MboValueInfo - object of the MboValue that needs to be copied.
        Returns:
        true if the field does not need to be copied. Otherwise, false is returned.
        Throws:
        java.rmi.RemoteException
        MXException
      • loadStagingForPkg

        public MboRemote loadStagingForPkg(MboRemote pkgMbo,
                                           java.lang.String type,
                                           UserInfo msgUI)
                                    throws java.lang.Exception
        Populate staging records for different staging type.
        Parameters:
        pkgMbo -
        type -
        Returns:
        new package mbo after change status
        Throws:
        java.lang.Exception
      • add

        public void add()
                 throws MXException,
                        java.rmi.RemoteException
        Add a new package definition
        Specified by:
        add in interface MboRemote
        Overrides:
        add in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • setReloadOnSave

        public void setReloadOnSave(boolean flag)
        Flag to set if reload is needed for save
        Parameters:
        flag -
      • getReloadOnSave

        public boolean getReloadOnSave()
        Flag to get if reload is needed for save
        Returns:
      • commit

        protected void commit()
        Commit to create a new package definition
        Overrides:
        commit in class Mbo
      • canEditSetWhere

        public void canEditSetWhere()
                             throws MXException,
                                    java.rmi.RemoteException
        Checks if package definition can be edited or not
        Throws:
        MXException
        java.rmi.RemoteException
      • setReadOnly

        public void setReadOnly()
                         throws MXException,
                                java.rmi.RemoteException
        Sets the readonly flag for package definition
        Throws:
        MXException
        java.rmi.RemoteException
      • canCreatePackage

        public void canCreatePackage()
                              throws MXException
        Check whether a package can be created.
        Throws:
        MXException
        java.rmi.RemoteException
      • setSnapshotFlag

        public void setSnapshotFlag(boolean snapshot)
        Set the flag that package definition is snapshot
        Parameters:
        snapshot -
      • getSnapshotFlag

        public boolean getSnapshotFlag()
        Get the flag that package definition is snapshot or change.
        Returns:
      • getPkgTypeAsInt

        public int getPkgTypeAsInt()
        Get the package type as integer
        Returns:
        0 for snapshot,1 for change , 2 for collection
      • setPkgTypeAsInt

        public void setPkgTypeAsInt(int type)
        Sets the package type as integer
        Parameters:
        type - - 0 for snapshot,1 for change , 2 for collection
      • delete

        public void delete(long accessModifier)
                    throws MXException,
                           java.rmi.RemoteException
        Delete package definition
        Specified by:
        delete in interface MboRemote
        Overrides:
        delete in class Mbo
        Parameters:
        accessModifier - The bitwise flag specified to determine if certain normal security checks are to be bypassed for this delete request. For example: if the accessModifer is NOACCESSCHECK, then the check for the object's NODELETE flag and the call to the object's canDelete() method will not be performed. If the accessModifer is NONE, then all the access checks are performed before this object is marked delete.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.delete(long)
      • moveEventTrackingToHistory

        public void moveEventTrackingToHistory()
                                        throws MXException,
                                               java.rmi.RemoteException
        When a package is created successfully, all the tracking events for change type package are moved to history table.
        Specified by:
        moveEventTrackingToHistory in interface DMPackageDefRemote
        Throws:
        MXException
        java.rmi.RemoteException
      • cantPerformOnLocked

        public void cantPerformOnLocked()
                                 throws MXException,
                                        java.rmi.RemoteException
        If the package definition's status is LOCKED, throw an exception. This method is called in multiple locations to avoid operation being performed when the definition is locked.
        Specified by:
        cantPerformOnLocked in interface DMPackageDefRemote
        Throws:
        MXException
        java.rmi.RemoteException