Package smilehouse.openinterface

Examples of smilehouse.openinterface.OpenInterfaceIF


        // Retrieve and store OpenInterface endpoint address
        this.oiEndpointAddress = WorkspaceOIUtils.getOIEndpointAddress(getDatabase(),
                                           getOpenInterfaceHost(),
                                           logger,
                                           this);
        OpenInterfaceIF oi = WorkspaceOIUtils.getOpenInterfaceIF(this.oiEndpointAddress,
                                       getOpenInterfaceHost());
        this.login = WorkspaceOIUtils.getLoginInfo(getDatabase(),
                                 getUsername(),
                                 getPassword());
View Full Code Here


    public int close(SourceInfo info, MessageLogger logger) throws FailTransferException {

        // Close the OpenInterface iterator unless it has been closed (due to a timeout) earlier
        if(this.oiIteratorId != null) {
            OpenInterfaceIF oi = WorkspaceOIUtils.getOpenInterfaceIF(
                this.oiEndpointAddress,
                getOpenInterfaceHost()
            );
            WorkspaceOIUtils.closeHQLIterator(oi, this.login, this.oiIteratorId, logger, this);
            this.oiIteratorId = null;
View Full Code Here

        // Increment iteration number
        this.iterationNumber++;
       
        Boolean xmlDeclarationForEachBlock = getXMLdeclarationForEachBlock();
       
        OpenInterfaceIF oi = WorkspaceOIUtils.getOpenInterfaceIF(
      this.oiEndpointAddress,
      getOpenInterfaceHost()
      );
       
        do {
            try {
                exportResult = oi.iterate(this.login, oiIteratorId, resultsPerIteration);
               
            } catch (AccessDeniedException e) {
                logger.logMessage(
                    "Access to OpenInterface was denied. Check your username and password settings.",
                    this,
View Full Code Here

    public ExportResult getExportResult(OrderCriteria criteria,
                                        Long updateLogId,
                                        String newStatusName,
                                        SourceInfo info,
                                        MessageLogger logger) throws FailTransferException {
        OpenInterfaceIF oi = getOpenInterfaceIF(logger);
        LoginInfo login = getLoginInfo();

        try {
            return oi.exportOrders(login, criteria, updateLogId, newStatusName);
        } catch (RemoteException e) {
            logger.logMessage("RemoteException while querying orders from Open Interface: " + e.getMessage(),
                this, MessageLogger.ERROR);
            Environment.getInstance().log("RemoteException while querying orders from Open Interface", e);
            PipeComponentUtils.failTransfer();
View Full Code Here

            // ----------------------------
            String oiEndpointAddress = WorkspaceOIUtils.getOIEndpointAddress(getDatabase(),
                getOpenInterfaceHost(),
                logger,
                this);
            OpenInterfaceIF oi = WorkspaceOIUtils.getOpenInterfaceIF(oiEndpointAddress, getOpenInterfaceHost());
            this.openInterface = oi;
            return oi;
        }
    }
View Full Code Here

        } else {
            fullAddress = openInterfaceHost + oiEndpointAddress;
        }
       
        stub._setProperty(javax.xml.rpc.Stub.ENDPOINT_ADDRESS_PROPERTY, fullAddress);
        OpenInterfaceIF oi = (OpenInterfaceIF) stub;
        return oi;
    }
View Full Code Here

        login.setPassword(getPassword());
        return login;
    }
   
    public ExportResult getExportResult(CustomerCriteria criteria,MessageLogger logger) throws FailTransferException {
        OpenInterfaceIF oi = getOpenInterfaceIF(logger);
        LoginInfo login = getLoginInfo();

        try {
            return oi.exportCustomers(login, criteria);          
        } catch (RemoteException e) {
            logger.logMessage("RemoteException while querying customers from Open Interface: " + e.getMessage(),
                this, MessageLogger.ERROR);
            Environment.getInstance().log("RemoteException while querying customers from Open Interface", e);
            PipeComponentUtils.failTransfer();
View Full Code Here

            // ----------------------------
            String oiEndpointAddress = WorkspaceOIUtils.getOIEndpointAddress(getDatabase(),
                getOpenInterfaceHost(),
                logger,
                this);
            OpenInterfaceIF oi = WorkspaceOIUtils.getOpenInterfaceIF(oiEndpointAddress, getOpenInterfaceHost());
            this.openInterface = oi;
            return oi;
        }
    }
View Full Code Here

                databaseName,
                openInterfaceHost,
                logger,
                this);

            OpenInterfaceIF oi = WorkspaceOIUtils.getOpenInterfaceIF(
                oiEndpointAddress,
                openInterfaceHost);

            // Send HQL query to OpenInterface and get a result iterator
            String iteratorId = WorkspaceOIUtils.openHQLIterator(
                oi,
                login,
                hqlQuery,
                sessionTimeout,
                logger,
                this);

            ExportResult exportResult = null;

            // Retrieve all results appending them to a StringBuffer
            try {
                do {
                    exportResult = oi.iterate(login, iteratorId, resultsPerIteration);
                    if(exportResult != null) {
                        hqlResult.append(stripResultTag(Utils.stripXMLdeclaration(exportResult
                            .getXml())));
                    }
                } while(exportResult != null);
View Full Code Here

        // ----------------------------
        // Connect to the OpenInterface
        // ----------------------------
        String oiEndpointAddress = WorkspaceOIUtils.getOIEndpointAddress(database, host, logger, this);
        OpenInterfaceIF oi = WorkspaceOIUtils.getOpenInterfaceIF(oiEndpointAddress, host);

        // -------------
        // Do the import
        // -------------
        try {
            LoginInfo login = new LoginInfo();
            login.setDatabase(database);
            login.setUserName(user);
            login.setPassword(password);
            ImportResult result = oi.importCustomers(
                login,
                data,
                importMode.intValue(),
                createGroups);
            WorkspaceOIUtils.logImportResult(result, logger, this, true);
View Full Code Here

TOP

Related Classes of smilehouse.openinterface.OpenInterfaceIF

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.