Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-27435

Record, Retention and Hold low-level implementation

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 10.10-HF21, 11.1, 2021.0
    • Component/s: Core
    • Impact type:
      API change, Data Persistence Change
    • Upgrade notes:
      Hide

      The notion of a document being a record is added. The notion of retention date and legal hold is added to records. Once a document is a record, this is forever. Copies of records (including versions) are not initially records.

      When a record has a legal hold or has a retention date in the future, modification or deletion of the main blob (file:content) is prevented, even indirectly through removal of the document or of an ancestor, even for Administrators.

      The following APIs are added:

      • CoreSession.makeRecord(doc)
        Only for users with permission MakeRecord.
        A record can never be set back to non-record (there is no unmakeRecord() API).
        When a document is turned into a record, the document blob manager will take care of unsharing the blob and moving it to the record blob provider.
      • CoreSession.isRecord(doc)
      • CoreSession.setRetainUntil(doc, datetime)
        Only for users with permission SetRetention.
        A special CoreSession.RETAIN_UNTIL_INDETERMINATE value is also available.
        The retention date can only be increased, except if it was indeterminate, in which case it can be set to an actual date.
      • CoreSession.getRetainUntil(doc)
      • CoreSession.setLegalHold(doc, boolean)
        Only for users with permission ManageLegalHold.
        If a hold is removed and the retention has expired, a "retention expired" event will be sent (after which the document may be deleted, along with its blob, depending on high-level policies).
      • CoreSession.hasLegalHold(doc)
      • CoreSession.isUnderRetentionOrLegalHold(doc)
        Convenience method doing hasLegalHold() OR getRetainUntil() > currentDate()

      And for convenience some getters are added:

      • DocumentModel.isRecord()
      • DocumentModel.getRetainUntil()
      • DocumentModel.hasLegalHold()
      • DocumentModel.isUnderRetentionOrLegalHold()

      The following APIs, that have never been used, are deprecated:

      • CoreSession.setRetentionActive(doc, boolean)
      • CoreSession.isRetentionActive(doc)

      NXQL has the following new special properties:

      • ecm:isRecord
      • ecm:retainUntil
      • ecm:hasLegalHold

      Note that NXQL does not have ecm:isUnderRetentionOrLegalHold, instead one should use ecm:retainUntil > NOW() OR ecm:hasLegalHold = 1.

      At the storage level, VCS has 3 additional columns in the table hierarchy:

      • isrecord
      • retainuntil
      • haslegalhold

      Some specific blob providers implementations can now be in "record mode":

      • BlobProvider.isRecordMode()

      When in record mode the blob providers behave differently:

      • They are transactional (blobs aren't actually written/deleted in the underlying storage until the transaction commits, and transaction rollback is possible).
      • They don't do de-duplication, each blob is stored individually.
      • They store only one blob per document (the main blob, file:content).
      • They can replace or delete a document's blob.
      • They have hooks to store additional metadata alongside the blob (for diagnostics/recovery).

       

      Show
      The notion of a document being a record is added. The notion of retention date and legal hold is added to records. Once a document is a record, this is forever. Copies of records (including versions) are not initially records. When a record has a legal hold or has a retention date in the future, modification or deletion of the main blob ( file:content ) is prevented, even indirectly through removal of the document or of an ancestor, even for Administrators. The following APIs are added: CoreSession.makeRecord(doc) Only for users with permission MakeRecord . A record can never be set back to non-record (there is no unmakeRecord() API). When a document is turned into a record, the document blob manager will take care of unsharing the blob and moving it to the record blob provider. CoreSession.isRecord(doc) CoreSession.setRetainUntil(doc, datetime) Only for users with permission SetRetention . A special CoreSession.RETAIN_UNTIL_INDETERMINATE  value is also available. The retention date can only be increased, except if it was indeterminate, in which case it can be set to an actual date. CoreSession.getRetainUntil(doc) CoreSession.setLegalHold(doc, boolean) Only for users with permission ManageLegalHold . If a hold is removed and the retention has expired, a "retention expired" event will be sent (after which the document may be deleted, along with its blob, depending on high-level policies). CoreSession.hasLegalHold(doc) CoreSession.isUnderRetentionOrLegalHold(doc) Convenience method doing hasLegalHold() OR getRetainUntil() > currentDate() And for convenience some getters are added: DocumentModel.isRecord() DocumentModel.getRetainUntil() DocumentModel.hasLegalHold() DocumentModel.isUnderRetentionOrLegalHold() The following APIs, that have never been used, are deprecated: CoreSession.setRetentionActive(doc, boolean) CoreSession.isRetentionActive(doc) NXQL has the following new special properties: ecm:isRecord ecm:retainUntil ecm:hasLegalHold Note that NXQL does not have ecm:isUnderRetentionOrLegalHold , instead one should use ecm:retainUntil > NOW() OR ecm:hasLegalHold = 1 . At the storage level, VCS has 3 additional columns in the table hierarchy : isrecord retainuntil haslegalhold Some specific blob providers implementations can now be in "record mode": BlobProvider.isRecordMode() When in record mode the blob providers behave differently: They are transactional (blobs aren't actually written/deleted in the underlying storage until the transaction commits, and transaction rollback is possible). They don't do de-duplication, each blob is stored individually. They store only one blob per document (the main blob, file:content ). They can replace or delete a document's blob. They have hooks to store additional metadata alongside the blob (for diagnostics/recovery).  
    • Sprint:
      nxFG 11.1.9, nxFG 11.1.10, nxFG 11.1.11
    • Story Points:
      8

      Description

      Implement the low-level changes to have retention & hold.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 7 weeks, 1 day, 3 hours
                  7w 1d 3h