Website Downloads Documentation Knowledgebase Wiki Issue tracker Commercial support

Book Store

General

The Book Store is responsible for the persistence of published books. It simply uses the filesystem as storage area.

By default, the Book Store stores it files in the following directory:

<wikidata directory>/daisywiki/bookstore

The location of this directory is however configurable in the cocoon.xconf:

<storageDirectory>file:/${daisywiki.data}/bookstore</storageDirectory>

If you have multiple Daisy Wiki instances in front of the same Daisy repository, you may configure them to use the same bookstore directory. Thus this directory may be shared by multiple processes.

Structure of the bookstore directory

For each book instance, the bookstore directory contains a subdirectory.

bookstore/
   <name of bookinstance>/
      lock
      acl.xml
      metadata.xml
      publications_info.xml
      data/
         dependencies.xml
         book_definition_processed.xml
         documents/
            <docid>_<branchId>_<langId>.xml
         resources/
            <id>_<branchId>_<langId>_<version>
            <id>_<branchId>_<langId>_<version>.meta.xml
      publications/
         log.txt
         link_errors.txt
         <publication_output_name>/
            output/

About these files:

  • all write operations require to take a lock, which creates the lock file. When a book instance is locked, nobody can access it except the user who took the lock.
  • the acl.xml defines the access control list for the book instance. See below.
  • the metadata.xml file contains general metadata about the book instance.
  • the publications_info.xml file contains information about the publications available in the book instance.
  • the data directory contains all the retrieved book data
  • the publications directory contains a subdirectory for each publication output. The files which should be publicly available should be located in the output subdirectory.

Access control on book instances

The access to a book instance is controlled by an Access Control List (ACL). The ACL determines whether a user has no permissions at all, only read permissions, or manage permissions. Read permissions allows only read access to the following paths in the book instance:

  • /publications/<publication_output_name>/output/*
  • /data/resources/*

Manage permission allows everything, including deletion of the book instance.

A book instance ACL consists of a number of rules. Each rule defines whether a specific user, role or everyone is granted or denied read or manage permission. By default (the start situation when evaluating an ACL), everyone is denied everything. The ACL is always evaluated top to bottom, from the first to the last rule, later rules overwriting the result of earlier rules (thus the evaluation does not stop on the first matching rule).

Manual manipulation of the bookstore directory

It is allowed to make manual changes to the bookstore directory, including deletion and addition of book instance directories. It is thus also allowed to copy book instance directories between different book stores, if you have multiple Wikis running (in such cases, if they talk to different repositories, be aware though that the ACL might need modification).

Comments (0)
Advertisement

Daisy hosting, installation, support. Workshops and turnkey Daisy CMS projects. Get Daisy from its creators.

outerthought.org

Downloads provided by

SourceForge.net Logo

Open source stats