Class NotificationManager


  • public class NotificationManager
    extends BaseTable
    This class manages the "jobnotifications" table, which contains the ordered list of notification connections and their specification data.

    jobnotifications
    FieldTypeDescription        
    owneridBIGINTReference:jobs.id
    ordinalBIGINT
    notificationnameVARCHAR(32)
    connectiondescVARCHAR(255)
    connectionspecLONGTEXT


    • Method Detail

      • install

        public void install​(java.lang.String ownerTable,
                            java.lang.String owningTablePrimaryKey,
                            java.lang.String notificationTableName,
                            java.lang.String notificationTableNameField)
                     throws ManifoldCFException
        Install or upgrade.
        Parameters:
        ownerTable - is the name of the table that owns this one.
        owningTablePrimaryKey - is the primary key of the owning table.
        Throws:
        ManifoldCFException
      • buildNotificationQueryClause

        public void buildNotificationQueryClause​(java.lang.StringBuilder query,
                                                 java.util.ArrayList params,
                                                 java.lang.String parentIDField,
                                                 java.util.List<java.lang.String> connectionNames)
        Build a query clause matching a set of notification connection names.
      • getNotificationConnectionNames

        public java.lang.String[] getNotificationConnectionNames​(java.lang.Long ownerID)
                                                          throws ManifoldCFException
        Get all the notification connection names for a job.
        Parameters:
        ownerID - is the job ID.
        Returns:
        the set of connection names.
        Throws:
        ManifoldCFException
      • getRows

        public void getRows​(java.util.Map<java.lang.Long,​JobDescription> returnValues,
                            java.lang.String ownerIDList,
                            java.util.ArrayList ownerIDParams)
                     throws ManifoldCFException
        Fill in a set of notifications corresponding to a set of owner id's.
        Parameters:
        returnValues - is a map keyed by ownerID, with value of JobDescription.
        ownerIDList - is the list of owner id's.
        ownerIDParams - is the corresponding set of owner id parameters.
        Throws:
        ManifoldCFException
      • compareRows

        public boolean compareRows​(java.lang.Long ownerID,
                                   IJobDescription job)
                            throws ManifoldCFException
        Compare rows in job description with what's currently in the database.
        Parameters:
        ownerID - is the owning identifier.
        job - is a job description.
        Throws:
        ManifoldCFException
      • writeRows

        public void writeRows​(java.lang.Long ownerID,
                              IJobDescription job)
                       throws ManifoldCFException
        Write a pipeline list into the database.
        Parameters:
        ownerID - is the owning identifier.
        job - is the job description that is the source of the pipeline.
        Throws:
        ManifoldCFException
      • deleteRows

        public void deleteRows​(java.lang.Long ownerID)
                        throws ManifoldCFException
        Delete rows.
        Parameters:
        ownerID - is the owner whose rows to delete.
        Throws:
        ManifoldCFException