Skip to main content
Package: com.phoenix_int.aserver.library Class Hierarchy
Implemented Interfaces
Declaration
This class implements a librarian that uses a directory on disk to store and retrieve files. It provides methods for adding, removing, and finding files in the directory, as well as for managing categories and associations.

Field Summary

Constructor Summary

Method Summary

Field Detail

directory

The directory used by this librarian.

categories

Map of categories managed by this librarian.

Constructor Detail

PHXDirectoryLibrarian

Parameters:
  • directory - The directory to be used by this librarian.

Method Detail

addFile

Adds a file to the directory. Parameters:
  • file - The file to add.

removeFile

Removes a file from the directory. Parameters:
  • file - The file to remove.

findFile

Finds a file by name. Parameters:
  • name - The name of the file to find.
Returns:
  • The file if found, or null otherwise.

addCategory

Adds a category. Parameters:
  • category - The category to add.

removeCategory

Removes a category. Parameters:
  • category - The category to remove.

listCategories

Lists all categories. Returns:
  • A list of all categories.

addAssociation

Adds an association. Parameters:
  • key - The key for the association.
  • value - The value for the association.

removeAssociation

Removes an association. Parameters:
  • key - The key for the association to remove.

findAssociation

Finds an association by key. Parameters:
  • key - The key for the association to find.
Returns:
  • The value associated with the key, or null if not found.