Class NotificationManager
- java.lang.Object
-
- org.apache.manifoldcf.core.database.BaseTable
-
- org.apache.manifoldcf.crawler.jobs.NotificationManager
-
public class NotificationManager extends BaseTable
This class manages the "jobnotifications" table, which contains the ordered list of notification connections and their specification data.
jobnotificationsField Type Description ownerid BIGINT Reference:jobs.id ordinal BIGINT notificationname VARCHAR(32) connectiondesc VARCHAR(255) connectionspec LONGTEXT
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
_rcsid
static java.lang.String
connectionDescriptionField
static java.lang.String
connectionSpecField
static java.lang.String
notificationNameField
static java.lang.String
ordinalField
static java.lang.String
ownerIDField
-
Fields inherited from class org.apache.manifoldcf.core.database.BaseTable
dbInterface, tableName
-
-
Constructor Summary
Constructors Constructor Description NotificationManager(IThreadContext threadContext, IDBInterface database)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.boolean
compareRows(java.lang.Long ownerID, IJobDescription job)
Compare rows in job description with what's currently in the database.void
deinstall()
Uninstall.void
deleteRows(java.lang.Long ownerID)
Delete rows.java.lang.String[]
getNotificationConnectionNames(java.lang.Long ownerID)
Get all the notification connection names for a job.void
getRows(java.util.Map<java.lang.Long,JobDescription> returnValues, java.lang.String ownerIDList, java.util.ArrayList ownerIDParams)
Fill in a set of notifications corresponding to a set of owner id's.void
install(java.lang.String ownerTable, java.lang.String owningTablePrimaryKey, java.lang.String notificationTableName, java.lang.String notificationTableNameField)
Install or upgrade.void
writeRows(java.lang.Long ownerID, IJobDescription job)
Write a pipeline list into the database.-
Methods inherited from class org.apache.manifoldcf.core.database.BaseTable
addTableIndex, analyzeTable, beginTransaction, buildConjunctionClause, constructCountClause, constructDistinctOnClause, constructDoubleCastClause, constructOffsetLimitClause, constructRegexpClause, constructSubstringClause, endTransaction, findConjunctionClauseMax, getDatabaseCacheKey, getDBInterface, getMaxInClause, getMaxOrClause, getSleepAmt, getTableIndexes, getTableName, getTableSchema, getTransactionID, getWindowedReportMaxRows, makeTableKey, noteModifications, performAddIndex, performAlter, performCommit, performCreate, performDelete, performDrop, performInsert, performModification, performQuery, performQuery, performRemoveIndex, performUpdate, prepareRowForSave, readRow, reindexTable, signalRollback, sleepFor
-
-
-
-
Field Detail
-
_rcsid
public static final java.lang.String _rcsid
- See Also:
- Constant Field Values
-
ownerIDField
public static final java.lang.String ownerIDField
- See Also:
- Constant Field Values
-
ordinalField
public static final java.lang.String ordinalField
- See Also:
- Constant Field Values
-
notificationNameField
public static final java.lang.String notificationNameField
- See Also:
- Constant Field Values
-
connectionDescriptionField
public static final java.lang.String connectionDescriptionField
- See Also:
- Constant Field Values
-
connectionSpecField
public static final java.lang.String connectionSpecField
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
NotificationManager
public NotificationManager(IThreadContext threadContext, IDBInterface database) throws ManifoldCFException
Constructor.- Parameters:
threadContext
- is the thread context.database
- is the database instance.- Throws:
ManifoldCFException
-
-
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
-
deinstall
public void deinstall() throws ManifoldCFException
Uninstall.- 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
-
-