|
<%=Messages.getString(pageContext.getRequest().getLocale(),"viewjob.NameColon")%> | <%=""%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(job.getDescription())%> |
|
<%=Messages.getString(pageContext.getRequest().getLocale(),"viewjob.OutputConnectionColon")%> |
<%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(job.getOutputConnectionName())%> |
<%=Messages.getString(pageContext.getRequest().getLocale(),"viewjob.RepositoryConnectionColon")%> |
<%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(job.getConnectionName())%> |
|
<%=Messages.getString(pageContext.getRequest().getLocale(),"viewjob.PriorityColon")%> | <%=priority%> |
<%=Messages.getString(pageContext.getRequest().getLocale(),"viewjob.StartMethodColon")%> | <%=startMethod%> |
<%
if (model != -1 && model != IRepositoryConnector.MODEL_ADD_CHANGE_DELETE)
{
%>
|
<%=Messages.getString(pageContext.getRequest().getLocale(),"viewjob.ScheduleTypeColon")%> | <%=jobType%> |
<%=Messages.getString(pageContext.getRequest().getLocale(),"viewjob.MinimumRecrawlIntervalColon")%> | <%=intervalString%>
|
<%=Messages.getString(pageContext.getRequest().getLocale(),"viewjob.ExpirationIntervalColon")%> | <%=expirationIntervalString%> |
<%=Messages.getString(pageContext.getRequest().getLocale(),"viewjob.ReseedIntervalColon")%> | <%=reseedIntervalString%> |
<%
}
%>
|
<%
if (job.getScheduleRecordCount() == 0)
{
%>
<%=Messages.getString(pageContext.getRequest().getLocale(),"viewjob.NoScheduledRunTimes")%> |
<%
}
else
{
// Loop through the schedule records
int j = 0;
while (j < job.getScheduleRecordCount())
{
ScheduleRecord sr = job.getScheduleRecord(j);
Long srDuration = sr.getDuration();
EnumeratedValues srDayOfWeek = sr.getDayOfWeek();
EnumeratedValues srMonthOfYear = sr.getMonthOfYear();
EnumeratedValues srDayOfMonth = sr.getDayOfMonth();
EnumeratedValues srYear = sr.getYear();
EnumeratedValues srHourOfDay = sr.getHourOfDay();
EnumeratedValues srMinutesOfHour = sr.getMinutesOfHour();
if (j > 0)
{
%>
|
<%
}
%>
<%=Messages.getString(pageContext.getRequest().getLocale(),"viewjob.ScheduledTimeColon")%> |
<%
if (srDayOfWeek == null)
out.println("Any day of week");
else
{
StringBuffer sb = new StringBuffer();
boolean firstTime = true;
if (srDayOfWeek.checkValue(0))
{
if (firstTime)
firstTime = false;
else
sb.append(",");
sb.append("Sundays");
}
if (srDayOfWeek.checkValue(1))
{
if (firstTime)
firstTime = false;
else
sb.append(",");
sb.append("Mondays");
}
if (srDayOfWeek.checkValue(2))
{
if (firstTime)
firstTime = false;
else
sb.append(",");
sb.append("Tuesdays");
}
if (srDayOfWeek.checkValue(3))
{
if (firstTime)
firstTime = false;
else
sb.append(",");
sb.append("Wednesdays");
}
if (srDayOfWeek.checkValue(4))
{
if (firstTime)
firstTime = false;
else
sb.append(",");
sb.append("Thursdays");
}
if (srDayOfWeek.checkValue(5))
{
if (firstTime)
firstTime = false;
else
sb.append(",");
sb.append("Fridays");
}
if (srDayOfWeek.checkValue(6))
{
if (firstTime)
firstTime = false;
else
sb.append(",");
sb.append("Saturdays");
}
out.println(sb.toString());
}
%>
<%
if (srHourOfDay == null)
{
if (srMinutesOfHour != null)
out.println(" on every hour ");
else
out.println(" at midnight ");
}
else
{
out.println(" at ");
int k = 0;
while (k < 24)
{
int q = k;
String ampm;
if (k < 12)
ampm = "am";
else
{
ampm = "pm";
q -= 12;
}
String hour;
if (q == 0)
q = 12;
if (srHourOfDay.checkValue(k))
out.println(Integer.toString(q)+" "+ampm+" ");
k++;
}
}
%>
<%
if (srMinutesOfHour != null)
{
out.println(" plus ");
int k = 0;
while (k < 60)
{
if (srMinutesOfHour.checkValue(k))
out.println(Integer.toString(k)+" ");
k++;
}
out.println(" minutes");
}
%>
<%
if (srMonthOfYear == null)
{
if (srDayOfMonth == null && srDayOfWeek == null && srHourOfDay == null && srMinutesOfHour == null)
out.println(" in January");
}
else
{
StringBuffer sb = new StringBuffer(" in ");
boolean firstTime = true;
if (srMonthOfYear.checkValue(0))
{
if (firstTime)
firstTime = false;
else
sb.append(",");
sb.append("January");
}
if (srMonthOfYear.checkValue(1))
{
if (firstTime)
firstTime = false;
else
sb.append(",");
sb.append("February");
}
if (srMonthOfYear.checkValue(2))
{
if (firstTime)
firstTime = false;
else
sb.append(",");
sb.append("March");
}
if (srMonthOfYear.checkValue(3))
{
if (firstTime)
firstTime = false;
else
sb.append(",");
sb.append("April");
}
if (srMonthOfYear.checkValue(4))
{
if (firstTime)
firstTime = false;
else
sb.append(",");
sb.append("May");
}
if (srMonthOfYear.checkValue(5))
{
if (firstTime)
firstTime = false;
else
sb.append(",");
sb.append("June");
}
if (srMonthOfYear.checkValue(6))
{
if (firstTime)
firstTime = false;
else
sb.append(",");
sb.append("July");
}
if (srMonthOfYear.checkValue(7))
{
if (firstTime)
firstTime = false;
else
sb.append(",");
sb.append("August");
}
if (srMonthOfYear.checkValue(8))
{
if (firstTime)
firstTime = false;
else
sb.append(",");
sb.append("September");
}
if (srMonthOfYear.checkValue(9))
{
if (firstTime)
firstTime = false;
else
sb.append(",");
sb.append("October");
}
if (srMonthOfYear.checkValue(10))
{
if (firstTime)
firstTime = false;
else
sb.append(",");
sb.append("November");
}
if (srMonthOfYear.checkValue(11))
{
if (firstTime)
firstTime = false;
else
sb.append(",");
sb.append("December");
}
out.println(sb.toString());
}
%>
<%
if (srDayOfMonth == null)
{
if (srDayOfWeek == null && srHourOfDay == null && srMinutesOfHour == null)
out.println(" on the 1st of the month");
}
else
{
StringBuffer sb = new StringBuffer(" on the ");
int k = 0;
boolean firstTime = true;
while (k < 31)
{
if (srDayOfMonth.checkValue(k))
{
if (firstTime)
firstTime = false;
else
sb.append(",");
sb.append(Integer.toString(k+1));
int value = (k+1) % 10;
if (value == 1 && k != 10)
sb.append("st");
else if (value == 2 && k != 11)
sb.append("nd");
else if (value == 3 && k != 12)
sb.append("rd");
else
sb.append("th");
}
k++;
}
sb.append(" of the month");
out.println(sb.toString());
}
%>
<%
if (srYear != null)
{
StringBuffer sb = new StringBuffer(" in year(s) ");
Iterator iter = srYear.getValues();
boolean firstTime = true;
while (iter.hasNext())
{
if (firstTime)
firstTime = false;
else
sb.append(",");
Integer value = (Integer)iter.next();
sb.append(value.toString());
}
out.println(sb.toString());
}
%>
|
<%=Messages.getString(pageContext.getRequest().getLocale(),"viewjob.MaximumRunTimeColon")%> |
<%
if (srDuration == null)
out.println("No limit");
else
out.println(new Long(srDuration.longValue()/60000L).toString() + " minutes");
%>
|
<%
j++;
}
}
if (relationshipTypes != null && relationshipTypes.length > 0)
{
%>
|
<%
int k = 0;
while (k < relationshipTypes.length)
{
String relationshipType = relationshipTypes[k++];
Long value = (Long)hopCountFilters.get(relationshipType);
%>
<%=Messages.getString(pageContext.getRequest().getLocale(),"viewjob.MaximumHopCountForLinkType")%> '<%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(relationshipType)%>': |
<%=((value==null)?"Unlimited":value.toString())%> |
<%
}
%>
|
<%=Messages.getString(pageContext.getRequest().getLocale(),"viewjob.HopCountModeColon")%> |
<%=(hopcountMode==IJobDescription.HOPCOUNT_ACCURATE)?"Delete unreachable documents":""%><%=(hopcountMode==IJobDescription.HOPCOUNT_NODELETE)?"No deletes, for now":""%><%=(hopcountMode==IJobDescription.HOPCOUNT_NEVERDELETE)?"No deletes, forever":""%> |
<%
}
%>
|
<%
if (outputConnection != null)
{
IOutputConnector outputConnector = OutputConnectorFactory.grab(threadContext,outputConnection.getClassName(),outputConnection.getConfigParams(),
outputConnection.getMaxConnections());
if (outputConnector != null)
{
try
{
outputConnector.viewSpecification(new org.apache.manifoldcf.ui.jsp.JspWrapper(out),pageContext.getRequest().getLocale(),job.getOutputSpecification());
}
finally
{
OutputConnectorFactory.release(outputConnector);
}
}
}
%>
|
|
<%
if (connection != null)
{
IRepositoryConnector repositoryConnector = RepositoryConnectorFactory.grab(threadContext,connection.getClassName(),connection.getConfigParams(),
connection.getMaxConnections());
if (repositoryConnector != null)
{
try
{
repositoryConnector.viewSpecification(new org.apache.manifoldcf.ui.jsp.JspWrapper(out),pageContext.getRequest().getLocale(),job.getSpecification());
}
finally
{
RepositoryConnectorFactory.release(repositoryConnector);
}
}
}
%>
|
|
"><%=Messages.getString(pageContext.getRequest().getLocale(),"viewjob.Edit")%>
"><%=Messages.getString(pageContext.getRequest().getLocale(),"viewjob.Delete")%> "><%=Messages.getString(pageContext.getRequest().getLocale(),"viewjob.Copy")%> |
<%
}
}
catch (ManifoldCFException e)
{
e.printStackTrace();
variableContext.setParameter("text",e.getMessage());
variableContext.setParameter("target","listjobs.jsp");
%>