Examples: IsDocumentLockingEnabled property
- This agent displays whether document locking is enabled for the
current database.
import lotus.domino.*;
public class JavaAgent extends AgentBase {
public void NotesMain() {
try {
Session session = getSession();
AgentContext agentContext = session.getAgentContext();
// (Your code goes here)
Database db = agentContext.getCurrentDatabase();
if (db.isDocumentLockingEnabled())
System.out.println("Document locking is enabled");
else
System.out.println("Document locking is not enabled");
} catch(Exception e) {
e.printStackTrace();
}
}
}
- This agent toggles document locking for the current database.
import lotus.domino.*;
public class JavaAgent extends AgentBase {
public void NotesMain() {
try {
Session session = getSession();
AgentContext agentContext = session.getAgentContext();
// (Your code goes here)
Database db = agentContext.getCurrentDatabase();
db.setDocumentLockingEnabled(!db.isDocumentLockingEnabled());
} catch(Exception e) {
e.printStackTrace();
}
}
}
Have feedback?
Google Analytics is used to store comments and ratings. To provide a comment or rating for a topic, click Accept All Cookies or Allow All in Cookie Preferences in the footer of this page.