Examples of CIXFileData


Examples of realcix20.cixfiles.CIXFileData

                        Cell pCell = findCell(getRow(), "P", "DEFPA");
                        while (rowIter.hasNext()) {
                            Row childRow = (Row)rowIter.next();                           
                            Cell cCell = findCell(childRow, "PA", "PA");
                            if ( (childRow != getRow()) && (cCell.getColumnValue().equals(pCell.getColumnValue())) ) {
                                CIXFileData data = new CIXFileData(type, getPrivateKey(), childRow);
                                CIXFile cixFile = new CIXFile(getPublicKey(), data);   
                                Random random = new Random();
                                String fileName = "confirm_add_account_" + random.nextInt(25000);
                                cixFile.exportFile(fileName);          
                                String str = TxtManager.getTxt("PARTNER.IMPORT.ADDPARTNER");
                                str = str.replaceAll("%", fileName);
                                DialogManager.showMessageDialog(getWindow(), str);
                                break;
                            }
                        }
                    } catch (Exception e) {
                        e.printStackTrace();
                    }
                   
                } else if ( (cell != null) && (cell.getColumnValue().equals("ME")) ) {
                   
                    try {
                        KeyPairGenerator keyGen = KeyPairGenerator.getInstance("RSA");
                        keyGen.initialize(1024);
                        KeyPair key = keyGen.generateKeyPair();
                       
                        Iterator rowIter = getRow().getRowSet().getRows().iterator();
                        while (rowIter.hasNext()) {
                            Row childRow = (Row)rowIter.next();
                            if (childRow != getRow()) {
                                Cell publicKeyCell = findCell(childRow, "PA", "PUBKEY");
                                Cell privateKeyCell = findCell(childRow, "PA", "PRIKEY");
                                publicKeyCell.setColumnValue(key.getPublic());
                                privateKeyCell.setColumnValue(key.getPrivate());   
                            }
                        }                                          
                       
                    } catch (Exception e) {
                        e.printStackTrace();
                    }
                   
                }

            } else if (action.equals("Confirm Add Account Request")) {                              
               
                Cell cell = findCell(getRow(), "P", "NS");
                if ( (cell != null) && (!cell.getColumnValue().equals("ME")) ) {
                   
                    try {                       
                        Iterator rowIter = getRow().getRowSet().getRows().iterator();
                        while (rowIter.hasNext()) {
                            Row childRow = (Row)rowIter.next();
                            if (childRow != getRow()) {
                                Cell publicKeyCell = findCell(childRow, "PA", "PUBKEY");
                                publicKeyCell.setColumnValue(getCixFile().getPublicKey());
                            }
                        }
                       
                        String type = "Re Confirm Add Account";
                        rowIter = getRow().getRowSet().getRows().iterator();                                               
                        Cell pCell = findCell(getRow(), "P", "DEFPA");
                        while (rowIter.hasNext()) {
                            Row childRow = (Row)rowIter.next();                           
                            Cell cCell = findCell(childRow, "PA", "PA");
                            if ( (childRow != getRow()) && (cCell.getColumnValue().equals(pCell.getColumnValue())) ) {
                                CIXFileData data = new CIXFileData(type, getPrivateKey(), childRow);
                                CIXFile cixFile = new CIXFile(getPublicKey(), data);   
                                Random random = new Random();
                                String fileName = "re_confirm_add_account_"+ random.nextInt(25000);                               
                                cixFile.exportFile(fileName);
                                String str = TxtManager.getTxt("PARTNER.IMPORT.CONFIRMADDPARTNER");
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.