rcb.setType(MVCConfigConstant.FORWARD_TYPE);
rcb.setLocation(retn);
}
}
}
ActionConfigBean action = new ActionConfigBean();
action.setShowValErrorType(showValMess == null ? valErrType
: showValMess);
action.setClazz(clazzName);
action.setMethod(methodName);
action.setName(actionName);
action.setReqMethod(reqMethod);
// 读取@ActionLevel注解
ActionLevel actionLevel = cls.getAnnotation(ActionLevel.class);
if (actionLevel == null)
actionLevel = m.getAnnotation(ActionLevel.class);
int level = 1;
if (actionLevel != null)
level = actionLevel.value();
action.setLevel(String.valueOf(level));
// 读取@Produces注解
Produces producesAnn = m.getAnnotation(Produces.class);
if (producesAnn != null) {
String producesStr = StringUtil
.parsePropValue(producesAnn.value()[0]);
action.getProduces().add(producesStr);
}
// 读取@Result注解
Result resultAnn = m.getAnnotation(Result.class);
if (resultAnn != null)
action.setResult(ResultAnnUtil.readResultAnn(resultAnn));
if (rcb != null)
action.getResult().add(rcb);
// 读取@Validator注解
Validator validatorAnn = m.getAnnotation(Validator.class);
if (validatorAnn != null)
action.setValidator(ValidatorUtil.readValidator(validatorAnn,
m.getAnnotation(ValField.class),
m.getAnnotation(ValMess.class),
m.getAnnotation(ValParamName.class),
m.getAnnotation(ValParam.class)));
// 读取Action object 的属性 验证信息
List<ValidatorConfigBean> vals = ValidatorUtil.readValidator(null, ru,
null, null);
if (vals != null)
action.setValidator(vals);
// Action全名,框架用,包括对“{xxx}”url参数的正则化,HttpRequestMethod
String actionFullName = ActionUrlUtil.mathersUrlMapping(m, actionName,
cls);
if (actionFullName == null)