Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: wikitransfer damage? Clearly these block 'code's want to be inlined

...

*Author: James Rutherford
*Version: 2007-11-05

...

  • logging
    • level, detail, etc
  • Events
  • authorization
  • use of Code Blockorg.dspace.core.Context cache

API

The API has already changed considerably (see below), but there are still a few things that I need to straighten out:

  • use of Code Blockorg.dspace.content.uri.ObjectIdentifier instead of Code Blockint or Code BlockString "identifiers".
  • pre- and post-hooks for all DAO operations (or at least the basic CRUD).
  • resolve API conflicts such as Code Blockitem.getBundles() vs. Code BlockbundleDAO.getBundles(item) (the former asks the in-memory Code BlockItem, the latter queries the data store – results will not necessarily be the same).

...

To ease migration away from the dependency on Handles, the 'new' URL form is basically the same as it was (

...

site_url/resource/identifier/extras

...

). While this basically, works, there are bugs waiting to creep in (mostly relating to identifiers that contain unescaped slashes), and it may be worth moving towards a more parameterized URL scheme.

...

Classes that have corresponding DAOs (

...

Item

...

etc) typically had package-private constructors which, among other things, prevented them from being subclassed (which was irritating); these constructors (usually) took a

...

TableRow

...

and a

...

Context

...

. In order to maintain some degree of consistency with the old API, such constructors now take an

...

int

...

ID, and a

...

Context

...

. It is important to note that these constructors are only really for use by the DAOs – all creates and retrieves go via DAOs so there should never be a need to directly instantiate one of these objects directly.

In the near future, I will probably remove these constructors and replace them with constructors that take no arguments (the

...

Context

...

is only required to support deprecated methods anyway) to avoid confusion.

Things that are broken

...

  • org.dspace.app.itemimport.ItemImport is broken (because of the previous dependency on Handles as identifiers). I'm in the process of fixing this, but for now it just doesn't work.

DAOs

Example: Code Block ItemDAO

Sample code to follow.

Code Blockorg.dspace.content.proxy

This section will provide an overview of the new

...

ItemProxy

...

class.

Identifiers

It used to be the case that DSpace used a mix of

...

int

...

s and

...

String

...

representations of Handles to identify objects. As much as possible, I've swapped all of these out in favour of using the new

...

ObjectIdentifier

...

class. The idea behind this identifier was driven by one of the reasons for using DAOs: n