All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.alogic.xscript.plugins.Message Maven / Gradle / Ivy

There is a newer version: 1.6.17
Show newest version
package com.alogic.xscript.plugins;

import com.alogic.xscript.doc.XsObject;
import com.alogic.xscript.AbstractLogiclet;
import com.alogic.xscript.ExecuteWatcher;
import com.alogic.xscript.Logiclet;
import com.alogic.xscript.LogicletContext;
import com.anysoft.util.Properties;
import com.anysoft.util.PropertiesConstants;

/**
 * Message
 * 
 * @author duanyy
 * 
 * @version 1.6.8.14 [20170509 duanyy] 
* - 增加xscript的中间文档模型,以便支持多种报文协议
* */ public class Message extends AbstractLogiclet { protected String msg = "hello"; public Message(String tag, Logiclet p) { super(tag, p); } @Override public void configure(Properties p) { super.configure(p); msg = PropertiesConstants.getRaw(p,"p",msg); } @Override protected void onExecute(XsObject root,XsObject current, LogicletContext ctx, ExecuteWatcher watcher) { if (current != null){ current.addProperty("msg", ctx.transform(msg)); } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy