return DatabaseContentToMedia.getInstance().getAudio(this) ;
}
- private SimpleList getVideoForContent()
+ private EntityList getVideoForContent()
throws StorageObjectException, TemplateModelException
{
return DatabaseContentToMedia.getInstance().getVideo(this) ;
}
- private SimpleList getOtherMediaForContent()
+ private EntityList getOtherMediaForContent()
throws StorageObjectException, TemplateModelException
{
- return HTMLTemplateProcessor.makeSimpleList(
- DatabaseContentToMedia.getInstance().getOther(this) );
+ return DatabaseContentToMedia.getInstance().getOther(this);
}
}
{
long startTime = System.currentTimeMillis();
-
+ int pageCount=0;
String whereClause = " ";
String orderBy = " ";
-1, userEntity);
}
- for(int i=0;i<batchEntityList.size();i++) {
- currentContent = (EntityContent)batchEntityList.elementAt(i);
-
- try {
-
- SimpleHash mergeData=new SimpleHash();
- mergeData.put("content", currentContent);
- String date = currentContent.getValue("date");
- String year = date.substring(0,4);
- String month = date.substring(4,6);
- htmlFileName = producerDocRoot + "/" + year + "/" + month + "/" +
- currentContent.getValue("id") + ".shtml";
-
- //produce html
- boolean retVal = produce(contentTemplate, htmlFileName, mergeData, htmlout);
- if ( retVal ) currentContent.setProduced(true);
-
- }
- catch(Exception e)
- {
- String errorText = "Producer.Content ERROR while producing content ID:"
- + currentContent.getId()+", skipping it :: "+e.toString();
- logHTML(htmlout, errorText);
- theLog.printError(errorText);
- }
-
- }//for
-
+ if (batchEntityList!=null) {
+ for(int i=0;i<batchEntityList.size();i++) {
+ currentContent = (EntityContent)batchEntityList.elementAt(i);
+
+ try {
+
+ SimpleHash mergeData=new SimpleHash();
+ mergeData.put("content", currentContent);
+ String date = currentContent.getValue("date");
+ String year = date.substring(0,4);
+ String month = date.substring(4,6);
+ htmlFileName = producerDocRoot + "/" + year + "/" + month + "/" +
+ currentContent.getValue("id") + ".shtml";
+
+ //produce html
+ boolean retVal = produce(contentTemplate, htmlFileName, mergeData, htmlout);
+ if ( retVal ) currentContent.setProduced(true);
+
+ }
+ catch(Exception e)
+ {
+ String errorText = "Producer.Content ERROR while producing content ID:"
+ + currentContent.getId()+", skipping it :: "+e.toString();
+ logHTML(htmlout, errorText);
+ theLog.printError(errorText);
+ }
+ pageCount++;
+ }//for
+ }
// timing and message to browser
- logHTML(htmlout, "Producer.Content finished: " +
- (System.currentTimeMillis() - startTime) + " ms.");
+ logHTML(htmlout, "Producer.Content finished producing " +
+ (System.currentTimeMillis() - startTime) + " ms. ("+ pageCount+")");
/** @todo here we should have a link back to admin logged */
/** @todo why no syncing here? */