Class UserDeletion

  • All Implemented Interfaces:
    IDominoAction

    public class UserDeletion
    extends java.lang.Object
    implements IDominoAction
    This class performs a user deletion from Domino.
    • Field Detail

      • ATTR_NAME_DELETE_MAIL_FILE

        public static final java.lang.String ATTR_NAME_DELETE_MAIL_FILE
        Attribute name : "DEL_DeleteMailFile"
        See Also:
        Constant Field Values
      • ATTR_NAME_DELETE_GROUP_NAME

        public static final java.lang.String ATTR_NAME_DELETE_GROUP_NAME
        Attribute name : "DEL_DeleteGroupName"
        See Also:
        Constant Field Values
      • DELETE_MAIL_FILE_DONT

        public static final int DELETE_MAIL_FILE_DONT
        Attribute value : 0
        See Also:
        Constant Field Values
      • DELETE_MAIL_FILE_DATABASE

        public static final int DELETE_MAIL_FILE_DATABASE
        Attribute value : 1
        See Also:
        Constant Field Values
      • DELETE_MAIL_FILE_REPLICAS

        public static final int DELETE_MAIL_FILE_REPLICAS
        Attribute value : 2
        See Also:
        Constant Field Values
    • Constructor Detail

      • UserDeletion

        public UserDeletion​(DominoUsersConnector aParent)
                     throws java.lang.Exception
        Class constructor
        Parameters:
        aParent - DominoUsersConnector that created this Domino Action object
        Throws:
        java.lang.Exception - if parent session is not valid
    • Method Detail

      • getDefaultDeleteMailFile

        public int getDefaultDeleteMailFile()
        Returns:
        default delete mail value.
      • setDefaultDeleteMailFile

        public void setDefaultDeleteMailFile​(int aDefaultDeleteMailFile)
                                      throws java.lang.Exception
        Sets default delete mail file value
        Parameters:
        aDefaultDeleteMailFile - value to set
        Throws:
        java.lang.Exception - if parameter is not supported.
      • getDefaultAddToGroup

        public java.lang.String getDefaultAddToGroup()
        Retrieves the
        Returns:
        default add to group value.
      • setDefaultAddToGroup

        public void setDefaultAddToGroup​(java.lang.String aDefaultAddToGroup)
                                  throws java.lang.Exception
        Sets default add to group value
        Parameters:
        aDefaultAddToGroup - value to set
        Throws:
        java.lang.Exception - if group value does not exist
      • getDeleteMailFile

        public java.lang.Integer getDeleteMailFile()
        Returns:
        delete mail file.
      • setDeleteMailFile

        public void setDeleteMailFile​(java.lang.Integer aDeleteMailFile)
        Sets delete mail value
        Parameters:
        aDeleteMailFile - value to set
      • getAddToGroup

        public java.lang.String getAddToGroup()
        Retrieves the name of the group the user is added to.
        Returns:
        add to group value.
      • setAddToGroup

        public void setAddToGroup​(java.lang.String aAddToGroup)
        Sets add to group value
        Parameters:
        aAddToGroup - value to set
      • getUserFullName

        public java.lang.String getUserFullName()
        Retrives user's full name.
        Returns:
        user's full name
      • setUserFullName

        public void setUserFullName​(java.lang.String aUserFullName)
        Sets user's full name.
        Parameters:
        aUserFullName - name to set.
      • getUserMailFile

        public java.lang.String getUserMailFile()
        Retrieves mail file.
        Returns:
        mail file.
      • setUserMailFile

        public void setUserMailFile​(java.lang.String aUserMailFile)
        Sets mail file
        Parameters:
        aUserMailFile - value to set
      • extractAndStoreData

        public Entry extractAndStoreData​(Entry aEntry)
                                  throws java.lang.Exception
        This method extracts and stores data. It performs the following actions:

        (1) Extract data from the given Entry according to the fixed schema of Attributes;

        (2) Stores this data into local data holders;

        Specified by:
        extractAndStoreData in interface IDominoAction
        Parameters:
        aEntry - The Entry object to extract data from.
        Returns:
        an Entry object that contains all Attributes of the aEntry parameter except those from the fixed schema.
        Throws:
        java.lang.Exception - if an error that cannot be handled occurs while operating.
      • mustPerform

        public boolean mustPerform​(Entry aEntry)
                            throws java.lang.Exception
        Inspects the Attributes of the given Entry and determines if the Domino Action has to be performed.
        Specified by:
        mustPerform in interface IDominoAction
        Parameters:
        aEntry - The Entry object which Attributes hold the necessary information whether to perform the Domino Action.
        Returns:
        "true" if the Domino Action must be performed; "false" otherwise.
        Throws:
        java.lang.Exception - if an error that cannot be handled occurs while operating.
      • canPerform

        public java.lang.String canPerform()
        Inspects the data stored in the local data holders and determines if it is consistent and the Domino Action can be performed.
        Specified by:
        canPerform in interface IDominoAction
        Returns:
        "null" if the Domino Action can be performed with the current data;

        and a non-empty string message explaining the problem, if the data is not consistent and the Action cannot be performed.

      • perform

        public void perform()
                     throws java.lang.Exception
        Performs the Domino Action useing the data from the local data holders.
        Specified by:
        perform in interface IDominoAction
        Throws:
        java.lang.Exception - if an error that cannot be handled occurs while operating.
      • resetData

        public void resetData()
                       throws java.lang.Exception
        Resets the local data holders to empty/default values according the business logic of the Domino Action.
        Specified by:
        resetData in interface IDominoAction
        Throws:
        java.lang.Exception - if an error that cannot be handled occurs while operating.
      • getDeleteMailFileActionValue

        public java.lang.String getDeleteMailFileActionValue()
        Retrives the value of the delete mail action.
        Returns:
        value of the delete mail file action.
      • getAddToGroupActionValue

        public java.lang.String getAddToGroupActionValue()
        Retrieves the name of the group the user is added to , if value is not found the name of the default group is returned.
        Returns:
        add to group action value