psdi.app.common.recon

Class DataSetGroupFieldUtils

  • java.lang.Object
    • psdi.app.common.recon.DataSetGroupFieldUtils
  • All Implemented Interfaces:
    MboConstants


    public class DataSetGroupFieldUtils
    extends java.lang.Object
    implements MboConstants
    A field validator that describes a field in a data set group of fields. It has the name of the main object's field that defines the data set type and is capable of providing specifications.
    • Method Detail

      • resetField

        public static void resetField(MboRemote mbovField,
                                      java.lang.String fldName,
                                      boolean isReadOnly,
                                      boolean isRequired)
        Clears a field with the specified name. Sets its "read-only" and "required" states.
        Parameters:
        mbo - Mbo containing the field to reset.
        Name - of the field to clear and disable.
        isReadOnly - Set the field to read-only?
        isRequired - Set the field to required?
      • resetField

        public static void resetField(MboValue mbv,
                                      java.lang.String fldName,
                                      boolean isReadOnly,
                                      boolean isRequired)
        Clears a field with the specified name. Sets its "read-only" and "required" states.
        Parameters:
        mbv - MboValue belonging to Mbo containing the field to reset.
        Name - of the field to clear and disable.
        isReadOnly - Set the field to read-only?
        isRequired - Set the field to required?
      • resetField

        public static void resetField(MboRemote mbo,
                                      java.lang.String fldName)
                               throws java.rmi.RemoteException,
                                      MXException
        Resets the field, by clearing it and setting it to "Read-only" and "Required".
        Parameters:
        mbo - Mbo containing the field to reset.
        fldName - Name of the field to be reset.
        Throws:
        java.rmi.RemoteException
        MXException
        See Also:
        #resetField(String, boolean, boolean)
      • resetField

        public static void resetField(MboValue mbv,
                                      java.lang.String fldName)
                               throws java.rmi.RemoteException,
                                      MXException
        Resets the field, by clearing it and setting it to "Read-only" and "Required".
        Parameters:
        mbv - MboValue belonging to Mbo containing the field to reset.
        fldName - Name of the field to be reset.
        Throws:
        java.rmi.RemoteException
        MXException
        See Also:
        #resetField(String, boolean, boolean)
      • hasSpecs

        public static boolean hasSpecs(MboValue mbvObjName,
                                       java.lang.String fldDataSetOwner)
                                throws MXException,
                                       java.rmi.RemoteException
        Checks whether or not there are specifications defined for the type of data set used.
        Returns:
        true if there are specs for the type of dataset, false otherwise.
        Throws:
        MXException - If there is an application error.
        java.rmi.RemoteException - If there is an RMI error.
      • getRootSpecID

        public static java.lang.String getRootSpecID(MboValue mbvObjName,
                                                     java.lang.String fldDataSetOwner)
                                              throws MXException,
                                                     java.rmi.RemoteException
        Returns the root specification variable or null if there are not specs for this data set type.
        Returns:
        The root specification variable.
        Throws:
        MXException - If there is an application error.
        java.rmi.RemoteException - If there is an RMI error.
      • getSpecs

        public static java.lang.String getSpecs(MboValue mbvObjName,
                                                java.lang.String fldDataSetOwner)
                                         throws MXException,
                                                java.rmi.RemoteException
        Returns the specifications for this data set type or null if there aren't any.
        Returns:
        Specifications for this data set type.
        Throws:
        MXException - If there is an application error.
        java.rmi.RemoteException - If there is an RMI error.
      • checkIfRootClassIsSet

        public static boolean checkIfRootClassIsSet(MboValue mbvObjName,
                                                    java.lang.String fldDataSetOwner)
                                             throws MXException,
                                                    java.rmi.RemoteException
        Check if Root Class is set. The root class is set from Organization application, System Setting. Display error if root class is not set.
        Returns:
        boolean - true if Root class ID is set.
        Throws:
        MXException - If there is an application error.
        java.rmi.RemoteException - If there is an RMI error.
      • getAllLevelAncestorIds

        public static java.lang.String[] getAllLevelAncestorIds(MboRemote mbo,
                                                                java.lang.String classStructId,
                                                                boolean includingSelf)
                                                         throws MXException,
                                                                java.rmi.RemoteException
        Returns ClassStructureIds of all level ancestors including or not including self.
        Parameters:
        mbo - The current mbo.
        classStructId - Class structure id of a class to find its ancestors.
        includingSelf - Whether or not to include the HierarchyLevel 0 ancestor ie. self.
        Returns:
        An array of all level ancestors or an empty array if the firt level.
        Throws:
        MXException
        java.rmi.RemoteException
      • setAllAttributesReadOnly

        public static void setAllAttributesReadOnly(Mbo mbo,
                                                    boolean readOnly)
                                             throws MXException
        Sets the "read-only" status of all attributes belonging to the specified mbo.
        Parameters:
        mbo - An MBO which attributes' "read-only" state is to be altered.
        readOnly - The new "read-only" state of the mbo's attributes.
        Throws:
        MXException
      • validateTaskFilterType

        public static void validateTaskFilterType(Mbo mboTask)
                                           throws java.rmi.RemoteException,
                                                  MXException
        Validates a Reconciliation Task's filter type that it matches one of the selected "Data Set 1" or "Data Set 2". If there is no match an exception is thrown.
        Parameters:
        mboTask - A Reconciliation Task MBO.
        Throws:
        java.rmi.RemoteException - If an RMI error occurs.
        MXException - If there is a no match or an application error.
      • setDataSetsReadOnly

        public static void setDataSetsReadOnly(MboRemote mbo,
                                               boolean readOnly)
        Sets the "read-only" state of the data set fields.
      • checkValueExists

        public static void checkValueExists(MboRemote mbo,
                                            java.lang.String attribute)
                                     throws MXException
        Checks if the value of the specified attribute is present. Throws an exception if it is missing.
        Parameters:
        attribute - Attribute name to check its value.
        Throws:
        MXException - Thrown if the attribute's value is missing.
      • countAfterSave

        public static int countAfterSave(MboSetRemote mbos)
                                  throws java.rmi.RemoteException,
                                         MXException
        Counts MBOs that would remain in the set if a save occured right away.
        Parameters:
        mbos - A set of MBOs.
        Returns:
        Count of objects remaining in the set after an immmediate save.
        Throws:
        java.rmi.RemoteException
        MXException
      • updateTaskComparisonResultStatus

        public static void updateTaskComparisonResultStatus(MboRemote task)
                                                     throws MXException,
                                                            java.rmi.RemoteException
        Updates the "required" state of the "Comparison Results" option of a Reconciliation Task and resets the value.
        Parameters:
        task - A Task object.
        Throws:
        MXException
        java.rmi.RemoteException
      • updateTaskComparisonResultStatus

        public static void updateTaskComparisonResultStatus(MboRemote task,
                                                            boolean required)
                                                     throws MXException,
                                                            java.rmi.RemoteException
        Updates the "required" state of the "Comparison Results" option of a Reconciliation Task and resets the value.
        Parameters:
        task - A Task object.
        Throws:
        MXException
        java.rmi.RemoteException
      • getTranslatedValue

        public static java.lang.String getTranslatedValue(Translate translator,
                                                          java.lang.String domainId,
                                                          java.lang.String value)
                                                   throws MXException
        Returns a translated value based on the value adapter
        Parameters:
        translator - The global translator.
        domainId - Synonym domain ID.
        value - A value to be translagted. VALUE -> MAXVALUE.
        Returns:
        The translated value.
        Throws:
        MXException
      • getTranslatedValue

        public static java.lang.String getTranslatedValue(Translate translator,
                                                          java.lang.String domainId,
                                                          MboRemote mbo,
                                                          java.lang.String attribute)
                                                   throws MXException,
                                                          java.rmi.RemoteException
        Returns the translated value of the attribute of mbo object.
        Parameters:
        translator - The global translator.
        domainId - Synonym domain ID.
        mbo - MBO which attribute is to be translated.
        attribute - The attribute to be translated.
        Returns:
        The translated value based on the specified domain. VALUE->MAXVALUE.
        Throws:
        MXException
        java.rmi.RemoteException