Package com.ibm.di.connector.dominoUsers
Class DominoUtils
- java.lang.Object
-
- com.ibm.di.connector.dominoUsers.DominoUtils
-
public class DominoUtils extends java.lang.ObjectUtility class
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringGROUP_SEARCH_FILTERGroup search filter : "Form = \"Group\""static java.lang.StringITEM_NAME_FORMItem name : "Form"static java.lang.StringITEM_NAME_GROUP_MEMBERSItem name : "Members"static java.lang.StringITEM_NAME_GROUP_NAMEItem name : "ListName"static java.lang.StringITEM_VALUE_PERSONItem value : "Person"static java.lang.StringVIEW_NAME_DENY_GROUPSView name : "Server\\Deny Access Groups"static java.lang.StringVIEW_NAME_DENY_GROUPS_2New name for deny list view
-
Constructor Summary
Constructors Constructor Description DominoUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringbuildNotesFormulaElement(SearchCriteria.rscSearch criteria)Builds Notes formula element.static SearchCriteriacloneSearchCriteria(SearchCriteria aSearch)Clones the search criteria.static booleandenyGroupExist(lotus.domino.Database aDatabase, java.lang.String aDenyGroupName, java.lang.String denyGroupViewName)Checks if the provided group name is in the data base view with the denied groups.static java.lang.StringgetDenyGroupViewName(lotus.domino.Database database)Try to guess the name of the view that contains the deny groupsstatic java.lang.StringgetNotesFormula(SearchCriteria aSearch)Builds Notes formula.static java.lang.StringgetUserAbbreviatedName(lotus.domino.Session aSession, java.lang.String aUserName)Retrieves user's abbreviated name.static java.lang.StringgetUserCanonicalName(lotus.domino.Session aSession, java.lang.String aUserName)Retrieves the canonical name of the user.static booleangroupExist(lotus.domino.Database aDatabase, java.lang.String aGroupName)Checks if the provided group name exists in the database.static booleanisDenyGroupMember(lotus.domino.Database aDatabase, java.lang.String aUserName)Checks whether a user is in the deny groups view of the data base.static booleanisDenyGroupMember(lotus.domino.Database aDatabase, java.lang.String aUserName, java.lang.String aDenyGroupName)Performs verification if the the group is part of the deny groups of the data base and if so is the user part of this group.static booleanisDenyGroupMember(lotus.domino.Document aDenyGroupDoc, java.lang.String aUserName)Checks whether the provided name is in the denied list.
-
-
-
Field Detail
-
VIEW_NAME_DENY_GROUPS
public static final java.lang.String VIEW_NAME_DENY_GROUPS
View name : "Server\\Deny Access Groups"- See Also:
- Constant Field Values
-
VIEW_NAME_DENY_GROUPS_2
public static final java.lang.String VIEW_NAME_DENY_GROUPS_2
New name for deny list view- See Also:
- Constant Field Values
-
ITEM_NAME_GROUP_NAME
public static final java.lang.String ITEM_NAME_GROUP_NAME
Item name : "ListName"- See Also:
- Constant Field Values
-
ITEM_NAME_GROUP_MEMBERS
public static final java.lang.String ITEM_NAME_GROUP_MEMBERS
Item name : "Members"- See Also:
- Constant Field Values
-
ITEM_NAME_FORM
public static final java.lang.String ITEM_NAME_FORM
Item name : "Form"- See Also:
- Constant Field Values
-
ITEM_VALUE_PERSON
public static final java.lang.String ITEM_VALUE_PERSON
Item value : "Person"- See Also:
- Constant Field Values
-
GROUP_SEARCH_FILTER
public static final java.lang.String GROUP_SEARCH_FILTER
Group search filter : "Form = \"Group\""- See Also:
- Constant Field Values
-
-
Method Detail
-
groupExist
public static boolean groupExist(lotus.domino.Database aDatabase, java.lang.String aGroupName) throws lotus.domino.NotesExceptionChecks if the provided group name exists in the database.- Parameters:
aDatabase- date base to look into.aGroupName- name of the group- Returns:
trueif exists.- Throws:
lotus.domino.NotesException
-
denyGroupExist
public static boolean denyGroupExist(lotus.domino.Database aDatabase, java.lang.String aDenyGroupName, java.lang.String denyGroupViewName) throws lotus.domino.NotesExceptionChecks if the provided group name is in the data base view with the denied groups.- Parameters:
aDatabase- database to look intoaDenyGroupName- group name to look fordenyGroupViewName- name of view containing deny groups- Returns:
- true if group is denied.
- Throws:
lotus.domino.NotesException- if an error occurs.
-
isDenyGroupMember
public static boolean isDenyGroupMember(lotus.domino.Document aDenyGroupDoc, java.lang.String aUserName) throws java.lang.ExceptionChecks whether the provided name is in the denied list.- Parameters:
aDenyGroupDoc- deny groupDocumentto look intoaUserName- user name to check- Returns:
trueif match found- Throws:
java.lang.Exception- if an error occurs.
-
isDenyGroupMember
public static boolean isDenyGroupMember(lotus.domino.Database aDatabase, java.lang.String aUserName) throws java.lang.ExceptionChecks whether a user is in the deny groups view of the data base.- Parameters:
aDatabase- data base to checkaUserName- user name to check- Returns:
trueif match found- Throws:
java.lang.Exception- if an error occurs.
-
isDenyGroupMember
public static boolean isDenyGroupMember(lotus.domino.Database aDatabase, java.lang.String aUserName, java.lang.String aDenyGroupName) throws java.lang.ExceptionPerforms verification if the the group is part of the deny groups of the data base and if so is the user part of this group.- Parameters:
aDatabase- data base to search intoaUserName- user name to checkaDenyGroupName- name of the deny group- Returns:
trueif the user is part of the deny group.- Throws:
java.lang.Exception- if the provided group deny name is not in the database view or if some other error occurs.
-
getUserCanonicalName
public static java.lang.String getUserCanonicalName(lotus.domino.Session aSession, java.lang.String aUserName) throws lotus.domino.NotesExceptionRetrieves the canonical name of the user.- Parameters:
aSession-SessionaUserName- user name- Returns:
- user's canonical name
- Throws:
lotus.domino.NotesException- if an error occurs
-
getUserAbbreviatedName
public static java.lang.String getUserAbbreviatedName(lotus.domino.Session aSession, java.lang.String aUserName) throws lotus.domino.NotesExceptionRetrieves user's abbreviated name.- Parameters:
aSession-SessionaUserName- user name- Returns:
- user's abbreviated name
- Throws:
lotus.domino.NotesException
-
cloneSearchCriteria
public static SearchCriteria cloneSearchCriteria(SearchCriteria aSearch)
Clones the search criteria.- Parameters:
aSearch-SearchCriteriato copy- Returns:
- exact copy of the provided SearchCriteria
-
getNotesFormula
public static java.lang.String getNotesFormula(SearchCriteria aSearch)
Builds Notes formula.- Parameters:
aSearch-SearchCriteriainstance- Returns:
- Notes formula from the provided search criteria
- See Also:
SearchCriteria.getNotesFilter()
-
buildNotesFormulaElement
public static java.lang.String buildNotesFormulaElement(SearchCriteria.rscSearch criteria)
Builds Notes formula element.- Parameters:
criteria- search criteria- Returns:
- the built element
-
getDenyGroupViewName
public static java.lang.String getDenyGroupViewName(lotus.domino.Database database) throws lotus.domino.NotesExceptionTry to guess the name of the view that contains the deny groups- Parameters:
database-- Returns:
- Throws:
lotus.domino.NotesException
-
-