Class FileNamerContext

java.lang.Object
se.datadosen.jalbum.FileNamerContext

public class FileNamerContext extends Object
Assistive class to FileNamer implementations jAlbum ensures that a new context is generated for each folder
See Also:
  • Constructor Details

    • FileNamerContext

      public FileNamerContext(AlbumObject folder)
  • Method Details

    • nameExists

      public boolean nameExists(String name)
      Check if name already exists in the current folder Relies on addName being called (ensured by jAlbum)
      Parameters:
      name -
      Returns:
    • nextValue

      public int nextValue()
      For each folder, return numbers 1,2,3 and onwards May be used to easily generate number sequences for the files in each folder
      Returns:
    • addName

      public String addName(String name)
      Suggest a name for one child object of the current folder
      Parameters:
      name - Suggested name
      Returns:
      A name that is unique for this folder
    • getFolder

      public AlbumObject getFolder()
      Return the current folder