I've been making a tool to create dummy documents on Lotus Notes using the Java API.
So far I've been successful creating the documents using the NotesFactory create session method
NotesFactory.createSession(serverUrl, username, password);
And later creating the document using the Database class createDocument() method.
However, regardless of the user I put when I'm creating the session, the created document always has "Administrator" as the document originator.
Is there any way to override this behavior?
EDIT 8/24/2016:
Here is the code I'm using to create documents
Session session = NotesFactory.createSession(serverUrl, username, password);
Database db = session.getDatabase(session.getServerName(), "docLibra.nsf");
Document doc = db.createDocument();
// Set document properties
doc.replaceItemValue("Subject", "Sample Subject");
RichTextItem bodyItem = doc.createRichTextItem("Body");
bodyItem.appendText("Sample content");
doc.save();
doc.recycle();
db.recycle();
session.recycle();
I created several users (i.e. user1, user2) and I'm able to get a Session with the credentials of those, but when the document is saved. The originator is set as Administrator, even tough the Administrator credentials are nowhere on the code and the code is executed on an external computer.