com.ibm.tivoli.maximo.mfmail.util

Class MfMailCfgValidator

  • java.lang.Object
    • com.ibm.tivoli.maximo.mfmail.util.MfMailCfgValidator


  • public class MfMailCfgValidator
    extends java.lang.Object
    A validator class for Maximo for E-mail configuration. The main method validate() will return whether the specified configuration is valid or not. If the configuration is invalid, the error messages can be gotten from getErrorMessage() method. This message has multiple exception values and each message is separated by line break.
    • Constructor Detail

      • MfMailCfgValidator

        public MfMailCfgValidator(MfMailCfgRemote configuration)
        Instantiates a new Maximo for E-mail configuration validator.
        Parameters:
        configuration - configuration
    • Method Detail

      • appendErrorMessage

        protected void appendErrorMessage(java.lang.String errorMsg)
        Append error message.
        Parameters:
        errorMsg - the error msg
      • checkValueTable

        protected void checkValueTable()
                                throws MXException,
                                       java.rmi.RemoteException
        Check whether the value table (MFMAILWFVALUECFG and MFMAILSTVALUECFG) has at least one entry or not. In addition, when the Workflow scenario, check whether at least one record to have ISACCEPT=1 field.
        Parameters:
        children - Relationship name for the children
        grandchildren - Relationship name for the grandchildren
        Throws:
        MXException
        java.rmi.RemoteException
      • checkWorkFlowValueTable

        protected void checkWorkFlowValueTable(MboSetRemote mboSet,
                                               MboRemote parent)
                                        throws MXException,
                                               java.rmi.RemoteException
        Check work flow value table. This method will check the workflow value table ,MFMAILWFVALUECFG, whether this table has at least one ISACCEPT = 1 and SETVALUE = 0.
        Parameters:
        mboSet - the mbo set
        parent - the parent
        Throws:
        MXException
        java.rmi.RemoteException
      • checkSendToField

        protected void checkSendToField(MboSetRemote mboSet)
                                 throws MXException,
                                        java.rmi.RemoteException
        Check send to field.
        Parameters:
        mboSet - the mbo set
        Throws:
        MXException - the mX exception
        java.rmi.RemoteException - the remote exception
      • getErrorMessages

        public java.lang.String getErrorMessages()
        Gets the error messages.
        Returns:
        the error messages
      • parseKeyValueStringFromMbo

        protected java.lang.String parseKeyValueStringFromMbo(MboRemote mbo)
                                                       throws java.rmi.RemoteException,
                                                              MXException
        Parses the key value string from mbo's KeyValue set.
        Parameters:
        mbo - the mbo
        Returns:
        the string
        Throws:
        java.rmi.RemoteException
        MXException
      • validate

        public boolean validate()
        Validate.
        Returns:
        true, if successful