mmseditaddslidaction.java

来自「MM7彩信对接网关示例」· Java 代码 · 共 46 行

JAVA
46
字号
/*
 * Created on 2005-7-13
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package com.rainbow.mms.manage;

import org.apache.log4j.Logger;

import com.opensymphony.webwork.ServletActionContext;
import com.opensymphony.xwork.ActionContext;
import com.opensymphony.xwork.ActionSupport;
import com.rainbow.mms.common.MmsSmilPageUnitCollection;

/**
 * 向已有的彩信内容体中添加新的一桢
 * @author Rainbow MMS Group Leader —— TrWorks
 *
 */
public class MmsEditAddSlidAction extends ActionSupport {

	private static final long serialVersionUID = 1L;
	private Logger log = Logger.getLogger(MmsEditAddSlidAction.class);

	public String execute() throws Exception {
		String addSlidNo = ServletActionContext.getRequest().getParameter("addSlidNo");
		String timeInterval = ServletActionContext.getRequest().getParameter("timeInterval");
		System.out.println("addSlidNo:" + addSlidNo + "; timeInterval:" + timeInterval);
		
		MmsSmilPageUnitCollection collection = 
			(MmsSmilPageUnitCollection)ActionContext.getContext().getSession().get("mmsPageMapCollection");
		if (collection == null || addSlidNo == null ){
			log.error("MmsEditAddMimeAction excute function's input params error!");
			return ERROR;
		}

		if (true == collection.addSlid(Integer.parseInt(timeInterval), Integer.parseInt(addSlidNo))){
			return SUCCESS;
		}
		else{
			return ERROR;
		}
	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?