Class BaseConnector

    • Constructor Detail

      • BaseConnector

        protected BaseConnector()
    • Method Detail

      • initialize

        public void initialize​(AtomContext context)
        Does any startup initialization for this connector. This will be called exactly once (within external synchronization) after the Connector is instantiated and before any other methods are called on it.

        This call may do expensive things like open connections or other resources which will be used throughout the Connector's lifecycle. Connectors are never explicitly closed, so explicit resource cleanup (if necessary) should be managed through garbage-collector hooks (e.g. reference objects or finalize). Note that any resources cached at the Connector level should not be account specific. The preferred resource cache is the one returned by a call to ConnectorContext.getConnectorCache() as it is Boomi account specific and therefore may be used to cache account specific information.

        Base implementation stores given context.

        Specified by:
        initialize in interface Connector
        Parameters:
        context - the static atom context
      • createBrowser

        public Browser createBrowser​(BrowseContext context)
        Default implementation throws UnsupportedOperationException.
        Specified by:
        createBrowser in interface Connector
        Parameters:
        context - the context for this browse operation. this context is considered to be owned by the Browser after this call and may be held by the Browser for use in subsequent method calls.
        Returns:
        a Browser for use when browsing this connector
      • createOperation

        public Operation createOperation​(OperationContext context)
        Returns the actual Operation. All connection fields from the connector's descriptor will be provided in ConnectorContext.getConnectionProperties() and operation all fields will be provided in BrowseContext.getOperationProperties() (where the keys will be the relevant field's "id" and the values will be of the appropriate Java type for the relevant field's "type").

        This call should be relatively cheap as Operations are only ever created for a single invocation. Any resource caching should be handled at the Connector level or via the ConnectorContext.getConnectorCache().

        Base implementation delegates creation call to one of the create*Operation() methods.

        Specified by:
        createOperation in interface Connector
        Parameters:
        context - the context for this connector operation. this context is considered to be owned by the Operation after this call and may be held by the Operation for use in subsequent method calls.
        Returns:
        an Operation for use when executing operations for this connector
      • createGetOperation

        protected Operation createGetOperation​(OperationContext context)
        Creates a new GET operation.

        Default implementation throws UnsupportedOperationException.

        Parameters:
        context - the new operation's context
        Returns:
        a valid operation
      • createQueryOperation

        protected Operation createQueryOperation​(OperationContext context)
        Creates a new QUERY operation.

        Default implementation throws UnsupportedOperationException.

        Parameters:
        context - the new operation's context
        Returns:
        a valid operation
      • createCreateOperation

        protected Operation createCreateOperation​(OperationContext context)
        Creates a new CREATE operation.

        Default implementation throws UnsupportedOperationException.

        Parameters:
        context - the new operation's context
        Returns:
        a valid operation
      • createUpdateOperation

        protected Operation createUpdateOperation​(OperationContext context)
        Creates a new UPDATE operation.

        Default implementation throws UnsupportedOperationException.

        Parameters:
        context - the new operation's context
        Returns:
        a valid operation
      • createUpsertOperation

        protected Operation createUpsertOperation​(OperationContext context)
        Creates a new UPSERT operation.

        Default implementation throws UnsupportedOperationException.

        Parameters:
        context - the new operation's context
        Returns:
        a valid operation
      • createDeleteOperation

        protected Operation createDeleteOperation​(OperationContext context)
        Creates a new DELETE operation.

        Default implementation throws UnsupportedOperationException.

        Parameters:
        context - the new operation's context
        Returns:
        a valid operation
      • createExecuteOperation

        protected Operation createExecuteOperation​(OperationContext context)
        Creates a new EXECUTE operation.

        Default implementation throws UnsupportedOperationException.

        Parameters:
        context - the new operation's context
        Returns:
        a valid operation