Examples of RippleServer


Examples of org.opentransactions.otapi.RippleServer

        if (walletData == null) {
            System.out.println("loadServerDetails - walletData returns null");
            return null;
        }
        for (int i = 0; i < walletData.GetRippleServerCount(); i++) {
            RippleServer rippleServer = walletData.GetRippleServer(i);
            if (rippleServer == null) {
                continue;
            }
            System.out.println("serverID:" + serverID + " rippleServer.getServer_id():" + rippleServer.getServer_id());
            if (serverID.equals(rippleServer.getServer_id())) {
                details = new String[5];
                details[0] = rippleServer.getServer_host()==null?"":rippleServer.getServer_host();
                details[1] = rippleServer.getNamefield_id()==null || rippleServer.getNamefield_id().trim().length()<1 ?Configuration.getRippleUsernameID():rippleServer.getNamefield_id();
                details[2] = rippleServer.getPassfield_id()==null || rippleServer.getPassfield_id().trim().length()<1 ?Configuration.getRipplePasswordID():rippleServer.getPassfield_id();
                details[3] = rippleServer.getRipple_username()==null?"":rippleServer.getRipple_username();
                details[4] = rippleServer.getRipple_password()==null?"":rippleServer.getRipple_password();
                break;
            }
        }

        return details;
View Full Code Here

Examples of org.opentransactions.otapi.RippleServer

        if (walletData == null) {
            System.out.println("addRippleServer - walletData returns null");
            return null;
        }
        RippleServer rippleServer = null;
        Storable storable = otapi.CreateObject(StoredObjectType.STORED_OBJ_RIPPLE_SERVER);
        if (storable != null) {
            rippleServer = RippleServer.ot_dynamic_cast(storable);
            if (rippleServer != null) {
                rippleServer.setServer_host(url);
                rippleServer.setRipple_password(pwd);
                rippleServer.setRipple_username(user);
                rippleServer.setNamefield_id(userTextID);
                rippleServer.setPassfield_id(pwdTextID);
                rippleServer.setGui_label(label);
                rippleServer.setServer_id(serverID);
                rippleServer.setServer_type("Ripple");
                boolean status = walletData.AddRippleServer(rippleServer);
                System.out.println("status walletData.AddRippleServer:" + status);
                status = otapi.StoreObject(walletData, "moneychanger", "gui_wallet.dat");
                System.out.println("status otapi.StoreObject:" + status);
                System.out.println("addRippleServer - serverID:" + serverID);
View Full Code Here

Examples of org.opentransactions.otapi.RippleServer

    private static void getRippleServerList(WalletData walletData, HashMap dataMap) {

        long count = walletData.GetRippleServerCount();

        for (int i = 0; i < count; i++) {
            RippleServer rippleServer = walletData.GetRippleServer(i);
            if (rippleServer == null) {
                continue;
            }
            String[] data = new String[3];
            data[0] = rippleServer.getGui_label();
            data[1] = "RippleAccount";
            data[2] = rippleServer.getServer_id();
            dataMap.put(data[2], data);
        }
    }
View Full Code Here

Examples of org.opentransactions.otapi.RippleServer

    private static boolean removeRippleServer(WalletData walletData, String serverID) {

        boolean status = false;
        for (int i = 0; i < walletData.GetRippleServerCount(); i++) {
            RippleServer rippleServer = walletData.GetRippleServer(i);
            if (rippleServer == null) {
                continue;
            }
            if (serverID.equals(rippleServer.getServer_id())) {
                walletData.RemoveRippleServer(i);
                status = otapi.StoreObject(walletData, "moneychanger", "gui_wallet.dat");
                System.out.println("removeOtherTabServer status otapi.StoreObject:" + status);
                break;
            }
View Full Code Here

Examples of org.opentransactions.otapi.RippleServer

    }

    private static boolean editRippleServerLabel(WalletData walletData, String serverID, String newLabel) {
        boolean status = false;
        for (int i = 0; i < walletData.GetRippleServerCount(); i++) {
            RippleServer rippleServer = walletData.GetRippleServer(i);
            if (rippleServer == null) {
                continue;
            }
            if (serverID.equals(rippleServer.getServer_id())) {
                rippleServer.setGui_label(newLabel);
                status = otapi.StoreObject(walletData, "moneychanger", "gui_wallet.dat");
                System.out.println("editOtherTabServerLabel status otapi.StoreObject:" + status);
                break;
            }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.