org.beangle.ems.business.web.action.RuleAction Maven / Gradle / Ivy
/*
* Beangle, Agile Development Scaffold and Toolkit
*
* Copyright (c) 2005-2016, Beangle Software.
*
* Beangle is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Beangle is distributed in the hope that it will be useful.
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Beangle. If not, see .
*/
package org.beangle.ems.business.web.action;
import java.util.Date;
import org.beangle.commons.entity.Entity;
import org.beangle.ems.rule.Rule;
import org.beangle.ems.web.action.SecurityActionSupport;
import org.beangle.struts2.convention.route.Action;
/**
* 规则信息
*
* @author chaostone
* @version $Id: RuleAction.java Jun 27, 2011 7:41:11 PM chaostone $
*/
public class RuleAction extends SecurityActionSupport {
@Override
protected String saveAndForward(Entity> entity) {
Rule rule = (Rule) entity;
rule.setUpdatedAt(new Date());
entityDao.saveOrUpdate(rule);
return redirect("search", "info.save.success");
}
@Override
protected String getEntityName() {
return Rule.class.getName();
}
public String params() {
return redirect(
Action.to(RuleParamAction.class).method("search").param("ruleParameter.rule.id", getLong("rule.id")),
null);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy