jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nicolas " <nto...@gmail.com>
Subject Refactoring of the backupTool
Date Thu, 31 Aug 2006 17:16:43 GMT

I am nearly over in refactoring the backup tool. Since, I added
importVersions inside the VersionManager as asked. I would like to list you
all the modifications I had to make so we all agree on this before I commit

I am calling those classes from the backup package so I need them public.
Those classes are low-level so I don't think this should create any problem
but they escape some consistancy checks.

Here are the classes I had to add in Core (they were previously in the
backup contrib package) and their description:

- RestoreBatchedItemOperations extends BatchedItemOperations. This class is
made to restore empty workspaces. I overload only one method:
createNodeState to escape the checks. If you try to use most other methods,
it will raise an exception (all methods are redefined this way). This class
is is o.a.j.core (next to BatchedItemOperations). This class should only be
called by system application such as a backup tool or internally.

- SysViewImporter: takes a system view XML document and import it as it is
in an empty repository. It is heavily based on the WorkspaceImporter but
doesn't extend it (I would have to put too many methods in protected for
this; tell me if you would be ok with this change though). Here are the
      1/ it escapes the isProtected check and doesn't autoCreate nodes. It
checks if there are some contents in the destination, if yes it throws an
      2/ You have more control through the constructor than the
WorkspaceImporter since you specify which BatchedItemOperations you want to
      3/ There are no conflicts/replace so basically, it just creates nodes
and so is a lot simpler thant the WorkspaceImporter.

- NodeVersionHistoriesUpdatableStateManager: is made to update easily the
Node Version Histories.

And I have modified a few existing classes:

- added VersionManagerImpl.importVersions(InputStream in, HierarchyManager
hierMgr, NamespaceResolver nsResolver, NamespaceRegistryImpl nsRegistry)
throws IOException, RepositoryException

- Switched RepositoryImpl.getVersionManager to public instead of private.

Are you fine with those changes and this refactoring?

If so, I will "clean up" the code and commit the patches. If not, let's
discuss :)

my blog! http://www.deviant-abstraction.net !!

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message