Interface IFileSystemNamingStrategy

All Known Implementing Classes:
DefaultFileSystemNamingStrategy

public interface IFileSystemNamingStrategy
Instances of FileSystemContentManager require content, identified by a GUID instance, to be stored on a file system. Implementations of this interface provide a mapping of GUID value to a file system path. In context of the FileSystemContentManager implementation, paths are to be relative identifiers. Implementations must ensure that the mapping from GUID to path (and vica versa) is:
  • repeatable: a conversion must lead to a result that is equal to previous conversion results based on the same (or equal) input value.
  • unique: conversions of unique values must lead to unique results, guaranteeing that there is a one-to-one relationship between value and result.
It is advisable, but not required, that the conversion routines take into account system independent characteristics - for example by using system-specific file name separators. Implementations must be thread-safe.
Since:
9.3
Author:
G. der Kinderen
  • Method Summary

    Modifier and Type
    Method
    Description
    toGUID(String path)
    Transforms a (relative) path identifier into a content identifier
    toPath(GUID guid)
    Transforms a content identifier into a (relative) path identifier.
  • Method Details

    • toPath

      String toPath(GUID guid)
      Transforms a content identifier into a (relative) path identifier.
      Parameters:
      guid - A content identifier (cannot be null).
      Returns:
      a path (never null).
    • toGUID

      GUID toGUID(String path)
      Transforms a (relative) path identifier into a content identifier
      Parameters:
      path - A path (cannot be null).
      Returns:
      a content identifier (never null).