Class AlbumBean
java.lang.Object
se.datadosen.jalbum.AlbumBean
- All Implemented Interfaces:
ImageObserver,Cloneable,AlbumEngine
JavaBean for creating web based photo albums with thumbnail page and slide
pages. Provides the actual album generation functionality of JAlbum. Method
comments have only been added where the use isn't obvious.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Mapbooleanstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final intstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAlbumBeanListener(AlbumBeanListener listener) voidAdd an image filter to the image process chain so it affects both closeups and thumbnailsbooleanAdd an image filter to the image process chain at the specified stagevoidaddGlobals(Map vars, boolean fullPreparation) voidvoidaddPropertyChangeListener(String propertyName, PropertyChangeListener listener) clone()Make a shallow copy of this object Note: It is not guaranteed that all member variables are separate or copied, just simple propertiesintcountFiles(File dir) Deprecated.Use JAlbumUtilities.countCategories instead for speed (less disk access) and flexibilityfilterIterator(int stage) protected voidfireAlbumMakingDone(boolean success) protected voidfireAlbumMakingStarted(boolean changes) protected voidfireErrorOccured(Throwable t, AlbumObject ao) protected voidprotected voidprotected voidprotected voidprotected voidfirePropertyChange(String propertyName, Object oldValue, Object newValue) Support for reporting bound property changes for Object properties.voidfireRequestConfirmation(String message) voidfireStatus(String message) Fire status messages during album buildprotected voidfireVideoProcessingProgress(AlbumBeanEvent e, float progress) voidfireWarning(String message) Fire warning messages during album buildintintInternal use onlyintgetCols()intRenamed from getNThreads in order to default to max number of cpu cores and ignore previously conservative settings store in jAlbum preferences now that our image scaling is far more memory conservativeKey for text to use for credit linksstatic StringjAlbum will use the background color when generating JPEG images from translucent imagesDeprecated.since v33.intstatic StringDeprecated.For version handling project filesintgetLimit()getNotes()Image format for generated typical images (not the variants)intintnet.jalbum.jlibraw.RAWImageReadParamGet default RAW image read parameters used for controlling RAW processingMight be moved out of AlbumBeanJAlbum 4.5 additionsintgetRows()static DimensiongetScaledDim(Dimension dim, double scale) intgetScaleForStage(int stage) intgetSizeForStage(int stage) getSkin()getStyle()getTargetName(File file) Figure out what should be the final file name for closeup images.getTargetThumbName(File file) Figure out what should be the final file name for thumbnails images.getTargetThumbName(File file, String defExt) Get dimension of theme imageintintUpload privacy relatedgetWidgetInjectionCode(String pageType, String rootPath) booleanimageUpdate(Image img, int infoflags, int x, int y, int width, int height) Ignore.voidinit()booleanSince 8.3.5booleanbooleanbooleanbooleanbooleanbooleanisDirty()Tell if settings have changed since last album buildbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanForce image processing even if source image is smaller than destination and no filters are appliedbooleanForce video processing too if make mode is AllbooleanbooleanTell whether closeup images are generated for HiDPI screens (i.e.booleanTell whether thumbnails are generated for HiDPI screens (i.e.booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanisSlides()booleanbooleanbooleanbooleanbooleanbooleanWhether to save album size by avoiding generating multiple copies of closeups and thumbnails by allowing the same object to be referenced from several foldersbooleanbooleanUpload privacy relatedbooleanbooleanFile[]Deprecated.Use the new AlbumObject object model instead (currentObject, currentFolder and rootFolder variables).Generate a web album.voidDeprecated.Use processScript(File) insteadvoidprocessImage(AlbumObject ao, File outputDir, Set<String> outputNames, Map<String, CachedFile> thumbsContents, Map<String, CachedFile> slidesContents, AlbumBeanEvent eventObject) voidProcess BeanShell or JavaScript filesvoidprocessScript(File f, Bindings vars) Process BeanShell or JavaScript filesprocessSection(Section sec, Map<String, Object> vars) processSection(Section sec, Scope vars) Replace variables and perform template parsing using the passed variables.Replace variables and perform template parsing Use the variables that are currently visible for the interpreter.voidprocessTemplateFile(File source, File dest) Replace variables and perform template parsing as a file is being copied.voidprocessTemplateFile(File source, File dest, Map vars) Replace variables and perform template parsing as a file is being copied Warning: This method has side effects of affecting the variables available in the current scope.voidprocessTemplateFile(File source, Writer writer) Made public in v22.0.4voidregisterVariables(File file, File outputDir) We store a Map of file->Map pairs where the Map contains metadata like imageWidth, imageHeight and EXIF data (if present)voidremoveAlbumBeanListener(AlbumBeanListener listener) voidvoidRemove all image filters from the image process chainbooleanremoveFilter(JAFilter filter, int stage) Remove an image filter from the image process chain at the specified stagevoidRemoves a PropertyChangeListener from the listener list.voidsetAcceleratedScaling(boolean hardwareScaling) Attempt to use hardware accelerated image scaling.voidsetAccountProfileName(String newAccountProfileName) voidsetAlbumAddress(String albumAddress) voidsetAlbumHeight(int albumHeight) voidsetAlbumWidth(int albumWidth) voidsetAppendImages(boolean newAppendImages) Control if all image files are to be rescaled or only new files.voidsetChainDirectories(boolean chain) Deprecated.Use setDictoryChaining() insteadvoidsetClassicReaders(boolean newClassicReaders) Use Sun's old, but faster image readers for JPEG, GIF and PNG file types instead of ImageIO readersvoidsetCols(int newCols) voidsetCopyOriginals(boolean newCopyOriginals) voidsetCpuCores(int cpuCores) Machines with multiple CPUs can utilize this method to cut down processing time Values higher than number of available processors are ignored.voidsetCreator(String creator) voidsetCreditText(AlbumBean.CreditText creditText) Set key for text to use for credit linksvoidsetCurrentProject(AlbumProject currentProject) voidsetCustomImageOrdering(Comparator fileComparator) Select custom image/file ordering by installing a custom Comparator object.voidsetDateFormat(String newDateFormat) voidsetDirectoriesFirst(boolean newDirectoriesFirst) voidsetDirectory(String newDirectory) Set image directory.voidsetDirectoryChaining(DirectoryChaining directoryChaining) Enable sequential traversal of an album tree via nextPage, previousPage, nextIndexPage and previousIndexPagevoidsetDisableColorSubsampling(boolean disableColorSubsampling) Disable chroma/color subsampling.voidsetExcludeBacklinks(boolean newExcludeBacklinks) voidsetExcludeByDefault(boolean newExcludeByDefault) Automatically exclude images recently added to the image directoryvoidsetExifImageDescription(boolean newexifImageDescription) voidsetExifUserComment(boolean newexifUserComment) voidsetFileNamer(FileNamer fileNamer) Allows skins with special naming requirements to control how files are namedvoidsetFolderThumbSize(String folderThumbSize) voidsetForceJPEGImages(boolean forceJPEGImages) Force closeup images to JPEG formatvoidsetForceJPEGThumbs(boolean forceJPEGThumbs) Force thumbnails to JPEG formatvoidsetForceJPEGWriting(boolean force) Deprecated.voidsetForceProcessing(boolean forceProcessing) Force image processing even if source image is smaller than destination and no filters are appliedvoidsetForceVideoProcessing(boolean forceVideoProcessing) Force video processing too if make mode is AllvoidsetGenerateJSON(boolean generateJSON) Tell whether JSON formatted metadata should be added to albumvoidsetHiDPIImages(boolean hiDPI) Set whether closeup images are generated for HiDPI screens (i.e.voidsetHiDPIThumbs(boolean hiDPI) Set whether thumbnails are generated for HiDPI screens (i.e.voidsetHighQualityThumbs(boolean newhighQualityThumbs) Control whether to force smooth scaling for thumbnails or rely on the general scaling quality settingvoidsetHomepageAddress(String homepageAddress) voidsetHomepageLinkText(String homepageLinkText) voidsetIgnorePattern(String ignorePattern) voidsetImageBackgroundColor(Color backgroundColor) jAlbum will use the background color when generating JPEG images from translucent imagesvoidsetImageLinking(String newImageLinking) Deprecated.since v33.voidsetImageOrdering(String newImageOrdering) Set image ordering to one of the ORDER_ string constants defined in this class Will cancel any custom image ordering set by the setCustomImageOrdering callvoidsetImageSize(String newImageSize) voidsetImageVariants(String imageVariants) voidsetIncludeDirectories(boolean newIncludeDirectories) voidsetIncludeOriginals(boolean includeOriginals) Set whether original images (or links to them) should be included as wellvoidsetIncludePattern(String includePattern) Include only files matching includePatternvoidsetIndexPageName(String newIndexPageName) voidsetIptcCaption(boolean newiptcCaption) voidsetJpegComment(boolean newjpegComment) voidsetKeepMetaData(boolean newKeepMetaData) Keep camera metadata in generated filesvoidsetKeepXmpData(boolean newKeepXmpData) Keep xmp metadata in generated filesvoidsetLimit(int limit) Limit number of album objects that are to be processed 0 = unlimited Use of this method by 3:rd party developers is discouragedvoidsetMakeImages(boolean makeImages) Set whether scaled images should be made or notvoidsetMakeThumbs(boolean makeThumbs) Set whether thumbnail images should be made or notvoidsetMediaRSS(boolean newMediaRSS) Add media RSS support to published albumsvoidsetMetaData(boolean newMetaData) voidSet pProject notes (notes to user of project.voidsetNotifyNotes(boolean notifyNotes) voidsetOnMakeStarted(Runnable onMakeStarted) voidsetOutputDirectory(String newOutputDirectory) voidsetOutputFormat(OutputFormat outputFormat) Set image format for generated typical images (not the variants)voidsetOverrideExistingCopyright(boolean overrideExistingCopyright) voidsetPageExtension(String newPageExtension) voidsetPageNamer(PageNamer pageNamer) Allows skins with special naming requirements to control how index pages and slide pages are namedvoidsetProcessFolderThumbs(boolean processFolderThumbs) voidsetProperties(Properties props) Convenience method that calls the relevant setter methods on this bean depending on the passed properties.voidsetQualityPercent(int newQualityPercent) voidsetQualityPercentWebP(int qualityPercentWebP) voidsetRawParam(net.jalbum.jlibraw.RAWImageReadParam rawParam) Set default RAW image read parameters used for controlling RAW processingvoidsetReadJAlbumMetaData(boolean readJAlbumMetaData) voidsetReadXmp(boolean readXmp) When reading comments, give priority to XMP metadata over other metadata sourcesvoidsetRemoteDirectory(String newRemoteDirectory) Might be moved out of AlbumBeanvoidsetRemoveDiacritics(boolean removeDiacritics) Whether to have diacritics stripped from generated file namesvoidsetReverseOrder(boolean newReverseOrder) voidvoidsetRightsURL(String rightsURL) voidsetRows(int newRows) voidsetScalingMethod(String scalingMethod) voidsetSharpenPercent(int newSharpenPercent) voidvoidsetSkinVariables(Map newSkinVariables) The new way of passing variables from skin user interfaces to the AlbumBean (Previously the user variables mechanism was used which bloated the user variables)voidsetSlides(boolean newSlides) voidsetSmoothScalingType(CustomScaler.Type smoothScalingType) voidvoidsetSubdirs(boolean newSubdirs) voidsetSuperimposeFilmIcon(boolean superimposeFilmIcon) Tell if to superimpose a film icon onto the thumbnails of movie filesvoidsetTextEncoding(String newTextEncoding) voidsetThemeImageDim(Dimension themeImageDim) Set dimension of theme imagevoidsetThemeImageProcessor(ThemeImageProcessor themeImageProcessor) Control whether jAlbum should generate folder specific theme images.voidsetThemeImageSize(String themeImageSize) voidsetThumbSize(String newThumbSize) voidsetThumbVariants(String thumbVariants) voidsetTitleSource(TitleSource titleSource) voidsetUpdatedDirsOnly(boolean newUpdatedDirsOnly) voidsetUrlEncode(boolean b) Deprecated.Ignored from v17.2.voidsetUseCustomVideoSettings(boolean useCustomVideoSettings) voidsetUseInternalLinking(boolean useInternalLinking) Set whether to save album size by avoiding generating multiple copies of closeups and thumbnails by allowing the same object to be referenced from several foldersvoidsetUserName(String userName) voidsetUserVariables(Map newUserVariables) voidsetUseThumbForFolderIcon(boolean newUseThumbForFolderIcon) Replace standard folder icon with a thumbnail from one of the files in the image directoryvoidstatic voidDeprecated.Use setVars(Map variables, ScriptEngine engine)static voidsetVars(Map<String, Object> variables, ScriptEngine engine) Called from JConsoleFrame only.voidsetVideoParameters(Parameters videoParameters) voidsetVideoQuality(int videoQuality) voidsetVideoResolution(VideoResolution videoResolution) voidsetVisibleOnProfilePage(boolean visibleOnProfilePage) Upload privacy relatedvoidsetWebPassword(String webPassword) Upload privacy relatedvoidsetWidgetInjection(boolean newWidgetInjection) Include widget injection to published albumsvoidsetWriteUTF8(boolean newWriteUTF8) Make album but let jAlbum decide whether to make all or changesvoidExperimental.voiduseScaledImagesAsOriginals(boolean use) Internal use only.
-
Field Details
-
compile
public boolean compile -
PRODUCT_DISPLAY_VERSION
- See Also:
-
PRODUCT_INTERNAL_VERSION
- See Also:
-
HEADLESS_SETTINGS_NAME
- See Also:
-
ORDER_BY_DATE
- See Also:
-
ORDER_BY_ADDED_DATE
- See Also:
-
ORDER_BY_CAMERA_DATE
- See Also:
-
ORDER_BY_NAME
- See Also:
-
ORDER_BY_SIMPLE_NAME
- See Also:
-
LINK_ORIGINALS
- See Also:
-
LINK_ORIGINALS_VIA_SCALED
- See Also:
-
LINK_SCALED
- See Also:
-
SCALE_SMOOTH
- See Also:
-
SCALE_MEDIUM
- See Also:
-
SCALE_FAST
- See Also:
-
MAX_ROWS
public static final int MAX_ROWS- See Also:
-
application
-
evalStats
-
indexAST
-
slideAST
-
skinDir
-
srcResDir
-
-
Constructor Details
-
AlbumBean
public AlbumBean() -
AlbumBean
-
-
Method Details
-
getStopwatch
- Returns:
- Time for last album make
- Since:
- 25
-
setOnMakeStarted
-
getAlbumHeight
public int getAlbumHeight() -
setAlbumHeight
public void setAlbumHeight(int albumHeight) -
getAlbumWidth
public int getAlbumWidth() -
setAlbumWidth
public void setAlbumWidth(int albumWidth) -
isMakeThumbs
public boolean isMakeThumbs()- Returns:
- true if engine is making thumbnail images
-
setMakeThumbs
public void setMakeThumbs(boolean makeThumbs) Set whether thumbnail images should be made or not- Parameters:
makeThumbs-
-
isMakeImages
public boolean isMakeImages()- Returns:
- true if engine is making scaled images as well
- Since:
- 33
-
setMakeImages
public void setMakeImages(boolean makeImages) Set whether scaled images should be made or not- Parameters:
makeImages-- Since:
- 33
-
isIncludeOriginals
public boolean isIncludeOriginals()- Returns:
- true if original images (or links to them) is included
- Since:
- 33
-
setIncludeOriginals
public void setIncludeOriginals(boolean includeOriginals) Set whether original images (or links to them) should be included as well- Parameters:
includeOriginals-- Since:
- 33
-
isUseInternalLinking
public boolean isUseInternalLinking()Whether to save album size by avoiding generating multiple copies of closeups and thumbnails by allowing the same object to be referenced from several folders- Since:
- 38
-
setUseInternalLinking
public void setUseInternalLinking(boolean useInternalLinking) Set whether to save album size by avoiding generating multiple copies of closeups and thumbnails by allowing the same object to be referenced from several folders- Parameters:
useInternalLinking-- Since:
- 38
-
getThemeImageProcessor
- Returns:
- Currently installed theme image processor or null
- Since:
- 15
-
setThemeImageProcessor
Control whether jAlbum should generate folder specific theme images. Cleared at the start of each album build (before init). Skins wanting theme images generated can pass new ThemeImageProcessor(engine) as argument- Since:
- 15
-
getOutputFormat
Image format for generated typical images (not the variants)- Returns:
- Since:
- 24
-
setOutputFormat
Set image format for generated typical images (not the variants)- Parameters:
outputFormat-- Since:
- 24
-
getJSONMaker
- Returns:
- JSONMaker instance or null if JSON making is disabled
- Since:
- 18.3
-
getCreator
-
setCreator
-
getRights
-
setRights
-
getRightsURL
-
setRightsURL
-
isOverrideExistingCopyright
public boolean isOverrideExistingCopyright() -
setOverrideExistingCopyright
public void setOverrideExistingCopyright(boolean overrideExistingCopyright) -
getLicenseManager
-
getPageNamer
- Returns:
- the currently installed PageNamer
-
setPageNamer
Allows skins with special naming requirements to control how index pages and slide pages are named- Parameters:
pageNamer-
-
getFileNamer
- Returns:
- the currently installed FileNamer
-
setFileNamer
Allows skins with special naming requirements to control how files are named- Since:
- 10.3
-
getDisplayVersion
-
getInternalVersion
-
getSkinProperties
- Since:
- 8.7
-
getChainedObjects
- Returns:
- @since 12.2
-
getRawParam
public net.jalbum.jlibraw.RAWImageReadParam getRawParam()Get default RAW image read parameters used for controlling RAW processing- Returns:
- Since:
- 13.1
-
setRawParam
public void setRawParam(net.jalbum.jlibraw.RAWImageReadParam rawParam) Set default RAW image read parameters used for controlling RAW processing- Since:
- 13.1
-
unloadCurrentSkin
-
getScriptEnvironment
-
clone
-
setDirectory
Set image directory. Mandatory to call before calling makeAlbum() Fires directory PropertyChangeEvent since 8.4- Specified by:
setDirectoryin interfaceAlbumEngine- Parameters:
newDirectory-
-
getDirectory
- Specified by:
getDirectoryin interfaceAlbumEngine- Returns:
-
getCurrentProject
-
setCurrentProject
-
setThumbSize
- Throws:
ParameterException
-
getThumbSize
-
isProcessFolderThumbs
public boolean isProcessFolderThumbs() -
setProcessFolderThumbs
public void setProcessFolderThumbs(boolean processFolderThumbs) -
setFolderThumbSize
- Throws:
ParameterException
-
getFolderThumbSize
-
setImageSize
- Throws:
ParameterException
-
getImageSize
-
getImageVariants
- Returns:
- Additional generated image sizes and types (JSON formatted)
- Since:
- 24
-
setImageVariants
- Parameters:
imageVariants- json string describing image variants- Since:
- 24
-
getThumbVariants
- Returns:
- Additional generated image sizes and types (JSON formatted)
- Since:
- 24
-
setThumbVariants
- Parameters:
thumbVariants- Additional generated image sizes and types (JSON formatted)- Since:
- 24
-
getThemeImageDim
Get dimension of theme image- Returns:
- Theme image dimension or null if no theme image used
- Since:
- 15
-
setThemeImageDim
Set dimension of theme image- Parameters:
themeImageDim- Dimension or null if no theme image to be used- Since:
- 15
-
setThemeImageSize
- Parameters:
themeImageSize-- Since:
- 16
-
getThemeImageSize
- Returns:
- Since:
- 16
-
getImageDim
- Returns:
- Image bounds as a Dimension
- Since:
- 13.8
-
getThumbDim
- Returns:
- Thumbnail bounds as a Dimension
- Since:
- 13.8
-
setCols
public void setCols(int newCols) -
getCols
public int getCols() -
setQualityPercent
public void setQualityPercent(int newQualityPercent) -
getQualityPercent
public int getQualityPercent() -
getQualityPercentWebP
public int getQualityPercentWebP()- Since:
- 24
-
setQualityPercentWebP
public void setQualityPercentWebP(int qualityPercentWebP) - Parameters:
qualityPercentWebP-- Since:
- 24
-
isHiDPIThumbs
public boolean isHiDPIThumbs()Tell whether thumbnails are generated for HiDPI screens (i.e. being delivered twice the size as their stated thumbWidth and thumbHeight dimensions)- Returns:
- whether HiDPI thumbnails are used or not
- Since:
- 13.7
-
setHiDPIThumbs
public void setHiDPIThumbs(boolean hiDPI) Set whether thumbnails are generated for HiDPI screens (i.e. being delivered twice the size as their stated thumbWidth and thumbHeight dimensions)- Since:
- 13.7
-
getImageScale
public int getImageScale()- Returns:
- Number of pixels per dot (1/72") (1 for ordinary images, 2 for HiDPI images)
- Since:
- 13.7
-
getScaleForStage
public int getScaleForStage(int stage) -
getSizeForStage
- Parameters:
stage-- Returns:
- The bounding Dimension for this stage
- Since:
- 26.3
-
getThumbScale
public int getThumbScale()- Returns:
- Number of pixels per dot (1/72") (1 for ordinary images, 2 for HiDPI images)
- Since:
- 13.7
-
setSharpenPercent
public void setSharpenPercent(int newSharpenPercent) -
getSharpenPercent
public int getSharpenPercent() -
isDisableColorSubsampling
public boolean isDisableColorSubsampling() -
setDisableColorSubsampling
public void setDisableColorSubsampling(boolean disableColorSubsampling) Disable chroma/color subsampling. Applies to images written with 90% or higher compression quality- Parameters:
disableColorSubsampling-- Since:
- 16.3
-
isHiDPIImages
public boolean isHiDPIImages()Tell whether closeup images are generated for HiDPI screens (i.e. being delivered twice the size as their stated thumbWidth and thumbHeight dimensions)- Returns:
- whether HiDPI closeup images are used or not
- Since:
- 13.7
-
setHiDPIImages
public void setHiDPIImages(boolean hiDPI) Set whether closeup images are generated for HiDPI screens (i.e. being delivered twice the size as their stated thumbWidth and thumbHeight dimensions)- Since:
- 13.7
-
useScaledImagesAsOriginals
public void useScaledImagesAsOriginals(boolean use) Internal use only. Don't call -
setClassicReaders
public void setClassicReaders(boolean newClassicReaders) Use Sun's old, but faster image readers for JPEG, GIF and PNG file types instead of ImageIO readers -
isClassicReaders
public boolean isClassicReaders() -
setUseThumbForFolderIcon
public void setUseThumbForFolderIcon(boolean newUseThumbForFolderIcon) Replace standard folder icon with a thumbnail from one of the files in the image directory- Since:
- v6.1
-
isUseThumbForFolderIcon
public boolean isUseThumbForFolderIcon() -
setCpuCores
public void setCpuCores(int cpuCores) Machines with multiple CPUs can utilize this method to cut down processing time Values higher than number of available processors are ignored. Renamed from setNThreads in order to ignore previously set conservative setting in jAlbum preferences. -
getCpuCores
public int getCpuCores()Renamed from getNThreads in order to default to max number of cpu cores and ignore previously conservative settings store in jAlbum preferences now that our image scaling is far more memory conservative- Returns:
-
setSlides
public void setSlides(boolean newSlides) -
isSlides
public boolean isSlides() -
setDateFormat
-
getDateFormat
-
getDateFormatAsObject
-
getImageInfoFormatter
-
getImageBackgroundColor
jAlbum will use the background color when generating JPEG images from translucent images- Since:
- 8.3.4
-
setImageBackgroundColor
jAlbum will use the background color when generating JPEG images from translucent images- Since:
- 8.3.4
-
processTemplateFile
public void processTemplateFile(File source, File dest) throws IOException, ElementException, ScriptException Replace variables and perform template parsing as a file is being copied. Use the variables that are currently visible for the interpreter.- Throws:
IOExceptionElementExceptionScriptException- Since:
- 4.7
-
processTemplateFile
public void processTemplateFile(File source, Writer writer) throws IOException, ElementException, ScriptException Made public in v22.0.4- Parameters:
source-writer-- Throws:
IOExceptionElementExceptionScriptException
-
getASTCache
-
processTemplate
Replace variables and perform template parsing Use the variables that are currently visible for the interpreter.- Throws:
ElementExceptionScriptException- Since:
- 6.1
-
processSection
Replace variables and perform template parsing using the passed variables.- Parameters:
sec- Section to processvars- Variables to process- Throws:
ElementExceptionScriptException- Since:
- 14
-
processSection
public String processSection(Section sec, Map<String, Object> vars) throws ElementException, ScriptException- Throws:
ElementExceptionScriptException
-
processTemplateFile
public void processTemplateFile(File source, File dest, Map vars) throws IOException, ElementException, ScriptException Replace variables and perform template parsing as a file is being copied Warning: This method has side effects of affecting the variables available in the current scope. Try using the version that doesn't take a Map as parameter -
listFiles
@Deprecated public File[] listFiles(File dir, boolean includeDirs, File outputDir) throws IOException Deprecated.Use the new AlbumObject object model instead (currentObject, currentFolder and rootFolder variables). Doesn't support renamed filesList valid albumfiles and subdirectories of a directory. The list is NO LONGER ordered according to the project settings- Parameters:
includeDirs- Include directories?outputDir- Output directory or null if not include directories- Throws:
IOException
-
processImage
public void processImage(AlbumObject ao, File outputDir, Set<String> outputNames, Map<String, CachedFile> thumbsContents, Map<String, CachedFile> slidesContents, AlbumBeanEvent eventObject) -
getJAlbumVersion
-
addGlobals
-
registerVariables
We store a Map of file->Map pairs where the Map contains metadata like imageWidth, imageHeight and EXIF data (if present)- Throws:
IOExceptionScriptException
-
processScript
Process BeanShell or JavaScript files- Throws:
IOExceptionScriptException
-
processScript
Process BeanShell or JavaScript files- Throws:
IOExceptionScriptException
-
processBeanShellFile
Deprecated.Use processScript(File) instead- Throws:
ElementExceptionIOException
-
countFiles
Deprecated.Use JAlbumUtilities.countCategories instead for speed (less disk access) and flexibilityRecursively figure out how many files to process in total v3.5 made public as a convenience- Throws:
IOException
-
init
-
isDirty
public boolean isDirty()Tell if settings have changed since last album build- Returns:
- Since:
- v12
-
makeAlbum
public MakeResult makeAlbum() throws IllegalArgumentException, IOException, OperationAbortedException, ElementException, ScriptExceptionGenerate a web album. Before calling makeAlbum() you must always call setDirectory() and setOutputDirectory() to set an output- Specified by:
makeAlbumin interfaceAlbumEngine- Returns:
- Throws:
IOExceptionElementExceptionIllegalArgumentExceptionOperationAbortedExceptionScriptException
-
smartMakeAlbum
public MakeResult smartMakeAlbum() throws IllegalArgumentException, IOException, OperationAbortedException, ElementException, ScriptExceptionMake album but let jAlbum decide whether to make all or changes- Specified by:
smartMakeAlbumin interfaceAlbumEngine- Returns:
- Throws:
IOExceptionElementExceptionIllegalArgumentExceptionOperationAbortedExceptionScriptException
-
isMakingAlbum
public boolean isMakingAlbum()- Returns:
- Since:
- v12
-
imageUpdate
Ignore. Will be moved out of AlbumBean Implements ImageObserver- Specified by:
imageUpdatein interfaceImageObserver
-
getWidgetInjectionCode
-
getTargetThumbName
-
getTargetThumbName
-
getTargetName
-
getScaledDim
-
removeAlbumBeanListener
- Specified by:
removeAlbumBeanListenerin interfaceAlbumEngine
-
removeAllAlbumBeanListeners
public void removeAllAlbumBeanListeners()- Since:
- 25 For handover to background processing
-
addAlbumBeanListener
- Specified by:
addAlbumBeanListenerin interfaceAlbumEngine
-
addPropertyChangeListener
-
removePropertyChangeListener
Removes a PropertyChangeListener from the listener list. This method should be used to remove PropertyChangeListeners that were registered for all bound properties of this class.If listener is null, no exception is thrown and no action is performed.
- Parameters:
listener- the PropertyChangeListener to be removed- See Also:
-
addPropertyChangeListener
-
firePropertyChange
Support for reporting bound property changes for Object properties. This method can be called when a bound property has changed and it will send the appropriate PropertyChangeEvent to any registered PropertyChangeListeners.- Parameters:
propertyName- the property whose value has changedoldValue- the property's previous valuenewValue- the property's new value
-
addFilter
Add an image filter to the image process chain so it affects both closeups and thumbnails -
filterIterator
-
addFilter
Add an image filter to the image process chain at the specified stage -
removeFilter
Remove an image filter from the image process chain at the specified stage -
removeAllFilters
public void removeAllFilters()Remove all image filters from the image process chain -
fireStatus
Fire status messages during album build- Parameters:
message-- Since:
- 27
-
fireWarning
Fire warning messages during album build- Parameters:
message-- Since:
- 30.3
-
fireRequestConfirmation
-
fireFolderProcessingStarted
-
fireFolderProcessingFinished
-
fireVideoProcessingProgress
-
fireImageProcessingStarted
-
fireImageProcessingFinished
-
fireErrorOccured
-
fireAlbumMakingStarted
protected void fireAlbumMakingStarted(boolean changes) -
fireAlbumMakingDone
protected void fireAlbumMakingDone(boolean success) -
setSubdirs
public void setSubdirs(boolean newSubdirs) -
isSubdirs
public boolean isSubdirs() -
setAppendImages
public void setAppendImages(boolean newAppendImages) Control if all image files are to be rescaled or only new files. Setting appendImages to true corresponds to "Make changes" Setting appendImages to false corresponds to "Make all" button.- Specified by:
setAppendImagesin interfaceAlbumEngine- Parameters:
newAppendImages-
-
isAppendImages
public boolean isAppendImages()- Specified by:
isAppendImagesin interfaceAlbumEngine
-
setUpdatedDirsOnly
public void setUpdatedDirsOnly(boolean newUpdatedDirsOnly) -
isUpdatedDirsOnly
public boolean isUpdatedDirsOnly() -
setExcludeByDefault
public void setExcludeByDefault(boolean newExcludeByDefault) Automatically exclude images recently added to the image directory- Since:
- 6.3
-
isExcludeByDefault
public boolean isExcludeByDefault() -
setKeepMetaData
public void setKeepMetaData(boolean newKeepMetaData) Keep camera metadata in generated files- Since:
- 6.5
-
isKeepMetaData
public boolean isKeepMetaData() -
setKeepXmpData
public void setKeepXmpData(boolean newKeepXmpData) Keep xmp metadata in generated files- Since:
- 10.8
-
isKeepXmpData
public boolean isKeepXmpData() -
getHomepageAddress
- Since:
- 10.8
-
setHomepageAddress
- Since:
- 10.8
-
getHomepageLinkText
- Since:
- 10.8
-
setHomepageLinkText
- Since:
- 10.8
-
setStyle
- Specified by:
setStylein interfaceAlbumEngine
-
getStyle
- Specified by:
getStylein interfaceAlbumEngine
-
setIndexPageName
-
getIndexPageName
-
isUrlEncode
public boolean isUrlEncode() -
setUrlEncode
Deprecated.Ignored from v17.2. URL encoding is now always on- Parameters:
b-
-
isRemoveDiacritics
public boolean isRemoveDiacritics()- Returns:
- Whether to have diacritics stripped from generated file names
-
setRemoveDiacritics
public void setRemoveDiacritics(boolean removeDiacritics) Whether to have diacritics stripped from generated file names- Parameters:
removeDiacritics-
-
setImageOrdering
Set image ordering to one of the ORDER_ string constants defined in this class Will cancel any custom image ordering set by the setCustomImageOrdering call -
getImageOrdering
-
setCustomImageOrdering
Select custom image/file ordering by installing a custom Comparator object. It is recommended that this method is called from the init.bsh file of a skin as the JAlbum user interface automatically resets this setting at the start of each album generation, before calling init.bsh. The resetting is done when the ordinary setImageOrdering method is called as the engine is synchronized with the UI.- Parameters:
fileComparator- Comparator object that is passed two File objects
-
getCustomImageOrdering
-
setMediaRSS
public void setMediaRSS(boolean newMediaRSS) Add media RSS support to published albums- Parameters:
newMediaRSS- boolean
-
isMediaRSS
public boolean isMediaRSS() -
isGenerateJSON
public boolean isGenerateJSON()- Since:
- 15.4 Tell whether JSON formatted metadata should be added to album
-
setGenerateJSON
public void setGenerateJSON(boolean generateJSON) Tell whether JSON formatted metadata should be added to album- Parameters:
generateJSON-- Since:
- 15.4
-
getNotes
- Returns:
- Project notes (notes to user of project. Not shown in album)
- Since:
- 16
-
setNotes
Set pProject notes (notes to user of project. Not shown in album)- Parameters:
notes-- Since:
- 16
-
isNotifyNotes
public boolean isNotifyNotes() -
setNotifyNotes
public void setNotifyNotes(boolean notifyNotes) -
setWidgetInjection
public void setWidgetInjection(boolean newWidgetInjection) Include widget injection to published albums- Parameters:
newWidgetInjection-
-
isWidgetInjection
public boolean isWidgetInjection() -
setExcludeBacklinks
public void setExcludeBacklinks(boolean newExcludeBacklinks) - Since:
- 8.7
-
isExcludeBacklinks
public boolean isExcludeBacklinks() -
getUserName
-
setUserName
-
setMetaData
public void setMetaData(boolean newMetaData) -
isMetaData
public boolean isMetaData() -
setOutputDirectory
- Specified by:
setOutputDirectoryin interfaceAlbumEngine
-
getOutputDirectory
- Specified by:
getOutputDirectoryin interfaceAlbumEngine
-
getInterpretedOutputDirectory
Deprecated. -
getOutputDir
-
setAlbumAddress
-
getAlbumAddress
-
setRows
public void setRows(int newRows) -
getRows
public int getRows() -
setLimit
public void setLimit(int limit) Limit number of album objects that are to be processed 0 = unlimited Use of this method by 3:rd party developers is discouraged- Specified by:
setLimitin interfaceAlbumEngine- Since:
- 8.3
-
getLimit
public int getLimit() -
setImageLinking
Deprecated.since v33. Use setMakeCloseups and setIncludeOriginals Will be called for older projectsSet image linking to one of the LINK_ string constants defined in this class -
getImageLinking
Deprecated.since v33. Use isMakeCloseups and isIncludeOriginals- Returns:
-
setCopyOriginals
public void setCopyOriginals(boolean newCopyOriginals) -
isCopyOriginals
public boolean isCopyOriginals() -
getWebPassword
Upload privacy related -
setWebPassword
Upload privacy related -
isVisibleOnProfilePage
public boolean isVisibleOnProfilePage()Upload privacy related -
setVisibleOnProfilePage
public void setVisibleOnProfilePage(boolean visibleOnProfilePage) Upload privacy related -
setSkin
- Specified by:
setSkinin interfaceAlbumEngine
-
getSkin
- Specified by:
getSkinin interfaceAlbumEngine- Returns:
- Currently active skin
-
getLastSkin
- Returns:
- Last active skin
- Since:
- 24
-
setPageExtension
-
getPageExtension
-
getResourceDirectory
JAlbum 4.5 additions -
getThumbnailDirectory
-
getCloseupDirectory
-
getSlideDirectory
-
getThumbnailPrefix
-
getCloseupPrefix
-
isReadJAlbumMetaData
public boolean isReadJAlbumMetaData() -
setReadJAlbumMetaData
public void setReadJAlbumMetaData(boolean readJAlbumMetaData) -
setReadXmp
public void setReadXmp(boolean readXmp) When reading comments, give priority to XMP metadata over other metadata sources- Parameters:
readXmp-- Since:
- 10
-
isReadXmp
public boolean isReadXmp() -
setJpegComment
public void setJpegComment(boolean newjpegComment) -
isJpegComment
public boolean isJpegComment() -
setIptcCaption
public void setIptcCaption(boolean newiptcCaption) -
isIptcCaption
public boolean isIptcCaption() -
setExifUserComment
public void setExifUserComment(boolean newexifUserComment) -
isExifUserComment
public boolean isExifUserComment() -
getTitleSource
- Since:
- 9.6
-
setTitleSource
- Since:
- 9.6
-
setHighQualityThumbs
public void setHighQualityThumbs(boolean newhighQualityThumbs) Control whether to force smooth scaling for thumbnails or rely on the general scaling quality setting- Parameters:
newhighQualityThumbs-
-
isHighQualityThumbs
public boolean isHighQualityThumbs() -
isForceProcessing
public boolean isForceProcessing()Force image processing even if source image is smaller than destination and no filters are applied- Since:
- 17.1
-
setForceProcessing
public void setForceProcessing(boolean forceProcessing) Force image processing even if source image is smaller than destination and no filters are applied- Parameters:
forceProcessing-- Since:
- 17.1
-
isForceVideoProcessing
public boolean isForceVideoProcessing()Force video processing too if make mode is All- Returns:
- Since:
- 37
-
setForceVideoProcessing
public void setForceVideoProcessing(boolean forceVideoProcessing) Force video processing too if make mode is All- Since:
- 37
-
setForceJPEGWriting
Deprecated.Ensure that images and thumbnails are always written as JPEGs (never PNG) Use setForceThumbs and setForceImages. Only here for backwards compatibility- Parameters:
force-- Since:
- 10.5
-
isForceJPEGThumbs
public boolean isForceJPEGThumbs()- Returns:
- true if thumbnails are forced to JPEG format
- Since:
- 18.3
-
setForceJPEGThumbs
public void setForceJPEGThumbs(boolean forceJPEGThumbs) Force thumbnails to JPEG format- Parameters:
forceJPEGThumbs-- Since:
- 18.3
-
isForceJPEGImages
public boolean isForceJPEGImages()- Returns:
- true if closeup images are forced to JPEG format
- Since:
- 18.3
-
setForceJPEGImages
public void setForceJPEGImages(boolean forceJPEGImages) Force closeup images to JPEG format- Parameters:
forceJPEGImages-
-
isSuperimposeFilmIcon
public boolean isSuperimposeFilmIcon()- Since:
- jAlbum 8.12
-
setSuperimposeFilmIcon
public void setSuperimposeFilmIcon(boolean superimposeFilmIcon) Tell if to superimpose a film icon onto the thumbnails of movie files- Since:
- jAlbum 8.12
-
setExifImageDescription
public void setExifImageDescription(boolean newexifImageDescription) -
isExifImageDescription
public boolean isExifImageDescription() -
setIncludeDirectories
public void setIncludeDirectories(boolean newIncludeDirectories) -
isIncludeDirectories
public boolean isIncludeDirectories() -
setUserVariables
- Specified by:
setUserVariablesin interfaceAlbumEngine
-
getVideoProcessor
-
getVideoParameters
-
setVideoParameters
-
isUseCustomVideoSettings
public boolean isUseCustomVideoSettings() -
setUseCustomVideoSettings
public void setUseCustomVideoSettings(boolean useCustomVideoSettings) -
getVideoQuality
public int getVideoQuality() -
setVideoQuality
public void setVideoQuality(int videoQuality) -
getVideoResolution
-
setVideoResolution
-
setSkinVariables
The new way of passing variables from skin user interfaces to the AlbumBean (Previously the user variables mechanism was used which bloated the user variables)- Specified by:
setSkinVariablesin interfaceAlbumEngine- Since:
- 5.2
-
setProperties
Convenience method that calls the relevant setter methods on this bean depending on the passed properties. Skin and user variables, prefixed with skin. and user. will be installed as skin- and user variables- Specified by:
setPropertiesin interfaceAlbumEngine- Since:
- 8.4
-
getUserVariables
- Specified by:
getUserVariablesin interfaceAlbumEngine
-
getSkinVariables
- Specified by:
getSkinVariablesin interfaceAlbumEngine
-
setRemoteDirectory
Might be moved out of AlbumBean -
getRemoteDirectory
Might be moved out of AlbumBean -
setAccountProfileName
-
getAccountProfileName
-
setReverseOrder
public void setReverseOrder(boolean newReverseOrder) -
isReverseOrder
public boolean isReverseOrder() -
setTextEncoding
-
getTextEncoding
-
setWriteUTF8
public void setWriteUTF8(boolean newWriteUTF8) -
isWriteUTF8
public boolean isWriteUTF8() -
setDirectoriesFirst
public void setDirectoriesFirst(boolean newDirectoriesFirst) -
isDirectoriesFirst
public boolean isDirectoriesFirst() -
setIgnorePattern
-
getIgnorePattern
-
setIncludePattern
Include only files matching includePattern- Since:
- 6.5
-
getIncludePattern
- Since:
- 6.5
-
setVars
@Deprecated public static void setVars(Map<String, Object> variables, bsh.Interpreter interpreter) throws ScriptExceptionDeprecated.Use setVars(Map variables, ScriptEngine engine)- Throws:
ScriptException
-
setVars
Called from JConsoleFrame only. Remove later and use our own scopes- Parameters:
variables-engine-
-
setUsing
-
getScalingMethod
-
setScalingMethod
-
getSmoothScalingType
- Returns:
- Since:
- 15
-
setSmoothScalingType
- Since:
- 15
-
isAcceleratedScaling
public boolean isAcceleratedScaling()Since 8.3.5 -
setAcceleratedScaling
public void setAcceleratedScaling(boolean hardwareScaling) Attempt to use hardware accelerated image scaling. Is usually faster but can produce worse results on some graphics cards Since 8.3.5 -
getDirectoryChaining
-
setDirectoryChaining
Enable sequential traversal of an album tree via nextPage, previousPage, nextIndexPage and previousIndexPage- Parameters:
directoryChaining-- Since:
- 24
-
isChainDirectories
public boolean isChainDirectories() -
setChainDirectories
Deprecated.Use setDictoryChaining() instead -
getCreditText
Key for text to use for credit links- Returns:
- Since:
- 10.10
-
setCreditText
Set key for text to use for credit links- Since:
- 10.10
-
getFactory
-