com.ibm.di.connector.dominoUsers
Class DominoUtils

java.lang.Object
  extended by com.ibm.di.connector.dominoUsers.DominoUtils

public class DominoUtils
extends Object

Utility class


Field Summary
static String GROUP_SEARCH_FILTER
          Group search filter : "Form = \"Group\""
static String ITEM_NAME_FORM
          Item name : "Form"
static String ITEM_NAME_GROUP_MEMBERS
          Item name : "Members"
static String ITEM_NAME_GROUP_NAME
          Item name : "ListName"
static String ITEM_VALUE_PERSON
          Item value : "Person"
static String VIEW_NAME_DENY_GROUPS
          View name : "Server\\Deny Access Groups"
 
Constructor Summary
DominoUtils()
           
 
Method Summary
static String buildNotesFormulaElement(SearchCriteria.rscSearch criteria)
          Builds Notes formula element.
static SearchCriteria cloneSearchCriteria(SearchCriteria aSearch)
          Clones the search criteria.
static boolean denyGroupExist(lotus.domino.Database aDatabase, String aDenyGroupName)
          Checks if the provided group name is in the data base view with the denied groups.
static String getNotesFormula(SearchCriteria aSearch)
          Builds Notes formula.
static String getUserAbbreviatedName(lotus.domino.Session aSession, String aUserName)
          Retrieves user's abbreviated name.
static String getUserCanonicalName(lotus.domino.Session aSession, String aUserName)
          Retrieves the canonical name of the user.
static boolean groupExist(lotus.domino.Database aDatabase, String aGroupName)
          Checks if the provided group name exists in the database.
static boolean isDenyGroupMember(lotus.domino.Database aDatabase, String aUserName)
          Checks whether a user is in the deny groups view of the data base.
static boolean isDenyGroupMember(lotus.domino.Database aDatabase, String aUserName, 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 boolean isDenyGroupMember(lotus.domino.Document aDenyGroupDoc, String aUserName)
          Checks whether the provided name is in the denied list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VIEW_NAME_DENY_GROUPS

public static final String VIEW_NAME_DENY_GROUPS
View name : "Server\\Deny Access Groups"

See Also:
Constant Field Values

ITEM_NAME_GROUP_NAME

public static final String ITEM_NAME_GROUP_NAME
Item name : "ListName"

See Also:
Constant Field Values

ITEM_NAME_GROUP_MEMBERS

public static final String ITEM_NAME_GROUP_MEMBERS
Item name : "Members"

See Also:
Constant Field Values

ITEM_NAME_FORM

public static final String ITEM_NAME_FORM
Item name : "Form"

See Also:
Constant Field Values

ITEM_VALUE_PERSON

public static final String ITEM_VALUE_PERSON
Item value : "Person"

See Also:
Constant Field Values

GROUP_SEARCH_FILTER

public static final String GROUP_SEARCH_FILTER
Group search filter : "Form = \"Group\""

See Also:
Constant Field Values
Constructor Detail

DominoUtils

public DominoUtils()
Method Detail

groupExist

public static boolean groupExist(lotus.domino.Database aDatabase,
                                 String aGroupName)
                          throws lotus.domino.NotesException
Checks if the provided group name exists in the database.

Parameters:
aDatabase - date base to look into.
aGroupName - name of the group
Returns:
true if exists.
Throws:
lotus.domino.NotesException

denyGroupExist

public static boolean denyGroupExist(lotus.domino.Database aDatabase,
                                     String aDenyGroupName)
                              throws lotus.domino.NotesException
Checks if the provided group name is in the data base view with the denied groups.

Parameters:
aDatabase - database to look into
aDenyGroupName - group name to look for
Returns:
true if group is denied.
Throws:
lotus.domino.NotesException - if an error occurs.

isDenyGroupMember

public static boolean isDenyGroupMember(lotus.domino.Document aDenyGroupDoc,
                                        String aUserName)
                                 throws Exception
Checks whether the provided name is in the denied list.

Parameters:
aDenyGroupDoc - deny group Document to look into
aUserName - user name to check
Returns:
true if match found
Throws:
Exception - if an error occurs.

isDenyGroupMember

public static boolean isDenyGroupMember(lotus.domino.Database aDatabase,
                                        String aUserName)
                                 throws Exception
Checks whether a user is in the deny groups view of the data base.

Parameters:
aDatabase - data base to check
aUserName - user name to check
Returns:
true if match found
Throws:
Exception - if an error occurs.

isDenyGroupMember

public static boolean isDenyGroupMember(lotus.domino.Database aDatabase,
                                        String aUserName,
                                        String aDenyGroupName)
                                 throws Exception
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.

Parameters:
aDatabase - data base to search into
aUserName - user name to check
aDenyGroupName - name of the deny group
Returns:
true if the user is part of the deny group.
Throws:
Exception - if the provided group deny name is not in the database view or if some other error occurs.

getUserCanonicalName

public static String getUserCanonicalName(lotus.domino.Session aSession,
                                          String aUserName)
                                   throws lotus.domino.NotesException
Retrieves the canonical name of the user.

Parameters:
aSession - Session
aUserName - user name
Returns:
user's canonical name
Throws:
lotus.domino.NotesException - if an error occurs

getUserAbbreviatedName

public static String getUserAbbreviatedName(lotus.domino.Session aSession,
                                            String aUserName)
                                     throws lotus.domino.NotesException
Retrieves user's abbreviated name.

Parameters:
aSession - Session
aUserName - user name
Returns:
user's abbreviated name
Throws:
lotus.domino.NotesException

cloneSearchCriteria

public static SearchCriteria cloneSearchCriteria(SearchCriteria aSearch)
Clones the search criteria.

Parameters:
aSearch - SearchCriteria to copy
Returns:
exact copy of the provided SearchCriteria

getNotesFormula

public static String getNotesFormula(SearchCriteria aSearch)
Builds Notes formula.

Parameters:
aSearch - SearchCriteria instance
Returns:
Notes formula from the provided search criteria
See Also:
SearchCriteria.getNotesFilter()

buildNotesFormulaElement

public static String buildNotesFormulaElement(SearchCriteria.rscSearch criteria)
Builds Notes formula element.

Parameters:
criteria - search criteria
Returns:
the built element