|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ibm.xsp.model.domino.DominoUtils
public class DominoUtils
DominoUtils is a library of helper methods for working with Domino Databases, Sessons, and Documents, etc.
Nested Class Summary | |
---|---|
static class |
DominoUtils.HtmlConverterWrapper
Simple wrapper for HtmlConverter. |
Field Summary | |
---|---|
static int |
DB_SLOT
|
static short |
FIND_ACCENT_INSENSITIVE
|
static short |
FIND_CASE_INSENSITIVE
|
static short |
FIND_COMPARE_MASK
|
static short |
FIND_EQUAL
|
static short |
FIND_FIRST_EQUAL
|
static short |
FIND_GREATER_THAN
|
static short |
FIND_LAST_EQUAL
|
static short |
FIND_LESS_THAN
|
static short |
FIND_NONCATEGORY_ONLY
|
static short |
FIND_PARTIAL
|
static short |
FIND_RANGE_OVERLAP
|
static short |
FIND_RETURN_ANY_NON_CATEGORY_MATCH
|
static short |
FIND_RETURN_DWORD
|
static short |
FIND_UPDATE_IF_NOT_FOUND
|
static java.lang.String |
SERVER_DB_DELIMITER
Domino Server Database delimiter is !! |
static int |
SERVER_SLOT
|
Constructor Summary | |
---|---|
DominoUtils()
|
Method Summary | |
---|---|
static boolean |
computeWithForm(lotus.domino.Document doc,
boolean doDataTypes,
boolean raiseError)
ComputeWithForm |
static boolean |
computeWithFormEx(lotus.domino.Document doc,
lotus.domino.Form form,
boolean doDataTypes,
boolean raiseError)
ComputeWithFormEx |
static lotus.domino.ViewColumn |
findColumnPosition(java.util.Vector<lotus.domino.ViewColumn> viewColumns,
java.lang.String name)
Helper method that gets a column by name |
static lotus.domino.Database |
getCurrentDatabase()
Return the lotus.domino.Database object |
static lotus.domino.Database |
getCurrentDatabase(javax.faces.context.FacesContext context)
Return the current database from the Request Map |
static lotus.domino.Session |
getCurrentSession()
Return the lotus.domino.Session object |
static lotus.domino.Session |
getCurrentSession(javax.faces.context.FacesContext context)
Return the current session from the Request Map |
static java.lang.String |
getDbNameByReplicaID(java.lang.String serverName,
java.lang.String repId)
Retunr the Database Name for the specified Replica Id |
static java.lang.String[] |
getDbNameParts(java.lang.String dbString)
Return database name parts that may include server prefix e.g. |
static SessionCloner |
getDesignerSessionCloner(boolean fullAdminAccess)
Create a session cloner for the designer user. |
static lotus.domino.Document |
getDocumentById(lotus.domino.Database db,
java.lang.String id)
Loads a document by id. |
static lotus.domino.Document |
getDocumentById(lotus.domino.Database db,
java.lang.String id,
boolean allowDeletedDocuments)
Loads a document by id, optionally allowing soft deleted document to be opened. |
static int |
getEnvironmentInt(java.lang.String varName)
Read a environment variable (notes.ini) as an integer. |
static long |
getEnvironmentLong(java.lang.String varName)
Read a environment variable (notes.ini) as a long integer. |
static java.lang.String |
getEnvironmentString(java.lang.String varName)
Read a environment variable (notes.ini) as a String. |
static java.lang.String |
getFilePath(lotus.domino.Database db)
Return the relative Database File Path for the specified Database |
static SessionCloner |
getSessionCloner()
Create a session cloner for the current user. |
static lotus.domino.ViewEntry |
getViewEntryByKeyWithOptions(lotus.domino.View view,
java.lang.Object startKeys,
int options)
Find a view entry using a key. |
static java.lang.String |
getXPagesForDocument(lotus.domino.Document doc)
Gets the Xpage associated with a document. |
static java.lang.String |
handleProxyPrefix(java.lang.String globalURL)
|
static boolean |
hasReplicaID(java.lang.String replicaID)
Check if database part of specified Replica id is valid Replica id |
static boolean |
isCategoryId(java.lang.String id)
Check if the doc id is actually for a view category row. |
static boolean |
isCurrentDatabase(lotus.domino.Database db)
Check if the database is the current database. |
static boolean |
isDBSegment(java.lang.String seg)
Return true if potential valid database name is part of input |
static boolean |
isKeysEmpty(java.lang.Object keys)
Return true if keys is null, or is empty string,
everything else is false |
static boolean |
isReplicaID(java.lang.String replicaID)
Check if this string is a valid form of a replica id ? This will be a 16 byte hexadecimal number in string form |
static boolean |
isUNID(java.lang.String id)
Check if the id is an UNID or the basic Note ID. |
static java.lang.String |
normalizeReplicaID(java.lang.String replicaID)
Normalise replica id to form with out separating ':' and uppercase all |
static lotus.domino.Database |
openDatabase()
Open the current database |
static lotus.domino.Database |
openDatabaseByName(lotus.domino.Session session,
java.lang.String dbName)
Open the database in the session |
static lotus.domino.Database |
openDatabaseByName(java.lang.String dbName)
Open the specified database, can also be a Replica Id |
static lotus.domino.Database |
openDatabaseByReplicaID(lotus.domino.Session session,
java.lang.String dbString)
Open database in the specified session |
static lotus.domino.Database |
openDatabaseByReplicaID(java.lang.String dbString)
Open database in the current session |
static lotus.domino.Session |
openSession()
Get the current session |
static java.lang.String |
prefixServerToDatabaseName(java.lang.String dbName)
SPR#JQUL8AGFQ5 Prefix Server Name for remote apps (Notes Client only) Helper method for XPages in Notes Client. |
static void |
recycle(java.util.Vector<?> v)
Recycling a Vector of Domino objects |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String SERVER_DB_DELIMITER
!!
public static final int SERVER_SLOT
public static final int DB_SLOT
public static final short FIND_PARTIAL
public static final short FIND_CASE_INSENSITIVE
public static final short FIND_RETURN_DWORD
public static final short FIND_ACCENT_INSENSITIVE
public static final short FIND_UPDATE_IF_NOT_FOUND
public static final short FIND_LESS_THAN
public static final short FIND_FIRST_EQUAL
public static final short FIND_LAST_EQUAL
public static final short FIND_GREATER_THAN
public static final short FIND_EQUAL
public static final short FIND_COMPARE_MASK
public static final short FIND_RANGE_OVERLAP
public static final short FIND_RETURN_ANY_NON_CATEGORY_MATCH
public static final short FIND_NONCATEGORY_ONLY
Constructor Detail |
---|
public DominoUtils()
Method Detail |
---|
public static lotus.domino.Session getCurrentSession()
public static lotus.domino.Database getCurrentDatabase()
public static boolean isCurrentDatabase(lotus.domino.Database db)
public static lotus.domino.Session getCurrentSession(javax.faces.context.FacesContext context)
context
-
public static lotus.domino.Database getCurrentDatabase(javax.faces.context.FacesContext context)
context
-
public static java.lang.String prefixServerToDatabaseName(java.lang.String dbName)
dbName
-
public static lotus.domino.Database openDatabase() throws lotus.domino.NotesException
FacesContext
-
lotus.domino.NotesException
public static lotus.domino.Database openDatabaseByName(java.lang.String dbName) throws lotus.domino.NotesException
FacesContext
- dbName
-
lotus.domino.NotesException
public static lotus.domino.Database openDatabaseByName(lotus.domino.Session session, java.lang.String dbName) throws lotus.domino.NotesException
session
- dbName
-
lotus.domino.NotesException
public static lotus.domino.Session openSession()
context
-
ResourcesPoolException
public static lotus.domino.Database openDatabaseByReplicaID(java.lang.String dbString) throws lotus.domino.NotesException
dbString
- containing a replica id
lotus.domino.NotesException
public static lotus.domino.Database openDatabaseByReplicaID(lotus.domino.Session session, java.lang.String dbString) throws lotus.domino.NotesException
session
- dbString
-
lotus.domino.NotesException
public static boolean isReplicaID(java.lang.String replicaID)
public static boolean hasReplicaID(java.lang.String replicaID)
replicaID
-
public static java.lang.String normalizeReplicaID(java.lang.String replicaID)
replicaID
-
public static java.lang.String[] getDbNameParts(java.lang.String dbString)
dbString
- -- may include server prefix e.g. "server!!db.nsf"
public static boolean isUNID(java.lang.String id)
public static boolean isCategoryId(java.lang.String id)
public static lotus.domino.Document getDocumentById(lotus.domino.Database db, java.lang.String id) throws lotus.domino.NotesException
lotus.domino.NotesException
public static lotus.domino.Document getDocumentById(lotus.domino.Database db, java.lang.String id, boolean allowDeletedDocuments) throws lotus.domino.NotesException
lotus.domino.NotesException
public static boolean computeWithForm(lotus.domino.Document doc, boolean doDataTypes, boolean raiseError) throws lotus.domino.NotesException
lotus.domino.NotesException
public static boolean computeWithFormEx(lotus.domino.Document doc, lotus.domino.Form form, boolean doDataTypes, boolean raiseError) throws lotus.domino.NotesException
lotus.domino.NotesException
public static java.lang.String getXPagesForDocument(lotus.domino.Document doc) throws lotus.domino.NotesException
lotus.domino.NotesException
public static lotus.domino.ViewColumn findColumnPosition(java.util.Vector<lotus.domino.ViewColumn> viewColumns, java.lang.String name) throws lotus.domino.NotesException
viewColumns
- name
-
lotus.domino.NotesException
public static boolean isDBSegment(java.lang.String seg)
true
if potential valid database name is part of input
seg
-
public static java.lang.String getFilePath(lotus.domino.Database db) throws lotus.domino.NotesException
db
- Database
lotus.domino.NotesException
public static java.lang.String getDbNameByReplicaID(java.lang.String serverName, java.lang.String repId)
serverName
- serverrepId
- replica id
public static void recycle(java.util.Vector<?> v) throws lotus.domino.NotesException
lotus.domino.NotesException
public static lotus.domino.ViewEntry getViewEntryByKeyWithOptions(lotus.domino.View view, java.lang.Object startKeys, int options) throws lotus.domino.NotesException
lotus.domino.NotesException
public static boolean isKeysEmpty(java.lang.Object keys)
true
if keys is null, or is empty string,
everything else is false
keys
-
public static java.lang.String getEnvironmentString(java.lang.String varName)
varName
- the name of the variable to read
public static int getEnvironmentInt(java.lang.String varName)
varName
- the name of the variable to read
public static long getEnvironmentLong(java.lang.String varName)
varName
- the name of the variable to read
public static java.lang.String handleProxyPrefix(java.lang.String globalURL)
public static SessionCloner getSessionCloner()
public static SessionCloner getDesignerSessionCloner(boolean fullAdminAccess)
fullAdminAccess
- if full admin access is requested.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |