Class AppStorage

All Implemented Interfaces:
Comparable<Storage>

public class AppStorage extends RootStorage
The application root storage. This overlays some storage aliases and performs additional path validation.
Version:
1.0
  • Field Details

    • SESSION_CURRENT

      public static final Path SESSION_CURRENT
      The current session path.
    • USER_CURRENT

      public static final Path USER_CURRENT
      The current user path.
  • Constructor Details

    • AppStorage

      public AppStorage()
      Creates a new application storage.
  • Method Details

    • isAccessible

      public boolean isAccessible(Path path)
      Checks if a storage path is valid for read access. Only binary paths or paths without file extensions are accepted.
      Parameters:
      path - the path to check
      Returns:
      true if the path is valid, or false otherwise
    • lookup

      public Metadata lookup(Path path)
      Searches for an object at the specified location and returns metadata about the object if found. The path may locate either an index or a specific object.
      Overrides:
      lookup in class RootStorage
      Parameters:
      path - the storage location
      Returns:
      the metadata for the object, or null if not found
    • load

      public Object load(Path path)
      Loads an object from the specified location. The path may locate either an index or a specific object. In case of an index, the data returned is an index dictionary listing of all objects in it.
      Overrides:
      load in class RootStorage
      Parameters:
      path - the storage location
      Returns:
      the data read, or null if not found