public static interface Agent.AgentRunContext
Modifier and Type | Method and Description |
---|---|
Optional<Document> |
getDocumentContext()
Returns the Document for Session.DocumentContext as a
Document |
Optional<Writer> |
getOutputWriter()
Returns the output writer used for Print statements during agent execution
|
int |
getParamDocId()
Returns the note id for Session.ParameterDocId
|
int |
getTimeoutSeconds()
Returns the agent timeout
|
String |
getUsername()
Returns the Notes username e.g.
|
boolean |
isCheckSecurity()
Returns whether security should be checked
|
boolean |
isReopenDbAsSigner()
Returns whether the DB should be reopened as agent signer
|
Agent.AgentRunContext |
setCheckSecurity(boolean checkSecurity)
Use this method to set the AGENT_SECURITY_ON flag:
AGENT_SECURITY_ON: Use this flag to tell the run context that when it runs an agent, you want it to check the privileges of the signer of that agent and apply them. |
Agent.AgentRunContext |
setDocumentContext(Document doc)
|
Agent.AgentRunContext |
setOutputWriter(Writer writer)
If this method is used to set an output writer, we will collect the agent
output produced during execution (e.g.
|
Agent.AgentRunContext |
setParamDocId(int paramDocId)
Sets the note id for Session.ParameterDocId
|
Agent.AgentRunContext |
setReopenDbAsSigner(boolean reopenAsSigner)
Use this method to set the AGENT_REOPEN_DB flag:
AGENT_REOPEN_DB: If AGENT_REOPEN_DB is set, the AgentRun call will reopen the agent's database with the privileges of the signer of the agent. |
Agent.AgentRunContext |
setTimeoutSeconds(int timeoutSeconds)
Sets an execution timeout in seconds
|
Agent.AgentRunContext |
setUsername(String sessionEffectiveName)
Sets the Notes username e.g.
|
boolean isCheckSecurity()
Agent.AgentRunContext setCheckSecurity(boolean checkSecurity)
checkSecurity
- true to check security, true by defaultboolean isReopenDbAsSigner()
Agent.AgentRunContext setReopenDbAsSigner(boolean reopenAsSigner)
reopenAsSigner
- true to reopen database, false by defaultOptional<Writer> getOutputWriter()
Agent.AgentRunContext setOutputWriter(Writer writer)
writer
- output writer, null by defaultint getTimeoutSeconds()
Agent.AgentRunContext setTimeoutSeconds(int timeoutSeconds)
timeoutSeconds
- timeout in seconds, 0 by defaultOptional<Document> getDocumentContext()
Document
Agent.AgentRunContext setDocumentContext(Document doc)
doc
- document context, can be in-memory only (not
saved yet)int getParamDocId()
Agent.AgentRunContext setParamDocId(int paramDocId)
paramDocId
- note id, 0 by defaultString getUsername()
Agent.AgentRunContext setUsername(String sessionEffectiveName)
sessionEffectiveName
- either in canonical or abbreviated format, null
by default, which means Session.EffectiveUserName
will be the agent signerCopyright © 2019–2021 HCL. All rights reserved.