Commit 66eab1a2 by tiger

sop可视化

1 parent 7877c456
Showing 766 changed files with 4848 additions and 0 deletions
......@@ -47,13 +47,17 @@ public class WebConfig implements WebMvcConfigurer {
.addResourceLocations("classpath:/META-INF/resources/")
.addResourceLocations("classpath:/resources/")
.addResourceLocations("classpath:/static/")
// .addResourceLocations("classpath:/library/")
.addResourceLocations("classpath:/templates/")
.addResourceLocations("classpath:/template/")
.addResourceLocations("classpath:/public/")
.addResourceLocations("/dist/");
//本地文件
registry.addResourceHandler("/files/**").addResourceLocations("file://" + uploadProperties.getBasePath());
//swagger3
registry.addResourceHandler("/swagger-ui/**").addResourceLocations("classpath:/META-INF/resources/webjars/springfox-swagger-ui/");
// js css
registry.addResourceHandler("/library/**").addResourceLocations("classpath:/library/");
}
@Override
......
/*
* @Copyright (c) 2018 缪聪(mcg-helper@qq.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.com.glsx.process.modules.controller.admin;
import java.nio.charset.Charset;
/**
*
* @ClassName: Constants
* @Description: TODO(定义系统需要的常量)
* @author: 缪聪(mcg-helper@qq.com)
* @date: 2018年3月9日 下午3:47:31
*
*/
public class Constants {
/* 字符编码 */
public static final Charset CHARSET = Charset.forName("utf-8");
/* httpSession超时时间 */
public static final int HTTP_SESSION_TIME_OUT = 60 * 60 * 4;
/* 版本号 */
public static final String VERSION = "mcg-helper_V1.6.7-Release";
/* 全局变量key */
public static final String GLOBAL_KEY = "mcgGlobal";
/* 流程文件扩展名 */
public static final String EXTENSION = ".mcg";
/* 字符加密key */
public final static String DES_KEY = "mcg-helper_2017_mc";
/* 数据持久化路径 */
public static String DATA_PATH;
/* 项目的绝对路径 */
public static String WEB_PATH;
/* 缓存名称 */
public final static String CACHE_NAME = "varCache";
/* SSH Linux控件 交互符 */
public final static String LINUX_INTERACT = "interact";
/* SSH Linux控件 默认交互等待时间 */
public final static long DEFAULT_TIME = 2000L;
/* SSH Linux控件 结束符 */
public final static String LINUX_EOF = "exit";
/* SSH Linux控件 执行符 */
public final static String LINUX_ENTER = "\r";
/* 混沌客户端数据key */
public final static String WONTON_KEY = "mcgWontonData";
/* 请求混沌客户端超时设置 */
public final static int REQUEST_WONTON_TIME_OUT = 5000;
/* 统计代码 */
public final static String js = "<script>var _hmt = _hmt || [];(function() {var hm = document.createElement(\"script\");hm.src = \"https://hm.baidu.com/hm.js?221fd6bfa9a0ff2f4a99e9f4ddb0075a\";var s = document.getElementsByTagName(\"script\")[0]; s.parentNode.insertBefore(hm, s);})();</script>";
}
package cn.com.glsx.process.modules.controller.admin.common;
/**
*
* 循环控件的执行状态
*
*/
public class LoopStatus {
/* 循环的剩余次数 */
private Integer count;
/* 循环开关 true:开 false:关*/
private Boolean swicth;
public Integer getCount() {
return count;
}
public void setCount(Integer count) {
this.count = count;
}
public Boolean getSwicth() {
return swicth;
}
public void setSwicth(Boolean swicth) {
this.swicth = swicth;
}
}
/*
* @Copyright (c) 2018 缪聪(mcg-helper@qq.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.com.glsx.process.modules.controller.admin.common;
import java.util.HashMap;
import java.util.Map;
public class McgResult {
//状态码 1:成功 0:失败
private Integer statusCode = 1;
//执行结果消息
private String statusMes = "执行成功";
//自定义属性
private Map<String, Object> resultMap = new HashMap<String, Object>();
public McgResult addAttribute(String attributeName, Object attributeValue) {
resultMap.put(attributeName, attributeValue);
return this;
}
public Integer getStatusCode() {
return statusCode;
}
public void setStatusCode(Integer statusCode) {
this.statusCode = statusCode;
}
public String getStatusMes() {
return statusMes;
}
public void setStatusMes(String statusMes) {
this.statusMes = statusMes;
}
public Map<String, Object> getResultMap() {
return resultMap;
}
}
package cn.com.glsx.process.modules.controller.admin.common;
public class Table {
private String tableName;
private String entityName;
private String daoName;
private String xmlName;
public String getTableName() {
return tableName;
}
public void setTableName(String tableName) {
this.tableName = tableName;
}
public String getEntityName() {
return entityName;
}
public void setEntityName(String entityName) {
this.entityName = entityName;
}
public String getDaoName() {
return daoName;
}
public void setDaoName(String daoName) {
this.daoName = daoName;
}
public String getXmlName() {
return xmlName;
}
public void setXmlName(String xmlName) {
this.xmlName = xmlName;
}
}
/*
* @Copyright (c) 2018 缪聪(mcg-helper@qq.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.com.glsx.process.modules.controller.admin.flow;
import java.util.Date;
import cn.com.glsx.process.modules.controller.admin.plugin.build.McgProduct;
import cn.com.glsx.process.modules.controller.admin.sysenum.EletypeEnum;
public abstract class FlowBase extends McgProduct {
private static final long serialVersionUID = -7660980819340679924L;
private String mcgWebScoketCode;
/* 流程实例ID */
private String flowId;
/* 执行的次序号 */
private Integer orderNum;
private String id;
/* 控件名称 */
private String name;
private String label;
private String width;
private String height;
private String classname;
private String eletype;
private String clone;
private String left;
private String top;
private String sign;
private EletypeEnum eletypeEnum;
private Date startTime;
private Date endTime;
public String getFlowId() {
return flowId;
}
public void setFlowId(String flowId) {
this.flowId = flowId;
}
public Integer getOrderNum() {
return orderNum;
}
public void setOrderNum(Integer orderNum) {
this.orderNum = orderNum;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
public String getWidth() {
return width;
}
public void setWidth(String width) {
this.width = width;
}
public String getHeight() {
return height;
}
public void setHeight(String height) {
this.height = height;
}
public String getClassname() {
return classname;
}
public void setClassname(String classname) {
this.classname = classname;
}
public String getEletype() {
return eletype;
}
public void setEletype(String eletype) {
this.eletype = eletype;
}
public String getClone() {
return clone;
}
public void setClone(String clone) {
this.clone = clone;
}
public String getLeft() {
return left;
}
public void setLeft(String left) {
this.left = left;
}
public String getTop() {
return top;
}
public void setTop(String top) {
this.top = top;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getSign() {
return sign;
}
public void setSign(String sign) {
this.sign = sign;
}
public String getMcgWebScoketCode() {
return mcgWebScoketCode;
}
public void setMcgWebScoketCode(String mcgWebScoketCode) {
this.mcgWebScoketCode = mcgWebScoketCode;
}
public EletypeEnum getEletypeEnum() {
return eletypeEnum;
}
public void setEletypeEnum(EletypeEnum eletypeEnum) {
this.eletypeEnum = eletypeEnum;
}
public Date getStartTime() {
return startTime;
}
public void setStartTime(Date startTime) {
this.startTime = startTime;
}
public Date getEndTime() {
return endTime;
}
public void setEndTime(Date endTime) {
this.endTime = endTime;
}
}
/*
* @Copyright (c) 2018 缪聪(mcg-helper@qq.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.com.glsx.process.modules.controller.admin.flow;
import java.io.Serializable;
import java.util.HashMap;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import cn.com.glsx.process.modules.controller.admin.flow.sequence.FlowSequences;
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class FlowStruct implements Serializable {
private static final long serialVersionUID = 5270098230104370957L;
/* 流程实例中控件的数量 */
@XmlAttribute
private int totalSize;
@XmlAttribute
private String mcgId;
@XmlElement
private FlowSequences flowSequences;
@XmlElement
private HashMap<String, List<Object>> flowElementMap;
public int getTotalSize() {
return totalSize;
}
public void setTotalSize(int totalSize) {
this.totalSize = totalSize;
}
public String getMcgId() {
return mcgId;
}
public void setMcgId(String mcgId) {
this.mcgId = mcgId;
}
public HashMap<String, List<Object>> getFlowElementMap() {
return flowElementMap;
}
public void setFlowElementMap(HashMap<String, List<Object>> flowElementMap) {
this.flowElementMap = flowElementMap;
}
public FlowSequences getFlowSequences() {
return flowSequences;
}
public void setFlowSequences(FlowSequences flowSequences) {
this.flowSequences = flowSequences;
}
}
\ No newline at end of file
/*
* @Copyright (c) 2018 缪聪(mcg-helper@qq.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.com.glsx.process.modules.controller.admin.flow.data;
import java.io.Serializable;
import java.util.List;
import javax.validation.Valid;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class DataField implements Serializable {
private static final long serialVersionUID = 2978897440879391218L;
// @NotBlank(message = "{flowData.dataField.dataSourceId.notBlank}")
@XmlElement
private String dataSourceId;
// @NotBlank(message = "{flowData.dataField.tableName.notBlank}")
@XmlElement
private String tableName;
@Valid
@XmlElement
private List<DataRecord> dataRecord;
public List<DataRecord> getDataRecord() {
return dataRecord;
}
public void setDataRecord(List<DataRecord> dataRecord) {
this.dataRecord = dataRecord;
}
public String getDataSourceId() {
return dataSourceId;
}
public void setDataSourceId(String dataSourceId) {
this.dataSourceId = dataSourceId;
}
public String getTableName() {
return tableName;
}
public void setTableName(String tableName) {
this.tableName = tableName;
}
}
\ No newline at end of file
/*
* @Copyright (c) 2018 缪聪(mcg-helper@qq.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.com.glsx.process.modules.controller.admin.flow.data;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.validator.constraints.NotBlank;
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class DataProperty implements Serializable {
private static final long serialVersionUID = 4737385559043572740L;
@NotBlank(message = "{flowData.dataProperty.key.notBlank}")
@XmlElement
private String key;
@NotBlank(message = "{flowData.dataProperty.className.notBlank}")
@XmlElement
private String className;
@XmlElement
private String packageName;
@XmlElement
private String tableName;
@NotBlank(message = "{flowData.dataProperty.name.notBlank}")
@XmlElement
private String name;
@XmlElement
private String dataDesc;
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public String getClassName() {
return className;
}
public void setClassName(String className) {
this.className = className;
}
public String getPackageName() {
return packageName;
}
public void setPackageName(String packageName) {
this.packageName = packageName;
}
public String getTableName() {
return tableName;
}
public void setTableName(String tableName) {
this.tableName = tableName;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDataDesc() {
return dataDesc;
}
public void setDataDesc(String dataDesc) {
this.dataDesc = dataDesc;
}
}
/*
* @Copyright (c) 2018 缪聪(mcg-helper@qq.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.com.glsx.process.modules.controller.admin.flow.data;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class DataRecord implements Serializable {
private static final long serialVersionUID = -1841232101261295734L;
@XmlAttribute
private String classField;
@XmlAttribute
private String tableField;
@XmlAttribute
private String comment;
@XmlAttribute
private String tableFieldType;
@XmlAttribute
private String dataType;
// @Pattern(regexp="^\\d+$", message = "{flowData.dataField.dataRecord.length.int}")
@XmlAttribute
private int length;
// @Pattern(regexp="^\\d+$", message = "{flowData.dataField.dataRecord.precision.notBlank}")
@XmlAttribute
private int precision;
@XmlAttribute
private boolean primary;
@XmlAttribute
private boolean autoincrement;
@XmlAttribute
private boolean mandatory;
@XmlAttribute
private String include;
public String getClassField() {
return classField;
}
public void setClassField(String classField) {
this.classField = classField;
}
public String getTableField() {
return tableField;
}
public void setTableField(String tableField) {
this.tableField = tableField;
}
public String getComment() {
return comment;
}
public void setComment(String comment) {
this.comment = comment;
}
public String getTableFieldType() {
return tableFieldType;
}
public void setTableFieldType(String tableFieldType) {
this.tableFieldType = tableFieldType;
}
public String getDataType() {
return dataType;
}
public void setDataType(String dataType) {
this.dataType = dataType;
}
public int getLength() {
return length;
}
public void setLength(int length) {
this.length = length;
}
public int getPrecision() {
return precision;
}
public void setPrecision(int precision) {
this.precision = precision;
}
public boolean isPrimary() {
return primary;
}
public void setPrimary(boolean primary) {
this.primary = primary;
}
public boolean isAutoincrement() {
return autoincrement;
}
public void setAutoincrement(boolean autoincrement) {
this.autoincrement = autoincrement;
}
public boolean isMandatory() {
return mandatory;
}
public void setMandatory(boolean mandatory) {
this.mandatory = mandatory;
}
public String getInclude() {
return include;
}
public void setInclude(String include) {
this.include = include;
}
}
/*
* @Copyright (c) 2018 缪聪(mcg-helper@qq.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.com.glsx.process.modules.controller.admin.flow.data;
import java.util.ArrayList;
import javax.validation.Valid;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.validator.constraints.NotBlank;
import cn.com.glsx.process.modules.controller.admin.flow.FlowBase;
import cn.com.glsx.process.modules.controller.admin.generate.ExecuteStruct;
import cn.com.glsx.process.modules.controller.admin.generate.RunResult;
import cn.com.glsx.process.modules.controller.admin.plugin.execute.ProcessContext;
import cn.com.glsx.process.modules.controller.admin.plugin.execute.strategy.FlowDataStrategy;
import cn.com.glsx.process.modules.controller.admin.sysenum.EletypeEnum;
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class FlowData extends FlowBase {
private static final long serialVersionUID = -642011996629764368L;
@NotBlank(message = "{flowData.id.NotBlank}")
@XmlAttribute
private String id;
@Valid
@XmlElement
private DataProperty dataProperty;
@Valid
@XmlElement
private DataField dataField;
@Override
public void prepare(ArrayList<String> sequence, ExecuteStruct executeStruct) throws Exception {
this.setFlowId(executeStruct.getFlowId());
this.setMcgWebScoketCode(executeStruct.getMcgWebScoketCode());
this.setOrderNum(executeStruct.getOrderNum());
this.setEletypeEnum(EletypeEnum.DATA);
ProcessContext processContext = new ProcessContext();
processContext.setProcessStrategy(new FlowDataStrategy());
processContext.prepare(sequence, this, executeStruct);
}
@Override
public RunResult execute(ExecuteStruct executeStruct) throws Exception {
ProcessContext processContext = new ProcessContext();
processContext.setProcessStrategy(new FlowDataStrategy());
RunResult runResult = processContext.run(this, executeStruct);
return runResult;
}
@Override
public String getId() {
return id;
}
@Override
public void setId(String id) {
this.id = id;
}
public DataProperty getDataProperty() {
return dataProperty;
}
public void setDataProperty(DataProperty dataProperty) {
this.dataProperty = dataProperty;
}
public DataField getDataField() {
return dataField;
}
public void setDataField(DataField dataField) {
this.dataField = dataField;
}
}
/*
* @Copyright (c) 2018 缪聪(mcg-helper@qq.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.com.glsx.process.modules.controller.admin.flow.data;
import java.io.Serializable;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class FlowDatas implements Serializable {
private static final long serialVersionUID = 4729087108631082808L;
@XmlElement
private List<FlowData> flowData;
public List<FlowData> getFlowData() {
return flowData;
}
public void setFlowData(List<FlowData> flowData) {
this.flowData = flowData;
}
}
/*
* @Copyright (c) 2018 缪聪(mcg-helper@qq.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.com.glsx.process.modules.controller.admin.flow.demo;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.validator.constraints.NotBlank;
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class DemoProperty implements Serializable {
private static final long serialVersionUID = 1L;
@NotBlank(message = "{flowDemo.demoProperty.key.notBlank}")
@XmlElement
private String key;
@NotBlank(message = "{flowDemo.demoProperty.name.notBlank}")
@XmlElement
private String name;
@XmlElement
private String desc;
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDesc() {
return desc;
}
public void setDesc(String desc) {
this.desc = desc;
}
}
/*
* @Copyright (c) 2018 缪聪(mcg-helper@qq.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.com.glsx.process.modules.controller.admin.flow.demo;
import java.util.ArrayList;
import javax.validation.Valid;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.validator.constraints.NotBlank;
import cn.com.glsx.process.modules.controller.admin.flow.FlowBase;
import cn.com.glsx.process.modules.controller.admin.generate.ExecuteStruct;
import cn.com.glsx.process.modules.controller.admin.generate.RunResult;
import cn.com.glsx.process.modules.controller.admin.plugin.execute.ProcessContext;
import cn.com.glsx.process.modules.controller.admin.plugin.execute.strategy.FlowDemoStrategy;
import cn.com.glsx.process.modules.controller.admin.sysenum.EletypeEnum;
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class FlowDemo extends FlowBase {
private static final long serialVersionUID = 1L;
@NotBlank(message = "{flowDemo.id.NotBlank}")
@XmlAttribute
private String id;
@Valid
@XmlElement
private DemoProperty demoProperty;
@Override
public void prepare(ArrayList<String> sequence, ExecuteStruct executeStruct) throws Exception {
this.setFlowId(executeStruct.getFlowId());
this.setMcgWebScoketCode(executeStruct.getMcgWebScoketCode());
this.setOrderNum(executeStruct.getOrderNum());
this.setEletypeEnum(EletypeEnum.DEMO);
ProcessContext processContext = new ProcessContext();
processContext.setProcessStrategy(new FlowDemoStrategy());
processContext.prepare(sequence, this, executeStruct);
}
@Override
public RunResult execute(ExecuteStruct executeStruct) throws Exception {
ProcessContext processContext = new ProcessContext();
processContext.setProcessStrategy(new FlowDemoStrategy());
RunResult runResult = processContext.run(this, executeStruct);
return runResult;
}
@Override
public String getId() {
return id;
}
@Override
public void setId(String id) {
this.id = id;
}
public DemoProperty getDemoProperty() {
return demoProperty;
}
public void setDemoProperty(DemoProperty demoProperty) {
this.demoProperty = demoProperty;
}
}
/*
* @Copyright (c) 2018 缪聪(mcg-helper@qq.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.com.glsx.process.modules.controller.admin.flow.demo;
import java.io.Serializable;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class FlowDemos implements Serializable {
private static final long serialVersionUID = 1L;
@XmlElement
private List<FlowDemo> flowDemo;
public List<FlowDemo> getFlowDemo() {
return flowDemo;
}
public void setFlowDemo(List<FlowDemo> flowDemo) {
this.flowDemo = flowDemo;
}
}
/*
* @Copyright (c) 2018 缪聪(mcg-helper@qq.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.com.glsx.process.modules.controller.admin.flow.end;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class EndProperty implements Serializable {
private static final long serialVersionUID = -6831068936775340739L;
@XmlElement
private String comment;
public String getComment() {
return comment;
}
public void setComment(String comment) {
this.comment = comment;
}
}
/*
* @Copyright (c) 2018 缪聪(mcg-helper@qq.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.com.glsx.process.modules.controller.admin.flow.end;
import java.util.ArrayList;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.validator.constraints.NotBlank;
import cn.com.glsx.process.modules.controller.admin.flow.FlowBase;
import cn.com.glsx.process.modules.controller.admin.generate.ExecuteStruct;
import cn.com.glsx.process.modules.controller.admin.generate.RunResult;
import cn.com.glsx.process.modules.controller.admin.plugin.execute.ProcessContext;
import cn.com.glsx.process.modules.controller.admin.plugin.execute.strategy.FlowEndStrategy;
import cn.com.glsx.process.modules.controller.admin.sysenum.EletypeEnum;
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class FlowEnd extends FlowBase {
private static final long serialVersionUID = 2912565642607464534L;
@NotBlank(message = "{flowEnd.endId.notBlank}")
@XmlAttribute
private String endId;
@XmlElement
private EndProperty endProperty;
@Override
public void prepare(ArrayList<String> sequence, ExecuteStruct executeStruct) throws Exception {
this.setFlowId(executeStruct.getFlowId());
this.setMcgWebScoketCode(executeStruct.getMcgWebScoketCode());
this.setOrderNum(executeStruct.getOrderNum());
this.setEletypeEnum(EletypeEnum.END);
ProcessContext processContext = new ProcessContext();
processContext.setProcessStrategy(new FlowEndStrategy());
processContext.prepare(sequence, this, executeStruct);
}
@Override
public RunResult execute(ExecuteStruct executeStruct) throws Exception {
ProcessContext processContext = new ProcessContext();
processContext.setProcessStrategy(new FlowEndStrategy());
RunResult runResult = processContext.run(this, executeStruct);
return runResult;
}
public EndProperty getEndProperty() {
return endProperty;
}
public void setEndProperty(EndProperty endProperty) {
this.endProperty = endProperty;
}
public String getEndId() {
return endId;
}
public void setEndId(String endId) {
this.endId = endId;
}
}
\ No newline at end of file
/*
* @Copyright (c) 2018 缪聪(mcg-helper@qq.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.com.glsx.process.modules.controller.admin.flow.git;
import java.util.ArrayList;
import javax.validation.Valid;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.validator.constraints.NotBlank;
import cn.com.glsx.process.modules.controller.admin.flow.FlowBase;
import cn.com.glsx.process.modules.controller.admin.generate.ExecuteStruct;
import cn.com.glsx.process.modules.controller.admin.generate.RunResult;
import cn.com.glsx.process.modules.controller.admin.plugin.execute.ProcessContext;
import cn.com.glsx.process.modules.controller.admin.plugin.execute.strategy.FlowGitStrategy;
import cn.com.glsx.process.modules.controller.admin.sysenum.EletypeEnum;
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class FlowGit extends FlowBase {
private static final long serialVersionUID = 1L;
@NotBlank(message = "{flowGit.id.notBlank}")
@XmlAttribute
private String id;
@Valid
@XmlElement
private GitProperty gitProperty;
@Override
public void prepare(ArrayList<String> sequence, ExecuteStruct executeStruct) throws Exception {
this.setFlowId(executeStruct.getFlowId());
this.setMcgWebScoketCode(executeStruct.getMcgWebScoketCode());
this.setOrderNum(executeStruct.getOrderNum());
this.setEletypeEnum(EletypeEnum.GIT);
ProcessContext processContext = new ProcessContext();
processContext.setProcessStrategy(new FlowGitStrategy());
processContext.prepare(sequence, this, executeStruct);
}
@Override
public RunResult execute(ExecuteStruct executeStruct) throws Exception {
ProcessContext processContext = new ProcessContext();
processContext.setProcessStrategy(new FlowGitStrategy());
RunResult runResult = processContext.run(this, executeStruct);;
return runResult;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public GitProperty getGitProperty() {
return gitProperty;
}
public void setGitProperty(GitProperty gitProperty) {
this.gitProperty = gitProperty;
}
}
/*
* @Copyright (c) 2018 缪聪(mcg-helper@qq.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.com.glsx.process.modules.controller.admin.flow.git;
import java.io.Serializable;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class FlowGits implements Serializable {
private static final long serialVersionUID = 1L;
@XmlElement
private List<FlowGit> flowGit;
public List<FlowGit> getFlowGit() {
return flowGit;
}
public void setFlowGit(List<FlowGit> flowGit) {
this.flowGit = flowGit;
}
}
/*
* @Copyright (c) 2018 缪聪(mcg-helper@qq.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.com.glsx.process.modules.controller.admin.flow.git;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.validator.constraints.NotBlank;
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class GitProperty implements Serializable {
private static final long serialVersionUID = 1L;
@NotBlank(message = "{flowGit.gitProperty.key.notBlank}")
@XmlElement
private String key;
@NotBlank(message = "{flowGit.gitProperty.name.notBlank}")
@XmlElement
private String name;
@XmlElement
private String remoteUrl;
@XmlElement
private String mode;
@XmlElement
private String userName;
@XmlElement
private String userPwd;
@XmlElement
private String branch;
@XmlElement
private String projectPath;
@XmlElement
private String desc;
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDesc() {
return desc;
}
public void setDesc(String desc) {
this.desc = desc;
}
public String getRemoteUrl() {
return remoteUrl;
}
public void setRemoteUrl(String remoteUrl) {
this.remoteUrl = remoteUrl;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getUserPwd() {
return userPwd;
}
public void setUserPwd(String userPwd) {
this.userPwd = userPwd;
}
public String getBranch() {
return branch;
}
public void setBranch(String branch) {
this.branch = branch;
}
public String getProjectPath() {
return projectPath;
}
public void setProjectPath(String projectPath) {
this.projectPath = projectPath;
}
public String getMode() {
return mode;
}
public void setMode(String mode) {
this.mode = mode;
}
}
/*
* @Copyright (c) 2018 缪聪(mcg-helper@qq.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.com.glsx.process.modules.controller.admin.flow.java;
import java.util.ArrayList;
import javax.validation.Valid;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.validator.constraints.NotBlank;
import cn.com.glsx.process.modules.controller.admin.flow.FlowBase;
import cn.com.glsx.process.modules.controller.admin.generate.ExecuteStruct;
import cn.com.glsx.process.modules.controller.admin.generate.RunResult;
import cn.com.glsx.process.modules.controller.admin.plugin.execute.ProcessContext;
import cn.com.glsx.process.modules.controller.admin.plugin.execute.strategy.FlowJavaStrategy;
import cn.com.glsx.process.modules.controller.admin.sysenum.EletypeEnum;
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class FlowJava extends FlowBase {
private static final long serialVersionUID = -644673564511787732L;
@NotBlank(message = "{flowJava.id.notBlank}")
@XmlAttribute
private String id;
@Valid
@XmlElement
private JavaCore javaCore;
@Valid
@XmlElement
private JavaProperty javaProperty;
@Override
public void prepare(ArrayList<String> sequence, ExecuteStruct executeStruct) throws Exception {
this.setFlowId(executeStruct.getFlowId());
this.setMcgWebScoketCode(executeStruct.getMcgWebScoketCode());
this.setOrderNum(executeStruct.getOrderNum());
this.setEletypeEnum(EletypeEnum.JAVA);
ProcessContext processContext = new ProcessContext();
processContext.setProcessStrategy(new FlowJavaStrategy());
processContext.prepare(sequence, this, executeStruct);
}
@Override
public RunResult execute(ExecuteStruct executeStruct) throws Exception {
ProcessContext processContext = new ProcessContext();
processContext.setProcessStrategy(new FlowJavaStrategy());
RunResult runResult = processContext.run(this, executeStruct);;
return runResult;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public JavaCore getJavaCore() {
return javaCore;
}
public void setJavaCore(JavaCore javaCore) {
this.javaCore = javaCore;
}
public JavaProperty getJavaProperty() {
return javaProperty;
}
public void setJavaProperty(JavaProperty javaProperty) {
this.javaProperty = javaProperty;
}
}
\ No newline at end of file
/*
* @Copyright (c) 2018 缪聪(mcg-helper@qq.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.com.glsx.process.modules.controller.admin.flow.java;
import java.io.Serializable;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class FlowJavas implements Serializable {
private static final long serialVersionUID = -9144738434201424684L;
@XmlElement
private List<FlowJava> flowJava;
public List<FlowJava> getFlowJava() {
return flowJava;
}
public void setFlowJava(List<FlowJava> flowJava) {
this.flowJava = flowJava;
}
}
/*
* @Copyright (c) 2018 缪聪(mcg-helper@qq.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.com.glsx.process.modules.controller.admin.flow.java;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.validator.constraints.NotBlank;
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class JavaCore implements Serializable {
private static final long serialVersionUID = 4782925487267366029L;
@NotBlank(message = "{flowJava.javaCore.source.notBlank}")
@XmlElement
private String source;
public String getSource() {
return source;
}
public void setSource(String source) {
this.source = source;
}
}
/*
* @Copyright (c) 2018 缪聪(mcg-helper@qq.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.com.glsx.process.modules.controller.admin.flow.java;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.validator.constraints.NotBlank;
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class JavaProperty implements Serializable {
private static final long serialVersionUID = -7531917158740164055L;
@NotBlank(message = "{flowJava.javaProperty.key.notBlank}")
@XmlElement
private String key;
@NotBlank(message = "{flowJava.javaProperty.name.notBlank}")
@XmlElement
private String name;
@XmlElement
private String javaDesc;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getJavaDesc() {
return javaDesc;
}
public void setJavaDesc(String javaDesc) {
this.javaDesc = javaDesc;
}
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
}
/*
* @Copyright (c) 2018 缪聪(mcg-helper@qq.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.com.glsx.process.modules.controller.admin.flow.json;
import java.util.ArrayList;
import javax.validation.Valid;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.validator.constraints.NotBlank;
import cn.com.glsx.process.modules.controller.admin.flow.FlowBase;
import cn.com.glsx.process.modules.controller.admin.generate.ExecuteStruct;
import cn.com.glsx.process.modules.controller.admin.generate.RunResult;
import cn.com.glsx.process.modules.controller.admin.plugin.execute.ProcessContext;
import cn.com.glsx.process.modules.controller.admin.plugin.execute.strategy.FlowJsonStrategy;
import cn.com.glsx.process.modules.controller.admin.sysenum.EletypeEnum;
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class FlowJson extends FlowBase {
private static final long serialVersionUID = -644673564511787732L;
@NotBlank(message = "{flowJson.id.notBlank}")
@XmlAttribute
private String id;
@Valid
@XmlElement
private JsonCore jsonCore;
@Valid
@XmlElement
private JsonProperty jsonProperty;
@Override
public void prepare(ArrayList<String> sequence, ExecuteStruct executeStruct) throws Exception {
this.setFlowId(executeStruct.getFlowId());
this.setMcgWebScoketCode(executeStruct.getMcgWebScoketCode());
this.setOrderNum(executeStruct.getOrderNum());
this.setEletypeEnum(EletypeEnum.JSON);
ProcessContext processContext = new ProcessContext();
processContext.setProcessStrategy(new FlowJsonStrategy());
processContext.prepare(sequence, this, executeStruct);
}
@Override
public RunResult execute(ExecuteStruct executeStruct) throws Exception {
ProcessContext processContext = new ProcessContext();
processContext.setProcessStrategy(new FlowJsonStrategy());
RunResult runResult = processContext.run(this, executeStruct);
return runResult;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public JsonCore getJsonCore() {
return jsonCore;
}
public void setJsonCore(JsonCore jsonCore) {
this.jsonCore = jsonCore;
}
public JsonProperty getJsonProperty() {
return jsonProperty;
}
public void setJsonProperty(JsonProperty jsonProperty) {
this.jsonProperty = jsonProperty;
}
}
\ No newline at end of file
/*
* @Copyright (c) 2018 缪聪(mcg-helper@qq.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.com.glsx.process.modules.controller.admin.flow.json;
import java.io.Serializable;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class FlowJsons implements Serializable {
private static final long serialVersionUID = -9144738434201424684L;
@XmlElement
private List<FlowJson> flowJson;
public List<FlowJson> getFlowJson() {
return flowJson;
}
public void setFlowJson(List<FlowJson> flowJson) {
this.flowJson = flowJson;
}
}
\ No newline at end of file
/*
* @Copyright (c) 2018 缪聪(mcg-helper@qq.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.com.glsx.process.modules.controller.admin.flow.json;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class JsonCore implements Serializable {
private static final long serialVersionUID = 4782925487267366029L;
@XmlElement
private String source;
public String getSource() {
return source;
}
public void setSource(String source) {
this.source = source;
}
}
/*
* @Copyright (c) 2018 缪聪(mcg-helper@qq.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.com.glsx.process.modules.controller.admin.flow.json;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.validator.constraints.NotBlank;
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class JsonProperty implements Serializable {
private static final long serialVersionUID = -7531917158740164055L;
@NotBlank(message = "{flowJson.jsonProperty.key.notBlank}")
@XmlElement
private String key;
@NotBlank(message = "{flowJson.jsonProperty.name.notBlank}")
@XmlElement
private String name;
@XmlElement
private String jsonDesc;
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getJsonDesc() {
return jsonDesc;
}
public void setJsonDesc(String jsonDesc) {
this.jsonDesc = jsonDesc;
}
}
/*
* @Copyright (c) 2018 缪聪(mcg-helper@qq.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.com.glsx.process.modules.controller.admin.flow.linux;
import java.util.ArrayList;
import javax.validation.Valid;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.validator.constraints.NotBlank;
import cn.com.glsx.process.modules.controller.admin.flow.FlowBase;
import cn.com.glsx.process.modules.controller.admin.generate.ExecuteStruct;
import cn.com.glsx.process.modules.controller.admin.generate.RunResult;
import cn.com.glsx.process.modules.controller.admin.plugin.execute.ProcessContext;
import cn.com.glsx.process.modules.controller.admin.plugin.execute.strategy.FlowLinuxStrategy;
import cn.com.glsx.process.modules.controller.admin.sysenum.EletypeEnum;
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class FlowLinux extends FlowBase {
private static final long serialVersionUID = 6228566251754129624L;
@NotBlank(message = "{flowLinux.id.notBlank}")
@XmlAttribute
private String id;
@Valid
@XmlElement
private LinuxCore linuxCore;
@Valid
@XmlElement
private LinuxProperty linuxProperty;
@Override
public void prepare(ArrayList<String> sequence, ExecuteStruct executeStruct) throws Exception {
this.setFlowId(executeStruct.getFlowId());
this.setMcgWebScoketCode(executeStruct.getMcgWebScoketCode());
this.setOrderNum(executeStruct.getOrderNum());
this.setEletypeEnum(EletypeEnum.LINUX);
ProcessContext processContext = new ProcessContext();
processContext.setProcessStrategy(new FlowLinuxStrategy());
processContext.prepare(sequence, this, executeStruct);
}
@Override
public RunResult execute(ExecuteStruct executeStruct) throws Exception {
ProcessContext processContext = new ProcessContext();
processContext.setProcessStrategy(new FlowLinuxStrategy());
RunResult runResult = processContext.run(this, executeStruct);
return runResult;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public LinuxCore getLinuxCore() {
return linuxCore;
}
public void setLinuxCore(LinuxCore linuxCore) {
this.linuxCore = linuxCore;
}
public LinuxProperty getLinuxProperty() {
return linuxProperty;
}
public void setLinuxProperty(LinuxProperty linuxProperty) {
this.linuxProperty = linuxProperty;
}
}
/*
* @Copyright (c) 2018 缪聪(mcg-helper@qq.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.com.glsx.process.modules.controller.admin.flow.linux;
import java.io.Serializable;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class FlowLinuxs implements Serializable {
private static final long serialVersionUID = 1L;
@XmlElement
private List<FlowLinux> flowLinux;
public List<FlowLinux> getFlowLinux() {
return flowLinux;
}
public void setFlowLinux(List<FlowLinux> flowLinux) {
this.flowLinux = flowLinux;
}
}
/*
* @Copyright (c) 2018 缪聪(mcg-helper@qq.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.com.glsx.process.modules.controller.admin.flow.linux;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.validator.constraints.NotBlank;
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class LinuxCore implements Serializable {
private static final long serialVersionUID = 1L;
@NotBlank(message = "{flowLinux.linuxCore.severSourceId.notBlank}")
@XmlElement
private String serverSourceId;
@NotBlank(message = "{flowLinux.linuxCore.connMode.notBlank}")
@XmlElement
private String connMode;
// @NotBlank(message = "{flowLinux.linuxCore.source.notBlank}")
@XmlElement
private String source;
@XmlElement
private String ip;
@XmlElement
private String port;
@XmlElement
private String user;
@XmlElement
private String pwd;
public String getSource() {
return source;
}
public void setSource(String source) {
this.source = source;
}
public String getServerSourceId() {
return serverSourceId;
}
public void setServerSourceId(String serverSourceId) {
this.serverSourceId = serverSourceId;
}
public String getConnMode() {
return connMode;
}
public void setConnMode(String connMode) {
this.connMode = connMode;
}
public String getIp() {
return ip;
}
public void setIp(String ip) {
this.ip = ip;
}
public String getPort() {
return port;
}
public void setPort(String port) {
this.port = port;
}
public String getUser() {
return user;
}
public void setUser(String user) {
this.user = user;
}
public String getPwd() {
return pwd;
}
public void setPwd(String pwd) {
this.pwd = pwd;
}
}
/*
* @Copyright (c) 2018 缪聪(mcg-helper@qq.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.com.glsx.process.modules.controller.admin.flow.linux;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.validator.constraints.NotBlank;
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class LinuxProperty implements Serializable {
private static final long serialVersionUID = 1L;
@NotBlank(message = "{flowLinux.linuxProperty.key.notBlank}")
@XmlElement
private String key;
@NotBlank(message = "{flowLinux.linuxProperty.name.notBlank}")
@XmlElement
private String name;
@XmlElement
private String linuxDesc;
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getLinuxDesc() {
return linuxDesc;
}
public void setLinuxDesc(String linuxDesc) {
this.linuxDesc = linuxDesc;
}
}
/*
* @Copyright (c) 2018 缪聪(mcg-helper@qq.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.com.glsx.process.modules.controller.admin.flow.loop;
import java.util.ArrayList;
import javax.validation.Valid;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.validator.constraints.NotBlank;
import cn.com.glsx.process.modules.controller.admin.flow.FlowBase;
import cn.com.glsx.process.modules.controller.admin.generate.ExecuteStruct;
import cn.com.glsx.process.modules.controller.admin.generate.RunResult;
import cn.com.glsx.process.modules.controller.admin.plugin.execute.ProcessContext;
import cn.com.glsx.process.modules.controller.admin.plugin.execute.strategy.FlowLoopStrategy;
import cn.com.glsx.process.modules.controller.admin.sysenum.EletypeEnum;
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class FlowLoop extends FlowBase {
private static final long serialVersionUID = 1L;
@NotBlank(message = "{flowLoop.id.notBlank}")
@XmlAttribute
private String id;
@Valid
@XmlElement
private LoopProperty loopProperty;
@Override
public void prepare(ArrayList<String> sequence, ExecuteStruct executeStruct) throws Exception {
this.setFlowId(executeStruct.getFlowId());
this.setMcgWebScoketCode(executeStruct.getMcgWebScoketCode());
this.setOrderNum(executeStruct.getOrderNum());
this.setEletypeEnum(EletypeEnum.LOOP);
ProcessContext processContext = new ProcessContext();
processContext.setProcessStrategy(new FlowLoopStrategy());
processContext.prepare(sequence, this, executeStruct);
}
@Override
public RunResult execute(ExecuteStruct executeStruct) throws Exception {
ProcessContext processContext = new ProcessContext();
processContext.setProcessStrategy(new FlowLoopStrategy());
RunResult runResult = processContext.run(this, executeStruct);;
return runResult;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public LoopProperty getLoopProperty() {
return loopProperty;
}
public void setLoopProperty(LoopProperty loopProperty) {
this.loopProperty = loopProperty;
}
}
/*
* @Copyright (c) 2018 缪聪(mcg-helper@qq.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.com.glsx.process.modules.controller.admin.flow.loop;
import java.io.Serializable;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class FlowLoops implements Serializable {
private static final long serialVersionUID = 1L;
@XmlElement
private List<FlowLoop> flowLoop;
public List<FlowLoop> getFlowLoop() {
return flowLoop;
}
public void setFlowLoop(List<FlowLoop> flowLoop) {
this.flowLoop = flowLoop;
}
}
/*
* @Copyright (c) 2018 缪聪(mcg-helper@qq.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.com.glsx.process.modules.controller.admin.flow.loop;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.validator.constraints.NotBlank;
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class LoopProperty implements Serializable {
private static final long serialVersionUID = 1L;
@NotBlank(message = "{flowLoop.loopProperty.key.notBlank}")
@XmlElement
private String key;
@NotBlank(message = "{flowLoop.loopProperty.name.notBlank}")
@XmlElement
private String name;
/* 循环类型 FlowLoopTypeEnum取值*/
@NotBlank(message = "{flowLoop.loopProperty.type.notBlank}")
@XmlElement
private String type;
@NotBlank(message = "{flowLoop.loopProperty.value.notBlank}")
@XmlElement
private String value;
@XmlElement
private String desc;
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDesc() {
return desc;
}
public void setDesc(String desc) {
this.desc = desc;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
}
/*
* @Copyright (c) 2018 缪聪(mcg-helper@qq.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.com.glsx.process.modules.controller.admin.flow.process;
import java.util.ArrayList;
import javax.validation.Valid;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.validator.constraints.NotBlank;
import cn.com.glsx.process.modules.controller.admin.flow.FlowBase;
import cn.com.glsx.process.modules.controller.admin.generate.ExecuteStruct;
import cn.com.glsx.process.modules.controller.admin.generate.RunResult;
import cn.com.glsx.process.modules.controller.admin.plugin.execute.ProcessContext;
import cn.com.glsx.process.modules.controller.admin.plugin.execute.strategy.FlowProcessStrategy;
import cn.com.glsx.process.modules.controller.admin.sysenum.EletypeEnum;
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class FlowProcess extends FlowBase {
private static final long serialVersionUID = 1L;
@NotBlank(message = "{flowProcess.id.notBlank}")
@XmlAttribute
private String id;
@Valid
@XmlElement
private ProcessProperty processProperty;
@Override
public void prepare(ArrayList<String> sequence, ExecuteStruct executeStruct) throws Exception {
this.setFlowId(executeStruct.getFlowId());
this.setMcgWebScoketCode(executeStruct.getMcgWebScoketCode());
this.setOrderNum(executeStruct.getOrderNum());
this.setEletypeEnum(EletypeEnum.PROCESS);
ProcessContext processContext = new ProcessContext();
processContext.setProcessStrategy(new FlowProcessStrategy());
processContext.prepare(sequence, this, executeStruct);
processContext.prepare(sequence, this, executeStruct);
}
@Override
public RunResult execute(ExecuteStruct executeStruct) throws Exception {
ProcessContext processContext = new ProcessContext();
processContext.setProcessStrategy(new FlowProcessStrategy());
RunResult runResult = processContext.run(this, executeStruct);
return runResult;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public ProcessProperty getProcessProperty() {
return processProperty;
}
public void setProcessProperty(ProcessProperty processProperty) {
this.processProperty = processProperty;
}
}
/*
* @Copyright (c) 2018 缪聪(mcg-helper@qq.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.com.glsx.process.modules.controller.admin.flow.process;
import java.io.Serializable;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class FlowProcesses implements Serializable {
private static final long serialVersionUID = 1L;
@XmlElement
private List<FlowProcess> flowProcess;
public List<FlowProcess> getFlowProcess() {
return flowProcess;
}
public void setFlowProcess(List<FlowProcess> flowProcess) {
this.flowProcess = flowProcess;
}
}
/*
* @Copyright (c) 2018 缪聪(mcg-helper@qq.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.com.glsx.process.modules.controller.admin.flow.process;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.validator.constraints.NotBlank;
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class ProcessProperty implements Serializable {
private static final long serialVersionUID = 1L;
@NotBlank(message = "{flowProcess.processProperty.key.notBlank}")
@XmlElement
private String key;
@NotBlank(message = "{flowProcess.processProperty.name.notBlank}")
@XmlElement
private String name;
/**
* 需要执行的子流程实例ID
*/
@NotBlank(message = "{flowProcess.processProperty.flowId.notBlank}")
@XmlElement
private String flowId;
@XmlElement
private String desc;
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDesc() {
return desc;
}
public void setDesc(String desc) {
this.desc = desc;
}
public String getFlowId() {
return flowId;
}
public void setFlowId(String flowId) {
this.flowId = flowId;
}
}
/*
* @Copyright (c) 2018 缪聪(mcg-helper@qq.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.com.glsx.process.modules.controller.admin.flow.python;
import java.util.ArrayList;
import javax.validation.Valid;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.validator.constraints.NotBlank;
import cn.com.glsx.process.modules.controller.admin.flow.FlowBase;
import cn.com.glsx.process.modules.controller.admin.generate.ExecuteStruct;
import cn.com.glsx.process.modules.controller.admin.generate.RunResult;
import cn.com.glsx.process.modules.controller.admin.plugin.execute.ProcessContext;
import cn.com.glsx.process.modules.controller.admin.plugin.execute.strategy.FlowPythonStrategy;
import cn.com.glsx.process.modules.controller.admin.sysenum.EletypeEnum;
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class FlowPython extends FlowBase {
private static final long serialVersionUID = 6228566251754129624L;
@NotBlank(message = "{flowPython.id.notBlank}")
@XmlAttribute
private String id;
@Valid
@XmlElement
private PythonCore pythonCore;
@Valid
@XmlElement
private PythonProperty pythonProperty;
@Override
public void prepare(ArrayList<String> sequence, ExecuteStruct executeStruct) throws Exception {
this.setFlowId(executeStruct.getFlowId());
this.setMcgWebScoketCode(executeStruct.getMcgWebScoketCode());
this.setOrderNum(executeStruct.getOrderNum());
this.setEletypeEnum(EletypeEnum.PYTHON);
ProcessContext processContext = new ProcessContext();
processContext.setProcessStrategy(new FlowPythonStrategy());
processContext.prepare(sequence, this, executeStruct);
}
@Override
public RunResult execute(ExecuteStruct executeStruct) throws Exception {
ProcessContext processContext = new ProcessContext();
processContext.setProcessStrategy(new FlowPythonStrategy());
RunResult runResult = processContext.run(this, executeStruct);
return runResult;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public PythonCore getPythonCore() {
return pythonCore;
}
public void setPythonCore(PythonCore pythonCore) {
this.pythonCore = pythonCore;
}
public PythonProperty getPythonProperty() {
return pythonProperty;
}
public void setPythonProperty(PythonProperty pythonProperty) {
this.pythonProperty = pythonProperty;
}
}
/*
* @Copyright (c) 2018 缪聪(mcg-helper@qq.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.com.glsx.process.modules.controller.admin.flow.python;
import java.io.Serializable;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class FlowPythons implements Serializable {
private static final long serialVersionUID = 5857290040486936642L;
@XmlElement
private List<FlowPython> flowPython;
public List<FlowPython> getFlowPython() {
return flowPython;
}
public void setFlowPython(List<FlowPython> flowPython) {
this.flowPython = flowPython;
}
}
/*
* @Copyright (c) 2018 缪聪(mcg-helper@qq.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.com.glsx.process.modules.controller.admin.flow.python;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.validator.constraints.NotBlank;
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class PythonCore implements Serializable {
private static final long serialVersionUID = 2441780332288469398L;
@NotBlank(message = "{flowPython.pythonCore.source.notBlank}")
@XmlElement
private String source;
public String getSource() {
return source;
}
public void setSource(String source) {
this.source = source;
}
}
/*
* @Copyright (c) 2018 缪聪(mcg-helper@qq.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.com.glsx.process.modules.controller.admin.flow.python;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.validator.constraints.NotBlank;
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class PythonProperty implements Serializable {
private static final long serialVersionUID = 4924529253652851842L;
@NotBlank(message = "{flowPython.pythonProperty.key.notBlank}")
@XmlElement
private String key;
@NotBlank(message = "{flowPython.pythonProperty.name.notBlank}")
@XmlElement
private String name;
@XmlElement
private String pythonDesc;
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getPythonDesc() {
return pythonDesc;
}
public void setPythonDesc(String pythonDesc) {
this.pythonDesc = pythonDesc;
}
}
/*
* @Copyright (c) 2018 缪聪(mcg-helper@qq.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.com.glsx.process.modules.controller.admin.flow.script;
import java.util.ArrayList;
import javax.validation.Valid;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.validator.constraints.NotBlank;
import cn.com.glsx.process.modules.controller.admin.flow.FlowBase;
import cn.com.glsx.process.modules.controller.admin.generate.ExecuteStruct;
import cn.com.glsx.process.modules.controller.admin.generate.RunResult;
import cn.com.glsx.process.modules.controller.admin.plugin.execute.ProcessContext;
import cn.com.glsx.process.modules.controller.admin.plugin.execute.strategy.FlowScriptStrategy;
import cn.com.glsx.process.modules.controller.admin.sysenum.EletypeEnum;
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class FlowScript extends FlowBase {
private static final long serialVersionUID = 1319153774376874270L;
@NotBlank(message = "{flowScript.scriptId.notBlank}")
@XmlAttribute
private String scriptId;
@Valid
@XmlElement
private ScriptCore scriptCore;
@Valid
@XmlElement
private ScriptProperty scriptProperty;
@Override
public void prepare(ArrayList<String> sequence, ExecuteStruct executeStruct) throws Exception {
this.setFlowId(executeStruct.getFlowId());
this.setMcgWebScoketCode(executeStruct.getMcgWebScoketCode());
this.setOrderNum(executeStruct.getOrderNum());
this.setEletypeEnum(EletypeEnum.SCRIPT);
ProcessContext processContext = new ProcessContext();
processContext.setProcessStrategy(new FlowScriptStrategy());
processContext.prepare(sequence, this, executeStruct);
}
@Override
public RunResult execute(ExecuteStruct executeStruct) throws Exception {
ProcessContext processContext = new ProcessContext();
processContext.setProcessStrategy(new FlowScriptStrategy());
RunResult runResult = processContext.run(this, executeStruct);
return runResult;
}
public String getScriptId() {
return scriptId;
}
public void setScriptId(String scriptId) {
this.scriptId = scriptId;
}
public ScriptCore getScriptCore() {
return scriptCore;
}
public void setScriptCore(ScriptCore scriptCore) {
this.scriptCore = scriptCore;
}
public ScriptProperty getScriptProperty() {
return scriptProperty;
}
public void setScriptProperty(ScriptProperty scriptProperty) {
this.scriptProperty = scriptProperty;
}
}
\ No newline at end of file
/*
* @Copyright (c) 2018 缪聪(mcg-helper@qq.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.com.glsx.process.modules.controller.admin.flow.script;
import java.io.Serializable;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class FlowScripts implements Serializable {
private static final long serialVersionUID = -2877153657875854559L;
@XmlElement
private List<FlowScript> flowScript;
public List<FlowScript> getFlowScript() {
return flowScript;
}
public void setFlowScript(List<FlowScript> flowScript) {
this.flowScript = flowScript;
}
}
/*
* @Copyright (c) 2018 缪聪(mcg-helper@qq.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.com.glsx.process.modules.controller.admin.flow.script;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.validator.constraints.NotBlank;
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class ScriptCore implements Serializable {
private static final long serialVersionUID = 6297648768592883820L;
@NotBlank(message = "{flowScript.scriptCore.source.notBlank}")
@XmlElement
private String source;
public String getSource() {
return source;
}
public void setSource(String source) {
this.source = source;
}
}
/*
* @Copyright (c) 2018 缪聪(mcg-helper@qq.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.com.glsx.process.modules.controller.admin.flow.script;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.validator.constraints.NotBlank;
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class ScriptProperty implements Serializable {
private static final long serialVersionUID = -7531917158740164055L;
@NotBlank(message = "{flowScript.scriptProperty.key.notBlank}")
@XmlElement
private String key;
@NotBlank(message = "{flowScript.scriptProperty.scriptName.notBlank}")
@XmlElement
private String scriptName;
@XmlElement
private String scriptDesc;
public String getScriptName() {
return scriptName;
}
public void setScriptName(String scriptName) {
this.scriptName = scriptName;
}
public String getScriptDesc() {
return scriptDesc;
}
public void setScriptDesc(String scriptDesc) {
this.scriptDesc = scriptDesc;
}
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
}
/*
* @Copyright (c) 2018 缪聪(mcg-helper@qq.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.com.glsx.process.modules.controller.admin.flow.sequence;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class FlowSequence implements Serializable {
private static final long serialVersionUID = 7472110061574904481L;
@XmlAttribute
private String sequenceId;
@XmlAttribute
private String sourceId;
@XmlAttribute
private String targetId;
public String getSequenceId() {
return sequenceId;
}
public void setSequenceId(String sequenceId) {
this.sequenceId = sequenceId;
}
public String getSourceId() {
return sourceId;
}
public void setSourceId(String sourceId) {
this.sourceId = sourceId;
}
public String getTargetId() {
return targetId;
}
public void setTargetId(String targetId) {
this.targetId = targetId;
}
}
/*
* @Copyright (c) 2018 缪聪(mcg-helper@qq.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.com.glsx.process.modules.controller.admin.flow.sequence;
import java.io.Serializable;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class FlowSequences implements Serializable {
private static final long serialVersionUID = 6505107587155092358L;
@XmlElement
private List<FlowSequence> flowSequences;
public List<FlowSequence> getFlowSequences() {
return flowSequences;
}
public void setFlowSequences(List<FlowSequence> flowSequences) {
this.flowSequences = flowSequences;
}
}
/*
* @Copyright (c) 2018 缪聪(mcg-helper@qq.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.com.glsx.process.modules.controller.admin.flow.sftp;
import java.util.ArrayList;
import javax.validation.Valid;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.validator.constraints.NotBlank;
import cn.com.glsx.process.modules.controller.admin.flow.FlowBase;
import cn.com.glsx.process.modules.controller.admin.generate.ExecuteStruct;
import cn.com.glsx.process.modules.controller.admin.generate.RunResult;
import cn.com.glsx.process.modules.controller.admin.plugin.execute.ProcessContext;
import cn.com.glsx.process.modules.controller.admin.plugin.execute.strategy.FlowSftpStrategy;
import cn.com.glsx.process.modules.controller.admin.sysenum.EletypeEnum;
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class FlowSftp extends FlowBase {
private static final long serialVersionUID = 1L;
@NotBlank(message = "{flowSftp.id.notBlank}")
@XmlAttribute
private String id;
@Valid
@XmlElement
private SftpProperty sftpProperty;
@XmlElement
private SftpUpload sftpUpload;
@Override
public void prepare(ArrayList<String> sequence, ExecuteStruct executeStruct) throws Exception {
this.setFlowId(executeStruct.getFlowId());
this.setMcgWebScoketCode(executeStruct.getMcgWebScoketCode());
this.setOrderNum(executeStruct.getOrderNum());
this.setEletypeEnum(EletypeEnum.SFTP);
ProcessContext processContext = new ProcessContext();
processContext.setProcessStrategy(new FlowSftpStrategy());
processContext.prepare(sequence, this, executeStruct);
}
@Override
public RunResult execute(ExecuteStruct executeStruct) throws Exception {
ProcessContext processContext = new ProcessContext();
processContext.setProcessStrategy(new FlowSftpStrategy());
RunResult runResult = processContext.run(this, executeStruct);
return runResult;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public SftpProperty getSftpProperty() {
return sftpProperty;
}
public void setSftpProperty(SftpProperty sftpProperty) {
this.sftpProperty = sftpProperty;
}
public SftpUpload getSftpUpload() {
return sftpUpload;
}
public void setSftpUpload(SftpUpload sftpUpload) {
this.sftpUpload = sftpUpload;
}
}
package cn.com.glsx.process.modules.controller.admin.flow.sftp;
import java.io.Serializable;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class FlowSftps implements Serializable {
private static final long serialVersionUID = 1L;
@XmlElement
private List<FlowSftp> flowSftp;
public List<FlowSftp> getFlowSftp() {
return flowSftp;
}
public void setFlowSftp(List<FlowSftp> flowSftp) {
this.flowSftp = flowSftp;
}
}
/*
* @Copyright (c) 2018 缪聪(mcg-helper@qq.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.com.glsx.process.modules.controller.admin.flow.sftp;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.validator.constraints.NotBlank;
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class SftpProperty implements Serializable {
private static final long serialVersionUID = 1L;
@NotBlank(message = "{flowSftp.sftpProperty.key.notBlank}")
@XmlElement
private String key;
@NotBlank(message = "{flowSftp.sftpProperty.name.notBlank}")
@XmlElement
private String name;
@NotBlank(message = "{flowSftp.sftpProperty.severSourceId.notBlank}")
@XmlElement
private String serverSourceId;
@NotBlank(message = "{flowSftp.sftpProperty.connMode.notBlank}")
@XmlElement
private String connMode;
@XmlElement
private String ip;
@XmlElement
private String port;
@XmlElement
private String user;
@XmlElement
private String pwd;
@XmlElement
private String uploadPath;
@XmlElement
private String sourceFilePath;
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getServerSourceId() {
return serverSourceId;
}
public void setServerSourceId(String serverSourceId) {
this.serverSourceId = serverSourceId;
}
public String getConnMode() {
return connMode;
}
public void setConnMode(String connMode) {
this.connMode = connMode;
}
public String getIp() {
return ip;
}
public void setIp(String ip) {
this.ip = ip;
}
public String getPort() {
return port;
}
public void setPort(String port) {
this.port = port;
}
public String getUser() {
return user;
}
public void setUser(String user) {
this.user = user;
}
public String getPwd() {
return pwd;
}
public void setPwd(String pwd) {
this.pwd = pwd;
}
public String getUploadPath() {
return uploadPath;
}
public void setUploadPath(String uploadPath) {
this.uploadPath = uploadPath;
}
public String getSourceFilePath() {
return sourceFilePath;
}
public void setSourceFilePath(String sourceFilePath) {
this.sourceFilePath = sourceFilePath;
}
}
/*
* @Copyright (c) 2018 缪聪(mcg-helper@qq.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.com.glsx.process.modules.controller.admin.flow.sftp;
import java.io.Serializable;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class SftpUpload implements Serializable {
private static final long serialVersionUID = 1L;
@XmlElement
private List<SftpUploadRecord> sftpUploadRecords;
public List<SftpUploadRecord> getSftpUploadRecords() {
return sftpUploadRecords;
}
public void setSftpUploadRecords(List<SftpUploadRecord> sftpUploadRecords) {
this.sftpUploadRecords = sftpUploadRecords;
}
}
package cn.com.glsx.process.modules.controller.admin.flow.sftp;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class SftpUploadRecord implements Serializable {
private static final long serialVersionUID = 1L;
/* 源文件上传全路径 */
@XmlElement
private String filePath;
/* 上传ftp路径 */
@XmlElement
private String uploadPath;
/* 在SftpOperationTypeEnum中定义 */
@XmlElement
private String type;
@XmlElement
private String note;
public String getFilePath() {
return filePath;
}
public void setFilePath(String filePath) {
this.filePath = filePath;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getNote() {
return note;
}
public void setNote(String note) {
this.note = note;
}
public String getUploadPath() {
return uploadPath;
}
public void setUploadPath(String uploadPath) {
this.uploadPath = uploadPath;
}
}
\ No newline at end of file
/*
* @Copyright (c) 2018 缪聪(mcg-helper@qq.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.com.glsx.process.modules.controller.admin.flow.sqlexecute;
import java.util.ArrayList;
import javax.validation.Valid;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.validator.constraints.NotBlank;
import cn.com.glsx.process.modules.controller.admin.flow.FlowBase;
import cn.com.glsx.process.modules.controller.admin.generate.ExecuteStruct;
import cn.com.glsx.process.modules.controller.admin.generate.RunResult;
import cn.com.glsx.process.modules.controller.admin.plugin.execute.ProcessContext;
import cn.com.glsx.process.modules.controller.admin.plugin.execute.strategy.FlowSqlExecuteStrategy;
import cn.com.glsx.process.modules.controller.admin.sysenum.EletypeEnum;
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class FlowSqlExecute extends FlowBase {
private static final long serialVersionUID = -1239847003886177416L;
@NotBlank(message = "{sqlExecute.id.notBlank}")
@XmlAttribute
private String id;
@Valid
@XmlElement
private SqlExecuteProperty sqlExecuteProperty;
@Valid
@XmlElement
private SqlExecuteCore sqlExecuteCore;
@Override
public void prepare(ArrayList<String> sequence, ExecuteStruct executeStruct) throws Exception {
this.setFlowId(executeStruct.getFlowId());
this.setMcgWebScoketCode(executeStruct.getMcgWebScoketCode());
this.setOrderNum(executeStruct.getOrderNum());
this.setEletypeEnum(EletypeEnum.SQLEXECUTE);
ProcessContext processContext = new ProcessContext();
processContext.setProcessStrategy(new FlowSqlExecuteStrategy());
processContext.prepare(sequence, this, executeStruct);
}
@Override
public RunResult execute(ExecuteStruct executeStruct) throws Exception {
ProcessContext processContext = new ProcessContext();
processContext.setProcessStrategy(new FlowSqlExecuteStrategy());
RunResult runResult = processContext.run(this, executeStruct);
return runResult;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public SqlExecuteProperty getSqlExecuteProperty() {
return sqlExecuteProperty;
}
public void setSqlExecuteProperty(SqlExecuteProperty sqlExecuteProperty) {
this.sqlExecuteProperty = sqlExecuteProperty;
}
public SqlExecuteCore getSqlExecuteCore() {
return sqlExecuteCore;
}
public void setSqlExecuteCore(SqlExecuteCore sqlExecuteCore) {
this.sqlExecuteCore = sqlExecuteCore;
}
}
\ No newline at end of file
/*
* @Copyright (c) 2018 缪聪(mcg-helper@qq.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.com.glsx.process.modules.controller.admin.flow.sqlexecute;
import java.io.Serializable;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class FlowSqlExecutes implements Serializable {
private static final long serialVersionUID = -3977540696720946841L;
@XmlElement
private List<FlowSqlExecute> flowSqlExecute;
public List<FlowSqlExecute> getFlowSqlExecute() {
return flowSqlExecute;
}
public void setFlowSqlExecute(List<FlowSqlExecute> flowSqlExecute) {
this.flowSqlExecute = flowSqlExecute;
}
}
/*
* @Copyright (c) 2018 缪聪(mcg-helper@qq.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.com.glsx.process.modules.controller.admin.flow.sqlexecute;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.validator.constraints.NotBlank;
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class SqlExecuteCore implements Serializable {
private static final long serialVersionUID = -1382167129121952046L;
@NotBlank(message = "{sqlExecute.sqlExecuteCore.dataSourceId.notBlank}")
@XmlElement
private String dataSourceId;
@NotBlank(message = "{sqlExecute.sqlExecuteCore.notBlank}")
@XmlElement
private String source;
public String getDataSourceId() {
return dataSourceId;
}
public void setDataSourceId(String dataSourceId) {
this.dataSourceId = dataSourceId;
}
public String getSource() {
return source;
}
public void setSource(String source) {
this.source = source;
}
}
\ No newline at end of file
/*
* @Copyright (c) 2018 缪聪(mcg-helper@qq.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.com.glsx.process.modules.controller.admin.flow.sqlexecute;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.validator.constraints.NotBlank;
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class SqlExecuteProperty implements Serializable {
private static final long serialVersionUID = -1034892158608340729L;
@NotBlank(message = "{sqlExecute.sqlExecuteProperty.key.notBlank}")
@XmlElement
private String key;
@NotBlank(message = "{sqlExecute.sqlExecuteProperty.name.notBlank}")
@XmlElement
private String name;
@XmlElement
private String desc;
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDesc() {
return desc;
}
public void setDesc(String desc) {
this.desc = desc;
}
}
\ No newline at end of file
/*
* @Copyright (c) 2018 缪聪(mcg-helper@qq.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.com.glsx.process.modules.controller.admin.flow.sqlquery;
import java.util.ArrayList;
import javax.validation.Valid;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.validator.constraints.NotBlank;
import cn.com.glsx.process.modules.controller.admin.flow.FlowBase;
import cn.com.glsx.process.modules.controller.admin.generate.ExecuteStruct;
import cn.com.glsx.process.modules.controller.admin.generate.RunResult;
import cn.com.glsx.process.modules.controller.admin.plugin.execute.ProcessContext;
import cn.com.glsx.process.modules.controller.admin.plugin.execute.strategy.FlowSqlQueryStrategy;
import cn.com.glsx.process.modules.controller.admin.sysenum.EletypeEnum;
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class FlowSqlQuery extends FlowBase {
private static final long serialVersionUID = -7721981742663194475L;
@NotBlank(message = "{sqlQuery.id.notBlank}")
@XmlAttribute
private String id;
@Valid
@XmlElement
private SqlQueryProperty sqlQueryProperty;
@Valid
@XmlElement
private SqlQueryCore sqlQueryCore;
@Override
public void prepare(ArrayList<String> sequence, ExecuteStruct executeStruct) throws Exception {
this.setFlowId(executeStruct.getFlowId());
this.setMcgWebScoketCode(executeStruct.getMcgWebScoketCode());
this.setOrderNum(executeStruct.getOrderNum());
this.setEletypeEnum(EletypeEnum.SQLQUERY);
ProcessContext processContext = new ProcessContext();
processContext.setProcessStrategy(new FlowSqlQueryStrategy());
processContext.prepare(sequence, this, executeStruct);
}
@Override
public RunResult execute(ExecuteStruct executeStruct) throws Exception {
ProcessContext processContext = new ProcessContext();
processContext.setProcessStrategy(new FlowSqlQueryStrategy());
RunResult runResult = processContext.run(this, executeStruct);
return runResult;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public SqlQueryProperty getSqlQueryProperty() {
return sqlQueryProperty;
}
public void setSqlQueryProperty(SqlQueryProperty sqlQueryProperty) {
this.sqlQueryProperty = sqlQueryProperty;
}
public SqlQueryCore getSqlQueryCore() {
return sqlQueryCore;
}
public void setSqlQueryCore(SqlQueryCore sqlQueryCore) {
this.sqlQueryCore = sqlQueryCore;
}
}
\ No newline at end of file
/*
* @Copyright (c) 2018 缪聪(mcg-helper@qq.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.com.glsx.process.modules.controller.admin.flow.sqlquery;
import java.io.Serializable;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class FlowSqlQuerys implements Serializable {
private static final long serialVersionUID = 4703941532479840821L;
@XmlElement
private List<FlowSqlQuery> flowSqlQuery;
public List<FlowSqlQuery> getFlowSqlQuery() {
return flowSqlQuery;
}
public void setFlowSqlQuery(List<FlowSqlQuery> flowSqlQuery) {
this.flowSqlQuery = flowSqlQuery;
}
}
/*
* @Copyright (c) 2018 缪聪(mcg-helper@qq.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.com.glsx.process.modules.controller.admin.flow.sqlquery;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.validator.constraints.NotBlank;
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class SqlQueryCore implements Serializable {
private static final long serialVersionUID = 4178574738078826151L;
@NotBlank(message = "{sqlQuery.sqlQueryCore.dataSourceId.notBlank}")
@XmlElement
private String dataSourceId;
@NotBlank(message = "{sqlQuery.sqlQueryCore.notBlank}")
@XmlElement
private String source;
public String getSource() {
return source;
}
public void setSource(String source) {
this.source = source;
}
public String getDataSourceId() {
return dataSourceId;
}
public void setDataSourceId(String dataSourceId) {
this.dataSourceId = dataSourceId;
}
}
\ No newline at end of file
/*
* @Copyright (c) 2018 缪聪(mcg-helper@qq.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.com.glsx.process.modules.controller.admin.flow.sqlquery;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.validator.constraints.NotBlank;
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class SqlQueryProperty implements Serializable {
private static final long serialVersionUID = 2219488336817995514L;
@NotBlank(message = "{sqlQuery.sqlQueryProperty.key.notBlank}")
@XmlElement
private String key;
@NotBlank(message = "{sqlQuery.sqlQueryProperty.name.notBlank}")
@XmlElement
private String name;
@XmlElement
private String desc;
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDesc() {
return desc;
}
public void setDesc(String desc) {
this.desc = desc;
}
}
/*
* @Copyright (c) 2018 缪聪(mcg-helper@qq.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.com.glsx.process.modules.controller.admin.flow.start;
import java.util.ArrayList;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.validator.constraints.NotEmpty;
import cn.com.glsx.process.modules.controller.admin.flow.FlowBase;
import cn.com.glsx.process.modules.controller.admin.generate.ExecuteStruct;
import cn.com.glsx.process.modules.controller.admin.generate.RunResult;
import cn.com.glsx.process.modules.controller.admin.plugin.execute.ProcessContext;
import cn.com.glsx.process.modules.controller.admin.plugin.execute.strategy.FlowStartStrategy;
import cn.com.glsx.process.modules.controller.admin.sysenum.EletypeEnum;
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class FlowStart extends FlowBase {
private static final long serialVersionUID = -5856043204850132040L;
@NotNull(message = "{flowStart.startId.null}")
@NotEmpty(message = "{flowStart.startId.empty}")
@XmlAttribute
private String startId;
@Valid
@NotNull(message = "{flowStart.startProperty.null}")
@XmlElement
private StartProperty startProperty;
@Override
public void prepare(ArrayList<String> sequence, ExecuteStruct executeStruct) throws Exception {
this.setFlowId(executeStruct.getFlowId());
this.setMcgWebScoketCode(executeStruct.getMcgWebScoketCode());
this.setOrderNum(executeStruct.getOrderNum());
this.setEletypeEnum(EletypeEnum.START);
ProcessContext processContext = new ProcessContext();
processContext.setProcessStrategy(new FlowStartStrategy());
processContext.prepare(sequence, this, executeStruct);
}
@Override
public RunResult execute(ExecuteStruct executeStruct) throws Exception {
ProcessContext processContext = new ProcessContext();
processContext.setProcessStrategy(new FlowStartStrategy());
RunResult runResult = processContext.run(this, executeStruct);
return runResult;
}
public String getStartId() {
return startId;
}
public void setStartId(String startId) {
this.startId = startId;
}
public StartProperty getStartProperty() {
return startProperty;
}
public void setStartProperty(StartProperty startProperty) {
this.startProperty = startProperty;
}
}
\ No newline at end of file
/*
* @Copyright (c) 2018 缪聪(mcg-helper@qq.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.com.glsx.process.modules.controller.admin.flow.start;
import java.io.Serializable;
import java.util.List;
import javax.validation.Valid;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class StartProperty implements Serializable {
private static final long serialVersionUID = -6831068936775340739L;
@Valid
@XmlElement
private List<Var> var;
public List<Var> getVar() {
return var;
}
public void setVar(List<Var> var) {
this.var = var;
}
}
/*
* @Copyright (c) 2018 缪聪(mcg-helper@qq.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.com.glsx.process.modules.controller.admin.flow.start;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class Var implements Serializable {
private static final long serialVersionUID = -3905729931199785787L;
// @NotBlank(message = "{flowStart.startProperty.var.key.notBlank}")
@XmlAttribute
private String key;
// @NotBlank(message = "{flowStart.startProperty.var.value.notBlank}")
@XmlAttribute
private String value;
@XmlAttribute
private String desc;
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public String getDesc() {
return desc;
}
public void setDesc(String desc) {
this.desc = desc;
}
}
/*
* @Copyright (c) 2018 缪聪(mcg-helper@qq.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.com.glsx.process.modules.controller.admin.flow.text;
import java.util.ArrayList;
import javax.validation.Valid;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.validator.constraints.NotBlank;
import cn.com.glsx.process.modules.controller.admin.flow.FlowBase;
import cn.com.glsx.process.modules.controller.admin.generate.ExecuteStruct;
import cn.com.glsx.process.modules.controller.admin.generate.RunResult;
import cn.com.glsx.process.modules.controller.admin.plugin.execute.ProcessContext;
import cn.com.glsx.process.modules.controller.admin.plugin.execute.strategy.FlowTextStrategy;
import cn.com.glsx.process.modules.controller.admin.sysenum.EletypeEnum;
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class FlowText extends FlowBase {
private static final long serialVersionUID = 1950493018293020319L;
@NotBlank(message = "{flowText.textId.notBlank}")
@XmlAttribute
private String textId;
@Valid
@XmlElement
private TextProperty textProperty;
@Valid
@XmlElement
private TextCore textCore;
@Override
public void prepare(ArrayList<String> sequence, ExecuteStruct executeStruct) throws Exception {
this.setFlowId(executeStruct.getFlowId());
this.setMcgWebScoketCode(executeStruct.getMcgWebScoketCode());
this.setOrderNum(executeStruct.getOrderNum());
this.setEletypeEnum(EletypeEnum.TEXT);
ProcessContext processContext = new ProcessContext();
processContext.setProcessStrategy(new FlowTextStrategy());
processContext.prepare(sequence, this, executeStruct);
}
@Override
public RunResult execute(ExecuteStruct executeStruct) throws Exception {
ProcessContext processContext = new ProcessContext();
processContext.setProcessStrategy(new FlowTextStrategy());
RunResult runResult = processContext.run(this, executeStruct);
return runResult;
}
public String getTextId() {
return textId;
}
public void setTextId(String textId) {
this.textId = textId;
}
public TextProperty getTextProperty() {
return textProperty;
}
public void setTextProperty(TextProperty textProperty) {
this.textProperty = textProperty;
}
public TextCore getTextCore() {
return textCore;
}
public void setTextCore(TextCore textCore) {
this.textCore = textCore;
}
}
/*
* @Copyright (c) 2018 缪聪(mcg-helper@qq.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.com.glsx.process.modules.controller.admin.flow.text;
import java.io.Serializable;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class FlowTexts implements Serializable {
private static final long serialVersionUID = -2410259389896915309L;
@XmlElement
private List<FlowText> flowText;
public List<FlowText> getFlowText() {
return flowText;
}
public void setFlowText(List<FlowText> flowText) {
this.flowText = flowText;
}
}
/*
* @Copyright (c) 2018 缪聪(mcg-helper@qq.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.com.glsx.process.modules.controller.admin.flow.text;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class TextCore implements Serializable {
private static final long serialVersionUID = -853611663119577286L;
@XmlElement
private String source;
public String getSource() {
return source;
}
public void setSource(String source) {
this.source = source;
}
}
\ No newline at end of file
/*
* @Copyright (c) 2018 缪聪(mcg-helper@qq.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.com.glsx.process.modules.controller.admin.flow.text;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.validator.constraints.NotBlank;
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class TextProperty implements Serializable {
private static final long serialVersionUID = -9222927738223425357L;
@NotBlank(message = "{flowText.textProperty.name.notBlank}")
@XmlElement
private String name;
@NotBlank(message = "{flowText.textProperty.key.notBlank}")
@XmlElement
private String key;
@NotBlank(message = "{flowText.textProperty.fileName.notBlank}")
@XmlElement
private String fileName;
@NotBlank(message = "{flowText.textProperty.outMode.notBlank}")
@XmlElement
private String outMode;
@NotBlank(message = "{flowText.textProperty.outPutPath.notBlank}")
@XmlElement
private String outPutPath;
public String getFileName() {
return fileName;
}
public void setFileName(String fileName) {
this.fileName = fileName;
}
public String getOutMode() {
return outMode;
}
public void setOutMode(String outMode) {
this.outMode = outMode;
}
public String getOutPutPath() {
return outPutPath;
}
public void setOutPutPath(String outPutPath) {
this.outPutPath = outPutPath;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
}
/*
* @Copyright (c) 2018 缪聪(mcg-helper@qq.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.com.glsx.process.modules.controller.admin.flow.web;
public class WebConnector {
private String connectorId;
private String sourceId;
private String targetId;
public String getConnectorId() {
return connectorId;
}
public void setConnectorId(String connectorId) {
this.connectorId = connectorId;
}
public String getSourceId() {
return sourceId;
}
public void setSourceId(String sourceId) {
this.sourceId = sourceId;
}
public String getTargetId() {
return targetId;
}
public void setTargetId(String targetId) {
this.targetId = targetId;
}
}
/*
* @Copyright (c) 2018 缪聪(mcg-helper@qq.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.com.glsx.process.modules.controller.admin.flow.web;
import org.hibernate.validator.constraints.NotBlank;
public class WebElement {
@NotBlank(message = "{webStruct.webElement.id.NotBlank}")
private String id;
private String label;
private String name;
private String width;
private String height;
private String classname;
private String eletype;
private String clone;
private String left;
private String top;
private String sign;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getWidth() {
return width;
}
public void setWidth(String width) {
this.width = width;
}
public String getHeight() {
return height;
}
public void setHeight(String height) {
this.height = height;
}
public String getClassname() {
return classname;
}
public void setClassname(String classname) {
this.classname = classname;
}
public String getEletype() {
return eletype;
}
public void setEletype(String eletype) {
this.eletype = eletype;
}
public String getClone() {
return clone;
}
public void setClone(String clone) {
this.clone = clone;
}
public String getLeft() {
return left;
}
public void setLeft(String left) {
this.left = left;
}
public String getTop() {
return top;
}
public void setTop(String top) {
this.top = top;
}
public String getSign() {
return sign;
}
public void setSign(String sign) {
this.sign = sign;
}
}
/*
* @Copyright (c) 2018 缪聪(mcg-helper@qq.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.com.glsx.process.modules.controller.admin.flow.web;
import java.util.List;
import org.hibernate.validator.constraints.NotBlank;
public class WebStruct {
private String mcgWebScoketCode;
@NotBlank(message = "{webStruct.flowId.NotBlank}")
private String flowId;
private List<WebElement> webElement;
private List<WebConnector> webConnector;
public String getMcgWebScoketCode() {
return mcgWebScoketCode;
}
public void setMcgWebScoketCode(String mcgWebScoketCode) {
this.mcgWebScoketCode = mcgWebScoketCode;
}
public List<WebElement> getWebElement() {
return webElement;
}
public void setWebElement(List<WebElement> webElement) {
this.webElement = webElement;
}
public List<WebConnector> getWebConnector() {
return webConnector;
}
public void setWebConnector(List<WebConnector> webConnector) {
this.webConnector = webConnector;
}
public String getFlowId() {
return flowId;
}
public void setFlowId(String flowId) {
this.flowId = flowId;
}
}
/*
* @Copyright (c) 2018 缪聪(mcg-helper@qq.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.com.glsx.process.modules.controller.admin.flow.wonton;
import java.util.ArrayList;
import javax.validation.Valid;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.validator.constraints.NotBlank;
import cn.com.glsx.process.modules.controller.admin.flow.FlowBase;
import cn.com.glsx.process.modules.controller.admin.generate.ExecuteStruct;
import cn.com.glsx.process.modules.controller.admin.generate.RunResult;
import cn.com.glsx.process.modules.controller.admin.plugin.execute.ProcessContext;
import cn.com.glsx.process.modules.controller.admin.plugin.execute.strategy.FlowWontonStrategy;
import cn.com.glsx.process.modules.controller.admin.sysenum.EletypeEnum;
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
public class FlowWonton extends FlowBase {
private static final long serialVersionUID = 1L;
@NotBlank(message = "{flowWonton.id.notBlank}")
@XmlAttribute
private String id;
@Valid
@XmlElement
private WontonProperty wontonProperty;
@Valid
@XmlElement
private WontonNetRule wontonNetRule;
@Valid
@XmlElement
private WontonCpuRule wontonCpuRule;
@Valid
@XmlElement
private WontonIoRule wontonIoRule;
@Valid
@XmlElement
private WontonMemRule wontonMemRule;
@Override
public void prepare(ArrayList<String> sequence, ExecuteStruct executeStruct) throws Exception {
this.setFlowId(executeStruct.getFlowId());
this.setMcgWebScoketCode(executeStruct.getMcgWebScoketCode());
this.setOrderNum(executeStruct.getOrderNum());
this.setEletypeEnum(EletypeEnum.WONTON);
ProcessContext processContext = new ProcessContext();
processContext.setProcessStrategy(new FlowWontonStrategy());
processContext.prepare(sequence, this, executeStruct);
}
@Override
public RunResult execute(ExecuteStruct executeStruct) throws Exception {
ProcessContext processContext = new ProcessContext();
processContext.setProcessStrategy(new FlowWontonStrategy());
RunResult runResult = processContext.run(this, executeStruct);
return runResult;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public WontonProperty getWontonProperty() {
return wontonProperty;
}
public void setWontonProperty(WontonProperty wontonProperty) {
this.wontonProperty = wontonProperty;
}
public WontonCpuRule getWontonCpuRule() {
return wontonCpuRule;
}
public void setWontonCpuRule(WontonCpuRule wontonCpuRule) {
this.wontonCpuRule = wontonCpuRule;
}
public WontonIoRule getWontonIoRule() {
return wontonIoRule;
}
public void setWontonIoRule(WontonIoRule wontonIoRule) {
this.wontonIoRule = wontonIoRule;
}
public WontonMemRule getWontonMemRule() {
return wontonMemRule;
}
public void setWontonMemRule(WontonMemRule wontonMemRule) {
this.wontonMemRule = wontonMemRule;
}
public WontonNetRule getWontonNetRule() {
return wontonNetRule;
}
public void setWontonNetRule(WontonNetRule wontonNetRule) {
this.wontonNetRule = wontonNetRule;
}
}
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!