public class NSFSession extends NSFBase
Constructor and Description |
---|
NSFSession(DominoAPI api)
Creates a new native session object.
|
NSFSession(DominoAPI api,
String effectiveUserName,
boolean internetSession,
boolean fullAccess)
Creates a new named session object.
|
Modifier and Type | Method and Description |
---|---|
NSFFormula |
compileFormula(String formula) |
NSFNoteIDCollection |
createNoteIDCollection() |
protected void |
doFree()
This method is called when the final reference to this object is freed.
|
Object[] |
evaluate(String formula) |
Object[] |
evaluate(String formula,
NSFNote context) |
static NSFSession |
fromLotus(DominoAPI api,
lotus.domino.Session lotusSession,
boolean internetSession,
boolean fullAccess)
Creates an
NSFSession based on the provided lotus.domino.Session , including its
effective user name. |
String[] |
getChangedDBPaths(String serverName,
NSFDateTime since) |
NSFDatabase |
getDatabase(String apiPath) |
NSFDatabase |
getDatabase(String serverName,
String filePath) |
NSFDatabase |
getDatabaseByHandle(long hDb,
String serverName)
Returns an
NSFDatabase object for the given open handle. |
String |
getDataDirectory() |
String |
getEffectiveUserName() |
String |
getEnvironmentVariable(String varName) |
int |
getEnvironmentVariableInt(String varName) |
long |
getEnvironmentVariableLong(String varName) |
long |
getNamesListHandle() |
protected NSFBase |
getParent() |
String |
getProgramDirectory() |
Collection<String> |
getServerList(String portName)
Retrieves a list of known servers on the given port.
|
File |
getTempDir()
Returns any specified temporary directroty that will be used for applicable operations, or
null if those operations will use the system default. |
NSFUserID |
getUserId(String userName,
String password,
String server)
Attempts to extract the specified user's ID from the ID vault, using the provided password and server.
|
String |
getUserName() |
String[] |
getUserNamesList() |
String[] |
getUserNamesList(String userName) |
boolean |
isRefValid()
Checks whether the object's inner reference is valid.
|
<T extends NSFBase> |
removeChild(T child)
Removed an
NSFBase object as a "child" of the current object, to be
no longer freed when this object is freed. |
void |
setTempDir(File tempDir)
Sets the temporary directory to use for applicable operations.
|
_checkRefValidity, addChild, addChildStruct, debugPrintChildHierarchy, finalize, free, free, free, getAPI, getChildObjectCount, getChildObjectCount, getChildStructCount, isFreed, isTraceCreation, removeChildStruct, removeFromParent, retain, setNeedsFree, setTraceCreation, toString
public NSFSession(DominoAPI api)
api
- the DominoAPI
instance to use for API callspublic NSFSession(DominoAPI api, String effectiveUserName, boolean internetSession, boolean fullAccess) throws DominoException
api
- the DominoAPI
instance to use for API callseffectiveUserName
- the effective user name to use for the session, if different from the local Notes IDinternetSession
- whether the session should comply with "Maximum Internet name and password" rulesfullAccess
- whether the session should be marked as allowing full accessDominoException
- if there is a lower-level API problem constructing the named sessionpublic static NSFSession fromLotus(DominoAPI api, lotus.domino.Session lotusSession, boolean internetSession, boolean fullAccess) throws lotus.domino.NotesException, DominoException
NSFSession
based on the provided lotus.domino.Session
, including its
effective user name.api
- the DominoAPI
instance to use for API callslotusSession
- the lotus.domino.Session
to base the session oninternetSession
- whether the session should comply with "Maximum Internet name and password" rulesfullAccess
- whether the session should be marked as allowing full accesslotus.domino.NotesException
DominoException
public NSFDatabase getDatabase(String apiPath) throws DominoException
DominoException
public NSFDatabase getDatabase(String serverName, String filePath) throws DominoException
DominoException
public NSFDatabase getDatabaseByHandle(long hDb, String serverName) throws DominoException
NSFDatabase
object for the given open handle. This method uses an internal pool to keep
track of objects created in this way, and so will return the same object for the same handle.
Objects created this way will be freed and have their handles closed when the session is freed.
DominoException
public Object[] evaluate(String formula) throws DominoException, FormulaException
DominoException
FormulaException
public Object[] evaluate(String formula, NSFNote context) throws DominoException, FormulaException
DominoException
FormulaException
public NSFFormula compileFormula(String formula) throws DominoException, FormulaException
DominoException
FormulaException
public NSFNoteIDCollection createNoteIDCollection() throws DominoException
DominoException
public String getUserName() throws DominoException
DominoException
public String getEffectiveUserName() throws DominoException
DominoException
public long getNamesListHandle()
public String[] getUserNamesList() throws DominoException
DominoException
public String[] getUserNamesList(String userName) throws DominoException
DominoException
public NSFUserID getUserId(String userName, String password, String server) throws DominoException
If successful, this returns a memory handle to the ID.
userName
- the user name of the IDpassword
- the password for the IDserver
- the server containing the vaultDominoException
- if there is a lower-level-API problem extracting the IDpublic String[] getChangedDBPaths(String serverName, NSFDateTime since) throws DominoException
serverName
- the server to querysince
- the start of the queryDominoException
- if there is a lower-level-API problem searching for databasespublic String getDataDirectory() throws DominoException
DominoException
- if there is a lower-level-API problem retrieving the directorypublic String getProgramDirectory() throws DominoException
DominoException
- if there is a lower-level-API problem retrieving the directorypublic int getEnvironmentVariableInt(String varName) throws DominoException
varName
- the environment variable to look upDominoException
- if there is a lower-level-API problem retrieving the valuepublic long getEnvironmentVariableLong(String varName) throws DominoException
varName
- the environment variable to look upDominoException
- if there is a lower-level-API problem retrieving the valuepublic String getEnvironmentVariable(String varName) throws DominoException
varName
- the environment variable to look upDominoException
- if there is a lower-level-API problem retrieving the valuepublic Collection<String> getServerList(String portName) throws DominoException
portName
- the network port to search, or null
for all portsCollection
of known server namesDominoException
- if there is a lower-level-API problem retrieving the listpublic void setTempDir(File tempDir)
null
to use the system temporary directory (default).tempDir
- the temporary directory to usepublic File getTempDir()
null
if those operations will use the system default.protected void doFree()
NSFBase
Implemented classes are expected to release any memory or network resources they have open. They are also expected to write this defensively, allowing the method to be called multiple times on the same object without problem.
public boolean isRefValid()
NSFBase
isRefValid
in class NSFBase
public <T extends NSFBase> T removeChild(T child)
NSFBase
NSFBase
object as a "child" of the current object, to be
no longer freed when this object is freed.
Note: this is intended for internal use primarily and should only be used very rarely externally.
removeChild
in class NSFBase
child
- the NSFBase
object to remove from the child listCopyright © 2014–2018. All rights reserved.