Package realcix20.cixfiles

Examples of realcix20.cixfiles.KeyManager


       
    }
   
    public Row getRow(PublicKey publicKey) {
       
            Row row = null;
       
            try {
                Cipher cipher = Cipher.getInstance("RSA");
                cipher.init(Cipher.UNWRAP_MODE, publicKey);
                Key key = cipher.unwrap(getCixKey().wrappedKey, "DES", Cipher.SECRET_KEY);
View Full Code Here


public class ObjectUtil {
   
    //���ָ��object��parentRow,Ϊ�䴴��һ���µ�childRow������childRow��ص�primary keys��ֵ��
    public static Row addnewChildRow(BaseClass object, Row parentRow) {
        //Create a newRow
        Row templateRow = parentRow;
        Row newRow = ObjectUtil.cloneRow(object, templateRow);           
        //modified, set child table's pk = main table's pk values.
        String mainTableName = object.getMainTableName();
        String childTableName = object.getChildTableName();
        Iterator newCellIter = newRow.getNewCells().iterator();
        Iterator oldCellIter = newRow.getOldCells().iterator();
        try {
            Cell newCell = (Cell)newCellIter.next();
            Cell oldCell = (Cell)oldCellIter.next();
            if (newCell.getTableName().equals(childTableName)) {
                newCell.setColumnValue(null);
View Full Code Here

        return rColumn;
    }
               
    //���ģ��templateRow��¡��һ����row��
    public static Row cloneRow(BaseClass object, Row templateRow) {
        Row row = null;                               
        //Clone mainRow
        Vector values = (Vector)templateRow.getNewCells().clone();
        row = new Row(values, object.getRowType());
        //Clone childRows
        //fix...
        row.getRowSet().getRows().clear();
        Iterator templateChildRowIter = templateRow.getRowSet().getRows().iterator();
        while (templateChildRowIter.hasNext()) {
            Row templateChildRow = (Row)templateChildRowIter.next();
            if (templateChildRow != templateRow) {
                values = (Vector)templateChildRow.getOldCells().clone();
                Row childRow = new Row(values, object.getRowType());
                row.getRowSet().getRows().add(childRow);                               
            }
        }
        return row;
    }
View Full Code Here

       
    }
   
    protected Row findRow(String tableName, String columnName, Vector componentExts) {
       
        Row row = null;
       
        Iterator componentExtIter = componentExts.iterator();
        while (componentExtIter.hasNext()) {
            ComponentExt componentExt = (ComponentExt)componentExtIter.next();
            Column column = componentExt.getColumn();
View Full Code Here

           
            Iterator rowIter = mainRow.getRowSet().getRows().iterator();
            int size = mainRow.getRowSet().getRows().size();

            while (rowIter.hasNext()) {
                Row row = (Row)rowIter.next();
                if ( (isItemRow(row)) && (!row.isDelete()) ) {
                
                    Vector rowDatas = new Vector();
                    columnIter = object.getColumns().iterator();
                    while (columnIter.hasNext()) {
                        Column column = (Column)columnIter.next();
View Full Code Here

            }
            names.add("row");
           
            Iterator rowIter = object.getRows().iterator();
            while (rowIter.hasNext()) {
                Row row = (Row)rowIter.next();               
                Vector rowDatas = new Vector();
                columnIter = object.getColumns().iterator();
                while (columnIter.hasNext()) {
                    Column column = (Column)columnIter.next();
                    if (column.isIndexField()) {                       
View Full Code Here

        public static void deleteRelativeRegs(Row correspondenceRow) {
            CorrespondenceClass correspondence = (CorrespondenceClass)ClassManager.createClass(520);
            correspondence.loadChilds(correspondenceRow);
            Iterator cItemRowsIter = correspondenceRow.getRowSet().getRows().iterator();           
            while (cItemRowsIter.hasNext()) {               
                Row cItemRow = (Row)cItemRowsIter.next();
                boolean needDelete = true;
                if ( (ObjectUtil.findNewCell(cItemRow, "TI", "R").getColumnValue() == null) ||
                        (ObjectUtil.findNewCell(cItemRow, "TI", "RI").getColumnValue() == null) ) {
                    needDelete = false;
                }
View Full Code Here

                String ns = (String)notEncryedDatas.get(0);
                String p = (String)notEncryedDatas.get(1);
                String pa = (String)notEncryedDatas.get(2);
                PartnerClass partner = (PartnerClass)ClassManager.createClass(250);
//                System.err.println("ns = " + ns + " p = " + p + " pa = " + pa);
                Row partnerAccountRow = PartnerClass.findPartnerAccountRow(partner, ns, p, pa);
                if (partnerAccountRow == null) {
                    StringBuffer sb = new StringBuffer(TxtManager.getTxt("INFORMATION.IMPORT.NOTFINDPA1"));
                    sb.append(ns + "/" + p + "/" + pa + " !");
                    DialogManager.showMessageDialog(listener.getContainer(), sb.toString());
                } else {
                    boolean result = true;
                    String urns = (String)ObjectUtil.findNewCell(partnerAccountRow, "PA", "URNS").getColumnValue();
                    String urp = (String)ObjectUtil.findNewCell(partnerAccountRow, "PA", "URP").getColumnValue();
                    String urpa = (String)ObjectUtil.findNewCell(partnerAccountRow, "PA", "URPA").getColumnValue();
                    PublicKey publicKey = (PublicKey)ObjectUtil.findNewCell(partnerAccountRow, "PA", "PUBKEY").getColumnValue();
                    if ( ( (urns == null) || (urns.trim().length() <= 0) ) ||
                            ( (urp == null) || (urp.trim().length() <= 0) ) ||
                            ( (urpa == null) || (urpa.trim().length() <= 0) ) ||
                            (publicKey == null) ) {
                        result = false;
                    }
                    if (!result) {
                        StringBuffer sb = new StringBuffer(TxtManager.getTxt("INFORMATION.IMPORT.NOTCREATERELATIVE1"));
                        sb.append(ns + "/" + p + "/" + pa + " , ");
                        sb.append(TxtManager.getTxt("INFORMATION.IMPORT.NOTCREATERELATIVE2"));
                        DialogManager.showMessageDialog(listener.getContainer(), sb.toString());
                    } else {
                        if (publicKey != null) {
                            Vector datas = realCIXFile.getDatas(publicKey);
                            if (datas == null) {
                                StringBuffer sb = new StringBuffer(TxtManager.getTxt("INFORMATION.IMPORT.PUBKEYISWRONG1"));
                                sb.append(ns + "/" + p + "/" + pa + " , ");
                                sb.append(TxtManager.getTxt("INFORMATION.IMPORT.PUBKEYISWRONG2"));
                                DialogManager.showMessageDialog(listener.getContainer(), sb.toString());
                            } else {//import success
//                                System.err.println("urns = " + urns + " urp = " + urp + " urpa = " + urpa);
                                DialogManager.showMessageDialog(listener.getContainer(), TxtManager.getTxt("INFORMATION.IMPORT.IMPORTSUCCESS"));
                                DialogManager.showMessageDialog(listener.getContainer(), TxtManager.getTxt("INFORMATION.IMPORT.CREATECORRESPONDENCE"));
                                Row correspondenceRow = (Row)datas.get(0);
                                listener.showObjectView(520);
                                listener.getContainer().updateTable();
                                Row newRow = new Row(listener.getContainer().getCurrentObject().getRowType());
                                ObjectUtil.findNewCell(newRow, "T", "URT").setColumnValue(ObjectUtil.findNewCell(correspondenceRow, "T", "T").getColumnValue());
                                ObjectUtil.findNewCell(newRow, "T", "TT").setColumnValue(ObjectUtil.findNewCell(correspondenceRow, "T", "TT").getColumnValue());
                                ObjectUtil.findNewCell(newRow, "T", "NS").setColumnValue(ns);
                                ObjectUtil.findNewCell(newRow, "T", "P").setColumnValue(p);
                                ObjectUtil.findNewCell(newRow, "T", "PA").setColumnValue(pa);
                                ObjectUtil.findNewCell(newRow, "T", "RECBNS").setColumnValue(ObjectUtil.findNewCell(correspondenceRow, "T", "RECBNS").getColumnValue());
                                ObjectUtil.findNewCell(newRow, "T", "RECB").setColumnValue(ObjectUtil.findNewCell(correspondenceRow, "T", "RECB").getColumnValue());
                                ObjectUtil.findNewCell(newRow, "T", "RECBA").setColumnValue(ObjectUtil.findNewCell(correspondenceRow, "T", "RECBA").getColumnValue());
                                ObjectUtil.findNewCell(newRow, "T", "REQUEST").setColumnValue(ObjectUtil.findNewCell(correspondenceRow, "T", "REQUEST").getColumnValue());
                                ObjectUtil.findNewCell(newRow, "T", "DUE").setColumnValue(ObjectUtil.findNewCell(correspondenceRow, "T", "DUE").getColumnValue());
                                ObjectUtil.findNewCell(newRow, "T", "TXT256").setColumnValue(ObjectUtil.findNewCell(correspondenceRow, "T", "TXT256").getColumnValue());
                                Iterator correspondenceItemRowsIter = correspondenceRow.getRowSet().getRows().iterator();
                                while (correspondenceItemRowsIter.hasNext()) {
                                    Row correspondenceItemRow = (Row)correspondenceItemRowsIter.next();
                                    boolean stat = false;
                                    if ( ( (correspondenceRow.isAdd()) && (correspondenceItemRow != correspondenceRow) ) ||
                                            (!correspondenceRow.isAdd()) ) {
                                        stat = true;
                                    }
                                    if (stat) {//add childRow
                                        Row childRow = ObjectUtil.addnewChildRow(listener.getContainer().getCurrentObject(), correspondenceItemRow);
                                        double tamt = 0.0;
                                        if ( (ObjectUtil.findNewCell(correspondenceItemRow, "TI", "TAMT").getColumnValue() != null) &&
                                                (ObjectUtil.findNewCell(correspondenceItemRow, "TI", "TAMT").getColumnValue().toString().trim().length() > 0) ) {
                                            tamt = 0 - Double.parseDouble(ObjectUtil.findNewCell(correspondenceItemRow, "TI", "TAMT").getColumnValue().toString());                                           
                                        }
View Full Code Here

                datas.add(correspondenceRow);
                String ns = ObjectUtil.findNewCell(correspondenceRow, "T", "NS").getColumnValue().toString();
                String p = ObjectUtil.findNewCell(correspondenceRow, "T", "P").getColumnValue().toString();
                String pa = ObjectUtil.findNewCell(correspondenceRow, "T", "PA").getColumnValue().toString();
                PartnerClass partner = (PartnerClass)ClassManager.createClass(250);
                Row partnerAccountRow = null;             
                partnerAccountRow = PartnerClass.findPartnerAccountRow(partner, ns, p, pa);
                Row mePartnerAccountRow = null;
                if (partnerAccountRow != null)
                    mePartnerAccountRow = PartnerClass.getMePartnerAccount(partnerAccountRow);
                PrivateKey privateKey = null;
                if (mePartnerAccountRow != null) {
                    privateKey = (PrivateKey)ObjectUtil.findNewCell(mePartnerAccountRow, "PA", "PRIKEY").getColumnValue();
View Full Code Here

               
                int currentRi = 0;
                double amt = 0.0;
                Iterator rowsIter = mainRow.getRowSet().getRows().iterator();
                while (rowsIter.hasNext()) {
                    Row childRow = (Row)rowsIter.next();
                    if ( (childRow != null) && (childRow != mainRow) ) {                      
                        currentRi++;
                        txt256Cell = ObjectUtil.findNewCell(childRow, "TI", "TXT256");
                        txt256 = (String)txt256Cell.getColumnValue();
                       
View Full Code Here

TOP

Related Classes of realcix20.cixfiles.KeyManager

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.