normalcommandfactory.java

来自「一个java权限系统.主要使用j2ee框架实现.」· Java 代码 · 共 27 行

JAVA
27
字号
package com.wxd.common.popedom.domain.command.factory;

import com.wxd.common.popedom.domain.command.Command;
import com.wxd.common.popedom.domain.command.CommandContext;
import com.wxd.common.popedom.domain.command.CommandFactory;
import com.wxd.common.popedom.domain.command.CommandProxy;

public class NormalCommandFactory extends CommandFactory{
	private String operatorId;
    private String actionView;

	public NormalCommandFactory(String operatorId, String actionView) {
		this.operatorId = operatorId;
		this.actionView = actionView;
	}

	@Override
	public Command getCommand(Class cmdClazz,Object cmdParameter) {
		Command cmd=this.getCmdFromActionSet(cmdClazz);
		CommandContext context=new CommandContext();
		context.setParamObject(cmdParameter);
		cmd.setContext(context);
		return new CommandProxy(cmd);
	}

}

⌨️ 快捷键说明

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