Class DominoConnector

    • Field Detail

      • selection

        protected java.lang.String selection
        Used by subclasses.
    • Constructor Detail

      • DominoConnector

        public DominoConnector()
        Constructor for the DominoConnector object
    • Method Detail

      • getDominoSession

        public lotus.domino.Session getDominoSession()
        Gets the dominoSession attribute of the DominoConnector object
        Returns:
        The dominoSession value
      • getDominoDatabase

        public lotus.domino.Database getDominoDatabase​(java.lang.String database)
                                                throws java.lang.Exception
        Gets the dominoDatabase attribute of the DominoConnector object
        Parameters:
        database - the name of the Domino database file (usually a file with a .nsf filename extension)
        Returns:
        The dominoDatabase value
        Throws:
        java.lang.Exception - An exception is thrown if this method fails.
      • getDominoView

        public lotus.domino.View getDominoView​(java.lang.String view)
                                        throws java.lang.Exception
        Gets the dominoView attribute of the DominoConnector object
        Parameters:
        view - the name of the Domino view
        Returns:
        The dominoView value
        Throws:
        java.lang.Exception - An exception is thrown if this method fails.
      • getVersion

        public java.lang.String getVersion()
        Return version information
        Specified by:
        getVersion in interface VersionInfoInterface
        Returns:
        The version value
      • terminate

        public void terminate()
        Terminate the connector. This function closes all connection and releases all resources used by the connector. This function also calls the parser's closeParser() method if a parser is active.
        Specified by:
        terminate in interface ConnectorInterface
        Overrides:
        terminate in class Connector
      • initialize

        public void initialize​(java.lang.Object o)
                        throws java.lang.Exception
        This method initializes the Connector.
        Specified by:
        initialize in interface ConnectorInterface
        Overrides:
        initialize in class Connector
        Parameters:
        o - this parameter is ignored
        Throws:
        java.lang.Exception - An exception is thrown if this method fails.
      • inner_initialize

        protected void inner_initialize​(java.lang.Object o)
                                 throws java.lang.Exception
        Initializes the internal worker thread and the connector configuration.
        Parameters:
        o - ignored.
        Throws:
        java.lang.Exception - if an error occurs.
      • getNotesDoc

        public lotus.domino.Document getNotesDoc()
      • selectEntries

        public void selectEntries()
                           throws java.lang.Exception
        This method is used in Iterator mode. This method retrieves the entries which will be iterated upon by the getNextEntry method.
        Specified by:
        selectEntries in interface ConnectorInterface
        Overrides:
        selectEntries in class Connector
        Throws:
        java.lang.Exception - An exception is thrown if this method fails.
      • buildEntry

        public Entry buildEntry​(lotus.domino.Document doc)
                         throws java.lang.Exception
        This method is invoked by the getNextEntry method. This method is used to create and populate the entry object to be returned to the AssemblyLine.
        Parameters:
        doc - the Domino Document object which provides the data for the entry being populated
        Returns:
        the populated TDI entry object
        Throws:
        java.lang.Exception - An exception is thrown if this method fails.
      • isConvertable

        public boolean isConvertable​(int type)
        This method is used internally.
        Parameters:
        type - the type id.
        Returns:
        true if the Domino type specified by the provided id can be converted, false otherwise.
      • putEntry

        public void putEntry​(Entry entry)
                      throws java.lang.Exception
        This method is used in AddOnly mode. This method writes data to the Domino database.
        Specified by:
        putEntry in interface ConnectorInterface
        Overrides:
        putEntry in class Connector
        Parameters:
        entry - the entry to be written to the Domino database
        Throws:
        java.lang.Exception - An exception is thrown if this method fails.
      • modEntry

        public void modEntry​(Entry entry,
                             SearchCriteria search)
                      throws java.lang.Exception
        This method is used in Update mode. This method makes changes to an existing document in the Domino database.
        Specified by:
        modEntry in interface ConnectorInterface
        Overrides:
        modEntry in class Connector
        Parameters:
        entry - the entry which stores the new data with which existing data will be replaced
        search - the search criteria with which the existing database document to be changed will be located
        Throws:
        java.lang.Exception - An exception is thrown if this method fails.
      • modEntry

        public void modEntry​(Entry entry,
                             SearchCriteria search,
                             Entry old)
                      throws java.lang.Exception
        This method is used in Update mode. This method makes changes to an existing document in the Domino database.
        Specified by:
        modEntry in interface ConnectorInterface
        Overrides:
        modEntry in class Connector
        Parameters:
        entry - the entry which stores the new data with which existing data will be replaced
        search - the search criteria with which the existing database document to be changed will be located
        old - used for the implementation of updating documents - it has no meaning for the user of the Connector
        Throws:
        java.lang.Exception - An exception is thrown if this method fails.
      • deleteEntry

        public void deleteEntry​(Entry entry,
                                SearchCriteria search)
                         throws java.lang.Exception
        This method is used in Delete mode. This methods deletes entries from the Domino database.
        Specified by:
        deleteEntry in interface ConnectorInterface
        Overrides:
        deleteEntry in class Connector
        Parameters:
        entry - used for implementation internals only
        search - the search criteria with which the existing database document to be deleted will be located
        Throws:
        java.lang.Exception - An exception is thrown if this method fails.
      • findEntry

        public Entry findEntry​(SearchCriteria search)
                        throws java.lang.Exception
        This method is used in Lookup, Update and Delete modes. This methods locates an entry by the given search criteria.
        Specified by:
        findEntry in interface ConnectorInterface
        Overrides:
        findEntry in class Connector
        Parameters:
        search - the search criteria with which the database document will be located
        Returns:
        the located entry object
        Throws:
        java.lang.Exception - if this method fails.
      • inner_findEntry

        public Entry inner_findEntry​(SearchCriteria search)
                              throws java.lang.Exception
        Internal implementation of the findEntry method executed by the worker thread.
        Parameters:
        search - the search criteria with which the database document will be located
        Returns:
        the located entry object
        Throws:
        java.lang.Exception - if this method fails.
      • setCurrent

        public void setCurrent​(Entry entry,
                               SearchCriteria search)
        Used when multiple entries found, and you want to modify or delete one of them. change foundDoc to be this entry.
        Specified by:
        setCurrent in interface ConnectorInterface
        Overrides:
        setCurrent in class Connector
        Parameters:
        entry - The entry we want to find for modification/delete
        search - The search
      • modDocument

        public void modDocument​(lotus.domino.Document doc,
                                Entry entry)
                         throws java.lang.Exception
        This method modifies a Domino database document.
        Parameters:
        doc - the database document to modify
        entry - the entry which supplies the new values for the document to be modified
        Throws:
        java.lang.Exception - An exception is thrown if this method fails.
      • addValue

        public void addValue​(Entry e,
                             java.lang.String attr,
                             java.util.Vector value,
                             int type)
        Adds a feature to the Value attribute of the DominoConnector object
        Parameters:
        e - Entry
        attr - attribute name
        value - attribute value
        type - attribute type
      • queryDatabases

        public java.util.Vector<java.lang.String> queryDatabases()
                                                          throws java.lang.Exception
        This methods builds and returns a collection of the available Domino databases. In order to successfully retreive a list of the databases through IIOP session the option "Allow HTTP clients to browse databases" should be set to "yes". This option can be configured with the Domino Admin application. It is situated: "Configuratin" page -> "Internet Protocols" tab -> "HTTP" sub-tab -> "R5 Basics" sectin
        Returns:
        a collection of the available Domino databases
        Throws:
        java.lang.Exception - if this method fails.
      • queryViews

        public java.util.Vector<java.lang.String> queryViews()
                                                      throws java.lang.Exception
        Gets the list of views' names for the current Domino database.
        Returns:
        the list of views' names for the current Domino database
        Throws:
        java.lang.Exception - An exception is thrown if this method fails.
      • initLocalThread

        public void initLocalThread()
                             throws java.lang.Exception
        This call is needed when the connector makes local calls through a client or server. The local calls (lotus.domino.local.*) are available only in the Notes.jar which may not be in the installation. Thus, use reflection to load and call sinitThread/stermThread. This method is called from the initialize method when local session is made.
        Throws:
        java.lang.Exception - An exception is thrown if this method fails.
      • termLocalThread

        public void termLocalThread()
        This method terminates the Notes API thread to make sure resources are cleaned up properly. This method is usually called from the terminate method. It is not recomended to use it directly.
      • run

        public void run()
        Kick off the internal worker thread.
        Specified by:
        run in interface java.lang.Runnable