Package com.gammastream.validity

Examples of com.gammastream.validity.GSVRule


        return null;
    }

    public WOComponent newRuleAction() {
        if(selectedSaveRule==null){
            this.setSelectedRule(new GSVRule("Untitled",null,null,null,null));
            keyValueParameters = new NSMutableArray();
        }else{
            this.setSelectedRule(this.newRule(selectedSaveRule));
            keyValueParameters = new NSMutableArray();
            this.convertRuleDictionaryToKeyValue();
View Full Code Here


                }
            }else{
                NSMutableArray temp = new NSMutableArray(att.rules());
                if(temp.count()!=0)
                    temp.removeObject(selectedRule());
                GSVRule ru=null;
                for(int s=0;s<temp.count();s++){
                    ru = (GSVRule)temp.objectAtIndex(s);
                    if(ru.ruleName().equals(selectedRule().ruleName())){
                        errorMessage = "There is already a rule named: "+ selectedRule().ruleName();
                        error=true;
                        return null;
                    }
                }
View Full Code Here

        }
        return att.rules().count();
    }

    public GSVRule newRule(GSVRule copyRule){
        GSVRule rule = new GSVRule(copyRule.ruleName(),copyRule.cName(),copyRule.mName(),"","");
        rule.setParameters(copyRule.parameters());
        rule.setOnSave(copyRule.onSave());
        rule.setOnInsert(copyRule.onInsert());
        rule.setOnDelete(copyRule.onDelete());
        return rule;
    }
View Full Code Here

        return recentAction();
    }
    public WOComponent restoreDefaults(){
        NSMutableArray rules= new NSMutableArray();
        NSMutableDictionary dict;
        GSVRule rule;

        rule = new GSVRule("compareTo","com.gammastream.validity.GSVNumberMethods","compareTo","","");
        dict = new NSMutableDictionary();
        rule.setParameters(dict);
        rule.parameters().setObjectForKey("","Operator");
        rule.parameters().setObjectForKey("","RightOperand");
        rules.addObject(rule);

        rule = new GSVRule("isPositiveNumber","com.gammastream.validity.GSVNumberMethods","isPositiveNumber","","");
        rules.addObject(rule);

        rule = new GSVRule("isNegativeNumber","com.gammastream.validity.GSVNumberMethods","isNegativeNumber","","");
        rules.addObject(rule);

        rule = new GSVRule("isInRange","com.gammastream.validity.GSVNumberMethods","isInRange","","");
        dict = new NSMutableDictionary();
        rule.setParameters(dict);
        rule.parameters().setObjectForKey("","Low");
        rule.parameters().setObjectForKey("","High");
        rules.addObject(rule);
       
        rule = new GSVRule("isStringEmpty","com.gammastream.validity.GSVStringMethods","isStringEmpty","","");
        rules.addObject(rule);

        rule = new GSVRule("toUpperCase","com.gammastream.validity.GSVStringMethods","toUpperCase","","");
        rules.addObject(rule);

        rule = new GSVRule("toLowerCase","com.gammastream.validity.GSVStringMethods","toLowerCase","","");
        rules.addObject(rule);

        rule = new GSVRule("length","com.gammastream.validity.GSVStringMethods","length","","");
        dict = new NSMutableDictionary();
        rule.setParameters(dict);
        rule.parameters().setObjectForKey("","Operator");
        rule.parameters().setObjectForKey("","RightOperand");
        rules.addObject(rule);

        rule = new GSVRule("contains","com.gammastream.validity.GSVStringMethods","contains","","");
        dict = new NSMutableDictionary();
        rule.setParameters(dict);
        rule.parameters().setObjectForKey("","Contains");
        rules.addObject(rule);

        rule = new GSVRule("endsWith","com.gammastream.validity.GSVStringMethods","endsWith","","");
        dict = new NSMutableDictionary();
        rule.setParameters(dict);
        rule.parameters().setObjectForKey("","EndsWith");
        rules.addObject(rule);

        rule = new GSVRule("startsWith","com.gammastream.validity.GSVStringMethods","startsWith","","");
        dict = new NSMutableDictionary();
        rule.setParameters(dict);
        rule.parameters().setObjectForKey("","StartsWith");
        rules.addObject(rule);

        rule = new GSVRule("isAlphaNumeric","com.gammastream.validity.GSVStringMethods","isAlphaNumeric","","");
        rules.addObject(rule);

        rule = new GSVRule("stripHTML","com.gammastream.validity.GSVStringMethods","stripHTML","","");
        rules.addObject(rule);

        rule = new GSVRule("isValidURL","com.gammastream.validity.GSVStringMethods","isValidURL","","");
        rules.addObject(rule);

        rule = new GSVRule("isValidEmailAddress","com.gammastream.validity.GSVStringMethods","isValidEmailAddress","","");
        rules.addObject(rule);


        rule = new GSVRule("compareTo","com.gammastream.validity.GSVStringMethods","compareTo","","");
        dict = new NSMutableDictionary();
        rule.setParameters(dict);
        rule.parameters().setObjectForKey("","Operator");
        rule.parameters().setObjectForKey("","RightOperand");
        rules.addObject(rule);
       
        rule = new GSVRule("isNull","com.gammastream.validity.GSVOtherMethods","isNull","","");
        rules.addObject(rule);

        rule = new GSVRule("isArrayEmpty","com.gammastream.validity.GSVOtherMethods","isArrayEmpty","","");
        dict = new NSMutableDictionary();
        rule.setParameters(dict);
        rule.parameters().setObjectForKey("","RelationshipKey");
        rules.addObject(rule);
       
        rule = new GSVRule("isUnique","com.gammastream.validity.GSVOtherMethods","isUnique","","");
        rules.addObject(rule);
       
        rule = new GSVRule("updateTimestamp","com.gammastream.validity.GSVDateMethods","updateTimestamp","","");
        rules.addObject(rule);

        app.config().setQuickRules(rules);
        app.saveConfiguration();
        return null;
View Full Code Here

TOP

Related Classes of com.gammastream.validity.GSVRule

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.