Class PipelineManager
- java.lang.Object
-
- org.apache.manifoldcf.core.database.BaseTable
-
- org.apache.manifoldcf.crawler.jobs.PipelineManager
-
public class PipelineManager extends BaseTable
This class manages the "pipelines" table, which contains the ordered transformation connections and their specification data.
jobpipelinesField Type Description ownerid BIGINT Reference:jobs.id ordinal BIGINT prerequisite BIGINT outputname VARCHAR(32) transformationname VARCHAR(32) connectiondesc VARCHAR(255) connectionspec LONGTEXT
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String_rcsidstatic java.lang.StringconnectionDescriptionFieldstatic java.lang.StringconnectionSpecFieldstatic java.lang.StringordinalFieldstatic java.lang.StringoutputNameFieldstatic java.lang.StringownerIDFieldstatic java.lang.StringprerequisiteFieldstatic java.lang.StringtransformationNameField-
Fields inherited from class org.apache.manifoldcf.core.database.BaseTable
dbInterface, tableName
-
-
Constructor Summary
Constructors Constructor Description PipelineManager(IThreadContext threadContext, IDBInterface database)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbuildOutputQueryClause(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 output connection names.voidbuildTransformationQueryClause(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 transformation connection names.booleancompareRows(java.lang.Long ownerID, IJobDescription job)Compare rows in job description with what's currently in the database.voiddeinstall()Uninstall.voiddeleteRows(java.lang.Long ownerID)Delete rows.java.lang.String[]getOutputConnectionNames(java.lang.Long ownerID)Get all the output connection names for a job.voidgetRows(java.util.Map<java.lang.Long,JobDescription> returnValues, java.lang.String ownerIDList, java.util.ArrayList ownerIDParams)Fill in a set of pipelines corresponding to a set of owner id's.java.lang.String[]getTransformationConnectionNames(java.lang.Long ownerID)Get all the transformation connection names for a job.voidinstall(java.lang.String ownerTable, java.lang.String owningTablePrimaryKey, java.lang.String outputTableName, java.lang.String outputTableNameField, java.lang.String transformationTableName, java.lang.String transformationTableNameField)Install or upgrade.voidwriteOutputStage(java.lang.Long ownerID, java.lang.String outputConnectionName, java.lang.String outputSpecification)Write an output stage (part of the upgrade code).voidwriteRows(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
-
prerequisiteField
public static final java.lang.String prerequisiteField
- See Also:
- Constant Field Values
-
outputNameField
public static final java.lang.String outputNameField
- See Also:
- Constant Field Values
-
transformationNameField
public static final java.lang.String transformationNameField
- 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
-
PipelineManager
public PipelineManager(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 outputTableName, java.lang.String outputTableNameField, java.lang.String transformationTableName, java.lang.String transformationTableNameField) throws ManifoldCFExceptionInstall 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 ManifoldCFExceptionUninstall.- Throws:
ManifoldCFException
-
buildTransformationQueryClause
public void buildTransformationQueryClause(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 transformation connection names.
-
buildOutputQueryClause
public void buildOutputQueryClause(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 output connection names.
-
getTransformationConnectionNames
public java.lang.String[] getTransformationConnectionNames(java.lang.Long ownerID) throws ManifoldCFExceptionGet all the transformation connection names for a job.- Parameters:
ownerID- is the job ID.- Returns:
- the set of connection names.
- Throws:
ManifoldCFException
-
getOutputConnectionNames
public java.lang.String[] getOutputConnectionNames(java.lang.Long ownerID) throws ManifoldCFExceptionGet all the output 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 pipelines 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 ManifoldCFExceptionCompare rows in job description with what's currently in the database.- Parameters:
ownerID- is the owning identifier.job- is a job description.- Throws:
ManifoldCFException
-
writeOutputStage
public void writeOutputStage(java.lang.Long ownerID, java.lang.String outputConnectionName, java.lang.String outputSpecification) throws ManifoldCFExceptionWrite an output stage (part of the upgrade code).- Throws:
ManifoldCFException
-
writeRows
public void writeRows(java.lang.Long ownerID, IJobDescription job) throws ManifoldCFExceptionWrite 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 ManifoldCFExceptionDelete rows.- Parameters:
ownerID- is the owner whose rows to delete.- Throws:
ManifoldCFException
-
-