Class ScheduleManager
- java.lang.Object
- 
- org.apache.manifoldcf.core.database.BaseTable
- 
- org.apache.manifoldcf.crawler.jobs.ScheduleManager
 
 
- 
 public class ScheduleManager extends BaseTable This class manages the "schedules" table, which contains the automatic execution schedule for each job. It's separated from the main jobs table because we will need multiple timeslots per job.
 schedulesField Type Description ownerid BIGINT Reference:jobs.id ordinal BIGINT dayofweek VARCHAR(255) dayofmonth VARCHAR(255) monthofyear VARCHAR(255) yearlist VARCHAR(255) hourofday VARCHAR(255) minutesofhour VARCHAR(255) timezone VARCHAR(32) windowlength BIGINT requestminimum CHAR(1) 
- 
- 
Field SummaryFields Modifier and Type Field Description static java.lang.String_rcsidstatic java.lang.StringdayOfMonthFieldstatic java.lang.StringdayOfWeekFieldstatic java.lang.StringhourOfDayFieldstatic java.lang.StringminutesOfHourFieldstatic java.lang.StringmonthOfYearFieldstatic java.lang.StringordinalFieldstatic java.lang.StringownerIDFieldstatic java.lang.StringrequestMinimumFieldstatic java.lang.StringtimezoneFieldstatic java.lang.StringwindowDurationFieldstatic java.lang.StringyearField- 
Fields inherited from class org.apache.manifoldcf.core.database.BaseTabledbInterface, tableName
 
- 
 - 
Constructor SummaryConstructors Constructor Description ScheduleManager(IThreadContext threadContext, IDBInterface database)Constructor.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddeinstall()Uninstall.voiddeleteRows(java.lang.Long ownerID)Delete rows.static java.lang.StringenumeratedValueToString(EnumeratedValues values)Go from enumerated value to string.voidgetRows(java.util.Map<java.lang.Long,JobDescription> returnValues, java.lang.String ownerIDList, java.util.ArrayList ownerIDParams)Fill in a set of schedules corresponding to a set of owner id's.voidgetRowsAlternate(java.util.Map returnValues, java.util.ArrayList ownerIDParams)Fill in a set of schedules corresponding to a set of owner id's.voidinstall(java.lang.String ownerTable, java.lang.String owningTablePrimaryKey)Install or upgrade.intmaxClauseGetRowsAlternate()Get the max clauses that can be used with getRowsAlternate.static java.lang.StringrequestMinimumValueToString(boolean requestMinimum)static EnumeratedValuesstringToEnumeratedValue(java.lang.String value)Go from string to enumerated value.static booleanstringToRequestMinimumValue(java.lang.String requestMinimum)voidwriteRows(java.lang.Long ownerID, IJobDescription list)Write a schedule list into the database.- 
Methods inherited from class org.apache.manifoldcf.core.database.BaseTableaddTableIndex, 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- 
_rcsidpublic static final java.lang.String _rcsid - See Also:
- Constant Field Values
 
 - 
ownerIDFieldpublic static final java.lang.String ownerIDField - See Also:
- Constant Field Values
 
 - 
ordinalFieldpublic static final java.lang.String ordinalField - See Also:
- Constant Field Values
 
 - 
dayOfWeekFieldpublic static final java.lang.String dayOfWeekField - See Also:
- Constant Field Values
 
 - 
dayOfMonthFieldpublic static final java.lang.String dayOfMonthField - See Also:
- Constant Field Values
 
 - 
monthOfYearFieldpublic static final java.lang.String monthOfYearField - See Also:
- Constant Field Values
 
 - 
yearFieldpublic static final java.lang.String yearField - See Also:
- Constant Field Values
 
 - 
hourOfDayFieldpublic static final java.lang.String hourOfDayField - See Also:
- Constant Field Values
 
 - 
minutesOfHourFieldpublic static final java.lang.String minutesOfHourField - See Also:
- Constant Field Values
 
 - 
timezoneFieldpublic static final java.lang.String timezoneField - See Also:
- Constant Field Values
 
 - 
windowDurationFieldpublic static final java.lang.String windowDurationField - See Also:
- Constant Field Values
 
 - 
requestMinimumFieldpublic static final java.lang.String requestMinimumField - See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
ScheduleManagerpublic ScheduleManager(IThreadContext threadContext, IDBInterface database) throws ManifoldCFException Constructor.- Parameters:
- threadContext- is the thread context.
- database- is the database instance.
- Throws:
- ManifoldCFException
 
 
- 
 - 
Method Detail- 
installpublic void install(java.lang.String ownerTable, java.lang.String owningTablePrimaryKey) 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
 
 - 
deinstallpublic void deinstall() throws ManifoldCFExceptionUninstall.- Throws:
- ManifoldCFException
 
 - 
getRowspublic 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 schedules 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
 
 - 
maxClauseGetRowsAlternatepublic int maxClauseGetRowsAlternate() Get the max clauses that can be used with getRowsAlternate.
 - 
getRowsAlternatepublic void getRowsAlternate(java.util.Map returnValues, java.util.ArrayList ownerIDParams) throws ManifoldCFExceptionFill in a set of schedules corresponding to a set of owner id's.- Parameters:
- returnValues- is a map keyed by ownerID, with a value that is an ArrayList of ScheduleRecord objects.
- ownerIDParams- is the corresponding set of owner id parameters.
- Throws:
- ManifoldCFException
 
 - 
writeRowspublic void writeRows(java.lang.Long ownerID, IJobDescription list) throws ManifoldCFExceptionWrite a schedule list into the database.- Parameters:
- ownerID- is the owning identifier.
- list- is the job description that is the source of the schedule.
- Throws:
- ManifoldCFException
 
 - 
deleteRowspublic void deleteRows(java.lang.Long ownerID) throws ManifoldCFExceptionDelete rows.- Parameters:
- ownerID- is the owner whose rows to delete.
- Throws:
- ManifoldCFException
 
 - 
stringToEnumeratedValuepublic static EnumeratedValues stringToEnumeratedValue(java.lang.String value) throws ManifoldCFException Go from string to enumerated value.- Parameters:
- value- is the input.
- Returns:
- the enumerated value.
- Throws:
- ManifoldCFException
 
 - 
enumeratedValueToStringpublic static java.lang.String enumeratedValueToString(EnumeratedValues values) Go from enumerated value to string.- Parameters:
- values- is the enumerated value.
- Returns:
- the string value.
 
 - 
requestMinimumValueToStringpublic static java.lang.String requestMinimumValueToString(boolean requestMinimum) 
 - 
stringToRequestMinimumValuepublic static boolean stringToRequestMinimumValue(java.lang.String requestMinimum) throws ManifoldCFException- Throws:
- ManifoldCFException
 
 
- 
 
-