psdi.app.dpldasset.virtual

Class PromoteNode

  • java.lang.Object
  • All Implemented Interfaces:
    java.rmi.Remote, PromoteSetAttributeFlags, PromoteNodeRemote, MboConstants, MboRemote, MaxRemoteProxy


    public class PromoteNode
    extends Mbo
    implements PromoteNodeRemote, PromoteSetAttributeFlags
    PromoteNode (PROMOTE object) is based on a view showing DPLDASSET values, but it also has non-peristent attributes showing
    1. the asset a node is already linked to, if any,
    2. the parent of that asset, and
    3. the parent of the node in deployedasset.
    The Mbo is acted upon by the PROMOTE escalation action and by the Promote to Assets dialog.
    Attribute NameDescription
    ASSETCLASSAsset Class
    ASSETNUMAsset linked through reconciliation links
    ASSETSITEIDSite of asset linked through reconciliation links
    CLASSSTRUCTUREIDClassification for created assets
    DESCRIPTIONDescription
    DOMAINNAMEDomain Name
    DPLDSITEIDSite Id
    GUIDActual CI's GUID
    ITEMNUMItem number for created rotating assets
    LOCATIONLocation to which created assets will be assigned. Location of parent is used if parent is known.
    NODEIDNode Id
    NODENAMENode Name
    ORGIDOrganization for created assets
    PARENTASSETNUMAsset linked through reconciliation links to parent node. This asset will be the parent of the promoted asset.
    PARENTSITEIDSite of parent asset. If present, this site will be used for the promoted asset.
    PROMOTECHILDRENIf checked, promote all child partitions along with these nodes, regardless of whether they were selected in the Computers list. This field will be enabled when children exist for the node.
    SERIALNUMBERSerial Number
    SITEIDSite for created assets
    STATUSInitial status for created assets
    HASHThe unique ID which is used to identify a partition from a discovery perspective. This field can be used by reconciliation to link and audit authorized partitions.
    ISPROMOTEDPromoted?
    PARENTIDParent Node Id
    PARTITIONIf this is a partition?
    PLATFORMBASEIndicates if the computer is distributed or mainframe
    Since:
    7.2
    See Also:
    #PromoteValues
    • Field Detail

      • PROMOTION_LOGGER

        public static MXLogger PROMOTION_LOGGER
      • MSG_GROUP_PROMOTION

        public static final java.lang.String MSG_GROUP_PROMOTION
        See Also:
        Constant Field Values
      • alwaysReadOnly

        protected static final java.lang.String[] alwaysReadOnly
      • defaultsStatus

        protected int defaultsStatus
      • readonlyFields_whenLinked

        protected static final java.lang.String[] readonlyFields_whenLinked
      • readonlyFields_whenChild

        protected static final java.lang.String[] readonlyFields_whenChild
    • Constructor Detail

      • PromoteNode

        public PromoteNode(MboSet ms)
                    throws MXException,
                           java.rmi.RemoteException
        Constructor
        Parameters:
        ms - PromotionEscalation set
        Throws:
        MXException
        java.rmi.RemoteException
    • Method Detail

      • promote

        public int promote(PromoteValuesRemote defaults,
                           boolean topLevelSelection,
                           boolean promotedByParent)
                    throws MXException,
                           java.rmi.RemoteException
        Promote nodes and optionally their children using the default values passed. Does not promote nodes that have already been promoted or are already linked to assets.
        Specified by:
        promote in interface PromoteNodeRemote
        Parameters:
        defaults - the default values to apply
        topLevelSelection - defect 31698 - make the promoted node aware if it is promoted directly, or as a result of the Promote Children flag
        promotedByParent - - if this is a child which is promoted because the parent is promoted.
        Returns:
        int
        Throws:
        MXException
        java.rmi.RemoteException
      • addPromoteLogInformation

        protected java.lang.String addPromoteLogInformation()
                                                     throws MXException,
                                                            java.rmi.RemoteException
        Add additional log information Place holder for the extension to extend this class and write information to the log.
        Throws:
        MXException
        java.rmi.RemoteException
      • isPromoted

        protected boolean isPromoted()
                              throws java.rmi.RemoteException,
                                     MXException
        Use the tloamispromoted to determine if node was previously promoted.
        Returns:
        true if the flag is external value for YES, false if null or otherwise.
        Throws:
        java.rmi.RemoteException
        MXException
      • setPromotedTrue

        public void setPromotedTrue()
                             throws java.rmi.RemoteException,
                                    MXException
        Set the tloamispromoted flag to true on the related computer record.
        Throws:
        java.rmi.RemoteException
        MXException
      • isPartition

        protected boolean isPartition()
                               throws MXException,
                                      java.rmi.RemoteException
        Get the itcategory external default value using the site / org of the mbo passed in. If the associated computer has parents, it is a partition, otherwise a computer.
        Parameters:
        assetMbo -
        Throws:
        MXException
        java.rmi.RemoteException
      • hasDeployedChildren

        protected boolean hasDeployedChildren()
                                       throws MXException,
                                              java.rmi.RemoteException
        Get the itcategory external default value using the site / org of the mbo passed in. If the associated computer has parents, it is a partition, otherwise a computer.
        Parameters:
        assetMbo -
        Throws:
        MXException
        java.rmi.RemoteException
      • getLinkedParentAsset

        public AssetRemote getLinkedParentAsset(boolean promoting)
                                         throws java.rmi.RemoteException,
                                                MXException
        Gets and caches linked parent asset through reconlinks. Link records may have been created by reconciliation process or by promotion.
        Specified by:
        getLinkedParentAsset in interface PromoteNodeRemote
        Parameters:
        promoting - true if there must be a parent of a child
        Throws:
        MXApplicationException - if parent node does not have a reconlink, or if reconlink does not refer to an asset.
        java.rmi.RemoteException
        MXException
      • setDefaults

        public int setDefaults(PromoteValuesRemote defaults,
                               boolean fromApplyDefaultsButton)
                        throws java.rmi.RemoteException,
                               MXException
        For the promotion values section of the promotion dialog, set the defaults as allowed and needed.
        Specified by:
        setDefaults in interface PromoteNodeRemote
        Parameters:
        siteid - Name of site from Promotion Values
        Throws:
        java.rmi.RemoteException
        MXException
      • applyDefaultAttribute

        protected void applyDefaultAttribute(PromoteValuesRemote defaults,
                                             java.lang.String attributeName)
                                      throws MXException,
                                             java.rmi.RemoteException
        Set the attribute of promoteNode to the current value of the attribute if it is not read only on promoteNode, otherwise leave as is. Will cause exceptions for non-nullables
        Throws:
        MXException
        java.rmi.RemoteException
      • createPromotedAsset

        protected void createPromotedAsset(boolean topLevelSelection)
                                    throws java.rmi.RemoteException,
                                           MXException
        Creates promoted asset. Use PromoteNode.getLinkedAsset() to get the asset created.
        Throws:
        java.rmi.RemoteException
        MXException
      • getClassificationErrorMsgKey

        protected java.lang.String getClassificationErrorMsgKey()
      • verifySizeCopy

        protected void verifySizeCopy(java.lang.String deployedAssetAttribute,
                                      java.lang.String assetAttribute)
                               throws java.rmi.RemoteException,
                                      MXException
        Copy an attribute value from the deployed asset to the asset object, throwing an exception if the source data ius too large to fit
        Parameters:
        deployedAssetAttribute - The name of the source deployed asset attribute
        assetAttribute - The name of the targer asset attribute
        Throws:
        java.rmi.RemoteException
        MXException
      • addCreatedMemo

        public void addCreatedMemo()
                            throws java.rmi.RemoteException,
                                   MXException
        Update the memo for the asset creation transaction to reflect the fact that this asset was promoted.
        Specified by:
        addCreatedMemo in interface PromoteNodeRemote
        Throws:
        java.rmi.RemoteException
        MXException
      • setDefaults

        protected boolean setDefaults(PromoteNodeRemote child,
                                      PromoteValuesRemote defaults)
                               throws java.rmi.RemoteException,
                                      MXException
        set Defaults
        Parameters:
        child - - child node
        defaults - - defaults values
        Returns:
        true if successful
        Throws:
        java.rmi.RemoteException
        MXException
      • getNewDomainValue

        protected java.lang.String getNewDomainValue(java.lang.String domain,
                                                     java.lang.String externalValue,
                                                     MboRemote mbo)
                                              throws MXException
        If the value is appropriate to mbo, returns the value, otherwise returns the default external value for the mbo taken from the maxvalue of value.
        Parameters:
        domain - name
        externalValue - to be checked and / or translated
        mbo - to be checked against
        Returns:
        domain value suitable for mbo or null
        Throws:
        MXException
      • createReconLink

        protected void createReconLink(MboRemote assetMbo)
                                throws java.rmi.RemoteException,
                                       MXException
        Creates a reconciliation link (reconlink) from the computer referenced by this record to the asset passed in.
        Parameters:
        assetMbo -
        Throws:
        java.rmi.RemoteException
        MXException
      • clearClassification

        public void clearClassification()
                                 throws MXException
        Set classstructureid to null from Clear Classification in Classification menu.
        Throws:
        MXException
      • assetLinkedSetReadOnlyAttr

        public void assetLinkedSetReadOnlyAttr()
                                        throws MXException,
                                               java.rmi.RemoteException
        If an authorized asset is already linked, then no promotion attributes can be set
        Throws:
        MXException
        java.rmi.RemoteException