Examples of GSVModel


Examples of com.gammastream.validity.GSVModel

    }


    public WOComponent deleteRuleInList() {
        String entityName = this.selectedAttribute().entity().name();
        GSVModel model = session.model();
        GSVEntity entity = model.entityNamed(entityName);
        if(entity==null){
            entity = new GSVEntity(model, entityName);
            model.addEntity(entity);
        }
        GSVAttribute att = entity.attributeNamed(this.selectedAttribute().name());
        if(att==null){
            att = new  GSVAttribute(entity, this.selectedAttribute().name());
            entity.addAttribute(att);
        }
        att.removeRule(currentRule);
        model.saveModel();

        showAttribute = true;
        showEntity = false;
        showInspector = false;
        newFlag = false;
View Full Code Here

Examples of com.gammastream.validity.GSVModel

    }

   
    public WOComponent deleteRule() {
        String entityName = this.selectedAttribute().entity().name();
        GSVModel model = session.model();
        GSVEntity entity = model.entityNamed(entityName);
        if(entity==null){
            entity = new GSVEntity(model, entityName);
            model.addEntity(entity);
        }
        GSVAttribute att = entity.attributeNamed(this.selectedAttribute().name());
        if(att==null){
            att = new  GSVAttribute(entity, this.selectedAttribute().name());
            entity.addAttribute(att);
        }
        att.removeRule(this.selectedRule());
        model.saveModel();

        showAttribute = true;
        showEntity = false;
        showInspector = false;
        newFlag = false;
View Full Code Here

Examples of com.gammastream.validity.GSVModel

            errorMessage="Rule Name can not be left blank.";
            return null;
        }
       
            String entityName = this.selectedAttribute().entity().name();
            GSVModel model = session.model();
            GSVEntity entity = model.entityNamed(entityName);
            if(entity==null){
                entity = new GSVEntity(model, entityName);
                model.addEntity(entity);
            }
            entity.setModel(model);
            GSVAttribute att = entity.attributeNamed(this.selectedAttribute().name());
            if(att==null){
                att = new  GSVAttribute(entity, this.selectedAttribute().name());
                entity.addAttribute(att);
            }
            att.setEntity(entity);
            if(newFlag){
                if(att.ruleNamed(selectedRule().ruleName())!=null){
                    errorMessage = "There is already a rule named: "+ selectedRule().ruleName();
                    error=true;
                    return null;
                }
            }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;
                    }
                }
            }
            if(!this.convertRuleKeyValueToDictionary()){
                errorMessage = "All Keys in the Parameter NSDictionary can not contain spaces.<BR>Keys and Values can not be blank.";
                error=true;
                return null;
            }
            if(checked){
                app.config().addRule(selectedRule());
            }else{
                app.config().removeRule(selectedRule());
            }
            if(newFlag)
                att.addRule(this.selectedRule());
            model.saveModel();
            app.saveConfiguration();
            showAttribute = true;
            showEntity = false;
            showInspector = false;
            newFlag = false;
View Full Code Here

Examples of com.gammastream.validity.GSVModel

        return ( currentEntity == this.selectedEntity() ) ? "#DDDDDD" : "#FFFFFF";
    }
   
    public int ruleCount(){
        String entityName = this.currentAttribute.entity().name();
        GSVModel model = session.model();
        GSVEntity entity = model.entityNamed(entityName);
        if(entity==null){
            return 0;
        }
        GSVAttribute att = entity.attributeNamed(this.currentAttribute.name());
        if(att==null){
View Full Code Here

Examples of com.gammastream.validity.GSVModel

        } else {
            rules.removeObjectAtIndex(index);
            rules.insertObjectAtIndex(currentRule, index+1);
        }
       
        GSVModel model = session.model();
        model.saveModel();
        return null;
    }
View Full Code Here

Examples of com.gammastream.validity.GSVModel

        } else {
            rules.removeObjectAtIndex(index);
            rules.insertObjectAtIndex(currentRule, index-1);
        }
       
        GSVModel model = session.model();
        model.saveModel();
        return null;
    }
View Full Code Here

Examples of com.gammastream.validity.GSVModel

            session.setModel((GSVModel)WOXMLDecoder.decoder().decodeRootObject(xmlPath));
            if(session.model.eomodelGroup().modelWithPath(eomodelPath)==null){
                session.model.savePath(eomodelPath);
            }
        }else{
            session.setModel(new GSVModel(tPath));
        }      
    }
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.