Interface IdentifierStrategy

Captures the behavior of container identifiers in a certain storage configuration.

Hierarchy

  • IdentifierStrategy

Implemented by

Properties

contains: ((container, identifier, transitive) => boolean)

Type declaration

    • (container, identifier, transitive): boolean
    • Checks if the given container would contain the given identifier. This does not check that either of these identifiers actually exist. This is similar to calling getParentContainer on an identifier and comparing the result.

      If transitive is false this only checks if container is the direct parent container of identifier.

      Parameters

      Returns boolean

getParentContainer: ((identifier) => ResourceIdentifier)

Type declaration

    • (identifier): ResourceIdentifier
    • Generates the identifier of the container this resource would be a member of. This does not check if that identifier actually exists. Will throw an error if the input identifier is a root container or is not supported.

      Parameters

      Returns ResourceIdentifier

isRootContainer: ((identifier) => boolean)

Type declaration

    • (identifier): boolean
    • Checks if the input corresponds to the identifier of a root container. This does not check if this identifier actually exists.

      Parameters

      Returns boolean

supportsIdentifier: ((identifier) => boolean)

Type declaration

    • (identifier): boolean
    • Verifies if this identifier is supported. This does not check if this identifier actually exists, but checks if the identifier is in scope for this class.

      Parameters

      Returns boolean