Package com.webobjects.eocontrol

Examples of com.webobjects.eocontrol.EOKeyValueUnarchiver


    }
   
    public ERD2WRule cloneRule() {
        EOKeyValueArchiver archiver = new EOKeyValueArchiver();
        encodeWithKeyValueArchiver(archiver);
        EOKeyValueUnarchiver unarchiver = new EOKeyValueUnarchiver(archiver.dictionary());
       
        return new ERD2WRule(unarchiver);
    }
View Full Code Here


                if (ruleDecodeLog.isDebugEnabled()) {
                    ruleDecodeLog.debug("Got dictionary for file: " + modelFile + "\n\n");
                    for (Enumeration e = ((NSArray)dic.objectForKey("rules")).objectEnumerator(); e.hasMoreElements();) {
                        NSDictionary aRule = (NSDictionary)e.nextElement();
                        NSMutableDictionary aRuleDictionary = new NSMutableDictionary(aRule, "rule");
                        EOKeyValueUnarchiver archiver = new EOKeyValueUnarchiver(aRuleDictionary);
                        try {
                            addRule((Rule)archiver.decodeObjectForKey("rule"));
                        } catch (Exception ex) {
                            ruleDecodeLog.error("Bad rule: " + aRule, ex);
                            ruleDecodeLog.error("Decoded rule: " + archiver.decodeObjectForKey("rule"));
                        }
                    }
                } else {
                    NSArray rules = (NSArray) new EOKeyValueUnarchiver(dic).decodeObjectForKey("rules");
                    if(rules != null) {
                        ERD2WModel model = new ERD2WModel(rules);
                        addRules(model.rules());
                    }
                }
View Full Code Here

import com.webobjects.foundation.NSMutableDictionary;

public class ERD2WRuleEditorModel extends D2WModel {
   
    public ERD2WRuleEditorModel(File file) {
        super(new EOKeyValueUnarchiver(ERD2WRuleEditorModel._dictionaryFromFile(file)));

    }
View Full Code Here

    }
   
    public ERD2WExtendedRule cloneRule() {
        EOKeyValueArchiver archiver = new EOKeyValueArchiver();
        encodeWithKeyValueArchiver(archiver);
        EOKeyValueUnarchiver unarchiver = new EOKeyValueUnarchiver(archiver.dictionary());

        return new ERD2WExtendedRule(unarchiver);
    }
View Full Code Here

    }

    protected Object decodedValue() {
        NSDictionary d = (NSDictionary )NSPropertyListSerialization.propertyListFromString(value());
        if(d != null) {
            EOKeyValueUnarchiver u = new EOKeyValueUnarchiver(d);
            return u.decodeObjectForKey(VALUE);
        }
        return null;
    }   
View Full Code Here

        return encodedValue;
    }

    protected Object decodedValue(String encodedValue) {
        NSDictionary d = (NSDictionary )NSPropertyListSerialization.propertyListFromString(encodedValue);
        EOKeyValueUnarchiver u = new EOKeyValueUnarchiver(d);
        return u.decodeObjectForKey(VALUE);
    }   
View Full Code Here

TOP

Related Classes of com.webobjects.eocontrol.EOKeyValueUnarchiver

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.