public class PicManImpl extends PicManCommonImpl implements PicManFacade
Modifier and Type | Field and Description |
---|---|
protected org.apache.commons.logging.Log |
logger |
dbf
Constructor and Description |
---|
PicManImpl() |
Modifier and Type | Method and Description |
---|---|
void |
addJobToLog(JobLogEntry jle)
Add an entry to the Job Log
|
java.awt.Dimension |
determinePicSize(Pic pic)
Read the file for this pic to figure out his size
|
java.lang.String |
engineRunningShortStatus()
Return a one or two word status for the engine.
|
BatchManager |
getBatchManager()
Get a reference to the instantiated
BatchManager . |
BSAccountMan |
getBSAccountMan() |
java.lang.String |
getContactSelectorHtml(Chain chain,
java.lang.String setName,
java.lang.String uri) |
DatabaseFacade |
getDB()
Get a reference to the Database
|
java.util.List<java.lang.String> |
getDirsInDir(int rid,
java.lang.String subDir)
Fetch a
List of dirs in this directory. |
int |
getFilesInDirCount(int rid,
java.lang.String dir)
Get the number of files in a directory
|
java.lang.String |
getFilterAsString(java.lang.String picName)
Create a String that represents the Sets and values for this pic.
|
java.util.LinkedList<JobLogEntry> |
getJobLog()
Return a reference to the Job Log
|
int |
getJobLogMaxCount()
Get the maximum displayed job log lines in the home page.
|
Filter |
getMaskedFilter(java.util.List<Set> sets,
Filter filter)
Given a List of Sets, return a copy of a filter with the values 0'd out
except for the Sets listed.
|
MosaicMan |
getMosaicMan()
Fetch a reference to the Mosaic Manager
|
Thumbnail |
getMosaicThumbNail(Pic pic,
int height)
Get a Thumbnail from this pic at this size.
|
java.lang.String |
getPicFilterWebEdit(java.lang.String picName) |
PicImporter |
getPicImporter()
Get a reference to the PicImporter
|
PicReader |
getPicReader()
Get a reference to the PicReader
|
PosterManager |
getPosterManager()
Return a reference to The PosterManager
|
java.lang.String |
getSetSizeCheckboxesHtml(Chain chain)
Return a String of {tr}{td} checkboxes for this chain.
|
java.lang.String |
getSetSizeWebTable(java.util.List<SetSize> setSizeList,
boolean showUnused)
Deprecated.
|
SyncManager_Old |
getSyncManager() |
Thumbnail |
getTestMosaicThumbNail(Pic pic,
int height,
int depth) |
ThumbCache |
getThumbCache()
Get a reference to the ThumbCache Manager
|
Thumbnail |
getThumbNail(Pic pic,
int height)
Get a Thumbnail from this pic at this size
|
Thumbnail |
getThumbNail(Pic pic,
int height,
java.lang.String label)
Get a Thumbnail from this pic at this size
|
boolean |
isEngineOn()
Does the User have the batch engine turned on? Should we do work?
|
void |
releaseMosaicThumbCache()
Done with the mosaic cache, release it's resources.
|
void |
runBatchManager()
Run one time through the
BatchManager loop. |
void |
setBatchManagerTrigger(CronTriggerBean batchManagerTrigger) |
void |
setBSAccountMan(BSAccountMan bsAccountMan) |
void |
setDEBUGBatchManager(boolean debugFlag)
Enable logger output for the BatchManager
|
void |
setDEBUGBatchManagerEntry(boolean debugFlag)
Enable logger output for the BatchManager Entry
|
void |
setDEBUGDatabaseImpl(boolean debugFlag) |
void |
setDEBUGMosaicEngine(boolean debugFlag)
Enable logger output for the Mosaic Engine.
|
void |
setDEBUGMosaicMan(boolean debugFlag)
Enable logger output for the MosaicMan.
|
void |
setEngineCronExpression(java.lang.String expression)
Set the Cron string used to clock the engine. DDS
|
void |
setPicManDatabase(DatabaseFacade pmdb)
AOP Injector to set the Database
|
void |
setupMosaicThumbCache(int sid,
int height)
Initialize the mosaic thumb cache for this set at this height
|
void |
setupThumbCache() |
addError, addSetChangedListener, addSyncToLog, emptyErrorLog, fireSetSizeChanged, getError, getErrorLog, getSyncLog, getSyncLogMaxCount, removeSetChangedListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addError, addSetChangedListener, addSyncToLog, emptyErrorLog, fireSetSizeChanged, getError, getErrorLog, getSyncLog, getSyncLogMaxCount, removeSetChangedListener
public DatabaseFacade getDB()
PicManFacade
getDB
in interface PicManFacade
public void setBatchManagerTrigger(CronTriggerBean batchManagerTrigger)
public void setPicManDatabase(DatabaseFacade pmdb)
setPicManDatabase
in class PicManCommonImpl
pmdb
- A reference to the databasepublic void setDEBUGBatchManager(boolean debugFlag)
debugFlag
- true == turn on debugging.public void setDEBUGBatchManagerEntry(boolean debugFlag)
debugFlag
- true == turn on debugging.public void setDEBUGDatabaseImpl(boolean debugFlag)
public void setDEBUGMosaicMan(boolean debugFlag)
debugFlag
- true == turn on debugging.public void setDEBUGMosaicEngine(boolean debugFlag)
debugFlag
- true == turn on debugging.public BSAccountMan getBSAccountMan()
public void setBSAccountMan(BSAccountMan bsAccountMan)
bsAccountMan
- the bsAccountMan to setpublic Thumbnail getThumbNail(Pic pic, int height)
PicManFacade
getThumbNail
in interface PicManFacade
pic
- The Pic to readheight
- How tall to make the imagepublic Thumbnail getThumbNail(Pic pic, int height, java.lang.String label)
PicManFacade
getThumbNail
in interface PicManFacade
pic
- The Pic to readheight
- How tall to make the imagelabel
- Any text (like the rating) to draw in the lower left corner of the graphicpublic Thumbnail getMosaicThumbNail(Pic pic, int height)
PicManFacade
PicManFacade.getThumbNail(Pic, int)
in that it uses the Mosaic ThumbCache,
which has slightly different rules.ThumbCache
operates thusly:
If a Thumbnail is requested and it doesn't exist, it is built at the MosaicThumbHeight. Then the size requested is
derived from that and returned.getMosaicThumbNail
in interface PicManFacade
pic
- The Pic to readheight
- How tall to make the imagepublic ThumbCache getThumbCache()
PicManFacade
getThumbCache
in interface PicManFacade
public void setupThumbCache()
setupThumbCache
in interface PicManFacade
public void setupMosaicThumbCache(int sid, int height)
PicManFacade
setupMosaicThumbCache
in interface PicManFacade
sid
- The SetID that MosaicMan is usingheight
- The height of the thumbnailspublic void releaseMosaicThumbCache()
PicManFacade
releaseMosaicThumbCache
in interface PicManFacade
public SyncManager_Old getSyncManager()
getSyncManager
in interface PicManFacade
public java.util.LinkedList<JobLogEntry> getJobLog()
PicManFacade
getJobLog
in interface PicManFacade
public int getJobLogMaxCount()
PicManFacade
getJobLogMaxCount
in interface PicManFacade
public void addJobToLog(JobLogEntry jle)
PicManFacade
addJobToLog
in interface PicManFacade
jle
- The JobLogEntry to add.public java.lang.String getPicFilterWebEdit(java.lang.String picName)
@Deprecated public java.lang.String getSetSizeWebTable(java.util.List<SetSize> setSizeList, boolean showUnused)
PicManFacade
getSetSizeWebTable
in interface PicManFacade
setSizeList
- The sets/sizes to include in the tableshowUnused
- Show or hide the unused Setspublic java.lang.String getContactSelectorHtml(Chain chain, java.lang.String setName, java.lang.String uri)
public java.lang.String getSetSizeCheckboxesHtml(Chain chain)
PicManFacade
getSetSizeCheckboxesHtml
in interface PicManFacade
chain
- Chain to filter the checkboxes on. If null, then output all checkboxespublic void runBatchManager() throws java.lang.Exception
BatchManager
loop. Do any work if need be.
Called by the cron trigger job that was set up in the Spring configuration.java.lang.Exception
public BatchManager getBatchManager()
PicManFacade
BatchManager
.getBatchManager
in interface PicManFacade
public java.lang.String engineRunningShortStatus()
PicManFacade
engineRunningShortStatus
in interface PicManFacade
public void setEngineCronExpression(java.lang.String expression)
PicManFacade
setEngineCronExpression
in interface PicManFacade
expression
- The cron expressionCronTriggerBean
public Filter getMaskedFilter(java.util.List<Set> sets, Filter filter)
PicManFacade
getMaskedFilter
in interface PicManFacade
sets
- A list of setsfilter
- The filter to maskpublic Thumbnail getTestMosaicThumbNail(Pic pic, int height, int depth)
getTestMosaicThumbNail
in interface PicManFacade
public java.awt.Dimension determinePicSize(Pic pic)
PicManFacade
determinePicSize
in interface PicManFacade
pic
- The Pic to readDimension
. (-1,-1) = error.public MosaicMan getMosaicMan()
PicManFacade
getMosaicMan
in interface PicManFacade
public PicImporter getPicImporter()
PicManFacade
getPicImporter
in interface PicManFacade
public PicReader getPicReader()
PicManFacade
getPicReader
in interface PicManFacade
public int getFilesInDirCount(int rid, java.lang.String dir)
PicManFacade
getFilesInDirCount
in interface PicManFacade
rid
- The rootid to look underdir
- The subdirectory i.e. "2008/20080609"public java.util.List<java.lang.String> getDirsInDir(int rid, java.lang.String subDir)
PicManFacade
List
of dirs in this directory.
Note: This does not do database lookups; rather, it reads the actual directory structure.
Perhaps this is not a good thing as the rest of the system deals with the database.
However, there are no real facilities for walking directories in the database.getDirsInDir
in interface PicManFacade
rid
- The root id to look undersubDir
- Any subdirectory to checkpublic java.lang.String getFilterAsString(java.lang.String picName)
PicManFacade
mlbG:6,6,6,6,0 mlb:6 Trains:6 Springfield
getFilterAsString
in interface PicManFacade
public boolean isEngineOn()
PicManFacade
isEngineOn
in interface PicManFacade
public PosterManager getPosterManager()
PicManFacade
getPosterManager
in interface PicManFacade