Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

(minus) Uploading a new file into an asset will change its node path

 

Alternative 4 - Subnode on Asset

When an asset is edited, copy the resource subnode to a new subnode on the Asset.

Concept:

Questions/Problems:

  • What about the "asset family" - How could you find all variants of the original? Do you need to be able to? Probably yes -this could be implemented by storing an extra reference when things are duplicated.
  • If implementation changes later, how messy would it be to have this implementation? Migration? Some nodes use once technique, some nodes use the other technique?

Implementation Notes:

  • Resource node of asset is updated after upload and edit in FileItemWrapperImpl.populateJcrItemProperty() This could be the place to check if an original exists yet, and copy the resource there if not, before saving the changes.
  • Upload saving happens in AbstactUploadFileField.uploadFinished() with fileItem.updateProperties() and fileItem.populateJcrItemProperty()

Node types

The original and the asset will use different node types.

...