CMIS Changelog move event: From where to where? - cmis

A CMIS server can generate a ChangeLog event when a document has been moved from a folder to another.
The ChangeLog event contains:
the nature of the change, for instance updated,
optional properties (because I want to be compatible with any CMIS server, I can't rely on them),
the identifier of the document OR the identifier of the folder containing it:
A repository MAY record events such as filing/unfiling/moving of documents as change events on the documents, their parent folder(s), or both the documents and the parent folders.
(CMIS 1.1 paragraph 2.1.15.1)
QUESTION: In case the ChangeLog event only contains the identifier of the folder containing the moved document, is there a way to know where the document has been moved from/to?

Related

Default folders on SharePoint Document Set

I'm trying to achieve a project documentation solution on SharePoint 2013 using a custom Document Set Content Type. Each new project Document Set would hold four types of documents.
My initial thought was to use folders for each type to allow easy drag and drop behavior for adding documents. The problem is, by default, folders can be created only by adding default documents to a Document Set Content Type. I wish to create the folders upon the creation of new instance of this Document Set but not add any documents inside these folders.
This is what I have tried so far:
Using workflow to delete default documents inside folders that were created in the new Document Set.
Custom folder Content Types.
The reason for use of folders is to avoid metadata tagging when uploading documents.
I'm quite restricted with the tools that I can use so the most basic level solutions would be appreciated.
To be more clear, I would hope to have a Document Set Content Type which holds four folders. Document Set would act as a holder for all documentation relevant for a single project and folders inside would group the documentation into groups. Each new project will generate documents in its lifespan and these documents should be grouped into categories, say marketing, finance, production and HR. So when I have a new project, I can create a new instance of custom Document Set with pre created, named, empty folders inside.
There's two ways you can achieve this I think. First would be to set-up your document set to have an empty document deployed to all of the folders you'd like to create. Simply add "Default Content" to your document set and there specify the correct folders. Unfortunately there's no way to create empty folders, so you'll need to put a dummy document in each folder which the user can then delete or override.
Second would require some coding. By attaching a remote event receiver to the library, you could trigger some custom code which would create the folder structure inside of the document set once created. This would allow you to create the folder structure without the need for dummy documents; so it's a bit more work which requires a developer, but the end result is also better.
The second solution you might also be able to pull off in a workflow (or Microsoft Flow) which then uses the API's to create the folders, but that's most likely less clean and more hassle to get working.
Create a custom content type called "Folder Creator". Use that content type to create the subfolders. Then have the "Folder Creator" content type auto delete using SharePoint Information Management Policies. Be sure to set your "Expiration Policy" job to run at least once a day.

Why do I have 2 identical documents that are both Parents

I am developing a method to allow the service owner to deal with conflicting and duplicate Notes documents in an XPages application. I have created a resolution for the service owner to deal with any duplicates and conflicts that occur but just found that I have a few Notes documents (they are Contracts) that are duplicates because they have the same Contract ID but they are BOTH PARENTS and not one parent and one response, so they are NOT picked up by the view formula SELECT #IsAvailable($Conflict)
Why is this? How can I create a view to find these?
If a Replication/Save document is edited, it is promoted to a main document. One option may be an agent running overnight to move such documents into a Folder or code in your save function to abort if it's not a main document.

Get recently read document in Lotus Notes Database

I am developing a database on Lotus Designer 8.5 environment with LotusScript and LotusFormula.
Is there any possibilities on get a list of recently opened documents (for example last five) in a Lotus Notes database ? My purpose is to provide an embedded view showing the recent documents opened by current user on the current database, which will act like some kind of history view.
Please advise
Use a folder categorized by username. Add the current document in PostOpen event to folder with document.PutInFolder(folderName) and remove the oldest document from folder with document.RemoveFromFolder(folderName)
This way you don't need to edit the documents and can show the last visited documents for a user in an embedded view.
As an alternative you can use user specific folders with option "Shared, private on first use".
I have that functionality in one of my databases.
I just added some code in the QueryOpen event of the form to store the UNID of the document in a profile document linked to the specific user. The values are stored in a multi value field, and my code removes the oldest entry when the number of entries I want to store is exceeded.
The user can actually set that number themselves in teh applications settings, 5 is default but they can make it more or less.
I built a class for this, makes it very easy to modify later, and to implement it in different forms, for different document types.
I then built a method to expose the last documents to the user, using a dropdown box as you can see below. Since you only wwant/need the five (or perhas ten) last documents, no need to use a view.

Unable to auto assign Document properties from Document Set shared columns

I have a SharePoint document library I am working on. It has a list of document sets. Each document set has a few fields that are marked as "Shared" so that they can be inherited by the documents inside.
When I upload a document inside a form opens and all the fields on the form are pre-filled with the shared values of the corresponding columns. But when I use create document from template, it opens the template in the corresponding Office application but the document property fields are empty and not read-only which is against the requirements of this project. I require them to be synced and filled exactly like when a document is uploaded.
There is one thing though. The user can fill any value he wants in those fields and they will still be saved a synced copy from parent in the library discarding what the user filled in, which is good, but why not show those values up in the document in the first place?
Anyone has experience in handling this please help. I have searched a lot on the internet but either my keywords are wrong or no one has had this problem before.
SharePoint version: 2010 Server
Office version: 2010 Professional
It sounds like you need a simple event reciever, which fire on itemadded. It would then go back up the tree to find the document set. Capture which properties are marked as shared. Adjust the item that is being added to force the values.
Probably 8 lines of code

Using Java API to read Lotus Notes documents

I am using the Lotus Notes 6.5.1 Java API to read an .nsf file. Every document in the .nsf file has multiple document history. While traversing through the documents in the .nsf file using the Lotus Notes Java API I am getting all the document versions as separate documents.
How do I ensure only the latest version of each document is retrieved by Lotus Notes? Is there a way to uniquely identify a document and all its version history as its children?
There is a built in feature for versioning documents in Notes Domino. Depending on hows it's configured in the database design (and assuming the database developer didn't roll their own) the versions will either be responses to an original parent, or the other way round, where new versions become the parent, with older versions being responses.
All this does however is to set up a response hierarchy in the database for you automatically when you edit the documents. How the rest of the database design interacts with this hierarchy is up to the developer.
What you probably want to do is create a view that only shows documents at the top of the response hierarchy. You can then traverse that view and know that the documents you get from it are the latest versions.
So if you have documents created with a form "Article" the view selection formula would be.
SELECT form*="Article" & !#IsAvailable($ref)
This selects all Article documents that are not responses. Now in code you can simply open the view and traverse it.
Once you have a handle on a document you can get its immediate child responses through
doc.getResponses()
This returns a DocumentCollection that you can recurse down finding responses to responses. You can't get a parent document directly. You first need to get its id with doc.getParentDocumentUNID() and then call db.getDocumentByUNID(). Of course you can combine that:
db.getDocumentByUNID(doc.getParentDocumentUNID())
In any case, you will have to look at what your database is actually doing, how it was originally designed and fit in with that.

Resources