Class EmptyRepository

  • All Implemented Interfaces:
    Repository

    public class EmptyRepository
    extends AbstractRepository
    An empty repository with no descriptors and no workspaces. This class can be used as a dummy sentinel in cases where a proper content repository is not available.
    Since:
    1.4
    • Constructor Detail

      • EmptyRepository

        public EmptyRepository()
    • Method Detail

      • getDescriptor

        public java.lang.String getDescriptor​(java.lang.String key)
        Returns null since this repository contains no descriptors.
        Parameters:
        key - descriptor key
        Returns:
        null
      • getDescriptorValue

        public Value getDescriptorValue​(java.lang.String key)
        Returns null since this repository contains no descriptors.
        Parameters:
        key - descriptor key
        Returns:
        null
      • getDescriptorValues

        public Value[] getDescriptorValues​(java.lang.String key)
        Returns null since this repository contains no descriptors.
        Parameters:
        key - descriptor key
        Returns:
        null
      • isSingleValueDescriptor

        public boolean isSingleValueDescriptor​(java.lang.String key)
        Returns false since this repository contains no descriptors.
        Parameters:
        key - descriptor key
        Returns:
        false
      • getDescriptorKeys

        public java.lang.String[] getDescriptorKeys()
        Returns an empty array since this repository contains no descriptors.
        Returns:
        empty array
      • login

        public Session login​(Credentials credentials,
                             java.lang.String workspace)
                      throws NoSuchWorkspaceException
        Throws an exception since this repository contains no workspaces.
        Parameters:
        credentials - The credentials of the user
        workspace - the name of a workspace.
        Returns:
        nothing
        Throws:
        NoSuchWorkspaceException - always thrown