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();
}
}
}
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();
}
}
}