if(input == null)input = "";
if(output == null)output = "";
boolean writeable = true; // We need to convert access to a boolean
boolean readable = true; // Make an assumption of r/w
RType rtype = null; // We need to convert the type to an int.
IRObject defaultO = null; // We need to convert the default into a Rules Engine Object.
writeable = access.toLowerCase().indexOf("w")>=0;
readable = access.toLowerCase().indexOf("r")>=0;
if(!writeable && !readable){
errorMsgs +="\nThe attribute "+attribute+" has to be either readable or writable\r\n";
succeeded=false;
rtype = RNull.type;
}
// Now the type. An easy thing.
if(!RType.isType(type)){
errorMsgs+= "The type specified: '"+type+"' is not a valid type.";
succeeded = false;
}else{
rtype = RType.getType(type);
}
try{
defaultO = session.getComputeDefault().computeDefaultValue(session, ef, defaultv, rtype) ;
} catch (RulesException e) {
errorMsgs += "Bad Default Value '"+defaultv+"' encountered on entity: '"+entityname+"' attribute: '"+attribute+"' \n";
succeeded = false;
}
RName entityRName = RName.getRName(entityname.trim(),false);
RName attributeRName = RName.getRName(attribute.trim(),false);
IREntity entity = ef.findcreateRefEntity(false,entityRName);
RType rtype2 = null;
if(!RType.isType(type)){
errorMsgs += "Bad Type: '"+type+"' encountered on entity: '"+entityname+"' attribute: '"+attribute+"' \n";
succeeded = false;
rtype2 = RNull.type;
}else{