提交 2e1ca228 编写于 作者: Z zhourui

添加 documentEvent,orkEvent,WorkCompletedEvent

上级 1405bcf3
......@@ -215,6 +215,10 @@
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml-schemas</artifactId>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-scratchpad</artifactId>
</dependency>
<dependency>
<groupId>fr.opensagres.xdocreport</groupId>
<artifactId>xdocreport</artifactId>
......
......@@ -11,259 +11,259 @@ import com.x.base.core.project.annotation.FieldDescribe;
public class ExternalStorageSources extends ConfigObject {
private static final long serialVersionUID = 8229115124625865737L;
private static final Boolean DEFAULT_ENABLE = false;
public static ExternalStorageSources defaultInstance() {
ExternalStorageSources externalStorages = new ExternalStorageSources();
externalStorages.getFile();
externalStorages.getMind();
externalStorages.getMeeting();
externalStorages.getProcessPlatform();
externalStorages.getCalendar();
externalStorages.getCms();
externalStorages.getBbs();
externalStorages.getTeamwork();
externalStorages.getStructure();
externalStorages.getIm();
externalStorages.getGeneral();
externalStorages.getCustom();
externalStorages.getStore();
externalStorages.enable = DEFAULT_ENABLE;
return externalStorages;
}
public ExternalStorageSources() {
super();
}
private CopyOnWriteArrayList<ExternalStorageSource> file;
private CopyOnWriteArrayList<ExternalStorageSource> processPlatform;
private CopyOnWriteArrayList<ExternalStorageSource> mind;
private CopyOnWriteArrayList<ExternalStorageSource> meeting;
private CopyOnWriteArrayList<ExternalStorageSource> calendar;
private CopyOnWriteArrayList<ExternalStorageSource> cms;
private CopyOnWriteArrayList<ExternalStorageSource> bbs;
private CopyOnWriteArrayList<ExternalStorageSource> teamwork;
private CopyOnWriteArrayList<ExternalStorageSource> structure;
private CopyOnWriteArrayList<ExternalStorageSource> im;
private CopyOnWriteArrayList<ExternalStorageSource> general;
private CopyOnWriteArrayList<ExternalStorageSource> custom;
private ConcurrentHashMap<String, Store> store;
private Boolean enable;
public Map<String, Store> getStore() {
if (null == this.store) {
this.store = new ConcurrentHashMap<>();
Store s = new Store();
s.setHost("hdfs://127.0.0.1");
s.setName("");
s.setUsername("");
s.setPassword("");
s.setProtocol(StorageProtocol.hdfs);
s.setPort(9000);
this.store.put("demo", s);
}
return this.store;
}
public List<ExternalStorageSource> get(StorageType storageType) {
switch (storageType) {
case file:
return this.getFile();
case processPlatform:
return this.getProcessPlatform();
case mind:
return this.getMind();
case meeting:
return this.getMeeting();
case calendar:
return this.getCalendar();
case cms:
return this.getCms();
case bbs:
return this.getBbs();
case teamwork:
return this.getTeamwork();
case structure:
return this.getStructure();
case im:
return this.getIm();
case general:
return this.getGeneral();
case custom:
default:
return this.getCustom();
}
}
public Boolean getEnable() {
// 兼容7.2之前版本
return (null == this.enable) ? true : this.enable;
}
public List<ExternalStorageSource> getFile() {
if (null == this.file) {
this.file = new CopyOnWriteArrayList<>();
this.file.add(ExternalStorageSource.defaultInstance());
}
return this.file;
}
public List<ExternalStorageSource> getMind() {
if (null == this.mind) {
this.mind = new CopyOnWriteArrayList<>();
this.mind.add(ExternalStorageSource.defaultInstance());
}
return this.mind;
}
public List<ExternalStorageSource> getMeeting() {
if (null == this.meeting) {
this.meeting = new CopyOnWriteArrayList<>();
this.meeting.add(ExternalStorageSource.defaultInstance());
}
return this.meeting;
}
public List<ExternalStorageSource> getProcessPlatform() {
if (null == this.processPlatform) {
this.processPlatform = new CopyOnWriteArrayList<>();
this.processPlatform.add(ExternalStorageSource.defaultInstance());
}
return this.processPlatform;
}
public List<ExternalStorageSource> getCalendar() {
if (null == this.calendar) {
this.calendar = new CopyOnWriteArrayList<>();
this.calendar.add(ExternalStorageSource.defaultInstance());
}
return this.calendar;
}
public List<ExternalStorageSource> getCms() {
if (null == this.cms) {
this.cms = new CopyOnWriteArrayList<>();
this.cms.add(ExternalStorageSource.defaultInstance());
}
return this.cms;
}
public List<ExternalStorageSource> getBbs() {
if (null == this.bbs) {
this.bbs = new CopyOnWriteArrayList<>();
this.bbs.add(ExternalStorageSource.defaultInstance());
}
return this.bbs;
}
public List<ExternalStorageSource> getTeamwork() {
if (null == this.teamwork) {
this.teamwork = new CopyOnWriteArrayList<>();
this.teamwork.add(ExternalStorageSource.defaultInstance());
}
return this.teamwork;
}
public List<ExternalStorageSource> getStructure() {
if (null == this.structure) {
this.structure = new CopyOnWriteArrayList<>();
this.structure.add(ExternalStorageSource.defaultInstance());
}
return this.structure;
}
public List<ExternalStorageSource> getIm() {
if (null == this.im) {
this.im = new CopyOnWriteArrayList<>();
this.im.add(ExternalStorageSource.defaultInstance());
}
return this.im;
}
public List<ExternalStorageSource> getGeneral() {
if (null == this.general) {
this.general = new CopyOnWriteArrayList<>();
this.general.add(ExternalStorageSource.defaultInstance());
}
return this.general;
}
public List<ExternalStorageSource> getCustom() {
if (null == this.custom) {
this.custom = new CopyOnWriteArrayList<>();
this.custom.add(ExternalStorageSource.defaultInstance());
}
return this.custom;
}
public static class Store {
private StorageProtocol protocol;
@FieldDescribe("登录用户名.")
private String username;
@FieldDescribe("登录密码.")
private String password;
@FieldDescribe("主机地址或阿里云endpoint.")
private String host;
@FieldDescribe("端口.")
private Integer port;
@FieldDescribe("存储节点名,对应存储名称,阿里云为bucket(桶)名称.")
private String name;
public StorageProtocol getProtocol() {
return protocol;
}
public void setProtocol(StorageProtocol protocol) {
this.protocol = protocol;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getHost() {
return host;
}
public void setHost(String host) {
this.host = host;
}
public Integer getPort() {
return port;
}
public void setPort(Integer port) {
this.port = port;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
private static final long serialVersionUID = 8229115124625865737L;
private static final Boolean DEFAULT_ENABLE = false;
public static ExternalStorageSources defaultInstance() {
ExternalStorageSources externalStorages = new ExternalStorageSources();
externalStorages.getFile();
externalStorages.getMind();
externalStorages.getMeeting();
externalStorages.getProcessPlatform();
externalStorages.getCalendar();
externalStorages.getCms();
externalStorages.getBbs();
externalStorages.getTeamwork();
externalStorages.getStructure();
externalStorages.getIm();
externalStorages.getGeneral();
externalStorages.getCustom();
externalStorages.getStore();
externalStorages.enable = DEFAULT_ENABLE;
return externalStorages;
}
public ExternalStorageSources() {
super();
}
private CopyOnWriteArrayList<ExternalStorageSource> file;
private CopyOnWriteArrayList<ExternalStorageSource> processPlatform;
private CopyOnWriteArrayList<ExternalStorageSource> mind;
private CopyOnWriteArrayList<ExternalStorageSource> meeting;
private CopyOnWriteArrayList<ExternalStorageSource> calendar;
private CopyOnWriteArrayList<ExternalStorageSource> cms;
private CopyOnWriteArrayList<ExternalStorageSource> bbs;
private CopyOnWriteArrayList<ExternalStorageSource> teamwork;
private CopyOnWriteArrayList<ExternalStorageSource> structure;
private CopyOnWriteArrayList<ExternalStorageSource> im;
private CopyOnWriteArrayList<ExternalStorageSource> general;
private CopyOnWriteArrayList<ExternalStorageSource> custom;
private ConcurrentHashMap<String, Store> store;
private Boolean enable;
public Map<String, Store> getStore() {
if (null == this.store) {
this.store = new ConcurrentHashMap<>();
Store s = new Store();
s.setHost("hdfs://127.0.0.1");
s.setName("");
s.setUsername("");
s.setPassword("");
s.setProtocol(StorageProtocol.hdfs);
s.setPort(9000);
this.store.put("demo", s);
}
return this.store;
}
public List<ExternalStorageSource> get(StorageType storageType) {
switch (storageType) {
case file:
return this.getFile();
case processPlatform:
return this.getProcessPlatform();
case mind:
return this.getMind();
case meeting:
return this.getMeeting();
case calendar:
return this.getCalendar();
case cms:
return this.getCms();
case bbs:
return this.getBbs();
case teamwork:
return this.getTeamwork();
case structure:
return this.getStructure();
case im:
return this.getIm();
case general:
return this.getGeneral();
case custom:
default:
return this.getCustom();
}
}
public Boolean getEnable() {
// 兼容7.2之前版本
return (null == this.enable) ? Boolean.TRUE : this.enable;
}
public List<ExternalStorageSource> getFile() {
if (null == this.file) {
this.file = new CopyOnWriteArrayList<>();
this.file.add(ExternalStorageSource.defaultInstance());
}
return this.file;
}
public List<ExternalStorageSource> getMind() {
if (null == this.mind) {
this.mind = new CopyOnWriteArrayList<>();
this.mind.add(ExternalStorageSource.defaultInstance());
}
return this.mind;
}
public List<ExternalStorageSource> getMeeting() {
if (null == this.meeting) {
this.meeting = new CopyOnWriteArrayList<>();
this.meeting.add(ExternalStorageSource.defaultInstance());
}
return this.meeting;
}
public List<ExternalStorageSource> getProcessPlatform() {
if (null == this.processPlatform) {
this.processPlatform = new CopyOnWriteArrayList<>();
this.processPlatform.add(ExternalStorageSource.defaultInstance());
}
return this.processPlatform;
}
public List<ExternalStorageSource> getCalendar() {
if (null == this.calendar) {
this.calendar = new CopyOnWriteArrayList<>();
this.calendar.add(ExternalStorageSource.defaultInstance());
}
return this.calendar;
}
public List<ExternalStorageSource> getCms() {
if (null == this.cms) {
this.cms = new CopyOnWriteArrayList<>();
this.cms.add(ExternalStorageSource.defaultInstance());
}
return this.cms;
}
public List<ExternalStorageSource> getBbs() {
if (null == this.bbs) {
this.bbs = new CopyOnWriteArrayList<>();
this.bbs.add(ExternalStorageSource.defaultInstance());
}
return this.bbs;
}
public List<ExternalStorageSource> getTeamwork() {
if (null == this.teamwork) {
this.teamwork = new CopyOnWriteArrayList<>();
this.teamwork.add(ExternalStorageSource.defaultInstance());
}
return this.teamwork;
}
public List<ExternalStorageSource> getStructure() {
if (null == this.structure) {
this.structure = new CopyOnWriteArrayList<>();
this.structure.add(ExternalStorageSource.defaultInstance());
}
return this.structure;
}
public List<ExternalStorageSource> getIm() {
if (null == this.im) {
this.im = new CopyOnWriteArrayList<>();
this.im.add(ExternalStorageSource.defaultInstance());
}
return this.im;
}
public List<ExternalStorageSource> getGeneral() {
if (null == this.general) {
this.general = new CopyOnWriteArrayList<>();
this.general.add(ExternalStorageSource.defaultInstance());
}
return this.general;
}
public List<ExternalStorageSource> getCustom() {
if (null == this.custom) {
this.custom = new CopyOnWriteArrayList<>();
this.custom.add(ExternalStorageSource.defaultInstance());
}
return this.custom;
}
public static class Store {
private StorageProtocol protocol;
@FieldDescribe("登录用户名.")
private String username;
@FieldDescribe("登录密码.")
private String password;
@FieldDescribe("主机地址或阿里云endpoint.")
private String host;
@FieldDescribe("端口.")
private Integer port;
@FieldDescribe("存储节点名,对应存储名称,阿里云为bucket(桶)名称.")
private String name;
public StorageProtocol getProtocol() {
return protocol;
}
public void setProtocol(StorageProtocol protocol) {
this.protocol = protocol;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getHost() {
return host;
}
public void setHost(String host) {
this.host = host;
}
public Integer getPort() {
return port;
}
public void setPort(Integer port) {
this.port = port;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
}
......@@ -6,34 +6,35 @@ import com.x.base.core.project.annotation.ModuleCategory;
import com.x.base.core.project.annotation.ModuleType;
@Module(type = ModuleType.SERVICE, category = ModuleCategory.OFFICIAL, name = "流程服务", packageName = "com.x.processplatform.service.processing", containerEntities = {
"com.x.processplatform.core.entity.content.Snap", "com.x.processplatform.core.entity.content.Draft",
"com.x.processplatform.core.entity.content.Attachment",
"com.x.processplatform.core.entity.content.TaskCompleted",
"com.x.processplatform.core.entity.content.ReadCompleted", "com.x.processplatform.core.entity.content.Review",
"com.x.processplatform.core.entity.content.Record", "com.x.processplatform.core.entity.content.WorkCompleted",
"com.x.processplatform.core.entity.content.WorkLog", "com.x.processplatform.core.entity.content.Record",
"com.x.processplatform.core.entity.content.Task", "com.x.processplatform.core.entity.content.Work",
"com.x.processplatform.core.entity.content.Read", "com.x.processplatform.core.entity.content.DocumentVersion",
"com.x.processplatform.core.entity.content.SerialNumber", "com.x.processplatform.core.entity.element.End",
"com.x.processplatform.core.entity.content.DocSign", "com.x.processplatform.core.entity.content.DocSignScrawl",
"com.x.processplatform.core.entity.element.Application", "com.x.processplatform.core.entity.element.Publish",
"com.x.processplatform.core.entity.element.ApplicationDict",
"com.x.processplatform.core.entity.element.ApplicationDictItem",
"com.x.processplatform.core.entity.element.Script", "com.x.processplatform.core.entity.element.Cancel",
"com.x.processplatform.core.entity.element.Merge", "com.x.processplatform.core.entity.element.Route",
"com.x.processplatform.core.entity.element.Choice", "com.x.processplatform.core.entity.element.Invoke",
"com.x.processplatform.core.entity.element.Manual", "com.x.processplatform.core.entity.element.Parallel",
"com.x.processplatform.core.entity.element.Begin", "com.x.processplatform.core.entity.element.Split",
"com.x.processplatform.core.entity.element.Process", "com.x.processplatform.core.entity.element.Service",
"com.x.processplatform.core.entity.element.Agent", "com.x.processplatform.core.entity.element.Delay",
"com.x.processplatform.core.entity.element.File", "com.x.processplatform.core.entity.element.Form",
"com.x.processplatform.core.entity.element.FormField", "com.x.processplatform.core.entity.element.Embed",
"com.x.processplatform.core.entity.element.Mapping", "com.x.processplatform.core.entity.log.SignalStackLog",
"com.x.processplatform.core.entity.message.Event", "com.x.query.core.entity.Item",
"com.x.cms.core.entity.element.Script",
"com.x.portal.core.entity.Script" }, storageTypes = { StorageType.processPlatform }, storeJars = {
"x_organization_core_entity", "x_organization_core_express", "x_processplatform_core_entity",
"x_processplatform_core_express", "x_query_core_entity", "x_cms_core_entity", "x_portal_core_entity" })
"com.x.processplatform.core.entity.content.Snap", "com.x.processplatform.core.entity.content.Draft",
"com.x.processplatform.core.entity.content.Attachment",
"com.x.processplatform.core.entity.content.TaskCompleted",
"com.x.processplatform.core.entity.content.ReadCompleted", "com.x.processplatform.core.entity.content.Review",
"com.x.processplatform.core.entity.content.Record", "com.x.processplatform.core.entity.content.WorkCompleted",
"com.x.processplatform.core.entity.content.WorkLog", "com.x.processplatform.core.entity.content.Record",
"com.x.processplatform.core.entity.content.Task", "com.x.processplatform.core.entity.content.Work",
"com.x.processplatform.core.entity.content.Read", "com.x.processplatform.core.entity.content.DocumentVersion",
"com.x.processplatform.core.entity.content.SerialNumber", "com.x.processplatform.core.entity.element.End",
"com.x.processplatform.core.entity.content.DocSign", "com.x.processplatform.core.entity.content.DocSignScrawl",
"com.x.processplatform.core.entity.element.Application", "com.x.processplatform.core.entity.element.Publish",
"com.x.processplatform.core.entity.element.ApplicationDict",
"com.x.processplatform.core.entity.element.ApplicationDictItem",
"com.x.processplatform.core.entity.element.Script", "com.x.processplatform.core.entity.element.Cancel",
"com.x.processplatform.core.entity.element.Merge", "com.x.processplatform.core.entity.element.Route",
"com.x.processplatform.core.entity.element.Choice", "com.x.processplatform.core.entity.element.Invoke",
"com.x.processplatform.core.entity.element.Manual", "com.x.processplatform.core.entity.element.Parallel",
"com.x.processplatform.core.entity.element.Begin", "com.x.processplatform.core.entity.element.Split",
"com.x.processplatform.core.entity.element.Process", "com.x.processplatform.core.entity.element.Service",
"com.x.processplatform.core.entity.element.Agent", "com.x.processplatform.core.entity.element.Delay",
"com.x.processplatform.core.entity.element.File", "com.x.processplatform.core.entity.element.Form",
"com.x.processplatform.core.entity.element.FormField", "com.x.processplatform.core.entity.element.Embed",
"com.x.processplatform.core.entity.element.Mapping",
"com.x.processplatform.core.entity.message.Event", "com.x.query.core.entity.Item",
"com.x.cms.core.entity.element.Script", "com.x.processplatform.core.entity.message.WorkEvent",
"com.x.processplatform.core.entity.message.WorkCompletedEvent",
"com.x.portal.core.entity.Script" }, storageTypes = { StorageType.processPlatform }, storeJars = {
"x_organization_core_entity", "x_organization_core_express", "x_processplatform_core_entity",
"x_processplatform_core_express", "x_query_core_entity", "x_cms_core_entity", "x_portal_core_entity" })
public class x_processplatform_service_processing extends Deployable {
}
......@@ -18,9 +18,11 @@ import com.x.base.core.project.annotation.ModuleType;
"com.x.processplatform.core.entity.element.Application",
"com.x.query.core.entity.ImportModel", "com.x.processplatform.core.entity.content.Work",
"com.x.processplatform.core.entity.content.WorkCompleted",
"com.x.processplatform.core.entity.content.Attachment", "com.x.cms.core.entity.Document",
"com.x.processplatform.core.entity.content.Attachment", "com.x.processplatform.core.entity.message.WorkEvent",
"com.x.processplatform.core.entity.message.WorkCompletedEvent", "com.x.cms.core.entity.Document",
"com.x.cms.core.entity.FileInfo", "com.x.cms.core.entity.AppInfo",
"com.x.cms.core.entity.CategoryInfo", "com.x.cms.core.entity.Review" }, storageTypes = {
"com.x.cms.core.entity.CategoryInfo", "com.x.cms.core.entity.Review",
"com.x.cms.core.entity.message.DocumentEvent" }, storageTypes = {
StorageType.processPlatform,
StorageType.cms }, storeJars = { "x_query_core_express", "x_query_core_entity",
"x_organization_core_entity", "x_organization_core_express", "x_processplatform_core_entity",
......
......@@ -4,106 +4,121 @@ import com.x.base.core.entity.AbstractPersistenceProperties;
public final class PersistenceProperties extends AbstractPersistenceProperties {
public static class Element {
public static class View {
public static final String table = "CMS_VIEW";
}
public static class ViewFieldConfig {
public static final String table = "CMS_VIEWFIELD_CONFIG";
}
public static class ViewCategory {
public static final String table = "CMS_VIEWCATEGORY";
}
public static class Form {
public static final String table = "CMS_FORM";
}
public static class File {
public static final String table = "CMS_FILE";
}
public static class FormField {
public static final String table = "CMS_FORMFIELD";
}
public static class TemplateForm {
public static final String table = "CMS_TEMPLATEFORM";
}
public static class AppDict {
public static final String table = "CMS_APPNDICT";
}
public static class AppDictItem {
public static final String table = "CMS_APPDICTITEM";
}
public static class Script {
public static final String table = "CMS_SCRIPT";
}
}
public static class AppInfo {
public static final String table = "CMS_APPINFO";
}
public static class AppInfoConfig {
public static final String table = "CMS_APPINFO_CONFIG";
}
public static class CategoryInfo {
public static final String table = "CMS_CATEGORYINFO";
}
public static class CategoryExt {
public static final String table = "CMS_CATEGORYEXT";
}
public static class Document {
public static final String table = "CMS_DOCUMENT";
}
public static class FileInfo {
public static final String table = "CMS_FILEINFO";
}
public static class Log {
public static final String table = "CMS_LOG";
}
public static class DocumentViewRecord {
public static final String table = "CMS_DOCUMENT_VIEWRECORD";
}
public static class Review {
public static final String table = "CMS_REVIEW";
}
public static class ReadRemind {
public static final String table = "CMS_READREMIND";
}
public static class DocumentCommentInfo {
public static final String table = "CMS_DOCUMENT_COMMENTINFO";
}
public static class DocumentCommentContent {
public static final String table = "CMS_DOCUMENT_COMMENTCONTENT";
}
public static class DocumentCommend {
public static final String table = "CMS_DOCUMENT_COMMEND";
}
public static class DocumentCommentCommend {
public static final String table = "CMS_DOCUMENT_COMMENTCOMMEND";
}
public static class CmsBatchOperation {
public static final String table = "CMS_BATCH_OPERATION";
}
public static class Element {
public static class View {
public static final String table = "CMS_VIEW";
}
public static class ViewFieldConfig {
public static final String table = "CMS_VIEWFIELD_CONFIG";
}
public static class ViewCategory {
public static final String table = "CMS_VIEWCATEGORY";
}
public static class Form {
public static final String table = "CMS_FORM";
}
public static class File {
public static final String table = "CMS_FILE";
}
public static class FormField {
public static final String table = "CMS_FORMFIELD";
}
public static class TemplateForm {
public static final String table = "CMS_TEMPLATEFORM";
}
public static class AppDict {
public static final String table = "CMS_APPNDICT";
}
public static class AppDictItem {
public static final String table = "CMS_APPDICTITEM";
}
public static class Script {
public static final String table = "CMS_SCRIPT";
}
}
public static class AppInfo {
public static final String table = "CMS_APPINFO";
}
public static class AppInfoConfig {
public static final String table = "CMS_APPINFO_CONFIG";
}
public static class CategoryInfo {
public static final String table = "CMS_CATEGORYINFO";
}
public static class CategoryExt {
public static final String table = "CMS_CATEGORYEXT";
}
public static class Document {
public static final String table = "CMS_DOCUMENT";
}
public static class FileInfo {
public static final String table = "CMS_FILEINFO";
}
public static class Log {
public static final String table = "CMS_LOG";
}
public static class DocumentViewRecord {
public static final String table = "CMS_DOCUMENT_VIEWRECORD";
}
public static class Review {
public static final String table = "CMS_REVIEW";
}
public static class ReadRemind {
public static final String table = "CMS_READREMIND";
}
public static class DocumentCommentInfo {
public static final String table = "CMS_DOCUMENT_COMMENTINFO";
}
public static class DocumentCommentContent {
public static final String table = "CMS_DOCUMENT_COMMENTCONTENT";
}
public static class DocumentCommend {
public static final String table = "CMS_DOCUMENT_COMMEND";
}
public static class DocumentCommentCommend {
public static final String table = "CMS_DOCUMENT_COMMENTCOMMEND";
}
public static class CmsBatchOperation {
public static final String table = "CMS_BATCH_OPERATION";
}
public static class Message {
private Message() {
}
public static class DocumentEvent {
private DocumentEvent() {
}
public static final String TABLE = "CMS_M_DOCUMENTEVENT";
}
}
}
\ No newline at end of file
package com.x.cms.core.entity.message;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
import org.apache.openjpa.persistence.jdbc.Index;
import com.x.base.core.entity.JpaObject;
import com.x.base.core.entity.SliceJpaObject;
import com.x.base.core.entity.annotation.CheckPersist;
import com.x.base.core.entity.annotation.ContainerEntity;
import com.x.base.core.project.annotation.FieldDescribe;
import com.x.cms.core.entity.PersistenceProperties;
import io.swagger.v3.oas.annotations.media.Schema;
@Schema(name = "DocumentEvent", description = "文档处理事件.")
@Entity
@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.log, reference = ContainerEntity.Reference.soft)
@Table(name = PersistenceProperties.Message.DocumentEvent.TABLE, uniqueConstraints = {
@UniqueConstraint(name = PersistenceProperties.Message.DocumentEvent.TABLE + JpaObject.IndexNameMiddle
+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,
JpaObject.CREATETIMECOLUMN, JpaObject.UPDATETIMECOLUMN, JpaObject.SEQUENCECOLUMN }) })
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
public class DocumentEvent extends SliceJpaObject {
private static final String TABLE = PersistenceProperties.Message.DocumentEvent.TABLE;
public static final String TYPE_UPDATE = "update";
public static final String TYPE_CREATE = "create";
public static final String TYPE_DELETE = "delete";
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
@FieldDescribe("数据库主键,自动生成.")
@Id
@Column(length = length_id, name = ColumnNamePrefix + id_FIELDNAME)
private String id = createId();
/* 以上为 JpaObject 默认字段 */
public void onPersist() throws Exception {
// nothing
}
public DocumentEvent() {
}
public static DocumentEvent updateEvent(String appInfo, String document) {
DocumentEvent o = new DocumentEvent();
o.setType(TYPE_UPDATE);
o.setAppInfo(appInfo);
o.setDocument(document);
return o;
}
public static DocumentEvent createEvent(String appInfo, String document) {
DocumentEvent o = new DocumentEvent();
o.setType(TYPE_CREATE);
o.setAppInfo(appInfo);
o.setDocument(document);
return o;
}
public static DocumentEvent deleteEvent(String appInfo, String document) {
DocumentEvent o = new DocumentEvent();
o.setType(TYPE_DELETE);
o.setAppInfo(appInfo);
o.setDocument(document);
return o;
}
public static final String DOCUMENT_FIELDNAME = "document";
@Schema(description = "文档标识.")
@FieldDescribe("文档标识.")
@Column(length = JpaObject.length_id, name = ColumnNamePrefix + DOCUMENT_FIELDNAME)
@Index(name = TABLE + IndexNameMiddle + DOCUMENT_FIELDNAME)
@CheckPersist(allowEmpty = false)
private String document;
public static final String TYPE_FIELDNAME = "type";
@Schema(description = "工作事件类型.")
@FieldDescribe("工作事件类型.")
@Column(length = JpaObject.length_id, name = ColumnNamePrefix + TYPE_FIELDNAME)
@Index(name = TABLE + IndexNameMiddle + TYPE_FIELDNAME)
@CheckPersist(allowEmpty = false)
private String type;
public static final String APPINFO_FIELDNAME = "appInfo";
@Schema(description = "栏目标识.")
@FieldDescribe("栏目标识.")
@Column(length = JpaObject.length_id, name = ColumnNamePrefix + APPINFO_FIELDNAME)
@Index(name = TABLE + IndexNameMiddle + APPINFO_FIELDNAME)
@CheckPersist(allowEmpty = false)
private String appInfo;
public String getDocument() {
return document;
}
public void setDocument(String document) {
this.document = document;
}
public String getAppInfo() {
return appInfo;
}
public void setAppInfo(String appInfo) {
this.appInfo = appInfo;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
}
\ No newline at end of file
......@@ -28,7 +28,7 @@ import com.x.base.core.project.jaxrs.WrapString;
import com.x.base.core.project.logger.Logger;
import com.x.base.core.project.logger.LoggerFactory;
import fr.opensagres.poi.xwpf.converter.xhtml.XHTMLConverter;
import fr.opensagres.poi.hwpf.converter.xhtml.XHTMLConverter;
import fr.opensagres.poi.xwpf.converter.xhtml.XHTMLOptions;
import fr.opensagres.xdocreport.converter.Options;
import fr.opensagres.xdocreport.converter.docx.poi.xhtml.XWPF2XHTMLConverter;
......
......@@ -26,12 +26,10 @@ import com.x.base.core.project.jaxrs.ResponseFactory;
import com.x.base.core.project.jaxrs.StandardJaxrsAction;
import com.x.base.core.project.logger.Logger;
import com.x.base.core.project.logger.LoggerFactory;
import com.x.general.assemble.control.jaxrs.ecnet.ActionCheck;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.parameters.RequestBody;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.tags.Tag;
......
......@@ -237,14 +237,32 @@ public final class PersistenceProperties extends AbstractPersistenceProperties {
private Message() {
}
public static class Event {
public static class Event {
private Event() {
}
private Event() {
}
public static final String table = "PP_M_EVENT";
public static final String table = "PP_M_EVENT";
}
}
public static class WorkEvent {
private WorkEvent() {
}
public static final String table = "PP_M_WORKEVENT";
}
public static class WorkCompletedEvent {
private WorkCompletedEvent() {
}
public static final String table = "PP_M_WORKCOMPLETEDEVENT";
}
}
public static class Temporary {
......
package com.x.processplatform.core.entity.message;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
import org.apache.openjpa.persistence.jdbc.Index;
import com.x.base.core.entity.JpaObject;
import com.x.base.core.entity.SliceJpaObject;
import com.x.base.core.entity.annotation.CheckPersist;
import com.x.base.core.entity.annotation.ContainerEntity;
import com.x.base.core.project.annotation.FieldDescribe;
import com.x.processplatform.core.entity.PersistenceProperties;
import io.swagger.v3.oas.annotations.media.Schema;
@Schema(name = "WorkEvent", description = "工作处理事件.")
@Entity
@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.log, reference = ContainerEntity.Reference.soft)
@Table(name = PersistenceProperties.Message.WorkCompletedEvent.table, uniqueConstraints = {
@UniqueConstraint(name = PersistenceProperties.Message.WorkCompletedEvent.table + JpaObject.IndexNameMiddle
+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,
JpaObject.CREATETIMECOLUMN, JpaObject.UPDATETIMECOLUMN, JpaObject.SEQUENCECOLUMN }) })
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
public class WorkCompletedEvent extends SliceJpaObject {
private static final String TABLE = PersistenceProperties.Message.WorkCompletedEvent.table;
public static final String TYPE_UPDATE = "update";
public static final String TYPE_CREATE = "create";
public static final String TYPE_DELETE = "delete";
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
@FieldDescribe("数据库主键,自动生成.")
@Id
@Column(length = length_id, name = ColumnNamePrefix + id_FIELDNAME)
private String id = createId();
/* 以上为 JpaObject 默认字段 */
public void onPersist() throws Exception {
// nothing
}
public WorkCompletedEvent() {
}
public static WorkCompletedEvent updateEvent(String application, String workCompleted, String work,
String job) {
WorkCompletedEvent o = new WorkCompletedEvent();
o.setType(TYPE_UPDATE);
o.setApplication(application);
o.setWorkCompleted(workCompleted);
o.setWork(work);
o.setJob(job);
return o;
}
public static WorkCompletedEvent createEvent(String application, String workCompleted, String work,
String job) {
WorkCompletedEvent o = new WorkCompletedEvent();
o.setType(TYPE_CREATE);
o.setApplication(application);
o.setWorkCompleted(workCompleted);
o.setWork(work);
o.setJob(job);
return o;
}
public static WorkCompletedEvent deleteEvent(String application, String workCompleted, String work, String job) {
WorkCompletedEvent o = new WorkCompletedEvent();
o.setType(TYPE_DELETE);
o.setApplication(application);
o.setWorkCompleted(workCompleted);
o.setWork(work);
o.setJob(job);
return o;
}
public static final String JOB_FIELDNAME = "job";
@Schema(description = "任务标识.")
@FieldDescribe("任务标识")
@Column(length = JpaObject.length_id, name = ColumnNamePrefix + JOB_FIELDNAME)
@Index(name = TABLE + IndexNameMiddle + JOB_FIELDNAME)
@CheckPersist(allowEmpty = false)
private String job;
public static final String WORK_FIELDNAME = "work";
@Schema(description = "工作标识.")
@FieldDescribe("工作标识.")
@Column(length = JpaObject.length_id, name = ColumnNamePrefix + WORK_FIELDNAME)
@Index(name = TABLE + IndexNameMiddle + WORK_FIELDNAME)
@CheckPersist(allowEmpty = false)
private String work;
public static final String WORKCOMPLETED_FIELDNAME = "workCompleted";
@Schema(description = "已完成工作标识.")
@FieldDescribe("已完成工作标识.")
@Column(length = JpaObject.length_id, name = ColumnNamePrefix + WORKCOMPLETED_FIELDNAME)
@Index(name = TABLE + IndexNameMiddle + WORKCOMPLETED_FIELDNAME)
@CheckPersist(allowEmpty = false)
private String workCompleted;
public static final String TYPE_FIELDNAME = "type";
@Schema(description = "工作事件类型.")
@FieldDescribe("工作事件类型.")
@Column(length = JpaObject.length_id, name = ColumnNamePrefix + TYPE_FIELDNAME)
@Index(name = TABLE + IndexNameMiddle + TYPE_FIELDNAME)
@CheckPersist(allowEmpty = false)
private String type;
public static final String APPLICATION_FIELDNAME = "application";
@Schema(description = "流程应用标识.")
@FieldDescribe("应用.")
@Column(length = JpaObject.length_id, name = ColumnNamePrefix + APPLICATION_FIELDNAME)
@Index(name = TABLE + IndexNameMiddle + APPLICATION_FIELDNAME)
@CheckPersist(allowEmpty = false)
private String application;
public String getApplication() {
return application;
}
public void setApplication(String application) {
this.application = application;
}
public String getWorkCompleted() {
return workCompleted;
}
public void setWorkCompleted(String workCompleted) {
this.workCompleted = workCompleted;
}
public String getJob() {
return job;
}
public void setJob(String job) {
this.job = job;
}
public String getWork() {
return work;
}
public void setWork(String work) {
this.work = work;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
}
\ No newline at end of file
......@@ -27,8 +27,8 @@ import com.x.processplatform.core.entity.element.ActivityType;
import com.x.processplatform.core.entity.element.Embed;
import com.x.processplatform.core.entity.element.End;
import com.x.processplatform.core.entity.element.Route;
import com.x.processplatform.core.entity.log.Signal;
import com.x.processplatform.core.entity.message.Event;
import com.x.processplatform.core.entity.log.Signal;
import com.x.processplatform.core.express.ProcessingAttributes;
import com.x.processplatform.service.processing.Business;
import com.x.processplatform.service.processing.Processing;
......
......@@ -46,7 +46,7 @@ public class ActionOpen extends BaseAction {
for (String key : Config.nodes().keySet()) {
File file = new File(Config.base(),"config/"+NODE_CONFIG+"_"+key+".json");
if (!file.exists()) {
file = new File(Config.base(),"config/"+NODE_CONFIG+"_"+key+".json");
file = new File(Config.base(),"configSample/"+NODE_CONFIG+"_"+key+".json");
}
if(file.exists()){
String json = FileUtils.readFileToString(file, DefaultCharset.charset);
......
......@@ -98,8 +98,7 @@ class ActionPost extends BaseAction {
Highlighter highlighter = highlighter(query);
final int facetMaxGroups = Config.query().index().getFacetMaxGroups();
final int searchMaxHits = Config.query().index().getSearchMaxHits();
TopScoreDocCollector topScoreDocCollector = TopScoreDocCollector
.create(Config.query().index().getSearchMaxHits(), Integer.MAX_VALUE);
TopScoreDocCollector topScoreDocCollector = TopScoreDocCollector.create(searchMaxHits, Integer.MAX_VALUE);
List<Pair<String, FirstPassGroupingCollector<BytesRef>>> firstPassGroupingCollectorPairs = Indexs
.adjustFacetField(wi.getFilterList().stream().map(Filter::getField).collect(Collectors.toList()))
.stream()
......
package com.x.query.core.entity.index;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.Transient;
import com.x.base.core.entity.JsonProperties;
import com.x.base.core.project.annotation.FieldDescribe;
public class StateProperties extends JsonProperties {
@FieldDescribe("最后更新对象标识.")
@Transient
private List<String> latestIdList = new ArrayList<>();
public List<String> getLatestIdList() {
return latestIdList;
}
public void setLatestIdList(List<String> latestIdList) {
this.latestIdList = latestIdList;
}
}
package com.x.query.service.processing.schedulelocal;
import com.x.query.service.processing.schedule.OptimizeIndex;
public class OptimizeIndexLocal extends OptimizeIndex {
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册