Package smilehouse.openinterface

Examples of smilehouse.openinterface.ImportResult


    public String[] convert(String data, ConversionInfo info, MessageLogger logger)
        throws FailTransferException, AbortTransferException {
        String[] results = new String[1];
       
        try {
            ImportResult result = openInterface.importOrders(oiLoginInfo, data, oiImportMode, additiveAnswerUpdate, additiveBasketUpdate, invokeReceivedEvents);
            WorkspaceOIUtils.logImportResult(result, logger, this,  false);
        }
        catch(AccessDeniedException ade) {
            logger.logMessage("Access to Open Interface denied. Check your login information.", this, MessageLogger.ERROR);
            PipeComponentUtils.failTransfer();
View Full Code Here


     */
    public void take(String data, DestinationInfo info, MessageLogger logger)
            throws FailTransferException, AbortTransferException {

        try {
            ImportResult result = openInterface.importOrders(oiLoginInfo, data, oiImportMode, additiveAnswerUpdate, additiveBasketUpdate, invokeReceivedEvents);
            WorkspaceOIUtils.logImportResult(result, logger, this, false);
        }
        catch(AccessDeniedException ade) {
            logger.logMessage("Access to Open Interface denied. Check your login information.", this, MessageLogger.ERROR);
            PipeComponentUtils.failTransfer();
View Full Code Here

        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

        // -------------
        // Do the import
        // -------------
        try {
           
            ImportResult result = oi.importPricelist(login, data, this.importMode.intValue());
           
            if(result != null) {
                List warnings = result.getWarnings();
                if(warnings != null)
                    for(Iterator it = warnings.iterator(); it.hasNext();) {
                        logger.logMessage((String) it.next(), this, MessageLogger.WARNING);
                    }
                List insertedIds = result.getInsertedIds();
                List updatedIds = result.getUpdatedIds();
                logger.logMessage(
                    "Inserted " + (insertedIds != null ? insertedIds.size() : 0) + ", updated "
                            + (updatedIds != null ? updatedIds.size() : 0),
                    this,
                    MessageLogger.DEBUG);
View Full Code Here

            LoginInfo login = new LoginInfo();
            login.setDatabase(database);
            login.setUserName(user);
            login.setPassword(password);
           
            ImportResult result = oi.importProducts2(
                login,
                data,
                importMode.intValue(),
                additiveOptionUpdate,
                additiveGroupUpdate,
                getProtectedGroups(),
                createGroups);
           
            List warnings = result.getWarnings();
            if(warnings != null)
                for(Iterator it = warnings.iterator(); it.hasNext();) {
                    logger.logMessage((String) it.next(), this, MessageLogger.WARNING);
                }
            List insertedIds = result.getInsertedIds();
            List updatedIds = result.getUpdatedIds();
            logger.logMessage(
                "Inserted " + (insertedIds != null ? insertedIds.size() : 0) + ", updated "
                        + (updatedIds != null ? updatedIds.size() : 0),
                this,
                MessageLogger.DEBUG);
View Full Code Here

TOP

Related Classes of smilehouse.openinterface.ImportResult

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.