ソースを参照

Merge branch 'feature/java11' into 'develop'

erasecontent

See merge request o2oa/o2oa!1536
o2null 5 年 前
コミット
09347eb80b
64 ファイル変更65 行追加4877 行削除
  1. 3 3
      o2server/x_console/src/main/java/com/x/server/console/ResourceFactory.java
  2. 4 3
      o2server/x_console/src/main/java/com/x/server/console/action/EraseContent.java
  3. 3 3
      o2server/x_console/src/main/java/com/x/server/console/server/application/ApplicationServerTools.java
  4. 37 23
      o2server/x_console/src/main/java/com/x/server/console/server/center/CenterServerTools.java
  5. 0 1994
      o2server/x_portal_assemble_surface/src/main/webapp/describe/describe.json
  6. 0 28
      o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/AbstractFactory.java
  7. 0 33
      o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/ApplicationServletContextListener.java
  8. 0 77
      o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/Business.java
  9. 0 97
      o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/Control.java
  10. 0 37
      o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/ThisApplication.java
  11. 0 74
      o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/factory/FileFactory.java
  12. 0 70
      o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/factory/PageFactory.java
  13. 0 95
      o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/factory/PortalFactory.java
  14. 0 162
      o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/factory/ScriptFactory.java
  15. 0 53
      o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/factory/WidgetFactory.java
  16. 0 25
      o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/ActionApplication.java
  17. 0 10
      o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/FileJaxrsFilter.java
  18. 0 10
      o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/PageJaxrsFilter.java
  19. 0 10
      o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/PortalJaxrsFilter.java
  20. 0 10
      o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/ScriptJaxrsFilter.java
  21. 0 10
      o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/WidgetJaxrsFilter.java
  22. 0 88
      o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/file/ActionContent.java
  23. 0 87
      o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/file/ActionDownload.java
  24. 0 43
      o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/file/ActionListWithPortal.java
  25. 0 7
      o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/file/BaseAction.java
  26. 0 87
      o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/file/FileAction.java
  27. 0 48
      o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/page/ActionGet.java
  28. 0 48
      o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/page/ActionGetMobile.java
  29. 0 63
      o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/page/ActionGetWithPortal.java
  30. 0 60
      o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/page/ActionGetWithPortalMobile.java
  31. 0 53
      o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/page/ActionList.java
  32. 0 19
      o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/page/BaseAction.java
  33. 0 13
      o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/page/ExceptionPageNotExist.java
  34. 0 13
      o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/page/ExceptionPortalAccessDenied.java
  35. 0 13
      o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/page/ExceptionPortalNotExist.java
  36. 0 124
      o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/page/PageAction.java
  37. 0 45
      o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/portal/ActionGet.java
  38. 0 45
      o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/portal/ActionIcon.java
  39. 0 34
      o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/portal/ActionIconBase64.java
  40. 0 84
      o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/portal/ActionList.java
  41. 0 6
      o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/portal/BaseAction.java
  42. 0 13
      o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/portal/ExceptionPortalAccessDenied.java
  43. 0 13
      o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/portal/ExceptionPortalNotExist.java
  44. 0 119
      o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/portal/PortalAction.java
  45. 0 112
      o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/script/ActionFlag.java
  46. 0 47
      o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/script/ActionGet.java
  47. 0 87
      o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/script/ActionGetImported.java
  48. 0 53
      o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/script/ActionList.java
  49. 0 11
      o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/script/BaseAction.java
  50. 0 13
      o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/script/ExceptionPortalAccessDenied.java
  51. 0 13
      o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/script/ExceptionPortalNotExist.java
  52. 0 13
      o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/script/ExceptionScriptNotExist.java
  53. 0 108
      o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/script/ScriptAction.java
  54. 0 48
      o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/widget/ActionGet.java
  55. 0 47
      o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/widget/ActionGetMobile.java
  56. 0 63
      o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/widget/ActionGetWithPortal.java
  57. 0 63
      o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/widget/ActionGetWithPortalMobile.java
  58. 0 55
      o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/widget/ActionList.java
  59. 0 11
      o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/widget/BaseAction.java
  60. 0 13
      o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/widget/ExceptionPortalAccessDenied.java
  61. 0 13
      o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/widget/ExceptionPortalNotExist.java
  62. 0 13
      o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/widget/ExceptionWidgetNotExist.java
  63. 0 124
      o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/widget/WidgetAction.java
  64. 18 18
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/form/FormAction.java

+ 3 - 3
o2server/x_console/src/main/java/com/x/server/console/ResourceFactory.java

@@ -140,7 +140,7 @@ public class ResourceFactory {
 		for (Entry<String, DataServer> entry : Config.nodes().dataServers().entrySet()) {
 		for (Entry<String, DataServer> entry : Config.nodes().dataServers().entrySet()) {
 			DruidDataSourceC3P0Adapter dataSource = new DruidDataSourceC3P0Adapter();
 			DruidDataSourceC3P0Adapter dataSource = new DruidDataSourceC3P0Adapter();
 			String url = "jdbc:h2:tcp://" + entry.getKey() + ":" + entry.getValue().getTcpPort()
 			String url = "jdbc:h2:tcp://" + entry.getKey() + ":" + entry.getValue().getTcpPort()
-					+ "/X;DEFAULT_LOCK_TIMEOUT=" + entry.getValue().getLockTimeout() + ";JMX="
+					+ "/X;LOCK_MODE=0;DEFAULT_LOCK_TIMEOUT=" + entry.getValue().getLockTimeout() + ";JMX="
 					+ (entry.getValue().getJmxEnable() ? "TRUE" : "FALSE") + ";CACHE_SIZE="
 					+ (entry.getValue().getJmxEnable() ? "TRUE" : "FALSE") + ";CACHE_SIZE="
 					+ (entry.getValue().getCacheSize() * 1024);
 					+ (entry.getValue().getCacheSize() * 1024);
 			dataSource.setJdbcUrl(url);
 			dataSource.setJdbcUrl(url);
@@ -170,7 +170,7 @@ public class ResourceFactory {
 			BasicDataSource dataSource = new BasicDataSource();
 			BasicDataSource dataSource = new BasicDataSource();
 
 
 			String url = "jdbc:h2:tcp://" + entry.getKey() + ":" + entry.getValue().getTcpPort()
 			String url = "jdbc:h2:tcp://" + entry.getKey() + ":" + entry.getValue().getTcpPort()
-					+ "/X;DEFAULT_LOCK_TIMEOUT=" + entry.getValue().getLockTimeout() + ";JMX="
+					+ "/X;LOCK_MODE=0;DEFAULT_LOCK_TIMEOUT=" + entry.getValue().getLockTimeout() + ";JMX="
 					+ (entry.getValue().getJmxEnable() ? "TRUE" : "FALSE") + ";CACHE_SIZE="
 					+ (entry.getValue().getJmxEnable() ? "TRUE" : "FALSE") + ";CACHE_SIZE="
 					+ (entry.getValue().getCacheSize() * 1024);
 					+ (entry.getValue().getCacheSize() * 1024);
 			dataSource.setDriverClassName(SlicePropertiesBuilder.driver_h2);
 			dataSource.setDriverClassName(SlicePropertiesBuilder.driver_h2);
@@ -195,7 +195,7 @@ public class ResourceFactory {
 		for (Entry<String, DataServer> entry : Config.nodes().dataServers().entrySet()) {
 		for (Entry<String, DataServer> entry : Config.nodes().dataServers().entrySet()) {
 			DruidDataSource dataSource = new DruidDataSource();
 			DruidDataSource dataSource = new DruidDataSource();
 			String url = "jdbc:h2:tcp://" + entry.getKey() + ":" + entry.getValue().getTcpPort()
 			String url = "jdbc:h2:tcp://" + entry.getKey() + ":" + entry.getValue().getTcpPort()
-					+ "/X;DEFAULT_LOCK_TIMEOUT=" + entry.getValue().getLockTimeout() + ";JMX="
+					+ "/X;LOCK_MODE=0;DEFAULT_LOCK_TIMEOUT=" + entry.getValue().getLockTimeout() + ";JMX="
 					+ (entry.getValue().getJmxEnable() ? "TRUE" : "FALSE") + ";CACHE_SIZE="
 					+ (entry.getValue().getJmxEnable() ? "TRUE" : "FALSE") + ";CACHE_SIZE="
 					+ (entry.getValue().getCacheSize() * 1024);
 					+ (entry.getValue().getCacheSize() * 1024);
 			dataSource.setDriverClassName(SlicePropertiesBuilder.driver_h2);
 			dataSource.setDriverClassName(SlicePropertiesBuilder.driver_h2);

+ 4 - 3
o2server/x_console/src/main/java/com/x/server/console/action/EraseContent.java

@@ -61,8 +61,8 @@ public abstract class EraseContent {
 	protected void run() throws Exception {
 	protected void run() throws Exception {
 		new Thread(() -> {
 		new Thread(() -> {
 			try {
 			try {
-				Thread.currentThread().setContextClassLoader(ClassLoaderTools.urlClassLoader(false, true, true, true,
-						true, Config.dir_local_temp_classes().toPath()));
+				Thread.currentThread().setContextClassLoader(ClassLoaderTools.urlClassLoader(false, false, false, false,
+						false, Config.dir_local_temp_classes().toPath()));
 				logger.print("erase {} content data: start at {}.", name, DateTools.format(start));
 				logger.print("erase {} content data: start at {}.", name, DateTools.format(start));
 				this.classNames = ListUtils.intersection(this.classNames,
 				this.classNames = ListUtils.intersection(this.classNames,
 						(List<String>) Config.resource(Config.RESOURCE_CONTAINERENTITYNAMES));
 						(List<String>) Config.resource(Config.RESOURCE_CONTAINERENTITYNAMES));
@@ -77,7 +77,6 @@ public abstract class EraseContent {
 							persistence.getName(),
 							persistence.getName(),
 							PersistenceXmlHelper.properties(cls.getName(), Config.slice().getEnable()));
 							PersistenceXmlHelper.properties(cls.getName(), Config.slice().getEnable()));
 					EntityManager em = emf.createEntityManager();
 					EntityManager em = emf.createEntityManager();
-
 					if (DataItem.class.isAssignableFrom(cls)) {
 					if (DataItem.class.isAssignableFrom(cls)) {
 						Long total = this.estimateItemCount(em, cls);
 						Long total = this.estimateItemCount(em, cls);
 						logger.print("erase {} content data:{}, total {}.", name, cls.getName(), total);
 						logger.print("erase {} content data:{}, total {}.", name, cls.getName(), total);
@@ -87,6 +86,8 @@ public abstract class EraseContent {
 						logger.print("erase {} content data:{}, total {}.", name, cls.getName(), total);
 						logger.print("erase {} content data:{}, total {}.", name, cls.getName(), total);
 						this.erase(cls, em, storageMappings, total);
 						this.erase(cls, em, storageMappings, total);
 					}
 					}
+					em.close();
+					emf.close();
 				}
 				}
 				Date end = new Date();
 				Date end = new Date();
 				logger.print("erase {} content data: completed at {}, elapsed {} ms.", name, DateTools.format(end),
 				logger.print("erase {} content data: completed at {}, elapsed {} ms.", name, DateTools.format(end),

+ 3 - 3
o2server/x_console/src/main/java/com/x/server/console/server/application/ApplicationServerTools.java

@@ -305,7 +305,7 @@ public class ApplicationServerTools extends JettySeverTools {
 			throws Exception {
 			throws Exception {
 		List<String> names = new ArrayList<>();
 		List<String> names = new ArrayList<>();
 		officialClassInfos.stream().map(ClassInfo::getSimpleName).forEach(names::add);
 		officialClassInfos.stream().map(ClassInfo::getSimpleName).forEach(names::add);
-		// names.addAll(customNames);
+		names.addAll(customNames);
 		for (String str : Config.dir_servers_applicationServer_work(true).list()) {
 		for (String str : Config.dir_servers_applicationServer_work(true).list()) {
 			if (!names.contains(str)) {
 			if (!names.contains(str)) {
 				FileUtils.forceDelete(new File(Config.dir_servers_applicationServer_work(), str));
 				FileUtils.forceDelete(new File(Config.dir_servers_applicationServer_work(), str));
@@ -316,7 +316,7 @@ public class ApplicationServerTools extends JettySeverTools {
 	private static void modified(Path war, Path dir) throws IOException {
 	private static void modified(Path war, Path dir) throws IOException {
 		Path lastModified = Paths.get(dir.toString(), PathTools.WEB_INF_LASTMODIFIED);
 		Path lastModified = Paths.get(dir.toString(), PathTools.WEB_INF_LASTMODIFIED);
 		if ((!Files.exists(lastModified)) || Files.isDirectory(lastModified)
 		if ((!Files.exists(lastModified)) || Files.isDirectory(lastModified)
-				|| (Files.getLastModifiedTime(lastModified).toMillis() != NumberUtils
+				|| (Files.getLastModifiedTime(war).toMillis() != NumberUtils
 						.toLong(FileUtils.readFileToString(lastModified.toFile(), DefaultCharset.charset_utf_8), 0))) {
 						.toLong(FileUtils.readFileToString(lastModified.toFile(), DefaultCharset.charset_utf_8), 0))) {
 			logger.print("deploy war:{}.", war.getFileName().toAbsolutePath());
 			logger.print("deploy war:{}.", war.getFileName().toAbsolutePath());
 			if (Files.exists(dir)) {
 			if (Files.exists(dir)) {
@@ -327,7 +327,7 @@ public class ApplicationServerTools extends JettySeverTools {
 				Files.createDirectories(lastModified.getParent());
 				Files.createDirectories(lastModified.getParent());
 				Files.createFile(lastModified);
 				Files.createFile(lastModified);
 			}
 			}
-			FileUtils.writeStringToFile(lastModified.toFile(), Files.getLastModifiedTime(lastModified).toMillis() + "",
+			FileUtils.writeStringToFile(lastModified.toFile(), Files.getLastModifiedTime(war).toMillis() + "",
 					DefaultCharset.charset_utf_8, false);
 					DefaultCharset.charset_utf_8, false);
 		}
 		}
 	}
 	}

+ 37 - 23
o2server/x_console/src/main/java/com/x/server/console/server/center/CenterServerTools.java

@@ -1,11 +1,17 @@
 package com.x.server.console.server.center;
 package com.x.server.console.server.center;
 
 
 import java.io.File;
 import java.io.File;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
 import java.util.EnumSet;
 import java.util.EnumSet;
 
 
 import javax.servlet.DispatcherType;
 import javax.servlet.DispatcherType;
 
 
 import org.apache.commons.io.FileUtils;
 import org.apache.commons.io.FileUtils;
+import org.apache.commons.io.file.PathUtils;
+import org.apache.commons.lang3.BooleanUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.math.NumberUtils;
 import org.apache.commons.lang3.math.NumberUtils;
 import org.eclipse.jetty.quickstart.QuickStartWebApp;
 import org.eclipse.jetty.quickstart.QuickStartWebApp;
@@ -25,14 +31,15 @@ import com.x.base.core.project.logger.Logger;
 import com.x.base.core.project.logger.LoggerFactory;
 import com.x.base.core.project.logger.LoggerFactory;
 import com.x.base.core.project.tools.DefaultCharset;
 import com.x.base.core.project.tools.DefaultCharset;
 import com.x.base.core.project.tools.JarTools;
 import com.x.base.core.project.tools.JarTools;
+import com.x.base.core.project.tools.PathTools;
 import com.x.server.console.server.JettySeverTools;
 import com.x.server.console.server.JettySeverTools;
 
 
 public class CenterServerTools extends JettySeverTools {
 public class CenterServerTools extends JettySeverTools {
 
 
 	private static Logger logger = LoggerFactory.getLogger(CenterServerTools.class);
 	private static Logger logger = LoggerFactory.getLogger(CenterServerTools.class);
 
 
-	private static int CENTERSERVER_THREAD_POOL_SIZE_MIN = 50;
-	private static int CENTERSERVER_THREAD_POOL_SIZE_MAX = 500;
+	private static final int CENTERSERVER_THREAD_POOL_SIZE_MIN = 50;
+	private static final int CENTERSERVER_THREAD_POOL_SIZE_MAX = 500;
 
 
 	public static Server start(CenterServer centerServer) throws Exception {
 	public static Server start(CenterServer centerServer) throws Exception {
 
 
@@ -40,22 +47,24 @@ public class CenterServerTools extends JettySeverTools {
 
 
 		HandlerList handlers = new HandlerList();
 		HandlerList handlers = new HandlerList();
 
 
-		File war = new File(Config.dir_store(), x_program_center.class.getSimpleName() + ".war");
-		File dir = new File(Config.dir_servers_centerServer_work(true), x_program_center.class.getSimpleName());
-		if (war.exists()) {
+		Path war = Paths.get(Config.dir_store().toString(), x_program_center.class.getSimpleName() + PathTools.DOT_WAR);
+		Path dir = Paths.get(Config.dir_servers_centerServer_work(true).toString(),
+				x_program_center.class.getSimpleName());
+		if (Files.exists(war)) {
 			modified(war, dir);
 			modified(war, dir);
 			QuickStartWebApp webApp = new QuickStartWebApp();
 			QuickStartWebApp webApp = new QuickStartWebApp();
 			webApp.setAutoPreconfigure(false);
 			webApp.setAutoPreconfigure(false);
 			webApp.setDisplayName(x_program_center.class.getSimpleName());
 			webApp.setDisplayName(x_program_center.class.getSimpleName());
 			webApp.setContextPath("/" + x_program_center.class.getSimpleName());
 			webApp.setContextPath("/" + x_program_center.class.getSimpleName());
-			webApp.setResourceBase(dir.getAbsolutePath());
-			webApp.setDescriptor(new File(dir, "WEB-INF/web.xml").getAbsolutePath());
+			webApp.setResourceBase(dir.toAbsolutePath().toString());
+			webApp.setDescriptor(dir.resolve(Paths.get(PathTools.WEB_INF_WEB_XML)).toString());
 			webApp.setExtraClasspath(calculateExtraClassPath(x_program_center.class));
 			webApp.setExtraClasspath(calculateExtraClassPath(x_program_center.class));
-			webApp.getInitParams().put("org.eclipse.jetty.servlet.Default.useFileMappedBuffer", "false");
-			webApp.getInitParams().put("org.eclipse.jetty.jsp.precompiled", "true");
-			webApp.getInitParams().put("org.eclipse.jetty.servlet.Default.dirAllowed", "false");
-			/* stat */
-			if (centerServer.getStatEnable()) {
+			webApp.getInitParams().put("org.eclipse.jetty.servlet.Default.useFileMappedBuffer",
+					BooleanUtils.toStringTrueFalse(false));
+			webApp.getInitParams().put("org.eclipse.jetty.jsp.precompiled", BooleanUtils.toStringTrueFalse(true));
+			webApp.getInitParams().put("org.eclipse.jetty.servlet.Default.dirAllowed",
+					BooleanUtils.toStringTrueFalse(false));
+			if (BooleanUtils.isTrue(centerServer.getStatEnable())) {
 				FilterHolder statFilterHolder = new FilterHolder(new WebStatFilter());
 				FilterHolder statFilterHolder = new FilterHolder(new WebStatFilter());
 				statFilterHolder.setInitParameter("exclusions", centerServer.getStatExclusions());
 				statFilterHolder.setInitParameter("exclusions", centerServer.getStatExclusions());
 				webApp.addFilter(statFilterHolder, "/*", EnumSet.of(DispatcherType.REQUEST));
 				webApp.addFilter(statFilterHolder, "/*", EnumSet.of(DispatcherType.REQUEST));
@@ -63,10 +72,9 @@ public class CenterServerTools extends JettySeverTools {
 				statServletHolder.setInitParameter("sessionStatEnable", "false");
 				statServletHolder.setInitParameter("sessionStatEnable", "false");
 				webApp.addServlet(statServletHolder, "/druid/*");
 				webApp.addServlet(statServletHolder, "/druid/*");
 			}
 			}
-			/* stat end */
 			handlers.addHandler(webApp);
 			handlers.addHandler(webApp);
 		} else {
 		} else {
-			throw new Exception("centerServer war not exist.");
+			throw new IOException("centerServer war not exist.");
 		}
 		}
 
 
 		QueuedThreadPool threadPool = new QueuedThreadPool();
 		QueuedThreadPool threadPool = new QueuedThreadPool();
@@ -75,7 +83,7 @@ public class CenterServerTools extends JettySeverTools {
 		Server server = new Server(threadPool);
 		Server server = new Server(threadPool);
 		server.setAttribute("maxFormContentSize", centerServer.getMaxFormContent() * 1024 * 1024);
 		server.setAttribute("maxFormContentSize", centerServer.getMaxFormContent() * 1024 * 1024);
 
 
-		if (centerServer.getSslEnable()) {
+		if (BooleanUtils.isTrue(centerServer.getSslEnable())) {
 			addHttpsConnector(server, centerServer.getPort());
 			addHttpsConnector(server, centerServer.getPort());
 		} else {
 		} else {
 			addHttpConnector(server, centerServer.getPort());
 			addHttpConnector(server, centerServer.getPort());
@@ -106,16 +114,22 @@ public class CenterServerTools extends JettySeverTools {
 		}
 		}
 	}
 	}
 
 
-	private static void modified(File war, File dir) throws Exception {
-		File lastModified = new File(dir, "WEB-INF/lastModified");
-		if ((!lastModified.exists()) || lastModified.isDirectory() || (war.lastModified() != NumberUtils
-				.toLong(FileUtils.readFileToString(lastModified, DefaultCharset.charset_utf_8), 0))) {
-			if (dir.exists()) {
-				FileUtils.forceDelete(dir);
+	private static void modified(Path war, Path dir) throws IOException {
+		Path lastModified = Paths.get(dir.toString(), PathTools.WEB_INF_LASTMODIFIED);
+		if ((!Files.exists(lastModified)) || Files.isDirectory(lastModified)
+				|| (Files.getLastModifiedTime(war).toMillis() != NumberUtils
+						.toLong(FileUtils.readFileToString(lastModified.toFile(), DefaultCharset.charset_utf_8), 0))) {
+			logger.print("deploy war:{}.", war.getFileName().toAbsolutePath());
+			if (Files.exists(dir)) {
+				PathUtils.cleanDirectory(dir);
 			}
 			}
 			JarTools.unjar(war, "", dir, true);
 			JarTools.unjar(war, "", dir, true);
-			FileUtils.writeStringToFile(lastModified, war.lastModified() + "", DefaultCharset.charset_utf_8, false);
+			if (!Files.exists(lastModified)) {
+				Files.createDirectories(lastModified.getParent());
+				Files.createFile(lastModified);
+			}
+			FileUtils.writeStringToFile(lastModified.toFile(), Files.getLastModifiedTime(war).toMillis() + "",
+					DefaultCharset.charset_utf_8, false);
 		}
 		}
 	}
 	}
-
 }
 }

+ 0 - 1994
o2server/x_portal_assemble_surface/src/main/webapp/describe/describe.json

@@ -1,1994 +0,0 @@
-{
-  "jaxrs": [
-    {
-      "name": "CacheAction",
-      "className": "com.x.base.core.project.jaxrs.cache.CacheAction",
-      "description": "缓存操作",
-      "methods": [
-        {
-          "name": "configFlush",
-          "className": "com.x.base.core.project.jaxrs.cache.ActionConfigFlush",
-          "description": "接收config flush 信号.",
-          "type": "GET",
-          "path": "jaxrs/cache/config/flush",
-          "contentType": "application/json",
-          "resultContentType": "application/json; charset\u003dUTF-8",
-          "useJsonElementParameter": false,
-          "useStringParameter": false,
-          "pathParameters": [],
-          "formParameters": [],
-          "queryParameters": [],
-          "ins": [],
-          "outs": [
-            {
-              "name": "value",
-              "type": "Boolean",
-              "isCollection": false,
-              "description": "布尔值."
-            }
-          ]
-        },
-        {
-          "name": "receive",
-          "className": "com.x.base.core.project.jaxrs.cache.ActionReceive",
-          "description": "接收Cache刷新信息.",
-          "type": "PUT",
-          "path": "jaxrs/cache",
-          "contentType": "application/json",
-          "resultContentType": "application/json; charset\u003dUTF-8",
-          "useJsonElementParameter": false,
-          "useStringParameter": false,
-          "pathParameters": [],
-          "formParameters": [],
-          "queryParameters": [],
-          "ins": [
-            {
-              "name": "nodeName",
-              "type": "String",
-              "isCollection": false,
-              "description": "节点名",
-              "isBaseType": true
-            },
-            {
-              "name": "className",
-              "type": "String",
-              "isCollection": false,
-              "description": "类名",
-              "isBaseType": true
-            },
-            {
-              "name": "keys",
-              "type": "List\u003cObject\u003e",
-              "isCollection": true,
-              "description": "关键字",
-              "isBaseType": false
-            }
-          ],
-          "outs": [
-            {
-              "name": "value",
-              "type": "String",
-              "isCollection": false,
-              "description": "字符串值"
-            }
-          ]
-        }
-      ]
-    },
-    {
-      "name": "EchoAction",
-      "className": "com.x.base.core.project.jaxrs.echo.EchoAction",
-      "description": "响应",
-      "methods": [
-        {
-          "name": "get",
-          "className": "com.x.base.core.project.jaxrs.echo.ActionGet",
-          "description": "获取应答.",
-          "type": "GET",
-          "path": "jaxrs/echo",
-          "contentType": "application/json",
-          "useJsonElementParameter": false,
-          "useStringParameter": false,
-          "pathParameters": [],
-          "formParameters": [],
-          "queryParameters": [],
-          "ins": [],
-          "outs": [
-            {
-              "name": "servletContextName",
-              "type": "String",
-              "isCollection": false,
-              "description": "上下文根"
-            },
-            {
-              "name": "serverTime",
-              "type": "Date",
-              "isCollection": false,
-              "description": "服务器时间"
-            }
-          ]
-        }
-      ]
-    },
-    {
-      "name": "FileAction",
-      "className": "com.x.portal.assemble.surface.jaxrs.file.FileAction",
-      "description": "文件操作",
-      "methods": [
-        {
-          "name": "content",
-          "className": "com.x.portal.assemble.surface.jaxrs.file.ActionContent",
-          "description": "访问文件内容.",
-          "type": "GET",
-          "path": "jaxrs/file/{flag}/portal/{portalFlag}/content",
-          "contentType": "application/json",
-          "useJsonElementParameter": false,
-          "useStringParameter": false,
-          "pathParameters": [
-            {
-              "name": "flag",
-              "type": "String",
-              "description": "标识"
-            },
-            {
-              "name": "portalFlag",
-              "type": "String",
-              "description": "应用标识"
-            }
-          ],
-          "formParameters": [],
-          "queryParameters": [],
-          "ins": [],
-          "outs": [
-            {
-              "name": "contentDisposition",
-              "type": "String",
-              "isCollection": false,
-              "description": "说明"
-            },
-            {
-              "name": "contentType",
-              "type": "String",
-              "isCollection": false,
-              "description": "类型"
-            },
-            {
-              "name": "bytes",
-              "type": "byte[]",
-              "isCollection": false,
-              "description": "字节内容."
-            }
-          ]
-        },
-        {
-          "name": "download",
-          "className": "com.x.portal.assemble.surface.jaxrs.file.ActionDownload",
-          "description": "访问文件内容.义stream格式下载",
-          "type": "GET",
-          "path": "jaxrs/file/{flag}/portal/{portalFlag}/download",
-          "contentType": "application/json",
-          "useJsonElementParameter": false,
-          "useStringParameter": false,
-          "pathParameters": [
-            {
-              "name": "flag",
-              "type": "String",
-              "description": "标识"
-            },
-            {
-              "name": "portalFlag",
-              "type": "String",
-              "description": "应用标识"
-            }
-          ],
-          "formParameters": [],
-          "queryParameters": [],
-          "ins": [],
-          "outs": [
-            {
-              "name": "contentDisposition",
-              "type": "String",
-              "isCollection": false,
-              "description": "说明"
-            },
-            {
-              "name": "contentType",
-              "type": "String",
-              "isCollection": false,
-              "description": "类型"
-            },
-            {
-              "name": "bytes",
-              "type": "byte[]",
-              "isCollection": false,
-              "description": "字节内容."
-            }
-          ]
-        },
-        {
-          "name": "listWithPortal",
-          "className": "com.x.portal.assemble.surface.jaxrs.file.ActionListWithPortal",
-          "description": "列示指定站点的下所有可见的文件.",
-          "type": "GET",
-          "path": "jaxrs/file/list/portal/{portalFlag}",
-          "contentType": "application/json",
-          "resultContentType": "application/json; charset\u003dUTF-8",
-          "useJsonElementParameter": false,
-          "useStringParameter": false,
-          "pathParameters": [
-            {
-              "name": "portalFlag",
-              "type": "String",
-              "description": "标识"
-            }
-          ],
-          "formParameters": [],
-          "queryParameters": [],
-          "ins": [],
-          "outs": [
-            {
-              "name": "id",
-              "type": "String",
-              "isCollection": false,
-              "description": "数据库主键,自动生成."
-            },
-            {
-              "name": "name",
-              "type": "String",
-              "isCollection": false,
-              "description": "文件名称."
-            },
-            {
-              "name": "alias",
-              "type": "String",
-              "isCollection": false,
-              "description": "文件别名."
-            },
-            {
-              "name": "description",
-              "type": "String",
-              "isCollection": false,
-              "description": "描述."
-            },
-            {
-              "name": "portal",
-              "type": "String",
-              "isCollection": false,
-              "description": "文件所属门户."
-            },
-            {
-              "name": "lastUpdatePerson",
-              "type": "String",
-              "isCollection": false,
-              "description": "最后的编辑者."
-            },
-            {
-              "name": "lastUpdateTime",
-              "type": "Date",
-              "isCollection": false,
-              "description": "最后的编辑时间."
-            },
-            {
-              "name": "fileName",
-              "type": "String",
-              "isCollection": false,
-              "description": "文件名称."
-            },
-            {
-              "name": "length",
-              "type": "Long",
-              "isCollection": false,
-              "description": "文件大小."
-            },
-            {
-              "name": "createTime",
-              "type": "Date",
-              "isCollection": false,
-              "description": "创建时间,自动生成,索引创建在约束中."
-            },
-            {
-              "name": "updateTime",
-              "type": "Date",
-              "isCollection": false,
-              "description": "修改时间,自动生成,索引创建在约束中."
-            }
-          ]
-        }
-      ]
-    },
-    {
-      "name": "FireScheduleAction",
-      "className": "com.x.base.core.project.jaxrs.fireschedule.FireScheduleAction",
-      "description": "触发任务",
-      "methods": [
-        {
-          "name": "execute",
-          "className": "com.x.base.core.project.jaxrs.fireschedule.ActionExecute",
-          "description": "接受x_program_center发送过来的运行schedule.",
-          "type": "GET",
-          "path": "jaxrs/fireschedule/classname/{className}",
-          "contentType": "application/json",
-          "useJsonElementParameter": false,
-          "useStringParameter": false,
-          "pathParameters": [
-            {
-              "name": "className",
-              "type": "String",
-              "description": "运行类"
-            }
-          ],
-          "formParameters": [],
-          "queryParameters": [],
-          "ins": [],
-          "outs": [
-            {
-              "name": "value",
-              "type": "Boolean",
-              "isCollection": false,
-              "description": "布尔值."
-            }
-          ]
-        }
-      ]
-    },
-    {
-      "name": "LoggerAction",
-      "className": "com.x.base.core.project.jaxrs.logger.LoggerAction",
-      "description": "日志操作",
-      "methods": [
-        {
-          "name": "debug",
-          "className": "com.x.base.core.project.jaxrs.logger.ActionDebug",
-          "description": "设置日志级别为DEBUG.",
-          "type": "GET",
-          "path": "jaxrs/logger/debug",
-          "contentType": "application/json",
-          "resultContentType": "application/json; charset\u003dUTF-8",
-          "useJsonElementParameter": false,
-          "useStringParameter": false,
-          "pathParameters": [],
-          "formParameters": [],
-          "queryParameters": [],
-          "ins": [],
-          "outs": [
-            {
-              "name": "value",
-              "type": "Boolean",
-              "isCollection": false,
-              "description": "布尔值."
-            }
-          ]
-        },
-        {
-          "name": "get",
-          "className": "com.x.base.core.project.jaxrs.logger.ActionGet",
-          "description": "获取当前日志级别.",
-          "type": "GET",
-          "path": "jaxrs/logger",
-          "contentType": "application/json",
-          "resultContentType": "application/json; charset\u003dUTF-8",
-          "useJsonElementParameter": false,
-          "useStringParameter": false,
-          "pathParameters": [],
-          "formParameters": [],
-          "queryParameters": [],
-          "ins": [],
-          "outs": [
-            {
-              "name": "value",
-              "type": "String",
-              "isCollection": false,
-              "description": "字符串值"
-            }
-          ]
-        },
-        {
-          "name": "info",
-          "className": "com.x.base.core.project.jaxrs.logger.ActionInfo",
-          "description": "设置日志级别为INFO",
-          "type": "GET",
-          "path": "jaxrs/logger/info",
-          "contentType": "application/json",
-          "resultContentType": "application/json; charset\u003dUTF-8",
-          "useJsonElementParameter": false,
-          "useStringParameter": false,
-          "pathParameters": [],
-          "formParameters": [],
-          "queryParameters": [],
-          "ins": [],
-          "outs": [
-            {
-              "name": "value",
-              "type": "Boolean",
-              "isCollection": false,
-              "description": "布尔值."
-            }
-          ]
-        },
-        {
-          "name": "trace",
-          "className": "com.x.base.core.project.jaxrs.logger.ActionTrace",
-          "description": "设置日志级别为TRACE.",
-          "type": "GET",
-          "path": "jaxrs/logger/trace",
-          "contentType": "application/json",
-          "resultContentType": "application/json; charset\u003dUTF-8",
-          "useJsonElementParameter": false,
-          "useStringParameter": false,
-          "pathParameters": [],
-          "formParameters": [],
-          "queryParameters": [],
-          "ins": [],
-          "outs": [
-            {
-              "name": "value",
-              "type": "Boolean",
-              "isCollection": false,
-              "description": "布尔值."
-            }
-          ]
-        },
-        {
-          "name": "warn",
-          "className": "com.x.base.core.project.jaxrs.logger.ActionWarn",
-          "description": "设置日志级别为WARN",
-          "type": "GET",
-          "path": "jaxrs/logger/warn",
-          "contentType": "application/json",
-          "resultContentType": "application/json; charset\u003dUTF-8",
-          "useJsonElementParameter": false,
-          "useStringParameter": false,
-          "pathParameters": [],
-          "formParameters": [],
-          "queryParameters": [],
-          "ins": [],
-          "outs": [
-            {
-              "name": "value",
-              "type": "Boolean",
-              "isCollection": false,
-              "description": "布尔值."
-            }
-          ]
-        }
-      ]
-    },
-    {
-      "name": "PageAction",
-      "className": "com.x.portal.assemble.surface.jaxrs.page.PageAction",
-      "description": "页面",
-      "methods": [
-        {
-          "name": "get",
-          "className": "com.x.portal.assemble.surface.jaxrs.page.ActionGet",
-          "description": "获取Page内容.",
-          "type": "GET",
-          "path": "jaxrs/page/{id}",
-          "contentType": "application/json",
-          "resultContentType": "application/json; charset\u003dUTF-8",
-          "useJsonElementParameter": false,
-          "useStringParameter": false,
-          "pathParameters": [
-            {
-              "name": "id",
-              "type": "String",
-              "description": "标识"
-            }
-          ],
-          "formParameters": [],
-          "queryParameters": [],
-          "ins": [],
-          "outs": [
-            {
-              "name": "id",
-              "type": "String",
-              "isCollection": false,
-              "description": "数据库主键,自动生成."
-            },
-            {
-              "name": "name",
-              "type": "String",
-              "isCollection": false,
-              "description": "名称."
-            },
-            {
-              "name": "alias",
-              "type": "String",
-              "isCollection": false,
-              "description": "别名."
-            },
-            {
-              "name": "description",
-              "type": "String",
-              "isCollection": false,
-              "description": "描述."
-            },
-            {
-              "name": "portal",
-              "type": "String",
-              "isCollection": false,
-              "description": "所属的Portal."
-            },
-            {
-              "name": "hasMobile",
-              "type": "Boolean",
-              "isCollection": false,
-              "description": "是否有移动端内容."
-            },
-            {
-              "name": "createTime",
-              "type": "Date",
-              "isCollection": false,
-              "description": "创建时间,自动生成,索引创建在约束中."
-            },
-            {
-              "name": "updateTime",
-              "type": "Date",
-              "isCollection": false,
-              "description": "修改时间,自动生成,索引创建在约束中."
-            }
-          ]
-        },
-        {
-          "name": "getMobile",
-          "className": "com.x.portal.assemble.surface.jaxrs.page.ActionGetMobile",
-          "description": "获取Page内容Mobile.",
-          "type": "GET",
-          "path": "jaxrs/page/{id}/mobile",
-          "contentType": "application/json",
-          "resultContentType": "application/json; charset\u003dUTF-8",
-          "useJsonElementParameter": false,
-          "useStringParameter": false,
-          "pathParameters": [
-            {
-              "name": "id",
-              "type": "String",
-              "description": "标识"
-            }
-          ],
-          "formParameters": [],
-          "queryParameters": [],
-          "ins": [],
-          "outs": [
-            {
-              "name": "id",
-              "type": "String",
-              "isCollection": false,
-              "description": "数据库主键,自动生成."
-            },
-            {
-              "name": "name",
-              "type": "String",
-              "isCollection": false,
-              "description": "名称."
-            },
-            {
-              "name": "alias",
-              "type": "String",
-              "isCollection": false,
-              "description": "别名."
-            },
-            {
-              "name": "description",
-              "type": "String",
-              "isCollection": false,
-              "description": "描述."
-            },
-            {
-              "name": "portal",
-              "type": "String",
-              "isCollection": false,
-              "description": "所属的Portal."
-            },
-            {
-              "name": "hasMobile",
-              "type": "Boolean",
-              "isCollection": false,
-              "description": "是否有移动端内容."
-            },
-            {
-              "name": "createTime",
-              "type": "Date",
-              "isCollection": false,
-              "description": "创建时间,自动生成,索引创建在约束中."
-            },
-            {
-              "name": "updateTime",
-              "type": "Date",
-              "isCollection": false,
-              "description": "修改时间,自动生成,索引创建在约束中."
-            }
-          ]
-        },
-        {
-          "name": "getWithPortal",
-          "className": "com.x.portal.assemble.surface.jaxrs.page.ActionGetWithPortal",
-          "description": "列示属于指定Portal的Page,其中Portal可以用name,alias和id标识,Page为在此Portal下的页面.",
-          "type": "GET",
-          "path": "jaxrs/page/{flag}/portal/{portalFlag}",
-          "contentType": "application/json",
-          "resultContentType": "application/json; charset\u003dUTF-8",
-          "useJsonElementParameter": false,
-          "useStringParameter": false,
-          "pathParameters": [
-            {
-              "name": "flag",
-              "type": "String",
-              "description": "标识"
-            },
-            {
-              "name": "portalFlag",
-              "type": "String",
-              "description": "门户标识"
-            }
-          ],
-          "formParameters": [],
-          "queryParameters": [],
-          "ins": [],
-          "outs": [
-            {
-              "name": "id",
-              "type": "String",
-              "isCollection": false,
-              "description": "数据库主键,自动生成."
-            },
-            {
-              "name": "name",
-              "type": "String",
-              "isCollection": false,
-              "description": "名称."
-            },
-            {
-              "name": "alias",
-              "type": "String",
-              "isCollection": false,
-              "description": "别名."
-            },
-            {
-              "name": "description",
-              "type": "String",
-              "isCollection": false,
-              "description": "描述."
-            },
-            {
-              "name": "portal",
-              "type": "String",
-              "isCollection": false,
-              "description": "所属的Portal."
-            },
-            {
-              "name": "hasMobile",
-              "type": "Boolean",
-              "isCollection": false,
-              "description": "是否有移动端内容."
-            },
-            {
-              "name": "createTime",
-              "type": "Date",
-              "isCollection": false,
-              "description": "创建时间,自动生成,索引创建在约束中."
-            },
-            {
-              "name": "updateTime",
-              "type": "Date",
-              "isCollection": false,
-              "description": "修改时间,自动生成,索引创建在约束中."
-            }
-          ]
-        },
-        {
-          "name": "getWithPortalMobile",
-          "className": "com.x.portal.assemble.surface.jaxrs.page.ActionGetWithPortalMobile",
-          "description": "列示属于指定Portal的Page,其中Portal可以用name,alias和id标识,Page为在此Portal下的页面Mobile.",
-          "type": "GET",
-          "path": "jaxrs/page/{flag}/portal/{portalFlag}/mobile",
-          "contentType": "application/json",
-          "resultContentType": "application/json; charset\u003dUTF-8",
-          "useJsonElementParameter": false,
-          "useStringParameter": false,
-          "pathParameters": [
-            {
-              "name": "flag",
-              "type": "String",
-              "description": "标识"
-            },
-            {
-              "name": "portalFlag",
-              "type": "String",
-              "description": "门户标识"
-            }
-          ],
-          "formParameters": [],
-          "queryParameters": [],
-          "ins": [],
-          "outs": [
-            {
-              "name": "id",
-              "type": "String",
-              "isCollection": false,
-              "description": "数据库主键,自动生成."
-            },
-            {
-              "name": "name",
-              "type": "String",
-              "isCollection": false,
-              "description": "名称."
-            },
-            {
-              "name": "alias",
-              "type": "String",
-              "isCollection": false,
-              "description": "别名."
-            },
-            {
-              "name": "description",
-              "type": "String",
-              "isCollection": false,
-              "description": "描述."
-            },
-            {
-              "name": "portal",
-              "type": "String",
-              "isCollection": false,
-              "description": "所属的Portal."
-            },
-            {
-              "name": "hasMobile",
-              "type": "Boolean",
-              "isCollection": false,
-              "description": "是否有移动端内容."
-            },
-            {
-              "name": "createTime",
-              "type": "Date",
-              "isCollection": false,
-              "description": "创建时间,自动生成,索引创建在约束中."
-            },
-            {
-              "name": "updateTime",
-              "type": "Date",
-              "isCollection": false,
-              "description": "修改时间,自动生成,索引创建在约束中."
-            }
-          ]
-        },
-        {
-          "name": "list",
-          "className": "com.x.portal.assemble.surface.jaxrs.page.ActionList",
-          "description": "列示属于指定Portal的Page.",
-          "type": "GET",
-          "path": "jaxrs/page/list/portal/{portal}",
-          "contentType": "application/json",
-          "resultContentType": "application/json; charset\u003dUTF-8",
-          "useJsonElementParameter": false,
-          "useStringParameter": false,
-          "pathParameters": [
-            {
-              "name": "portal",
-              "type": "String",
-              "description": "门户"
-            }
-          ],
-          "formParameters": [],
-          "queryParameters": [],
-          "ins": [],
-          "outs": [
-            {
-              "name": "id",
-              "type": "String",
-              "isCollection": false,
-              "description": "数据库主键,自动生成."
-            },
-            {
-              "name": "name",
-              "type": "String",
-              "isCollection": false,
-              "description": "名称."
-            },
-            {
-              "name": "alias",
-              "type": "String",
-              "isCollection": false,
-              "description": "别名."
-            },
-            {
-              "name": "description",
-              "type": "String",
-              "isCollection": false,
-              "description": "描述."
-            },
-            {
-              "name": "portal",
-              "type": "String",
-              "isCollection": false,
-              "description": "所属的Portal."
-            },
-            {
-              "name": "hasMobile",
-              "type": "Boolean",
-              "isCollection": false,
-              "description": "是否有移动端内容."
-            },
-            {
-              "name": "createTime",
-              "type": "Date",
-              "isCollection": false,
-              "description": "创建时间,自动生成,索引创建在约束中."
-            },
-            {
-              "name": "updateTime",
-              "type": "Date",
-              "isCollection": false,
-              "description": "修改时间,自动生成,索引创建在约束中."
-            }
-          ]
-        }
-      ]
-    },
-    {
-      "name": "PortalAction",
-      "className": "com.x.portal.assemble.surface.jaxrs.portal.PortalAction",
-      "description": "门户",
-      "methods": [
-        {
-          "name": "get",
-          "className": "com.x.portal.assemble.surface.jaxrs.portal.ActionGet",
-          "description": "获取单个的Portal.",
-          "type": "GET",
-          "path": "jaxrs/portal/{flag}",
-          "contentType": "application/json",
-          "resultContentType": "application/json; charset\u003dUTF-8",
-          "useJsonElementParameter": false,
-          "useStringParameter": false,
-          "pathParameters": [
-            {
-              "name": "flag",
-              "type": "String",
-              "description": "标识"
-            }
-          ],
-          "formParameters": [],
-          "queryParameters": [],
-          "ins": [],
-          "outs": [
-            {
-              "name": "id",
-              "type": "String",
-              "isCollection": false,
-              "description": "数据库主键,自动生成."
-            },
-            {
-              "name": "name",
-              "type": "String",
-              "isCollection": false,
-              "description": "名称."
-            },
-            {
-              "name": "alias",
-              "type": "String",
-              "isCollection": false,
-              "description": "别名."
-            },
-            {
-              "name": "description",
-              "type": "String",
-              "isCollection": false,
-              "description": "描述."
-            },
-            {
-              "name": "availableIdentityList",
-              "type": "List\u003cString\u003e",
-              "isCollection": true,
-              "description": "在指定启动时候,允许新建的用户."
-            },
-            {
-              "name": "availableUnitList",
-              "type": "List\u003cString\u003e",
-              "isCollection": true,
-              "description": "在指定启动时候,允许新建的组织."
-            },
-            {
-              "name": "portalCategory",
-              "type": "String",
-              "isCollection": false,
-              "description": "应用分类."
-            },
-            {
-              "name": "icon",
-              "type": "String",
-              "isCollection": false,
-              "description": "icon Base64编码后的文本."
-            },
-            {
-              "name": "firstPage",
-              "type": "String",
-              "isCollection": false,
-              "description": "默认首页."
-            },
-            {
-              "name": "controllerList",
-              "type": "List\u003cString\u003e",
-              "isCollection": true,
-              "description": "应用管理者。"
-            },
-            {
-              "name": "creatorPerson",
-              "type": "String",
-              "isCollection": false,
-              "description": "应用的创建者。"
-            },
-            {
-              "name": "lastUpdateTime",
-              "type": "Date",
-              "isCollection": false,
-              "description": "应用的最后修改时间。"
-            },
-            {
-              "name": "lastUpdatePerson",
-              "type": "String",
-              "isCollection": false,
-              "description": "应用的最后修改者"
-            },
-            {
-              "name": "pcClient",
-              "type": "Boolean",
-              "isCollection": false,
-              "description": "是否在pc终端显示."
-            },
-            {
-              "name": "mobileClient",
-              "type": "Boolean",
-              "isCollection": false,
-              "description": "是否在移动设备显示."
-            },
-            {
-              "name": "createTime",
-              "type": "Date",
-              "isCollection": false,
-              "description": "创建时间,自动生成,索引创建在约束中."
-            },
-            {
-              "name": "updateTime",
-              "type": "Date",
-              "isCollection": false,
-              "description": "修改时间,自动生成,索引创建在约束中."
-            }
-          ]
-        },
-        {
-          "name": "icon",
-          "className": "com.x.portal.assemble.surface.jaxrs.portal.ActionIcon",
-          "description": "获取Portal的图标.",
-          "type": "GET",
-          "path": "jaxrs/portal/{id}/icon",
-          "contentType": "application/json",
-          "useJsonElementParameter": false,
-          "useStringParameter": false,
-          "pathParameters": [
-            {
-              "name": "id",
-              "type": "String",
-              "description": "标识"
-            }
-          ],
-          "formParameters": [],
-          "queryParameters": [],
-          "ins": [],
-          "outs": [
-            {
-              "name": "contentDisposition",
-              "type": "String",
-              "isCollection": false,
-              "description": "说明"
-            },
-            {
-              "name": "contentType",
-              "type": "String",
-              "isCollection": false,
-              "description": "类型"
-            },
-            {
-              "name": "bytes",
-              "type": "byte[]",
-              "isCollection": false,
-              "description": "字节内容."
-            }
-          ]
-        },
-        {
-          "name": "iconBase64",
-          "className": "com.x.portal.assemble.surface.jaxrs.portal.ActionIconBase64",
-          "description": "获取Portal的图标Base64编码.",
-          "type": "GET",
-          "path": "jaxrs/portal/{id}/icon/base64",
-          "contentType": "application/json",
-          "resultContentType": "application/json; charset\u003dUTF-8",
-          "useJsonElementParameter": false,
-          "useStringParameter": false,
-          "pathParameters": [
-            {
-              "name": "id",
-              "type": "String",
-              "description": "标识"
-            }
-          ],
-          "formParameters": [],
-          "queryParameters": [],
-          "ins": [],
-          "outs": [
-            {
-              "name": "value",
-              "type": "String",
-              "isCollection": false,
-              "description": "字符串值"
-            }
-          ]
-        },
-        {
-          "name": "list",
-          "className": "com.x.portal.assemble.surface.jaxrs.portal.ActionList",
-          "description": "列示当前用户所有可见的Portal.",
-          "type": "GET",
-          "path": "jaxrs/portal/list",
-          "contentType": "application/json",
-          "resultContentType": "application/json; charset\u003dUTF-8",
-          "useJsonElementParameter": false,
-          "useStringParameter": false,
-          "pathParameters": [],
-          "formParameters": [],
-          "queryParameters": [],
-          "ins": [],
-          "outs": [
-            {
-              "name": "id",
-              "type": "String",
-              "isCollection": false,
-              "description": "数据库主键,自动生成."
-            },
-            {
-              "name": "name",
-              "type": "String",
-              "isCollection": false,
-              "description": "名称."
-            },
-            {
-              "name": "alias",
-              "type": "String",
-              "isCollection": false,
-              "description": "别名."
-            },
-            {
-              "name": "description",
-              "type": "String",
-              "isCollection": false,
-              "description": "描述."
-            },
-            {
-              "name": "portalCategory",
-              "type": "String",
-              "isCollection": false,
-              "description": "应用分类."
-            },
-            {
-              "name": "icon",
-              "type": "String",
-              "isCollection": false,
-              "description": "icon Base64编码后的文本."
-            },
-            {
-              "name": "firstPage",
-              "type": "String",
-              "isCollection": false,
-              "description": "默认首页."
-            },
-            {
-              "name": "creatorPerson",
-              "type": "String",
-              "isCollection": false,
-              "description": "应用的创建者。"
-            },
-            {
-              "name": "lastUpdateTime",
-              "type": "Date",
-              "isCollection": false,
-              "description": "应用的最后修改时间。"
-            },
-            {
-              "name": "lastUpdatePerson",
-              "type": "String",
-              "isCollection": false,
-              "description": "应用的最后修改者"
-            },
-            {
-              "name": "pcClient",
-              "type": "Boolean",
-              "isCollection": false,
-              "description": "是否在pc终端显示."
-            },
-            {
-              "name": "mobileClient",
-              "type": "Boolean",
-              "isCollection": false,
-              "description": "是否在移动设备显示."
-            },
-            {
-              "name": "createTime",
-              "type": "Date",
-              "isCollection": false,
-              "description": "创建时间,自动生成,索引创建在约束中."
-            },
-            {
-              "name": "updateTime",
-              "type": "Date",
-              "isCollection": false,
-              "description": "修改时间,自动生成,索引创建在约束中."
-            }
-          ]
-        }
-      ]
-    },
-    {
-      "name": "ScriptAction",
-      "className": "com.x.portal.assemble.surface.jaxrs.script.ScriptAction",
-      "description": "脚本",
-      "methods": [
-        {
-          "name": "flag",
-          "className": "com.x.portal.assemble.surface.jaxrs.script.ActionFlag",
-          "description": "在指定的Portal下根据flag获取Script.",
-          "type": "POST",
-          "path": "jaxrs/script/portal/{portal}/name/{name}",
-          "contentType": "application/json",
-          "resultContentType": "application/json; charset\u003dUTF-8",
-          "useJsonElementParameter": false,
-          "useStringParameter": false,
-          "pathParameters": [
-            {
-              "name": "name",
-              "type": "String",
-              "description": "名称"
-            },
-            {
-              "name": "portal",
-              "type": "String",
-              "description": "门户标识"
-            }
-          ],
-          "formParameters": [],
-          "queryParameters": [],
-          "ins": [
-            {
-              "name": "importedList",
-              "type": "List\u003cString\u003e",
-              "isCollection": true,
-              "description": "已经导入的脚本",
-              "isBaseType": true
-            }
-          ],
-          "outs": [
-            {
-              "name": "id",
-              "type": "String",
-              "isCollection": false,
-              "description": "数据库主键,自动生成."
-            },
-            {
-              "name": "name",
-              "type": "String",
-              "isCollection": false,
-              "description": "名称."
-            },
-            {
-              "name": "alias",
-              "type": "String",
-              "isCollection": false,
-              "description": "别名."
-            },
-            {
-              "name": "description",
-              "type": "String",
-              "isCollection": false,
-              "description": "描述."
-            },
-            {
-              "name": "validated",
-              "type": "Boolean",
-              "isCollection": false,
-              "description": "代码格式是否正确."
-            },
-            {
-              "name": "portal",
-              "type": "String",
-              "isCollection": false,
-              "description": "脚本所属应用."
-            },
-            {
-              "name": "text",
-              "type": "String",
-              "isCollection": false,
-              "description": "脚本内容."
-            },
-            {
-              "name": "dependScriptList",
-              "type": "List\u003cString\u003e",
-              "isCollection": true,
-              "description": "依赖的函数列表."
-            },
-            {
-              "name": "creatorPerson",
-              "type": "String",
-              "isCollection": false,
-              "description": "流程创建者."
-            },
-            {
-              "name": "lastUpdatePerson",
-              "type": "String",
-              "isCollection": false,
-              "description": "最后的编辑者."
-            },
-            {
-              "name": "lastUpdateTime",
-              "type": "Date",
-              "isCollection": false,
-              "description": "最后的编辑时间."
-            },
-            {
-              "name": "createTime",
-              "type": "Date",
-              "isCollection": false,
-              "description": "创建时间,自动生成,索引创建在约束中."
-            },
-            {
-              "name": "updateTime",
-              "type": "Date",
-              "isCollection": false,
-              "description": "修改时间,自动生成,索引创建在约束中."
-            }
-          ]
-        },
-        {
-          "name": "get",
-          "className": "com.x.portal.assemble.surface.jaxrs.script.ActionGet",
-          "description": "获取Script内容.",
-          "type": "GET",
-          "path": "jaxrs/script/{id}",
-          "contentType": "application/json",
-          "resultContentType": "application/json; charset\u003dUTF-8",
-          "useJsonElementParameter": false,
-          "useStringParameter": false,
-          "pathParameters": [
-            {
-              "name": "id",
-              "type": "String",
-              "description": "标识"
-            }
-          ],
-          "formParameters": [],
-          "queryParameters": [],
-          "ins": [],
-          "outs": [
-            {
-              "name": "id",
-              "type": "String",
-              "isCollection": false,
-              "description": "数据库主键,自动生成."
-            },
-            {
-              "name": "name",
-              "type": "String",
-              "isCollection": false,
-              "description": "名称."
-            },
-            {
-              "name": "alias",
-              "type": "String",
-              "isCollection": false,
-              "description": "别名."
-            },
-            {
-              "name": "description",
-              "type": "String",
-              "isCollection": false,
-              "description": "描述."
-            },
-            {
-              "name": "validated",
-              "type": "Boolean",
-              "isCollection": false,
-              "description": "代码格式是否正确."
-            },
-            {
-              "name": "portal",
-              "type": "String",
-              "isCollection": false,
-              "description": "脚本所属应用."
-            },
-            {
-              "name": "text",
-              "type": "String",
-              "isCollection": false,
-              "description": "脚本内容."
-            },
-            {
-              "name": "dependScriptList",
-              "type": "List\u003cString\u003e",
-              "isCollection": true,
-              "description": "依赖的函数列表."
-            },
-            {
-              "name": "creatorPerson",
-              "type": "String",
-              "isCollection": false,
-              "description": "流程创建者."
-            },
-            {
-              "name": "lastUpdatePerson",
-              "type": "String",
-              "isCollection": false,
-              "description": "最后的编辑者."
-            },
-            {
-              "name": "lastUpdateTime",
-              "type": "Date",
-              "isCollection": false,
-              "description": "最后的编辑时间."
-            },
-            {
-              "name": "createTime",
-              "type": "Date",
-              "isCollection": false,
-              "description": "创建时间,自动生成,索引创建在约束中."
-            },
-            {
-              "name": "updateTime",
-              "type": "Date",
-              "isCollection": false,
-              "description": "修改时间,自动生成,索引创建在约束中."
-            }
-          ]
-        },
-        {
-          "name": "getImported",
-          "className": "com.x.portal.assemble.surface.jaxrs.script.ActionGetImported",
-          "description": "获取Script内容,并递归附带应用脚本.",
-          "type": "GET",
-          "path": "jaxrs/script/portal/{portal}/name/{name}/imported",
-          "contentType": "application/json",
-          "resultContentType": "application/json; charset\u003dUTF-8",
-          "useJsonElementParameter": false,
-          "useStringParameter": false,
-          "pathParameters": [
-            {
-              "name": "name",
-              "type": "String",
-              "description": "名称"
-            },
-            {
-              "name": "portal",
-              "type": "String",
-              "description": "门户标识"
-            }
-          ],
-          "formParameters": [],
-          "queryParameters": [],
-          "ins": [],
-          "outs": [
-            {
-              "name": "id",
-              "type": "String",
-              "isCollection": false,
-              "description": "数据库主键,自动生成."
-            },
-            {
-              "name": "name",
-              "type": "String",
-              "isCollection": false,
-              "description": "名称."
-            },
-            {
-              "name": "alias",
-              "type": "String",
-              "isCollection": false,
-              "description": "别名."
-            },
-            {
-              "name": "description",
-              "type": "String",
-              "isCollection": false,
-              "description": "描述."
-            },
-            {
-              "name": "validated",
-              "type": "Boolean",
-              "isCollection": false,
-              "description": "代码格式是否正确."
-            },
-            {
-              "name": "portal",
-              "type": "String",
-              "isCollection": false,
-              "description": "脚本所属应用."
-            },
-            {
-              "name": "text",
-              "type": "String",
-              "isCollection": false,
-              "description": "脚本内容."
-            },
-            {
-              "name": "dependScriptList",
-              "type": "List\u003cString\u003e",
-              "isCollection": true,
-              "description": "依赖的函数列表."
-            },
-            {
-              "name": "creatorPerson",
-              "type": "String",
-              "isCollection": false,
-              "description": "流程创建者."
-            },
-            {
-              "name": "lastUpdatePerson",
-              "type": "String",
-              "isCollection": false,
-              "description": "最后的编辑者."
-            },
-            {
-              "name": "lastUpdateTime",
-              "type": "Date",
-              "isCollection": false,
-              "description": "最后的编辑时间."
-            },
-            {
-              "name": "createTime",
-              "type": "Date",
-              "isCollection": false,
-              "description": "创建时间,自动生成,索引创建在约束中."
-            },
-            {
-              "name": "updateTime",
-              "type": "Date",
-              "isCollection": false,
-              "description": "修改时间,自动生成,索引创建在约束中."
-            }
-          ]
-        },
-        {
-          "name": "list",
-          "className": "com.x.portal.assemble.surface.jaxrs.script.ActionList",
-          "description": "列示属于指定Portal的Script.",
-          "type": "GET",
-          "path": "jaxrs/script/list/portal/{portal}",
-          "contentType": "application/json",
-          "resultContentType": "application/json; charset\u003dUTF-8",
-          "useJsonElementParameter": false,
-          "useStringParameter": false,
-          "pathParameters": [
-            {
-              "name": "portal",
-              "type": "String",
-              "description": "门户标识"
-            }
-          ],
-          "formParameters": [],
-          "queryParameters": [],
-          "ins": [],
-          "outs": [
-            {
-              "name": "id",
-              "type": "String",
-              "isCollection": false,
-              "description": "数据库主键,自动生成."
-            },
-            {
-              "name": "name",
-              "type": "String",
-              "isCollection": false,
-              "description": "名称."
-            },
-            {
-              "name": "alias",
-              "type": "String",
-              "isCollection": false,
-              "description": "别名."
-            },
-            {
-              "name": "description",
-              "type": "String",
-              "isCollection": false,
-              "description": "描述."
-            },
-            {
-              "name": "validated",
-              "type": "Boolean",
-              "isCollection": false,
-              "description": "代码格式是否正确."
-            },
-            {
-              "name": "portal",
-              "type": "String",
-              "isCollection": false,
-              "description": "脚本所属应用."
-            },
-            {
-              "name": "creatorPerson",
-              "type": "String",
-              "isCollection": false,
-              "description": "流程创建者."
-            },
-            {
-              "name": "lastUpdatePerson",
-              "type": "String",
-              "isCollection": false,
-              "description": "最后的编辑者."
-            },
-            {
-              "name": "lastUpdateTime",
-              "type": "Date",
-              "isCollection": false,
-              "description": "最后的编辑时间."
-            },
-            {
-              "name": "createTime",
-              "type": "Date",
-              "isCollection": false,
-              "description": "创建时间,自动生成,索引创建在约束中."
-            },
-            {
-              "name": "updateTime",
-              "type": "Date",
-              "isCollection": false,
-              "description": "修改时间,自动生成,索引创建在约束中."
-            }
-          ]
-        }
-      ]
-    },
-    {
-      "name": "SysResourceAction",
-      "className": "com.x.base.core.project.jaxrs.sysresource.SysResourceAction",
-      "description": "系统资源",
-      "methods": [
-        {
-          "name": "listResource",
-          "className": "com.x.base.core.project.jaxrs.sysresource.ActionListResource",
-          "description": "获取静态资源信息.",
-          "type": "GET",
-          "path": "jaxrs/sysresource/filePath/{filePath}",
-          "contentType": "application/json",
-          "resultContentType": "application/json; charset\u003dUTF-8",
-          "useJsonElementParameter": false,
-          "useStringParameter": false,
-          "pathParameters": [
-            {
-              "name": "filePath",
-              "type": "String",
-              "description": "查找路径(根路径:(0))"
-            }
-          ],
-          "formParameters": [],
-          "queryParameters": [],
-          "ins": [],
-          "outs": []
-        },
-        {
-          "name": "uploadResource",
-          "className": "com.x.base.core.project.jaxrs.sysresource.ActionUploadResource",
-          "description": "上传静态资源(仅上传到当前服务器)",
-          "type": "POST",
-          "path": "jaxrs/sysresource/upload/resource/as/new/{asNew}",
-          "contentType": "multipart/form-data",
-          "resultContentType": "application/json; charset\u003dUTF-8",
-          "useJsonElementParameter": false,
-          "useStringParameter": true,
-          "pathParameters": [
-            {
-              "name": "asNew",
-              "type": "Boolean",
-              "description": "覆盖类型:true删除原文件然后上传,false覆盖原文件"
-            }
-          ],
-          "formParameters": [
-            {
-              "name": "file",
-              "type": "File",
-              "description": "上传文件"
-            },
-            {
-              "name": "fileName",
-              "type": "String",
-              "description": "附件名称"
-            },
-            {
-              "name": "filePath",
-              "type": "String",
-              "description": "附件存放目录(可以为空)"
-            }
-          ],
-          "queryParameters": [],
-          "ins": [],
-          "outs": [
-            {
-              "name": "value",
-              "type": "Boolean",
-              "isCollection": false,
-              "description": "布尔值."
-            }
-          ]
-        }
-      ]
-    },
-    {
-      "name": "WidgetAction",
-      "className": "com.x.portal.assemble.surface.jaxrs.widget.WidgetAction",
-      "description": "部件",
-      "methods": [
-        {
-          "name": "get",
-          "className": "com.x.portal.assemble.surface.jaxrs.widget.ActionGet",
-          "description": "获取部件内容.",
-          "type": "GET",
-          "path": "jaxrs/widget/{id}",
-          "contentType": "application/json",
-          "resultContentType": "application/json; charset\u003dUTF-8",
-          "useJsonElementParameter": false,
-          "useStringParameter": false,
-          "pathParameters": [
-            {
-              "name": "id",
-              "type": "String",
-              "description": "标识"
-            }
-          ],
-          "formParameters": [],
-          "queryParameters": [],
-          "ins": [],
-          "outs": [
-            {
-              "name": "id",
-              "type": "String",
-              "isCollection": false,
-              "description": "数据库主键,自动生成."
-            },
-            {
-              "name": "name",
-              "type": "String",
-              "isCollection": false,
-              "description": "名称."
-            },
-            {
-              "name": "alias",
-              "type": "String",
-              "isCollection": false,
-              "description": "别名."
-            },
-            {
-              "name": "description",
-              "type": "String",
-              "isCollection": false,
-              "description": "描述."
-            },
-            {
-              "name": "portal",
-              "type": "String",
-              "isCollection": false,
-              "description": "所属的Portal."
-            },
-            {
-              "name": "hasMobile",
-              "type": "Boolean",
-              "isCollection": false,
-              "description": "是否有移动端内容."
-            },
-            {
-              "name": "createTime",
-              "type": "Date",
-              "isCollection": false,
-              "description": "创建时间,自动生成,索引创建在约束中."
-            },
-            {
-              "name": "updateTime",
-              "type": "Date",
-              "isCollection": false,
-              "description": "修改时间,自动生成,索引创建在约束中."
-            }
-          ]
-        },
-        {
-          "name": "getMobile",
-          "className": "com.x.portal.assemble.surface.jaxrs.widget.ActionGetMobile",
-          "description": "获取部件内容Mobile.",
-          "type": "GET",
-          "path": "jaxrs/widget/{id}/mobile",
-          "contentType": "application/json",
-          "resultContentType": "application/json; charset\u003dUTF-8",
-          "useJsonElementParameter": false,
-          "useStringParameter": false,
-          "pathParameters": [
-            {
-              "name": "id",
-              "type": "String",
-              "description": "标识"
-            }
-          ],
-          "formParameters": [],
-          "queryParameters": [],
-          "ins": [],
-          "outs": [
-            {
-              "name": "id",
-              "type": "String",
-              "isCollection": false,
-              "description": "数据库主键,自动生成."
-            },
-            {
-              "name": "name",
-              "type": "String",
-              "isCollection": false,
-              "description": "名称."
-            },
-            {
-              "name": "alias",
-              "type": "String",
-              "isCollection": false,
-              "description": "别名."
-            },
-            {
-              "name": "description",
-              "type": "String",
-              "isCollection": false,
-              "description": "描述."
-            },
-            {
-              "name": "portal",
-              "type": "String",
-              "isCollection": false,
-              "description": "所属的Portal."
-            },
-            {
-              "name": "hasMobile",
-              "type": "Boolean",
-              "isCollection": false,
-              "description": "是否有移动端内容."
-            },
-            {
-              "name": "createTime",
-              "type": "Date",
-              "isCollection": false,
-              "description": "创建时间,自动生成,索引创建在约束中."
-            },
-            {
-              "name": "updateTime",
-              "type": "Date",
-              "isCollection": false,
-              "description": "修改时间,自动生成,索引创建在约束中."
-            }
-          ]
-        },
-        {
-          "name": "getWithPortal",
-          "className": "com.x.portal.assemble.surface.jaxrs.widget.ActionGetWithPortal",
-          "description": "列示属于指定Portal的部件,其中Portal可以用name,alias和id标识,部件为在此Portal下的页面.",
-          "type": "GET",
-          "path": "jaxrs/widget/{flag}/portal/{portalFlag}",
-          "contentType": "application/json",
-          "resultContentType": "application/json; charset\u003dUTF-8",
-          "useJsonElementParameter": false,
-          "useStringParameter": false,
-          "pathParameters": [
-            {
-              "name": "flag",
-              "type": "String",
-              "description": "标识"
-            },
-            {
-              "name": "portalFlag",
-              "type": "String",
-              "description": "门户标识"
-            }
-          ],
-          "formParameters": [],
-          "queryParameters": [],
-          "ins": [],
-          "outs": [
-            {
-              "name": "id",
-              "type": "String",
-              "isCollection": false,
-              "description": "数据库主键,自动生成."
-            },
-            {
-              "name": "name",
-              "type": "String",
-              "isCollection": false,
-              "description": "名称."
-            },
-            {
-              "name": "alias",
-              "type": "String",
-              "isCollection": false,
-              "description": "别名."
-            },
-            {
-              "name": "description",
-              "type": "String",
-              "isCollection": false,
-              "description": "描述."
-            },
-            {
-              "name": "portal",
-              "type": "String",
-              "isCollection": false,
-              "description": "所属的Portal."
-            },
-            {
-              "name": "hasMobile",
-              "type": "Boolean",
-              "isCollection": false,
-              "description": "是否有移动端内容."
-            },
-            {
-              "name": "createTime",
-              "type": "Date",
-              "isCollection": false,
-              "description": "创建时间,自动生成,索引创建在约束中."
-            },
-            {
-              "name": "updateTime",
-              "type": "Date",
-              "isCollection": false,
-              "description": "修改时间,自动生成,索引创建在约束中."
-            }
-          ]
-        },
-        {
-          "name": "getWithPortalMobile",
-          "className": "com.x.portal.assemble.surface.jaxrs.widget.ActionGetWithPortalMobile",
-          "description": "列示属于指定Portal的部件,其中Portal可以用name,alias和id标识,部件为在此Portal下的页面Mobile.",
-          "type": "GET",
-          "path": "jaxrs/widget/{flag}/portal/{portalFlag}/mobile",
-          "contentType": "application/json",
-          "resultContentType": "application/json; charset\u003dUTF-8",
-          "useJsonElementParameter": false,
-          "useStringParameter": false,
-          "pathParameters": [
-            {
-              "name": "flag",
-              "type": "String",
-              "description": "标识"
-            },
-            {
-              "name": "portalFlag",
-              "type": "String",
-              "description": "门户标识"
-            }
-          ],
-          "formParameters": [],
-          "queryParameters": [],
-          "ins": [],
-          "outs": [
-            {
-              "name": "id",
-              "type": "String",
-              "isCollection": false,
-              "description": "数据库主键,自动生成."
-            },
-            {
-              "name": "name",
-              "type": "String",
-              "isCollection": false,
-              "description": "名称."
-            },
-            {
-              "name": "alias",
-              "type": "String",
-              "isCollection": false,
-              "description": "别名."
-            },
-            {
-              "name": "description",
-              "type": "String",
-              "isCollection": false,
-              "description": "描述."
-            },
-            {
-              "name": "portal",
-              "type": "String",
-              "isCollection": false,
-              "description": "所属的Portal."
-            },
-            {
-              "name": "hasMobile",
-              "type": "Boolean",
-              "isCollection": false,
-              "description": "是否有移动端内容."
-            },
-            {
-              "name": "createTime",
-              "type": "Date",
-              "isCollection": false,
-              "description": "创建时间,自动生成,索引创建在约束中."
-            },
-            {
-              "name": "updateTime",
-              "type": "Date",
-              "isCollection": false,
-              "description": "修改时间,自动生成,索引创建在约束中."
-            }
-          ]
-        },
-        {
-          "name": "list",
-          "className": "com.x.portal.assemble.surface.jaxrs.widget.ActionList",
-          "description": "列示属于指定Portal的部件.",
-          "type": "GET",
-          "path": "jaxrs/widget/list/portal/{portal}",
-          "contentType": "application/json",
-          "resultContentType": "application/json; charset\u003dUTF-8",
-          "useJsonElementParameter": false,
-          "useStringParameter": false,
-          "pathParameters": [
-            {
-              "name": "portal",
-              "type": "String",
-              "description": "门户"
-            }
-          ],
-          "formParameters": [],
-          "queryParameters": [],
-          "ins": [],
-          "outs": [
-            {
-              "name": "id",
-              "type": "String",
-              "isCollection": false,
-              "description": "数据库主键,自动生成."
-            },
-            {
-              "name": "name",
-              "type": "String",
-              "isCollection": false,
-              "description": "名称."
-            },
-            {
-              "name": "alias",
-              "type": "String",
-              "isCollection": false,
-              "description": "别名."
-            },
-            {
-              "name": "description",
-              "type": "String",
-              "isCollection": false,
-              "description": "描述."
-            },
-            {
-              "name": "portal",
-              "type": "String",
-              "isCollection": false,
-              "description": "所属的Portal."
-            },
-            {
-              "name": "hasMobile",
-              "type": "Boolean",
-              "isCollection": false,
-              "description": "是否有移动端内容."
-            },
-            {
-              "name": "createTime",
-              "type": "Date",
-              "isCollection": false,
-              "description": "创建时间,自动生成,索引创建在约束中."
-            },
-            {
-              "name": "updateTime",
-              "type": "Date",
-              "isCollection": false,
-              "description": "修改时间,自动生成,索引创建在约束中."
-            }
-          ]
-        }
-      ]
-    }
-  ]
-}

+ 0 - 28
o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/AbstractFactory.java

@@ -1,28 +0,0 @@
-package com.x.portal.assemble.surface;
-
-import com.x.base.core.container.EntityManagerContainer;
-
-public abstract class AbstractFactory {
-
-	private Business business;
-
-	public AbstractFactory(Business business) throws Exception {
-		try {
-			if (null == business) {
-				throw new Exception("business can not be null.");
-			}
-			this.business = business;
-		} catch (Exception e) {
-			throw new Exception("can not instantiating factory.");
-		}
-	}
-
-	public EntityManagerContainer entityManagerContainer() throws Exception {
-		return this.business.entityManagerContainer();
-	}
-
-	public Business business() throws Exception {
-		return this.business;
-	}
-
-}

+ 0 - 33
o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/ApplicationServletContextListener.java

@@ -1,33 +0,0 @@
-package com.x.portal.assemble.surface;
-
-import javax.servlet.ServletContextEvent;
-import javax.servlet.ServletContextListener;
-import javax.servlet.annotation.WebListener;
-
-import com.x.base.core.project.Context;
-
-@WebListener
-public class ApplicationServletContextListener implements ServletContextListener {
-
-	@Override
-	public void contextInitialized(ServletContextEvent servletContextEvent) {
-		try {
-			ThisApplication.context = Context.concrete(servletContextEvent);
-			ThisApplication.init();
-			ThisApplication.context().regist();
-		} catch (Exception e) {
-			e.printStackTrace();
-		}
-	}
-
-	@Override
-	public void contextDestroyed(ServletContextEvent servletContextEvent) {
-		try {
-			ThisApplication.destroy();
-			ThisApplication.context.destrory(servletContextEvent);
-		} catch (Exception e) {
-			e.printStackTrace();
-		}
-	}
-
-}

+ 0 - 77
o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/Business.java

@@ -1,77 +0,0 @@
-package com.x.portal.assemble.surface;
-
-import com.x.base.core.container.EntityManagerContainer;
-import com.x.organization.core.express.Organization;
-import com.x.portal.assemble.surface.factory.FileFactory;
-import com.x.portal.assemble.surface.factory.PageFactory;
-import com.x.portal.assemble.surface.factory.PortalFactory;
-import com.x.portal.assemble.surface.factory.ScriptFactory;
-import com.x.portal.assemble.surface.factory.WidgetFactory;
-
-public class Business {
-
-	private EntityManagerContainer emc;
-
-	public Business(EntityManagerContainer emc) throws Exception {
-		this.emc = emc;
-	}
-
-	public EntityManagerContainer entityManagerContainer() {
-		return this.emc;
-	}
-
-	private Organization organization;
-
-	public Organization organization() throws Exception {
-		if (null == this.organization) {
-			this.organization = new Organization(ThisApplication.context());
-		}
-		return organization;
-	}
-
-	private PortalFactory portal;
-
-	public PortalFactory portal() throws Exception {
-		if (null == this.portal) {
-			this.portal = new PortalFactory(this);
-		}
-		return portal;
-	}
-
-	private WidgetFactory widget;
-
-	public WidgetFactory widget() throws Exception {
-		if (null == this.widget) {
-			this.widget = new WidgetFactory(this);
-		}
-		return widget;
-	}
-
-	private PageFactory page;
-
-	public PageFactory page() throws Exception {
-		if (null == this.page) {
-			this.page = new PageFactory(this);
-		}
-		return page;
-	}
-
-	private ScriptFactory script;
-
-	public ScriptFactory script() throws Exception {
-		if (null == this.script) {
-			this.script = new ScriptFactory(this);
-		}
-		return script;
-	}
-
-	private FileFactory file;
-
-	public FileFactory file() throws Exception {
-		if (null == this.file) {
-			this.file = new FileFactory(this);
-		}
-		return file;
-	}
-
-}

+ 0 - 97
o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/Control.java

@@ -1,97 +0,0 @@
-package com.x.portal.assemble.surface;
-
-import com.x.base.core.project.gson.GsonPropertyObject;
-
-public class Control extends GsonPropertyObject {
-	/* 是否可以看到 */
-	private Boolean allowVisit;
-	/* 是否可以直接流转 */
-	private Boolean allowProcessing;
-	/* 是否可以处理待阅 */
-	private Boolean allowReadProcessing;
-	/* 是否可以保存数据 */
-	private Boolean allowSave;
-	/* 是否可以重置处理人 */
-	private Boolean allowReset;
-	/* 是否可以待阅处理人 */
-	private Boolean allowReadReset;
-	/* 是否可以召回 */
-	private Boolean allowRetract;
-	/* 是否可以调度 */
-	private Boolean allowReroute;
-	/* 是否可以删除 */
-	private Boolean allowDelete;
-
-	public Boolean getAllowSave() {
-		return allowSave;
-	}
-
-	public void setAllowSave(Boolean allowSave) {
-		this.allowSave = allowSave;
-	}
-
-	public Boolean getAllowReset() {
-		return allowReset;
-	}
-
-	public void setAllowReset(Boolean allowReset) {
-		this.allowReset = allowReset;
-	}
-
-	public Boolean getAllowRetract() {
-		return allowRetract;
-	}
-
-	public void setAllowRetract(Boolean allowRetract) {
-		this.allowRetract = allowRetract;
-	}
-
-	public Boolean getAllowReroute() {
-		return allowReroute;
-	}
-
-	public void setAllowReroute(Boolean allowReroute) {
-		this.allowReroute = allowReroute;
-	}
-
-	public Boolean getAllowProcessing() {
-		return allowProcessing;
-	}
-
-	public void setAllowProcessing(Boolean allowProcessing) {
-		this.allowProcessing = allowProcessing;
-	}
-
-	public Boolean getAllowDelete() {
-		return allowDelete;
-	}
-
-	public void setAllowDelete(Boolean allowDelete) {
-		this.allowDelete = allowDelete;
-	}
-
-	public Boolean getAllowVisit() {
-		return allowVisit;
-	}
-
-	public void setAllowVisit(Boolean allowVisit) {
-		this.allowVisit = allowVisit;
-	}
-
-	public Boolean getAllowReadProcessing() {
-		return allowReadProcessing;
-	}
-
-	public void setAllowReadProcessing(Boolean allowReadProcessing) {
-		this.allowReadProcessing = allowReadProcessing;
-	}
-
-	public Boolean getAllowReadReset() {
-		return allowReadReset;
-	}
-
-	public void setAllowReadReset(Boolean allowReadReset) {
-		this.allowReadReset = allowReadReset;
-	}
-
-}

+ 0 - 37
o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/ThisApplication.java

@@ -1,37 +0,0 @@
-package com.x.portal.assemble.surface;
-
-import com.x.base.core.project.Context;
-import com.x.base.core.project.cache.CacheManager;
-import com.x.base.core.project.config.Config;
-import com.x.base.core.project.logger.LoggerFactory;
-
-public class ThisApplication {
-
-	private ThisApplication() {
-		// nothing
-	}
-
-	protected static Context context;
-
-	public static Context context() {
-		return context;
-	}
-
-	public static void init() {
-		try {
-			CacheManager.init(context.clazz().getSimpleName());
-			LoggerFactory.setLevel(Config.logLevel().x_portal_assemble_surface());
-		} catch (Exception e) {
-			e.printStackTrace();
-		}
-	}
-
-	public static void destroy() {
-		try {
-			CacheManager.shutdown();
-		} catch (Exception e) {
-			e.printStackTrace();
-		}
-	}
-
-}

+ 0 - 74
o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/factory/FileFactory.java

@@ -1,74 +0,0 @@
-package com.x.portal.assemble.surface.factory;
-
-import java.util.Comparator;
-import java.util.List;
-import java.util.stream.Collectors;
-
-import javax.persistence.EntityManager;
-import javax.persistence.criteria.CriteriaBuilder;
-import javax.persistence.criteria.CriteriaQuery;
-import javax.persistence.criteria.Predicate;
-import javax.persistence.criteria.Root;
-
-import com.x.portal.assemble.surface.AbstractFactory;
-import com.x.portal.assemble.surface.Business;
-import com.x.portal.core.entity.File;
-import com.x.portal.core.entity.File_;
-import com.x.base.core.project.cache.Cache.CacheCategory;
-import com.x.base.core.project.cache.Cache.CacheKey;
-import com.x.base.core.project.cache.CacheManager;
-import java.util.Optional;
-
-public class FileFactory extends AbstractFactory {
-
-	static CacheCategory cache = new CacheCategory(File.class);
-
-	public FileFactory(Business abstractBusiness) throws Exception {
-		super(abstractBusiness);
-	}
-
-	public File pick(String id) throws Exception {
-		CacheKey cacheKey = new CacheKey(id);
-		Optional<?> optional = CacheManager.get(cache, cacheKey);
-		if (optional.isPresent()) {
-			return (File) optional.get();
-		} else {
-			File o = this.business().entityManagerContainer().find(id, File.class);
-			if (null != o) {
-				this.business().entityManagerContainer().get(File.class).detach(o);
-				CacheManager.put(cache, cacheKey, o);
-				return o;
-			}
-			return null;
-		}
-	}
-
-	public List<File> listWithPortalObject(String portalId) throws Exception {
-		EntityManager em = this.entityManagerContainer().get(File.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<File> cq = cb.createQuery(File.class);
-		Root<File> root = cq.from(File.class);
-		Predicate p = cb.equal(root.get(File_.portal), portalId);
-		List<File> list = em.createQuery(cq.select(root).where(p)).getResultList();
-		return list;
-	}
-
-	public List<String> listWithPortal(String portalId) throws Exception {
-		EntityManager em = this.entityManagerContainer().get(File.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery(String.class);
-		Root<File> root = cq.from(File.class);
-		Predicate p = cb.equal(root.get(File_.portal), portalId);
-		List<String> list = em.createQuery(cq.select(root.get(File_.id)).where(p)).getResultList();
-		return list;
-	}
-	
-	public <T extends File> List<T> sort(List<T> list) {
-		list = list.stream()
-				.sorted(Comparator.comparing(File::getAlias, Comparator.nullsLast(String::compareTo))
-						.thenComparing(File::getName, Comparator.nullsLast(String::compareTo)))
-				.collect(Collectors.toList());
-		return list;
-	}
-
-}

+ 0 - 70
o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/factory/PageFactory.java

@@ -1,70 +0,0 @@
-package com.x.portal.assemble.surface.factory;
-
-import java.util.List;
-
-import javax.persistence.EntityManager;
-import javax.persistence.criteria.CriteriaBuilder;
-import javax.persistence.criteria.CriteriaQuery;
-import javax.persistence.criteria.Predicate;
-import javax.persistence.criteria.Root;
-
-import com.x.portal.assemble.surface.AbstractFactory;
-import com.x.portal.assemble.surface.Business;
-import com.x.portal.core.entity.Page;
-import com.x.portal.core.entity.Page_;
-import com.x.portal.core.entity.Portal;
-import com.x.base.core.project.cache.Cache.CacheCategory;
-import com.x.base.core.project.cache.Cache.CacheKey;
-import com.x.base.core.project.cache.CacheManager;
-import java.util.Optional;
-
-public class PageFactory extends AbstractFactory {
-
-	static CacheCategory cache = new CacheCategory(Page.class);
-
-	public PageFactory(Business abstractBusiness) throws Exception {
-		super(abstractBusiness);
-	}
-
-	public List<String> listWithPortal(String portalId) throws Exception {
-		EntityManager em = this.entityManagerContainer().get(Page.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery(String.class);
-		Root<Page> root = cq.from(Page.class);
-		Predicate p = cb.equal(root.get(Page_.portal), portalId);
-		List<String> list = em.createQuery(cq.select(root.get(Page_.id)).where(p)).getResultList();
-		return list;
-	}
-
-	public Page pick(String id) throws Exception {
-		CacheKey cacheKey = new CacheKey(id);
-		Optional<?> optional = CacheManager.get(cache, cacheKey);
-		if (optional.isPresent()) {
-			return (Page) optional.get();
-		} else {
-			Page o = this.business().entityManagerContainer().find(id, Page.class);
-			if (null != o) {
-				this.business().entityManagerContainer().get(Page.class).detach(o);
-				CacheManager.put(cache, cacheKey, o);
-				return o;
-			}
-			return null;
-		}
-	}
-
-	public Page pick(Portal portal, String flag) throws Exception {
-		CacheKey cacheKey = new CacheKey(portal.getId(), flag);
-		Optional<?> optional = CacheManager.get(cache, cacheKey);
-		if (optional.isPresent()) {
-			return (Page) optional.get();
-		} else {
-			Page o = entityManagerContainer().restrictFlag(flag, Page.class, Page.portal_FIELDNAME, portal.getId());
-			if (null != o) {
-				this.business().entityManagerContainer().get(Page.class).detach(o);
-				CacheManager.put(cache, cacheKey, o);
-				return o;
-			}
-			return null;
-		}
-	}
-}

+ 0 - 95
o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/factory/PortalFactory.java

@@ -1,95 +0,0 @@
-package com.x.portal.assemble.surface.factory;
-
-import java.util.List;
-
-import javax.persistence.EntityManager;
-import javax.persistence.criteria.CriteriaBuilder;
-import javax.persistence.criteria.CriteriaQuery;
-import javax.persistence.criteria.Predicate;
-import javax.persistence.criteria.Root;
-
-import com.x.base.core.project.http.EffectivePerson;
-import com.x.base.core.project.organization.OrganizationDefinition;
-import com.x.base.core.project.tools.ListTools;
-import com.x.portal.assemble.surface.AbstractFactory;
-import com.x.portal.assemble.surface.Business;
-import com.x.portal.core.entity.Portal;
-import com.x.portal.core.entity.Portal_;
-import com.x.base.core.project.cache.Cache.CacheCategory;
-import com.x.base.core.project.cache.Cache.CacheKey;
-import com.x.base.core.project.cache.CacheManager;
-import java.util.Optional;
-
-public class PortalFactory extends AbstractFactory {
-
-	static CacheCategory cache = new CacheCategory(Portal.class);
-
-	public PortalFactory(Business abstractBusiness) throws Exception {
-		super(abstractBusiness);
-	}
-
-	public List<String> list(EffectivePerson effectivePerson) throws Exception {
-		EntityManager em = this.entityManagerContainer().get(Portal.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery(String.class);
-		Root<Portal> root = cq.from(Portal.class);
-		Predicate p = cb.conjunction();
-		if (effectivePerson.isNotManager() && (!this.business().organization().person().hasRole(effectivePerson,
-				OrganizationDefinition.PortalManager))) {
-			List<String> identities = this.business().organization().identity()
-					.listWithPerson(effectivePerson.getDistinguishedName());
-			List<String> units = this.business().organization().unit()
-					.listWithPersonSupNested(effectivePerson.getDistinguishedName());
-			p = cb.equal(root.get(Portal_.creatorPerson), effectivePerson.getDistinguishedName());
-			p = cb.or(p, cb.isMember(effectivePerson.getDistinguishedName(), root.get(Portal_.controllerList)));
-			p = cb.or(cb.and(cb.isEmpty(root.get(Portal_.availableIdentityList)),
-					cb.isEmpty(root.get(Portal_.availableUnitList))));
-			p = cb.or(p, root.get(Portal_.availableIdentityList).in(identities));
-			p = cb.or(p, root.get(Portal_.availableUnitList).in(units));
-		}
-		cq.select(root.get(Portal_.id)).where(p).distinct(true);
-		return em.createQuery(cq).getResultList();
-	}
-
-	public boolean visible(EffectivePerson effectivePerson, Portal portal) throws Exception {
-		if (effectivePerson.isManager() || this.business().organization().person().hasRole(effectivePerson,
-				OrganizationDefinition.PortalManager)) {
-			return true;
-		}
-		if (effectivePerson.isPerson(portal.getCreatorPerson())) {
-			return true;
-		}
-		if (effectivePerson.isPerson(portal.getControllerList())) {
-			return true;
-		}
-		if (ListTools.isEmpty(portal.getAvailableIdentityList(), portal.getAvailableUnitList())) {
-			return true;
-		}
-		List<String> identities = this.business().organization().identity()
-				.listWithPerson(effectivePerson.getDistinguishedName());
-		if (ListTools.containsAny(identities, portal.getAvailableIdentityList())) {
-			return true;
-		}
-		List<String> units = this.business().organization().unit().listWithPersonSupNested(effectivePerson);
-		if (ListTools.containsAny(units, portal.getAvailableUnitList())) {
-			return true;
-		}
-		return false;
-	}
-
-	public Portal pick(String flag) throws Exception {
-		CacheKey cacheKey = new CacheKey(flag);
-		Optional<?> optional = CacheManager.get(cache, cacheKey);
-		if (optional.isPresent()) {
-			return (Portal) optional.get();
-		} else {
-			Portal o = this.business().entityManagerContainer().flag(flag, Portal.class);
-			if (null != o) {
-				this.business().entityManagerContainer().get(Portal.class).detach(o);
-				CacheManager.put(cache, cacheKey, o);
-				return o;
-			}
-			return null;
-		}
-	}
-}

+ 0 - 162
o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/factory/ScriptFactory.java

@@ -1,162 +0,0 @@
-package com.x.portal.assemble.surface.factory;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import javax.persistence.EntityManager;
-import javax.persistence.criteria.CriteriaBuilder;
-import javax.persistence.criteria.CriteriaQuery;
-import javax.persistence.criteria.Predicate;
-import javax.persistence.criteria.Root;
-
-import com.x.portal.assemble.surface.AbstractFactory;
-import com.x.portal.assemble.surface.Business;
-import com.x.portal.core.entity.Portal;
-import com.x.portal.core.entity.Script;
-import com.x.portal.core.entity.Script_;
-import com.x.base.core.project.cache.Cache.CacheCategory;
-import com.x.base.core.project.cache.Cache.CacheKey;
-import com.x.base.core.project.cache.CacheManager;
-import java.util.Optional;
-
-public class ScriptFactory extends AbstractFactory {
-
-	static CacheCategory cache = new CacheCategory(Script.class);
-
-	public ScriptFactory(Business abstractBusiness) throws Exception {
-		super(abstractBusiness);
-	}
-
-	public Script flagWithPortalObject(String flag, String portalId) throws Exception {
-		CacheKey cacheKey = new CacheKey("flagObject", flag);
-		Optional<?> optional = CacheManager.get(cache, cacheKey);
-		if (optional.isPresent()) {
-			return (Script) optional.get();
-		} else {
-			EntityManager em = this.entityManagerContainer().get(Script.class);
-			CriteriaBuilder cb = em.getCriteriaBuilder();
-			CriteriaQuery<Script> cq = cb.createQuery(Script.class);
-			Root<Script> root = cq.from(Script.class);
-			Predicate p = cb.equal(root.get(Script_.portal), portalId);
-			p = cb.and(p, cb.or(cb.equal(root.get(Script_.name), flag), cb.equal(root.get(Script_.alias), flag)));
-			List<Script> list = em.createQuery(cq.select(root).where(p)).setMaxResults(1).getResultList();
-			if (list.isEmpty()) {
-				return null;
-			} else {
-				Script o = list.get(0);
-				em.detach(o);
-				CacheManager.put(cache, cacheKey, o);
-				return o;
-			}
-		}
-	}
-
-	public Script pick(String id) throws Exception {
-		CacheKey cacheKey = new CacheKey(id);
-		Optional<?> optional = CacheManager.get(cache, cacheKey);
-		if (optional.isPresent()) {
-			return (Script) optional.get();
-		} else {
-			Script o = this.business().entityManagerContainer().find(id, Script.class);
-			if (null != o) {
-				this.business().entityManagerContainer().get(Script.class).detach(o);
-				CacheManager.put(cache, cacheKey, o);
-				return o;
-			}
-			return null;
-		}
-	}
-
-	public List<String> listWithPortal(String portalId) throws Exception {
-		EntityManager em = this.entityManagerContainer().get(Script.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery(String.class);
-		Root<Script> root = cq.from(Script.class);
-		Predicate p = cb.equal(root.get(Script_.portal), portalId);
-		List<String> list = em.createQuery(cq.select(root.get(Script_.id)).where(p)).getResultList();
-		return list;
-	}
-
-	@SuppressWarnings("unchecked")
-	public List<Script> listScriptNestedWithPortalWithFlag(Portal portal, String flag) throws Exception {
-		List<Script> list = new ArrayList<>();
-		CacheKey cacheKey = new CacheKey(flag, portal.getId(), "listScriptNestedWithPortalWithFlag");
-		Optional<?> optional = CacheManager.get(cache, cacheKey);
-		if (optional.isPresent()) {
-			list = (List<Script>) optional.get();
-		} else {
-			List<String> names = new ArrayList<>();
-			names.add(flag);
-			while (!names.isEmpty()) {
-				List<String> loops = new ArrayList<>();
-				for (String name : names) {
-					Script o = this.getScriptWithPortalWithFlag(portal, name);
-					if ((null != o) && (!list.contains(o))) {
-						list.add(o);
-						loops.addAll(o.getDependScriptList());
-					}
-				}
-				names = loops;
-			}
-			if (!list.isEmpty()) {
-				Collections.reverse(list);
-				CacheManager.put(cache, cacheKey, list);
-			}
-		}
-		return list;
-	}
-
-	private Script getScriptWithPortalWithFlag(Portal portal, String flag) throws Exception {
-		Script script = this.getWithPortalWithId(portal, flag);
-		if (null == script) {
-			script = this.getWithPortalWithAlias(portal, flag);
-		}
-		if (null == script) {
-			script = this.getWithPortalWithName(portal, flag);
-		}
-		return script;
-	}
-
-	private Script getWithPortalWithId(Portal portal, String flag) throws Exception {
-		EntityManager em = this.entityManagerContainer().get(Script.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<Script> cq = cb.createQuery(Script.class);
-		Root<Script> root = cq.from(Script.class);
-		Predicate p = cb.equal(root.get(Script_.id), flag);
-		p = cb.and(p, cb.equal(root.get(Script_.portal), portal.getId()));
-		List<Script> list = em.createQuery(cq.where(p)).setMaxResults(1).getResultList();
-		if (!list.isEmpty()) {
-			return list.get(0);
-		}
-		return null;
-	}
-
-	private Script getWithPortalWithAlias(Portal portal, String flag) throws Exception {
-		EntityManager em = this.entityManagerContainer().get(Script.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<Script> cq = cb.createQuery(Script.class);
-		Root<Script> root = cq.from(Script.class);
-		Predicate p = cb.equal(root.get(Script_.alias), flag);
-		p = cb.and(p, cb.equal(root.get(Script_.portal), portal.getId()));
-		List<Script> list = em.createQuery(cq.where(p)).setMaxResults(1).getResultList();
-		if (!list.isEmpty()) {
-			return list.get(0);
-		}
-		return null;
-	}
-
-	private Script getWithPortalWithName(Portal portal, String flag) throws Exception {
-		EntityManager em = this.entityManagerContainer().get(Script.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<Script> cq = cb.createQuery(Script.class);
-		Root<Script> root = cq.from(Script.class);
-		Predicate p = cb.equal(root.get(Script_.name), flag);
-		p = cb.and(p, cb.equal(root.get(Script_.portal), portal.getId()));
-		List<Script> list = em.createQuery(cq.where(p)).setMaxResults(1).getResultList();
-		if (!list.isEmpty()) {
-			return list.get(0);
-		}
-		return null;
-	}
-}

+ 0 - 53
o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/factory/WidgetFactory.java

@@ -1,53 +0,0 @@
-package com.x.portal.assemble.surface.factory;
-
-import java.util.List;
-
-import javax.persistence.EntityManager;
-import javax.persistence.criteria.CriteriaBuilder;
-import javax.persistence.criteria.CriteriaQuery;
-import javax.persistence.criteria.Predicate;
-import javax.persistence.criteria.Root;
-
-import com.x.portal.assemble.surface.AbstractFactory;
-import com.x.portal.assemble.surface.Business;
-import com.x.portal.core.entity.Widget;
-import com.x.portal.core.entity.Widget_;
-import com.x.base.core.project.cache.Cache.CacheCategory;
-import com.x.base.core.project.cache.Cache.CacheKey;
-import com.x.base.core.project.cache.CacheManager;
-import java.util.Optional;
-
-public class WidgetFactory extends AbstractFactory {
-
-	static CacheCategory cache = new CacheCategory(Widget.class);
-
-	public WidgetFactory(Business abstractBusiness) throws Exception {
-		super(abstractBusiness);
-	}
-
-	public Widget pick(String id) throws Exception {
-		CacheKey cacheKey = new CacheKey(id);
-		Optional<?> optional = CacheManager.get(cache, cacheKey);
-		if (optional.isPresent()) {
-			return (Widget) optional.get();
-		} else {
-			Widget o = this.business().entityManagerContainer().find(id, Widget.class);
-			if (null != o) {
-				this.business().entityManagerContainer().get(Widget.class).detach(o);
-				CacheManager.put(cache, cacheKey, o);
-				return o;
-			}
-			return null;
-		}
-	}
-
-	public List<String> listWithPortal(String portalId) throws Exception {
-		EntityManager em = this.entityManagerContainer().get(Widget.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery(String.class);
-		Root<Widget> root = cq.from(Widget.class);
-		Predicate p = cb.equal(root.get(Widget_.portal), portalId);
-		List<String> list = em.createQuery(cq.select(root.get(Widget_.id)).where(p)).getResultList();
-		return list;
-	}
-}

+ 0 - 25
o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/ActionApplication.java

@@ -1,25 +0,0 @@
-package com.x.portal.assemble.surface.jaxrs;
-
-import java.util.Set;
-
-import javax.ws.rs.ApplicationPath;
-
-import com.x.base.core.project.jaxrs.AbstractActionApplication;
-import com.x.portal.assemble.surface.jaxrs.file.FileAction;
-import com.x.portal.assemble.surface.jaxrs.page.PageAction;
-import com.x.portal.assemble.surface.jaxrs.portal.PortalAction;
-import com.x.portal.assemble.surface.jaxrs.script.ScriptAction;
-import com.x.portal.assemble.surface.jaxrs.widget.WidgetAction;
-
-@ApplicationPath("jaxrs")
-public class ActionApplication extends AbstractActionApplication {
-
-	public Set<Class<?>> getClasses() {
-		classes.add(PortalAction.class);
-		classes.add(WidgetAction.class);
-		classes.add(PageAction.class);
-		classes.add(ScriptAction.class);
-		classes.add(FileAction.class);
-		return classes;
-	}
-}

+ 0 - 10
o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/FileJaxrsFilter.java

@@ -1,10 +0,0 @@
-package com.x.portal.assemble.surface.jaxrs;
-
-import javax.servlet.annotation.WebFilter;
-
-import com.x.base.core.project.jaxrs.AnonymousCipherManagerUserJaxrsFilter;
-
-@WebFilter(urlPatterns = "/jaxrs/file/*", asyncSupported = true)
-public class FileJaxrsFilter extends AnonymousCipherManagerUserJaxrsFilter {
-
-}

+ 0 - 10
o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/PageJaxrsFilter.java

@@ -1,10 +0,0 @@
-package com.x.portal.assemble.surface.jaxrs;
-
-import javax.servlet.annotation.WebFilter;
-
-import com.x.base.core.project.jaxrs.AnonymousCipherManagerUserJaxrsFilter;
-
-@WebFilter(urlPatterns = "/jaxrs/page/*", asyncSupported = true)
-public class PageJaxrsFilter extends AnonymousCipherManagerUserJaxrsFilter {
-
-}

+ 0 - 10
o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/PortalJaxrsFilter.java

@@ -1,10 +0,0 @@
-package com.x.portal.assemble.surface.jaxrs;
-
-import javax.servlet.annotation.WebFilter;
-
-import com.x.base.core.project.jaxrs.AnonymousCipherManagerUserJaxrsFilter;
-
-@WebFilter(urlPatterns = "/jaxrs/portal/*", asyncSupported = true)
-public class PortalJaxrsFilter extends AnonymousCipherManagerUserJaxrsFilter {
-
-}

+ 0 - 10
o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/ScriptJaxrsFilter.java

@@ -1,10 +0,0 @@
-package com.x.portal.assemble.surface.jaxrs;
-
-import javax.servlet.annotation.WebFilter;
-
-import com.x.base.core.project.jaxrs.AnonymousCipherManagerUserJaxrsFilter;
-
-@WebFilter(urlPatterns = "/jaxrs/script/*", asyncSupported = true)
-public class ScriptJaxrsFilter extends AnonymousCipherManagerUserJaxrsFilter {
-
-}

+ 0 - 10
o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/WidgetJaxrsFilter.java

@@ -1,10 +0,0 @@
-package com.x.portal.assemble.surface.jaxrs;
-
-import javax.servlet.annotation.WebFilter;
-
-import com.x.base.core.project.jaxrs.AnonymousCipherManagerUserJaxrsFilter;
-
-@WebFilter(urlPatterns = "/jaxrs/widget/*", asyncSupported = true)
-public class WidgetJaxrsFilter extends AnonymousCipherManagerUserJaxrsFilter {
-
-}

+ 0 - 88
o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/file/ActionContent.java

@@ -1,88 +0,0 @@
-package com.x.portal.assemble.surface.jaxrs.file;
-
-import java.util.List;
-
-import javax.persistence.EntityManager;
-import javax.persistence.criteria.CriteriaBuilder;
-import javax.persistence.criteria.CriteriaQuery;
-import javax.persistence.criteria.Predicate;
-import javax.persistence.criteria.Root;
-
-import org.apache.commons.codec.binary.Base64;
-import org.apache.commons.lang3.StringUtils;
-
-import com.x.base.core.container.EntityManagerContainer;
-import com.x.base.core.container.factory.EntityManagerContainerFactory;
-import com.x.base.core.project.cache.ApplicationCache;
-import com.x.base.core.project.exception.ExceptionEntityNotExist;
-import com.x.base.core.project.http.ActionResult;
-import com.x.base.core.project.http.EffectivePerson;
-import com.x.base.core.project.jaxrs.StandardJaxrsAction;
-import com.x.base.core.project.jaxrs.WoFile;
-import com.x.portal.assemble.surface.Business;
-import com.x.portal.core.entity.File;
-import com.x.portal.core.entity.File_;
-import com.x.portal.core.entity.Portal;
-import com.x.base.core.project.cache.Cache.CacheCategory;
-import com.x.base.core.project.cache.Cache.CacheKey;
-import com.x.base.core.project.cache.CacheManager;
-import java.util.Optional;
-
-class ActionContent extends StandardJaxrsAction {
-
-	private CacheCategory cache = new CacheCategory(File.class);
-
-	ActionResult<Wo> execute(EffectivePerson effectivePerson, String flag, String portalFlag) throws Exception {
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			ActionResult<Wo> result = new ActionResult<>();
-			Wo wo = null;
-			CacheKey cacheKey = new CacheKey(this.getClass(), flag, portalFlag);
-			Optional<?> optional = CacheManager.get(cache, cacheKey);
-			if (optional.isPresent()) {
-				wo = ((Wo) optional.get());
-			} else {
-				Business business = new Business(emc);
-				Portal portal = business.portal().pick(portalFlag);
-				if (null == portal) {
-					throw new ExceptionEntityNotExist(portalFlag, Portal.class);
-				}
-				String id = this.get(business, portal, flag);
-				if (StringUtils.isEmpty(id)) {
-					throw new ExceptionEntityNotExist(flag, File.class);
-				}
-				File file = business.file().pick(id);
-				byte[] bs = new byte[] {};
-				if (StringUtils.isNotEmpty(file.getData())) {
-					bs = Base64.decodeBase64(file.getData());
-				}
-				wo = new Wo(bs, this.contentType(false, file.getFileName()),
-						this.contentDisposition(false, file.getFileName()));
-				CacheManager.put(cache, cacheKey, wo);
-			}
-			result.setData(wo);
-			return result;
-		}
-	}
-
-	public static class Wo extends WoFile {
-
-		public Wo(byte[] bytes, String contentType, String contentDisposition) {
-			super(bytes, contentType, contentDisposition);
-		}
-
-	}
-
-	private String get(Business business, Portal portal, String flag) throws Exception {
-		EntityManager em = business.entityManagerContainer().get(File.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery(String.class);
-		Root<File> root = cq.from(File.class);
-		Predicate p = cb.equal(root.get(File_.name), flag);
-		p = cb.or(p, cb.equal(root.get(File_.alias), flag));
-		p = cb.or(p, cb.equal(root.get(File_.id), flag));
-		p = cb.and(p, cb.equal(root.get(File_.portal), portal.getId()));
-		List<String> list = em.createQuery(cq.select(root.get(File_.id)).where(p)).setMaxResults(1).getResultList();
-		return list.isEmpty() ? null : list.get(0);
-	}
-
-}

+ 0 - 87
o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/file/ActionDownload.java

@@ -1,87 +0,0 @@
-package com.x.portal.assemble.surface.jaxrs.file;
-
-import java.util.List;
-
-import javax.persistence.EntityManager;
-import javax.persistence.criteria.CriteriaBuilder;
-import javax.persistence.criteria.CriteriaQuery;
-import javax.persistence.criteria.Predicate;
-import javax.persistence.criteria.Root;
-
-import org.apache.commons.codec.binary.Base64;
-import org.apache.commons.lang3.StringUtils;
-
-import com.x.base.core.container.EntityManagerContainer;
-import com.x.base.core.container.factory.EntityManagerContainerFactory;
-import com.x.base.core.project.exception.ExceptionEntityNotExist;
-import com.x.base.core.project.http.ActionResult;
-import com.x.base.core.project.http.EffectivePerson;
-import com.x.base.core.project.jaxrs.StandardJaxrsAction;
-import com.x.base.core.project.jaxrs.WoFile;
-import com.x.portal.assemble.surface.Business;
-import com.x.portal.core.entity.File;
-import com.x.portal.core.entity.File_;
-import com.x.portal.core.entity.Portal;
-import com.x.base.core.project.cache.Cache.CacheCategory;
-import com.x.base.core.project.cache.Cache.CacheKey;
-import com.x.base.core.project.cache.CacheManager;
-import java.util.Optional;
-
-class ActionDownload extends StandardJaxrsAction {
-
-	private CacheCategory cache = new CacheCategory(File.class);
-
-	ActionResult<Wo> execute(EffectivePerson effectivePerson, String flag, String portalFlag) throws Exception {
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			ActionResult<Wo> result = new ActionResult<>();
-			Wo wo = null;
-			CacheKey cacheKey = new CacheKey(this.getClass(), flag, portalFlag);
-			Optional<?> optional = CacheManager.get(cache, cacheKey);
-			if (optional.isPresent()) {
-				wo = ((Wo) optional.get());
-			} else {
-				Business business = new Business(emc);
-				Portal portal = business.portal().pick(portalFlag);
-				if (null == portal) {
-					throw new ExceptionEntityNotExist(portalFlag, Portal.class);
-				}
-				String id = this.get(business, portal, flag);
-				if (StringUtils.isEmpty(id)) {
-					throw new ExceptionEntityNotExist(flag, File.class);
-				}
-				File file = business.file().pick(id);
-				byte[] bs = new byte[] {};
-				if (StringUtils.isNotEmpty(file.getData())) {
-					bs = Base64.decodeBase64(file.getData());
-				}
-				wo = new Wo(bs, this.contentType(true, file.getFileName()),
-						this.contentDisposition(true, file.getFileName()));
-				CacheManager.put(cache, cacheKey, wo);
-			}
-			result.setData(wo);
-			return result;
-		}
-	}
-
-	public static class Wo extends WoFile {
-
-		public Wo(byte[] bytes, String contentType, String contentDisposition) {
-			super(bytes, contentType, contentDisposition);
-		}
-
-	}
-
-	private String get(Business business, Portal portal, String flag) throws Exception {
-		EntityManager em = business.entityManagerContainer().get(File.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery(String.class);
-		Root<File> root = cq.from(File.class);
-		Predicate p = cb.equal(root.get(File_.name), flag);
-		p = cb.or(p, cb.equal(root.get(File_.alias), flag));
-		p = cb.or(p, cb.equal(root.get(File_.id), flag));
-		p = cb.and(p, cb.equal(root.get(File_.portal), portal.getId()));
-		List<String> list = em.createQuery(cq.select(root.get(File_.id)).where(p)).setMaxResults(1).getResultList();
-		return list.isEmpty() ? null : list.get(0);
-	}
-
-}

+ 0 - 43
o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/file/ActionListWithPortal.java

@@ -1,43 +0,0 @@
-package com.x.portal.assemble.surface.jaxrs.file;
-
-import java.util.List;
-
-import com.x.base.core.container.EntityManagerContainer;
-import com.x.base.core.container.factory.EntityManagerContainerFactory;
-import com.x.base.core.entity.JpaObject;
-import com.x.base.core.project.bean.WrapCopier;
-import com.x.base.core.project.bean.WrapCopierFactory;
-import com.x.base.core.project.exception.ExceptionEntityNotExist;
-import com.x.base.core.project.http.ActionResult;
-import com.x.base.core.project.http.EffectivePerson;
-import com.x.base.core.project.tools.ListTools;
-import com.x.portal.assemble.surface.Business;
-import com.x.portal.core.entity.File;
-import com.x.portal.core.entity.Portal;
-
-class ActionListWithPortal extends BaseAction {
-
-	ActionResult<List<Wo>> execute(EffectivePerson effectivePerson, String portalFlag) throws Exception {
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			Business business = new Business(emc);
-			ActionResult<List<Wo>> result = new ActionResult<>();
-			Portal portal = business.portal().pick(portalFlag);
-			if (null == portal) {
-				throw new ExceptionEntityNotExist(portalFlag, Portal.class);
-			}
-			List<Wo> wos = emc.fetchEqual(File.class, Wo.copier, File.portal_FIELDNAME, portal.getId());
-			wos = business.file().sort(wos);
-			result.setData(wos);
-			return result;
-		}
-	}
-
-	public static class Wo extends File {
-
-		private static final long serialVersionUID = 3121411589636528551L;
-		static WrapCopier<File, Wo> copier = WrapCopierFactory.wo(File.class, Wo.class, null,
-				ListTools.toList(JpaObject.FieldsInvisible, File.data_FIELDNAME));
-
-	}
-
-}

+ 0 - 7
o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/file/BaseAction.java

@@ -1,7 +0,0 @@
-package com.x.portal.assemble.surface.jaxrs.file;
-
-import com.x.base.core.project.jaxrs.StandardJaxrsAction;
-
-abstract class BaseAction extends StandardJaxrsAction {
-
-}

+ 0 - 87
o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/file/FileAction.java

@@ -1,87 +0,0 @@
-package com.x.portal.assemble.surface.jaxrs.file;
-
-import java.util.List;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.container.AsyncResponse;
-import javax.ws.rs.container.Suspended;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.MediaType;
-
-import com.x.base.core.project.annotation.JaxrsDescribe;
-import com.x.base.core.project.annotation.JaxrsMethodDescribe;
-import com.x.base.core.project.annotation.JaxrsParameterDescribe;
-import com.x.base.core.project.http.ActionResult;
-import com.x.base.core.project.http.EffectivePerson;
-import com.x.base.core.project.http.HttpMediaType;
-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;
-
-@Path("file")
-@JaxrsDescribe("文件操作")
-public class FileAction extends StandardJaxrsAction {
-
-	private static Logger logger = LoggerFactory.getLogger(FileAction.class);
-
-	@JaxrsMethodDescribe(value = "列示指定站点的下所有可见的文件.", action = ActionListWithPortal.class)
-	@GET
-	@Path("list/portal/{portalFlag}")
-	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
-	@Consumes(MediaType.APPLICATION_JSON)
-	public void listWithPortal(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
-			@JaxrsParameterDescribe("标识") @PathParam("portalFlag") String applicationFlag) {
-		ActionResult<List<ActionListWithPortal.Wo>> result = new ActionResult<>();
-		EffectivePerson effectivePerson = this.effectivePerson(request);
-		try {
-			result = new ActionListWithPortal().execute(effectivePerson, applicationFlag);
-		} catch (Exception e) {
-			logger.error(e, effectivePerson, request, null);
-			result.error(e);
-		}
-		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
-	}
-
-	@JaxrsMethodDescribe(value = "访问文件内容.义stream格式下载", action = ActionDownload.class)
-	@GET
-	@Path("{flag}/portal/{portalFlag}/download")
-	@Consumes(MediaType.APPLICATION_JSON)
-	public void download(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
-			@JaxrsParameterDescribe("标识") @PathParam("flag") String flag,
-			@JaxrsParameterDescribe("应用标识") @PathParam("portalFlag") String applicationFlag) {
-		ActionResult<ActionDownload.Wo> result = new ActionResult<>();
-		EffectivePerson effectivePerson = this.effectivePerson(request);
-		try {
-			result = new ActionDownload().execute(effectivePerson, flag, applicationFlag);
-		} catch (Exception e) {
-			logger.error(e, effectivePerson, request, null);
-			result.error(e);
-		}
-		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
-	}
-
-	@JaxrsMethodDescribe(value = "访问文件内容.", action = ActionContent.class)
-	@GET
-	@Path("{flag}/portal/{portalFlag}/content")
-	@Consumes(MediaType.APPLICATION_JSON)
-	public void content(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
-			@JaxrsParameterDescribe("标识") @PathParam("flag") String flag,
-			@JaxrsParameterDescribe("应用标识") @PathParam("portalFlag") String applicationFlag) {
-		ActionResult<ActionContent.Wo> result = new ActionResult<>();
-		EffectivePerson effectivePerson = this.effectivePerson(request);
-		try {
-			result = new ActionContent().execute(effectivePerson, flag, applicationFlag);
-		} catch (Exception e) {
-			logger.error(e, effectivePerson, request, null);
-			result.error(e);
-		}
-		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
-	}
-
-}

+ 0 - 48
o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/page/ActionGet.java

@@ -1,48 +0,0 @@
-package com.x.portal.assemble.surface.jaxrs.page;
-
-import com.x.base.core.container.EntityManagerContainer;
-import com.x.base.core.container.factory.EntityManagerContainerFactory;
-import com.x.base.core.entity.JpaObject;
-import com.x.base.core.project.bean.WrapCopier;
-import com.x.base.core.project.bean.WrapCopierFactory;
-import com.x.base.core.project.http.ActionResult;
-import com.x.base.core.project.http.EffectivePerson;
-import com.x.base.core.project.tools.ListTools;
-import com.x.portal.assemble.surface.Business;
-import com.x.portal.core.entity.Page;
-import com.x.portal.core.entity.Portal;
-
-class ActionGet extends BaseAction {
-
-	ActionResult<Wo> execute(EffectivePerson effectivePerson, String id) throws Exception {
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			Business business = new Business(emc);
-			ActionResult<Wo> result = new ActionResult<>();
-			Page page = business.page().pick(id);
-			if (null == page) {
-				throw new ExceptionPageNotExist(id);
-			}
-			Portal portal = business.portal().pick(page.getPortal());
-			if (null == portal) {
-				throw new ExceptionPortalNotExist(page.getPortal());
-			}
-			if (isNotLoginPage(id) && (!business.portal().visible(effectivePerson, portal))) {
-				throw new ExceptionPortalAccessDenied(effectivePerson.getDistinguishedName(), portal.getName(),
-						portal.getId());
-			}
-			Wo wo = Wo.copier.copy(page);
-			wo.setData(page.getDataOrMobileData());
-			result.setData(wo);
-			return result;
-		}
-	}
-
-	public static class Wo extends Page {
-
-		private static final long serialVersionUID = -8067704098385000667L;
-
-		/** 不输出data数据,单独处理 */
-		static WrapCopier<Page, Wo> copier = WrapCopierFactory.wo(Page.class, Wo.class, null,
-				ListTools.toList(JpaObject.FieldsInvisible, Page.data_FIELDNAME, Page.mobileData_FIELDNAME));
-	}
-}

+ 0 - 48
o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/page/ActionGetMobile.java

@@ -1,48 +0,0 @@
-package com.x.portal.assemble.surface.jaxrs.page;
-
-import com.x.base.core.container.EntityManagerContainer;
-import com.x.base.core.container.factory.EntityManagerContainerFactory;
-import com.x.base.core.entity.JpaObject;
-import com.x.base.core.project.bean.WrapCopier;
-import com.x.base.core.project.bean.WrapCopierFactory;
-import com.x.base.core.project.http.ActionResult;
-import com.x.base.core.project.http.EffectivePerson;
-import com.x.base.core.project.tools.ListTools;
-import com.x.portal.assemble.surface.Business;
-import com.x.portal.core.entity.Page;
-import com.x.portal.core.entity.Portal;
-
-class ActionGetMobile extends BaseAction {
-
-	ActionResult<Wo> execute(EffectivePerson effectivePerson, String id) throws Exception {
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			Business business = new Business(emc);
-			ActionResult<Wo> result = new ActionResult<>();
-			Page page = business.page().pick(id);
-			if (null == page) {
-				throw new ExceptionPageNotExist(id);
-			}
-			Portal portal = business.portal().pick(page.getPortal());
-			if (null == portal) {
-				throw new ExceptionPortalNotExist(page.getPortal());
-			}
-			if (isNotLoginPage(id) && (!business.portal().visible(effectivePerson, portal))) {
-				throw new ExceptionPortalAccessDenied(effectivePerson.getDistinguishedName(), portal.getName(),
-						portal.getId());
-			}
-			Wo wo = Wo.copier.copy(page);
-			wo.setData(page.getMobileDataOrData());
-			result.setData(wo);
-			return result;
-		}
-	}
-
-	public static class Wo extends Page {
-
-		private static final long serialVersionUID = -8067704098385000667L;
-
-		/** 不输出data数据,单独处理 */
-		static WrapCopier<Page, Wo> copier = WrapCopierFactory.wo(Page.class, Wo.class, null,
-				ListTools.toList(JpaObject.FieldsInvisible, Page.data_FIELDNAME, Page.mobileData_FIELDNAME));
-	}
-}

+ 0 - 63
o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/page/ActionGetWithPortal.java

@@ -1,63 +0,0 @@
-package com.x.portal.assemble.surface.jaxrs.page;
-
-import com.x.base.core.container.EntityManagerContainer;
-import com.x.base.core.container.factory.EntityManagerContainerFactory;
-import com.x.base.core.entity.JpaObject;
-import com.x.base.core.project.bean.WrapCopier;
-import com.x.base.core.project.bean.WrapCopierFactory;
-import com.x.base.core.project.http.ActionResult;
-import com.x.base.core.project.http.EffectivePerson;
-import com.x.base.core.project.tools.ListTools;
-import com.x.portal.assemble.surface.Business;
-import com.x.portal.core.entity.Page;
-import com.x.portal.core.entity.Portal;
-import com.x.base.core.project.cache.Cache.CacheKey;
-import com.x.base.core.project.cache.CacheManager;
-import java.util.Optional;
-
-class ActionGetWithPortal extends BaseAction {
-
-	ActionResult<Wo> execute(EffectivePerson effectivePerson, String flag, String portalFlag) throws Exception {
-		ActionResult<Wo> result = new ActionResult<>();
-		Wo wo = null;
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			Business business = new Business(emc);
-			CacheKey cacheKey = new CacheKey(this.getClass(), flag, portalFlag);
-			Optional<?> optional = CacheManager.get(pageCache, cacheKey);
-			if (optional.isPresent()) {
-				wo = (Wo) optional.get();
-				Portal portal = business.portal().pick(wo.getPortal());
-				if (isNotLoginPage(flag) && (!business.portal().visible(effectivePerson, portal))) {
-					throw new ExceptionPortalAccessDenied(effectivePerson.getDistinguishedName(), portal.getName(),
-							portal.getId());
-				}
-			} else {
-				Portal portal = business.portal().pick(portalFlag); 
-				if (null == portal) {
-					throw new ExceptionPortalNotExist(portalFlag);
-				}
-				if (isNotLoginPage(flag) && (!business.portal().visible(effectivePerson, portal))) {
-					throw new ExceptionPortalAccessDenied(effectivePerson.getDistinguishedName(), portal.getName(),
-							portal.getId());
-				}
-				Page page = business.page().pick(portal, flag);
-				if (null == page) {
-					throw new ExceptionPageNotExist(flag);
-				}
-				wo = Wo.copier.copy(page);
-				wo.setData(page.getDataOrMobileData());
-				CacheManager.put(pageCache, cacheKey, wo);
-			}
-			result.setData(wo);
-			return result;
-		}
-	}
-
-	public static class Wo extends Page {
-
-		private static final long serialVersionUID = 3454132769791427909L;
-		static WrapCopier<Page, Wo> copier = WrapCopierFactory.wo(Page.class, Wo.class, null,
-				ListTools.toList(JpaObject.FieldsInvisible, Page.data_FIELDNAME, Page.mobileData_FIELDNAME));
-
-	}
-}

+ 0 - 60
o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/page/ActionGetWithPortalMobile.java

@@ -1,60 +0,0 @@
-package com.x.portal.assemble.surface.jaxrs.page;
-
-import com.x.base.core.container.EntityManagerContainer;
-import com.x.base.core.container.factory.EntityManagerContainerFactory;
-import com.x.base.core.entity.JpaObject;
-import com.x.base.core.project.bean.WrapCopier;
-import com.x.base.core.project.bean.WrapCopierFactory;
-import com.x.base.core.project.http.ActionResult;
-import com.x.base.core.project.http.EffectivePerson;
-import com.x.base.core.project.tools.ListTools;
-import com.x.portal.assemble.surface.Business;
-import com.x.portal.core.entity.Page;
-import com.x.portal.core.entity.Portal;
-import com.x.base.core.project.cache.Cache.CacheKey;
-import com.x.base.core.project.cache.CacheManager;
-import java.util.Optional;
-
-class ActionGetWithPortalMobile extends BaseAction {
-
-	ActionResult<Wo> execute(EffectivePerson effectivePerson, String flag, String portalFlag) throws Exception {
-		ActionResult<Wo> result = new ActionResult<>();
-		Wo wo = null;
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			Business business = new Business(emc);
-			CacheKey cacheKey = new CacheKey(this.getClass(), flag, portalFlag);
-			Optional<?> optional = CacheManager.get(pageCache, cacheKey);
-			if (optional.isPresent()) {
-				wo = (Wo) optional.get();
-				Portal portal = business.portal().pick(wo.getPortal());
-				if (isNotLoginPage(flag) && (!business.portal().visible(effectivePerson, portal))) {
-					throw new ExceptionPortalAccessDenied(effectivePerson.getDistinguishedName(), portal.getName(),
-							portal.getId());
-				}
-			} else {
-				Portal portal = business.portal().pick(portalFlag);
-				if (null == portal) {
-					throw new ExceptionPortalNotExist(portalFlag);
-				}
-				if (isNotLoginPage(flag) && (!business.portal().visible(effectivePerson, portal))) {
-					throw new ExceptionPortalAccessDenied(effectivePerson.getDistinguishedName(), portal.getName(),
-							portal.getId());
-				}
-				Page page = business.page().pick(portal, flag);
-				wo = Wo.copier.copy(page);
-				wo.setData(page.getMobileDataOrData());
-				CacheManager.put(pageCache, cacheKey, wo);
-			}
-			result.setData(wo);
-			return result;
-		}
-	}
-
-	public static class Wo extends Page {
-
-		private static final long serialVersionUID = 3454132769791427909L;
-		static WrapCopier<Page, Wo> copier = WrapCopierFactory.wo(Page.class, Wo.class, null,
-				ListTools.toList(JpaObject.FieldsInvisible, Page.data_FIELDNAME, Page.mobileData_FIELDNAME));
-
-	}
-}

+ 0 - 53
o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/page/ActionList.java

@@ -1,53 +0,0 @@
-package com.x.portal.assemble.surface.jaxrs.page;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import com.x.base.core.container.EntityManagerContainer;
-import com.x.base.core.container.factory.EntityManagerContainerFactory;
-import com.x.base.core.entity.JpaObject;
-import com.x.base.core.project.bean.WrapCopier;
-import com.x.base.core.project.bean.WrapCopierFactory;
-import com.x.base.core.project.http.ActionResult;
-import com.x.base.core.project.http.EffectivePerson;
-import com.x.portal.assemble.surface.Business;
-import com.x.portal.core.entity.Page;
-import com.x.portal.core.entity.Portal;
-
-class ActionList extends BaseAction {
-
-	ActionResult<List<Wo>> execute(EffectivePerson effectivePerson, String portalId) throws Exception {
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			Business business = new Business(emc);
-			ActionResult<List<Wo>> result = new ActionResult<>();
-			List<Wo> wos = new ArrayList<>();
-			Portal portal = business.portal().pick(portalId);
-			if (null == portal) {
-				throw new ExceptionPortalNotExist(portalId);
-			}
-			if (!business.portal().visible(effectivePerson, portal)) {
-				throw new ExceptionPortalAccessDenied(effectivePerson.getDistinguishedName(), portal.getName(),
-						portal.getId());
-			}
-			List<String> ids = business.page().listWithPortal(portal.getId());
-			for (String id : ids) {
-				Page o = business.page().pick(id);
-				if (null == o) {
-					throw new ExceptionPageNotExist(id);
-				} else {
-					wos.add(Wo.copier.copy(o));
-				}
-			}
-			result.setData(wos);
-			return result;
-		}
-	}
-
-	public static class Wo extends Page {
-
-		private static final long serialVersionUID = 3454132769791427909L;
-		static WrapCopier<Page, Wo> copier = WrapCopierFactory.wo(Page.class, Wo.class,
-				JpaObject.singularAttributeField(Page.class, true, true), JpaObject.FieldsInvisible);
-
-	}
-}

+ 0 - 19
o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/page/BaseAction.java

@@ -1,19 +0,0 @@
-package com.x.portal.assemble.surface.jaxrs.page;
-
-import org.apache.commons.lang3.StringUtils;
-
-import com.x.base.core.project.config.Config;
-import com.x.base.core.project.jaxrs.StandardJaxrsAction;
-import com.x.portal.core.entity.Page;
-import com.x.base.core.project.cache.Cache.CacheCategory;
-
-abstract class BaseAction extends StandardJaxrsAction {
-
-	CacheCategory pageCache = new CacheCategory(Page.class);
-
-	protected boolean isNotLoginPage(String id) throws Exception {
-		return !(Config.portal().getIndexPage().getEnable()
-				&& StringUtils.equals(id, Config.portal().getIndexPage().getPage()));
-	}
-
-}

+ 0 - 13
o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/page/ExceptionPageNotExist.java

@@ -1,13 +0,0 @@
-package com.x.portal.assemble.surface.jaxrs.page;
-
-import com.x.base.core.project.exception.PromptException;
-
-class ExceptionPageNotExist extends PromptException {
-
-	private static final long serialVersionUID = -4908883340253465376L;
-
-	ExceptionPageNotExist(String id) {
-		super("指定的页面不存在:{}.", id);
-	}
-
-}

+ 0 - 13
o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/page/ExceptionPortalAccessDenied.java

@@ -1,13 +0,0 @@
-package com.x.portal.assemble.surface.jaxrs.page;
-
-import com.x.base.core.project.exception.PromptException;
-
-class ExceptionPortalAccessDenied extends PromptException {
-
-	private static final long serialVersionUID = -4908883340253465376L;
-
-	ExceptionPortalAccessDenied(String person, String name, String id) {
-		super("用户: {}, 访问站点: {}, id: {}, 失败,权限不足.", person, name, id);
-	}
-
-}

+ 0 - 13
o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/page/ExceptionPortalNotExist.java

@@ -1,13 +0,0 @@
-package com.x.portal.assemble.surface.jaxrs.page;
-
-import com.x.base.core.project.exception.PromptException;
-
-class ExceptionPortalNotExist extends PromptException {
-
-	private static final long serialVersionUID = -4908883340253465376L;
-
-	ExceptionPortalNotExist(String id) {
-		super("指定的站点不存在:{}.", id);
-	}
-
-}

+ 0 - 124
o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/page/PageAction.java

@@ -1,124 +0,0 @@
-package com.x.portal.assemble.surface.jaxrs.page;
-
-import java.util.List;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.container.AsyncResponse;
-import javax.ws.rs.container.Suspended;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.MediaType;
-
-import com.x.base.core.project.annotation.JaxrsDescribe;
-import com.x.base.core.project.annotation.JaxrsMethodDescribe;
-import com.x.base.core.project.annotation.JaxrsParameterDescribe;
-import com.x.base.core.project.http.ActionResult;
-import com.x.base.core.project.http.EffectivePerson;
-import com.x.base.core.project.http.HttpMediaType;
-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;
-
-@Path("page")
-@JaxrsDescribe("页面")
-public class PageAction extends StandardJaxrsAction {
-
-	private static Logger logger = LoggerFactory.getLogger(PageAction.class);
-
-	@JaxrsMethodDescribe(value = "获取Page内容.", action = ActionGet.class)
-	@GET
-	@Path("{id}")
-	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
-	@Consumes(MediaType.APPLICATION_JSON)
-	public void get(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
-			@JaxrsParameterDescribe("标识") @PathParam("id") String id) {
-		ActionResult<ActionGet.Wo> result = new ActionResult<>();
-		EffectivePerson effectivePerson = this.effectivePerson(request);
-		try {
-			result = new ActionGet().execute(effectivePerson, id);
-		} catch (Exception e) {
-			logger.error(e, effectivePerson, request, null);
-			result.error(e);
-		}
-		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
-	}
-
-	@JaxrsMethodDescribe(value = "获取Page内容Mobile.", action = ActionGetMobile.class)
-	@GET
-	@Path("{id}/mobile")
-	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
-	@Consumes(MediaType.APPLICATION_JSON)
-	public void getMobile(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
-			@JaxrsParameterDescribe("标识") @PathParam("id") String id) {
-		ActionResult<ActionGetMobile.Wo> result = new ActionResult<>();
-		EffectivePerson effectivePerson = this.effectivePerson(request);
-		try {
-			result = new ActionGetMobile().execute(effectivePerson, id);
-		} catch (Exception e) {
-			logger.error(e, effectivePerson, request, null);
-			result.error(e);
-		}
-		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
-	}
-
-	@JaxrsMethodDescribe(value = "列示属于指定Portal的Page.", action = ActionList.class)
-	@GET
-	@Path("list/portal/{portal}")
-	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
-	@Consumes(MediaType.APPLICATION_JSON)
-	public void list(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
-			@JaxrsParameterDescribe("门户") @PathParam("portal") String portal) {
-		ActionResult<List<ActionList.Wo>> result = new ActionResult<>();
-		EffectivePerson effectivePerson = this.effectivePerson(request);
-		try {
-			result = new ActionList().execute(effectivePerson, portal);
-		} catch (Exception e) {
-			logger.error(e, effectivePerson, request, null);
-			result.error(e);
-		}
-		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
-	}
-
-	@JaxrsMethodDescribe(value = "列示属于指定Portal的Page,其中Portal可以用name,alias和id标识,Page为在此Portal下的页面.", action = ActionGetWithPortal.class)
-	@GET
-	@Path("{flag}/portal/{portalFlag}")
-	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
-	@Consumes(MediaType.APPLICATION_JSON)
-	public void getWithPortal(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
-			@JaxrsParameterDescribe("标识") @PathParam("flag") String flag,
-			@JaxrsParameterDescribe("门户标识") @PathParam("portalFlag") String portalFlag) {
-		ActionResult<ActionGetWithPortal.Wo> result = new ActionResult<>();
-		EffectivePerson effectivePerson = this.effectivePerson(request);
-		try {
-			result = new ActionGetWithPortal().execute(effectivePerson, flag, portalFlag);
-		} catch (Exception e) {
-			logger.error(e, effectivePerson, request, null);
-			result.error(e);
-		}
-		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
-	}
-
-	@JaxrsMethodDescribe(value = "列示属于指定Portal的Page,其中Portal可以用name,alias和id标识,Page为在此Portal下的页面Mobile.", action = ActionGetWithPortalMobile.class)
-	@GET
-	@Path("{flag}/portal/{portalFlag}/mobile")
-	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
-	@Consumes(MediaType.APPLICATION_JSON)
-	public void getWithPortalMobile(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
-			@JaxrsParameterDescribe("标识") @PathParam("flag") String flag,
-			@JaxrsParameterDescribe("门户标识") @PathParam("portalFlag") String portalFlag) {
-		ActionResult<ActionGetWithPortalMobile.Wo> result = new ActionResult<>();
-		EffectivePerson effectivePerson = this.effectivePerson(request);
-		try {
-			result = new ActionGetWithPortalMobile().execute(effectivePerson, flag, portalFlag);
-		} catch (Exception e) {
-			logger.error(e, effectivePerson, request, null);
-			result.error(e);
-		}
-		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
-	}
-}

+ 0 - 45
o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/portal/ActionGet.java

@@ -1,45 +0,0 @@
-package com.x.portal.assemble.surface.jaxrs.portal;
-
-import com.x.base.core.container.EntityManagerContainer;
-import com.x.base.core.container.factory.EntityManagerContainerFactory;
-import com.x.base.core.entity.JpaObject;
-import com.x.base.core.project.bean.WrapCopier;
-import com.x.base.core.project.bean.WrapCopierFactory;
-import com.x.base.core.project.http.ActionResult;
-import com.x.base.core.project.http.EffectivePerson;
-import com.x.base.core.project.tools.ListTools;
-import com.x.portal.assemble.surface.Business;
-import com.x.portal.core.entity.Portal;
-
-class ActionGet extends BaseAction {
-
-	/**
-	 * 1.身份在可使用列表中 2.部门在可使用部门中 3.公司在可使用公司中 4.没有限定身份,部门或者公司 5.个人在应用管理员中
-	 * 6.是此Portal的创建人员 7.个人有Manage权限 8.个人拥有PortalManager
-	 */
-	ActionResult<Wo> execute(EffectivePerson effectivePerson, String flag) throws Exception {
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			Business business = new Business(emc);
-			ActionResult<Wo> result = new ActionResult<>();
-			Portal o = business.portal().pick(flag);
-			if (null == o) {
-				throw new ExceptionPortalNotExist(flag);
-			}
-			if (!business.portal().visible(effectivePerson, o)) {
-				throw new ExceptionPortalAccessDenied(effectivePerson.getDistinguishedName(), o.getName(), o.getId());
-			}
-			Wo wo = Wo.copier.copy(o);
-			result.setData(wo);
-			return result;
-		}
-	}
-
-	public static class Wo extends Portal {
-
-		private static final long serialVersionUID = 727247858785981924L;
-
-		static WrapCopier<Portal, Wo> copier = WrapCopierFactory.wo(Portal.class, Wo.class, null,
-				ListTools.toList(JpaObject.FieldsInvisible));
-
-	}
-}

+ 0 - 45
o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/portal/ActionIcon.java

@@ -1,45 +0,0 @@
-package com.x.portal.assemble.surface.jaxrs.portal;
-
-import org.apache.commons.codec.binary.Base64;
-import org.apache.commons.lang3.StringUtils;
-
-import com.x.base.core.container.EntityManagerContainer;
-import com.x.base.core.container.factory.EntityManagerContainerFactory;
-import com.x.base.core.project.http.ActionResult;
-import com.x.base.core.project.http.EffectivePerson;
-import com.x.base.core.project.jaxrs.WoFile;
-import com.x.portal.assemble.surface.Business;
-import com.x.portal.core.entity.Portal;
-
-class ActionIcon extends BaseAction {
-
-	ActionResult<Wo> execute(EffectivePerson effectivePerson, String id) throws Exception {
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			Business business = new Business(emc);
-			ActionResult<Wo> result = new ActionResult<>();
-			Portal o = business.portal().pick(id);
-			if (null == o) {
-				throw new ExceptionPortalNotExist(id);
-			}
-			// if (!business.portal().visible(effectivePerson, o)) {
-			// throw new
-			// ExceptionPortalAccessDenied(effectivePerson.getDistinguishedName(),
-			// o.getName(), o.getId());
-			// }
-			byte[] bs = Base64
-					.decodeBase64(StringUtils.isEmpty(o.getIcon()) ? DEFAULT_PORTAL_ICON_BASE64 : o.getIcon());
-			Wo wo = new Wo(bs, this.contentType(false, "icon.png"), this.contentDisposition(false, "icon.png"));
-			result.setData(wo);
-			return result;
-		}
-	}
-
-	public static class Wo extends WoFile {
-
-		public Wo(byte[] bytes, String contentType, String contentDisposition) {
-			super(bytes, contentType, contentDisposition);
-		}
-
-	}
-
-}

+ 0 - 34
o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/portal/ActionIconBase64.java

@@ -1,34 +0,0 @@
-package com.x.portal.assemble.surface.jaxrs.portal;
-
-import org.apache.commons.lang3.StringUtils;
-
-import com.x.base.core.container.EntityManagerContainer;
-import com.x.base.core.container.factory.EntityManagerContainerFactory;
-import com.x.base.core.project.http.ActionResult;
-import com.x.base.core.project.http.EffectivePerson;
-import com.x.base.core.project.jaxrs.WrapString;
-import com.x.portal.assemble.surface.Business;
-import com.x.portal.core.entity.Portal;
-
-class ActionIconBase64 extends BaseAction {
-
-	ActionResult<Wo> execute(EffectivePerson effectivePerson, String id) throws Exception {
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			Business business = new Business(emc);
-			ActionResult<Wo> result = new ActionResult<>();
-			Portal o = business.portal().pick(id);
-			if (null == o) {
-				throw new ExceptionPortalNotExist(id);
-			}
-			Wo wo = new Wo();
-			wo.setValue(StringUtils.isEmpty(o.getIcon()) ? DEFAULT_PORTAL_ICON_BASE64 : o.getIcon());
-			result.setData(wo);
-			return result;
-		}
-	}
-
-	public static class Wo extends WrapString {
-
-	}
-
-}

+ 0 - 84
o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/portal/ActionList.java

@@ -1,84 +0,0 @@
-package com.x.portal.assemble.surface.jaxrs.portal;
-
-import java.util.ArrayList;
-import java.util.Comparator;
-import java.util.List;
-import java.util.stream.Collectors;
-
-import javax.persistence.EntityManager;
-import javax.persistence.criteria.CriteriaBuilder;
-import javax.persistence.criteria.CriteriaQuery;
-import javax.persistence.criteria.Predicate;
-import javax.persistence.criteria.Root;
-
-import com.x.base.core.container.EntityManagerContainer;
-import com.x.base.core.container.factory.EntityManagerContainerFactory;
-import com.x.base.core.entity.JpaObject;
-import com.x.base.core.project.bean.WrapCopier;
-import com.x.base.core.project.bean.WrapCopierFactory;
-import com.x.base.core.project.http.ActionResult;
-import com.x.base.core.project.http.EffectivePerson;
-import com.x.base.core.project.organization.OrganizationDefinition;
-import com.x.portal.assemble.surface.Business;
-import com.x.portal.core.entity.Portal;
-import com.x.portal.core.entity.Portal_;
-
-class ActionList extends BaseAction {
-
-	/**
-	 * 1.身份在可使用列表中 2.部门在可使用部门中 3.公司在可使用公司中 4.没有限定身份,部门或者公司 5.个人在应用管理员中
-	 * 6.是此Portal的创建人员 7.个人有Manage权限 8.个人拥有PortalManager
-	 */
-	ActionResult<List<Wo>> execute(EffectivePerson effectivePerson) throws Exception {
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			ActionResult<List<Wo>> result = new ActionResult<>();
-			List<Wo> wos = new ArrayList<>();
-			Business business = new Business(emc);
-			List<String> ids = this.list(business, effectivePerson);
-			for (String id : ids) {
-				Portal o = business.portal().pick(id);
-				if (null == o) {
-					throw new ExceptionPortalNotExist(id);
-				} else {
-					wos.add(Wo.copier.copy(o));
-				}
-			}
-			wos = wos.stream().sorted(Comparator.comparing(Portal::getName, Comparator.nullsLast(String::compareTo)))
-					.collect(Collectors.toList());
-			result.setData(wos);
-			return result;
-		}
-	}
-
-	private List<String> list(Business business, EffectivePerson effectivePerson) throws Exception {
-		EntityManager em = business.entityManagerContainer().get(Portal.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery(String.class);
-		Root<Portal> root = cq.from(Portal.class);
-		Predicate p = cb.or(cb.isNull(root.get(Portal_.pcClient)), cb.isTrue(root.get(Portal_.pcClient)));
-		if (effectivePerson.isNotManager()
-				&& (!business.organization().person().hasRole(effectivePerson, OrganizationDefinition.PortalManager))) {
-			List<String> identities = business.organization().identity()
-					.listWithPerson(effectivePerson.getDistinguishedName());
-			List<String> units = business.organization().unit()
-					.listWithPersonSupNested(effectivePerson.getDistinguishedName());
-			Predicate who = cb.equal(root.get(Portal_.creatorPerson), effectivePerson.getDistinguishedName());
-			who = cb.or(who, cb.isMember(effectivePerson.getDistinguishedName(), root.get(Portal_.controllerList)));
-			who = cb.or(who, cb.and(cb.isEmpty(root.get(Portal_.availableIdentityList)),
-					cb.isEmpty(root.get(Portal_.availableUnitList))));
-			who = cb.or(who, root.get(Portal_.availableIdentityList).in(identities));
-			who = cb.or(who, root.get(Portal_.availableUnitList).in(units));
-			p = cb.and(p, who);
-		}
-		cq.select(root.get(Portal_.id)).where(p).distinct(true);
-		return em.createQuery(cq).getResultList();
-	}
-
-	public static class Wo extends Portal {
-
-		private static final long serialVersionUID = -5240059905993945729L;
-		static WrapCopier<Portal, Wo> copier = WrapCopierFactory.wo(Portal.class, Wo.class,
-				JpaObject.singularAttributeField(Portal.class, true, false), JpaObject.FieldsInvisible);
-
-	}
-}

ファイルの差分が大きいため隠しています
+ 0 - 6
o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/portal/BaseAction.java


+ 0 - 13
o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/portal/ExceptionPortalAccessDenied.java

@@ -1,13 +0,0 @@
-package com.x.portal.assemble.surface.jaxrs.portal;
-
-import com.x.base.core.project.exception.PromptException;
-
-class ExceptionPortalAccessDenied extends PromptException {
-
-	private static final long serialVersionUID = -4908883340253465376L;
-
-	ExceptionPortalAccessDenied(String person, String name, String id) {
-		super("用户: {}, 访问站点: {}, id: {}, 失败,权限不足.", person, name, id);
-	}
-
-}

+ 0 - 13
o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/portal/ExceptionPortalNotExist.java

@@ -1,13 +0,0 @@
-package com.x.portal.assemble.surface.jaxrs.portal;
-
-import com.x.base.core.project.exception.PromptException;
-
-class ExceptionPortalNotExist extends PromptException {
-
-	private static final long serialVersionUID = -4908883340253465376L;
-
-	ExceptionPortalNotExist(String id) {
-		super("指定的站点不存在:{}.", id);
-	}
-
-}

+ 0 - 119
o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/portal/PortalAction.java

@@ -1,119 +0,0 @@
-package com.x.portal.assemble.surface.jaxrs.portal;
-
-import java.awt.image.BufferedImage;
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.util.List;
-
-import javax.imageio.ImageIO;
-import javax.servlet.http.HttpServletRequest;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.container.AsyncResponse;
-import javax.ws.rs.container.Suspended;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.MediaType;
-
-import org.apache.commons.codec.binary.Base64;
-
-import com.x.base.core.project.annotation.JaxrsDescribe;
-import com.x.base.core.project.annotation.JaxrsMethodDescribe;
-import com.x.base.core.project.annotation.JaxrsParameterDescribe;
-import com.x.base.core.project.http.ActionResult;
-import com.x.base.core.project.http.EffectivePerson;
-import com.x.base.core.project.http.HttpMediaType;
-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;
-
-@Path("portal")
-@JaxrsDescribe("门户")
-public class PortalAction extends StandardJaxrsAction {
-
-	private static Logger logger = LoggerFactory.getLogger(PortalAction.class);
-
-	@JaxrsMethodDescribe(value = "获取单个的Portal.", action = ActionGet.class)
-	@GET
-	@Path("{flag}")
-	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
-	@Consumes(MediaType.APPLICATION_JSON)
-	public void get(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
-			@JaxrsParameterDescribe("标识") @PathParam("flag") String flag) {
-		ActionResult<ActionGet.Wo> result = new ActionResult<>();
-		EffectivePerson effectivePerson = this.effectivePerson(request);
-		try {
-			result = new ActionGet().execute(effectivePerson, flag);
-		} catch (Exception e) {
-			logger.error(e, effectivePerson, request, null);
-			result.error(e);
-		}
-		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
-	}
-
-	@JaxrsMethodDescribe(value = "获取Portal的图标.", action = ActionIcon.class)
-	@GET
-	@Path("{id}/icon")
-	@Consumes(MediaType.APPLICATION_JSON)
-	public void icon(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
-			@JaxrsParameterDescribe("标识") @PathParam("id") String id) {
-		ActionResult<ActionIcon.Wo> result = new ActionResult<>();
-		EffectivePerson effectivePerson = this.effectivePerson(request);
-		try {
-			result = new ActionIcon().execute(effectivePerson, id);
-		} catch (Exception e) {
-			logger.error(e, effectivePerson, request, null);
-			result.error(e);
-		}
-		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
-	}
-
-	@JaxrsMethodDescribe(value = "获取Portal的图标Base64编码.", action = ActionIconBase64.class)
-	@GET
-	@Path("{id}/icon/base64")
-	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
-	@Consumes(MediaType.APPLICATION_JSON)
-	public void iconBase64(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
-			@JaxrsParameterDescribe("标识") @PathParam("id") String id) {
-		ActionResult<ActionIconBase64.Wo> result = new ActionResult<>();
-		EffectivePerson effectivePerson = this.effectivePerson(request);
-		try {
-			result = new ActionIconBase64().execute(effectivePerson, id);
-		} catch (Exception e) {
-			logger.error(e, effectivePerson, request, null);
-			result.error(e);
-		}
-		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
-	}
-
-	@JaxrsMethodDescribe(value = "列示当前用户所有可见的Portal.", action = ActionList.class)
-	@GET
-	@Path("list")
-	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
-	@Consumes(MediaType.APPLICATION_JSON)
-	public void list(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request) {
-		ActionResult<List<ActionList.Wo>> result = new ActionResult<>();
-		EffectivePerson effectivePerson = this.effectivePerson(request);
-		try {
-			result = new ActionList().execute(effectivePerson);
-		} catch (Exception e) {
-			logger.error(e, effectivePerson, request, null);
-			result.error(e);
-		}
-		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
-	}
-
-	public void test() throws Exception {
-		try (FileInputStream in = new FileInputStream(new File("d:/a.png"));
-				ByteArrayOutputStream baos = new ByteArrayOutputStream()) {
-			BufferedImage image = ImageIO.read(in);
-			ImageIO.write(image, "png", baos);
-			String icon = Base64.encodeBase64String(baos.toByteArray());
-		}
-	}
-
-}

+ 0 - 112
o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/script/ActionFlag.java

@@ -1,112 +0,0 @@
-package com.x.portal.assemble.surface.jaxrs.script;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.commons.lang3.StringUtils;
-import org.apache.commons.lang3.SystemUtils;
-
-import com.google.gson.JsonElement;
-import com.x.base.core.container.EntityManagerContainer;
-import com.x.base.core.container.factory.EntityManagerContainerFactory;
-import com.x.base.core.entity.JpaObject;
-import com.x.base.core.project.annotation.FieldDescribe;
-import com.x.base.core.project.bean.WrapCopier;
-import com.x.base.core.project.bean.WrapCopierFactory;
-import com.x.base.core.project.gson.GsonPropertyObject;
-import com.x.base.core.project.http.ActionResult;
-import com.x.base.core.project.http.EffectivePerson;
-import com.x.base.core.project.tools.ListTools;
-import com.x.portal.assemble.surface.Business;
-import com.x.portal.core.entity.Portal;
-import com.x.portal.core.entity.Script;
-
-class ActionFlag extends BaseAction {
-
-	ActionResult<Wo> execute(EffectivePerson effectivePerson, String flag, String portalId, JsonElement jsonElement)
-			throws Exception {
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			Business business = new Business(emc);
-			Wi wi = this.convertToWrapIn(jsonElement, Wi.class);
-			ActionResult<Wo> result = new ActionResult<>();
-			Portal portal = business.portal().pick(portalId);
-			if (null == portal) {
-				throw new ExceptionPortalNotExist(portalId);
-			}
-			if (!business.portal().visible(effectivePerson, portal)) {
-				throw new ExceptionPortalAccessDenied(effectivePerson.getDistinguishedName(), portal.getName(),
-						portal.getId());
-			}
-			List<Script> list = new ArrayList<>();
-			for (Script o : business.script().listScriptNestedWithPortalWithFlag(portal, flag)) {
-
-				if ((!this.contains(wi.getImportedList(), o.getAlias()))
-						&& (!this.contains(wi.getImportedList(), o.getName()))
-						&& (!this.contains(wi.getImportedList(), o.getId()))) {
-					list.add(o);
-				}
-			}
-			StringBuffer buffer = new StringBuffer();
-			List<String> imported = new ArrayList<>();
-			for (Script o : list) {
-				buffer.append(o.getText());
-				buffer.append(SystemUtils.LINE_SEPARATOR);
-				imported.add(o.getId());
-				if (StringUtils.isNotEmpty(o.getName())) {
-					imported.add(o.getName());
-				}
-				if (StringUtils.isNotEmpty(o.getAlias())) {
-					imported.add(o.getAlias());
-				}
-			}
-			Wo wo = new Wo();
-			wo.setImportedList(imported);
-			wo.setText(buffer.toString());
-			result.setData(wo);
-			return result;
-		}
-	}
-
-	private boolean contains(List<String> list, String value) {
-		if (StringUtils.isEmpty(value)) {
-			return false;
-		} else {
-			return ListTools.contains(list, value);
-		}
-	}
-
-	public static class Wi extends GsonPropertyObject {
-
-		@FieldDescribe("已经导入的脚本")
-		private List<String> importedList;
-
-		public List<String> getImportedList() {
-			return importedList;
-		}
-
-		public void setImportedList(List<String> importedList) {
-			this.importedList = importedList;
-		}
-
-	}
-
-	public static class Wo extends Script {
-
-		private static final long serialVersionUID = -8067704098385000667L;
-
-		static WrapCopier<Script, Wo> copier = WrapCopierFactory.wo(Script.class, Wo.class, null,
-				ListTools.toList(JpaObject.FieldsInvisible));
-
-		private List<String> importedList;
-
-		public List<String> getImportedList() {
-			return importedList;
-		}
-
-		public void setImportedList(List<String> importedList) {
-			this.importedList = importedList;
-		}
-
-	}
-
-}

+ 0 - 47
o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/script/ActionGet.java

@@ -1,47 +0,0 @@
-package com.x.portal.assemble.surface.jaxrs.script;
-
-import com.x.base.core.container.EntityManagerContainer;
-import com.x.base.core.container.factory.EntityManagerContainerFactory;
-import com.x.base.core.entity.JpaObject;
-import com.x.base.core.project.bean.WrapCopier;
-import com.x.base.core.project.bean.WrapCopierFactory;
-import com.x.base.core.project.http.ActionResult;
-import com.x.base.core.project.http.EffectivePerson;
-import com.x.base.core.project.tools.ListTools;
-import com.x.portal.assemble.surface.Business;
-import com.x.portal.core.entity.Portal;
-import com.x.portal.core.entity.Script;
-
-class ActionGet extends BaseAction {
-
-	ActionResult<Wo> execute(EffectivePerson effectivePerson, String id) throws Exception {
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			Business business = new Business(emc);
-			ActionResult<Wo> result = new ActionResult<>();
-			Script script = business.script().pick(id);
-			if (null == script) {
-				throw new ExceptionScriptNotExist(id);
-			}
-			Portal portal = business.portal().pick(script.getPortal());
-			if (null == portal) {
-				throw new ExceptionPortalNotExist(script.getPortal());
-			}
-			if (!business.portal().visible(effectivePerson, portal)) {
-				throw new ExceptionPortalAccessDenied(effectivePerson.getDistinguishedName(), portal.getName(),
-						portal.getId());
-			}
-			Wo wo = Wo.copier.copy(script);
-			result.setData(wo);
-			return result;
-		}
-	}
-
-	public static class Wo extends Script {
-
-		private static final long serialVersionUID = 727247858785981924L;
-
-		static WrapCopier<Script, Wo> copier = WrapCopierFactory.wo(Script.class, Wo.class, null,
-				ListTools.toList(JpaObject.FieldsInvisible));
-
-	}
-}

+ 0 - 87
o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/script/ActionGetImported.java

@@ -1,87 +0,0 @@
-package com.x.portal.assemble.surface.jaxrs.script;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.commons.lang3.StringUtils;
-
-import com.x.base.core.container.EntityManagerContainer;
-import com.x.base.core.container.factory.EntityManagerContainerFactory;
-import com.x.base.core.entity.JpaObject;
-import com.x.base.core.project.bean.WrapCopier;
-import com.x.base.core.project.bean.WrapCopierFactory;
-import com.x.base.core.project.http.ActionResult;
-import com.x.base.core.project.http.EffectivePerson;
-import com.x.base.core.project.tools.ListTools;
-import com.x.portal.assemble.surface.Business;
-import com.x.portal.core.entity.Portal;
-import com.x.portal.core.entity.Script;
-import com.x.base.core.project.cache.Cache.CacheKey;
-import com.x.base.core.project.cache.CacheManager;
-import java.util.Optional;
-
-class ActionGetImported extends BaseAction {
-
-	ActionResult<Wo> execute(EffectivePerson effectivePerson, String flag, String portalId) throws Exception {
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			ActionResult<Wo> result = new ActionResult<>();
-			Wo wo = new Wo();
-			CacheKey cacheKey = new CacheKey(this.getClass(), flag, portalId);
-			Optional<?> optional = CacheManager.get(cache, cacheKey);
-			if (optional.isPresent()) {
-				wo = (Wo) optional.get();
-			} else {
-				Business business = new Business(emc);
-				Portal portal = business.portal().pick(portalId);
-				if (null == portal) {
-					throw new ExceptionPortalNotExist(portalId);
-				}
-				if (!business.portal().visible(effectivePerson, portal)) {
-					throw new ExceptionPortalAccessDenied(effectivePerson.getDistinguishedName(), portal.getName(),
-							portal.getId());
-				}
-				List<Script> list = new ArrayList<>();
-				for (Script o : business.script().listScriptNestedWithPortalWithFlag(portal, flag)) {
-					list.add(o);
-				}
-				StringBuffer buffer = new StringBuffer();
-				List<String> imported = new ArrayList<>();
-				for (Script o : list) {
-					buffer.append(o.getText());
-					buffer.append(System.lineSeparator());
-					imported.add(o.getId());
-					if (StringUtils.isNotEmpty(o.getName())) {
-						imported.add(o.getName());
-					}
-					if (StringUtils.isNotEmpty(o.getAlias())) {
-						imported.add(o.getAlias());
-					}
-				}
-				wo.setImportedList(imported);
-				wo.setText(buffer.toString());
-				CacheManager.put(cache, cacheKey, wo);
-			}
-			result.setData(wo);
-			return result;
-		}
-	}
-
-	public static class Wo extends Script {
-
-		private static final long serialVersionUID = -8067704098385000667L;
-
-		static WrapCopier<Script, Wo> copier = WrapCopierFactory.wo(Script.class, Wo.class, null,
-				ListTools.toList(JpaObject.FieldsInvisible));
-
-		private List<String> importedList;
-
-		public List<String> getImportedList() {
-			return importedList;
-		}
-
-		public void setImportedList(List<String> importedList) {
-			this.importedList = importedList;
-		}
-	}
-
-}

+ 0 - 53
o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/script/ActionList.java

@@ -1,53 +0,0 @@
-package com.x.portal.assemble.surface.jaxrs.script;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import com.x.base.core.container.EntityManagerContainer;
-import com.x.base.core.container.factory.EntityManagerContainerFactory;
-import com.x.base.core.entity.JpaObject;
-import com.x.base.core.project.bean.WrapCopier;
-import com.x.base.core.project.bean.WrapCopierFactory;
-import com.x.base.core.project.http.ActionResult;
-import com.x.base.core.project.http.EffectivePerson;
-import com.x.portal.assemble.surface.Business;
-import com.x.portal.core.entity.Portal;
-import com.x.portal.core.entity.Script;
-
-class ActionList extends BaseAction {
-
-	ActionResult<List<Wo>> execute(EffectivePerson effectivePerson, String portalId) throws Exception {
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			Business business = new Business(emc);
-			ActionResult<List<Wo>> result = new ActionResult<>();
-			List<Wo> wos = new ArrayList<>();
-			Portal portal = business.portal().pick(portalId);
-			if (null == portal) {
-				throw new ExceptionPortalNotExist(portalId);
-			}
-			if (!business.portal().visible(effectivePerson, portal)) {
-				throw new ExceptionPortalAccessDenied(effectivePerson.getDistinguishedName(), portal.getName(),
-						portal.getId());
-			}
-			List<String> ids = business.script().listWithPortal(portal.getId());
-			for (String id : ids) {
-				Script o = business.script().pick(id);
-				if (null == o) {
-					throw new ExceptionScriptNotExist(id);
-				} else {
-					wos.add(Wo.copier.copy(o));
-				}
-			}
-			result.setData(wos);
-			return result;
-		}
-	}
-
-	public static class Wo extends Script {
-
-		private static final long serialVersionUID = -5240059905993945729L;
-		static WrapCopier<Script, Wo> copier = WrapCopierFactory.wo(Script.class, Wo.class,
-				JpaObject.singularAttributeField(Script.class, true, true), JpaObject.FieldsInvisible);
-
-	}
-}

+ 0 - 11
o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/script/BaseAction.java

@@ -1,11 +0,0 @@
-package com.x.portal.assemble.surface.jaxrs.script;
-
-import com.x.base.core.project.jaxrs.StandardJaxrsAction;
-import com.x.portal.core.entity.Script;
-import com.x.base.core.project.cache.Cache.CacheCategory;
-
-abstract class BaseAction extends StandardJaxrsAction {
-
-	protected CacheCategory cache = new CacheCategory(Script.class);
-
-}

+ 0 - 13
o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/script/ExceptionPortalAccessDenied.java

@@ -1,13 +0,0 @@
-package com.x.portal.assemble.surface.jaxrs.script;
-
-import com.x.base.core.project.exception.PromptException;
-
-class ExceptionPortalAccessDenied extends PromptException {
-
-	private static final long serialVersionUID = -4908883340253465376L;
-
-	ExceptionPortalAccessDenied(String person, String name, String id) {
-		super("用户: {}, 访问站点: {}, id: {}, 失败,权限不足.", person, name, id);
-	}
-
-}

+ 0 - 13
o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/script/ExceptionPortalNotExist.java

@@ -1,13 +0,0 @@
-package com.x.portal.assemble.surface.jaxrs.script;
-
-import com.x.base.core.project.exception.PromptException;
-
-class ExceptionPortalNotExist extends PromptException {
-
-	private static final long serialVersionUID = -4908883340253465376L;
-
-	ExceptionPortalNotExist(String id) {
-		super("指定的站点不存在:{}.", id);
-	}
-
-}

+ 0 - 13
o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/script/ExceptionScriptNotExist.java

@@ -1,13 +0,0 @@
-package com.x.portal.assemble.surface.jaxrs.script;
-
-import com.x.base.core.project.exception.PromptException;
-
-class ExceptionScriptNotExist extends PromptException {
-
-	private static final long serialVersionUID = -4908883340253465376L;
-
-	ExceptionScriptNotExist(String id) {
-		super("指定的脚本不存在:{}.", id);
-	}
-
-}

+ 0 - 108
o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/script/ScriptAction.java

@@ -1,108 +0,0 @@
-package com.x.portal.assemble.surface.jaxrs.script;
-
-import java.util.List;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.container.AsyncResponse;
-import javax.ws.rs.container.Suspended;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.MediaType;
-
-import com.google.gson.JsonElement;
-import com.x.base.core.project.annotation.JaxrsDescribe;
-import com.x.base.core.project.annotation.JaxrsMethodDescribe;
-import com.x.base.core.project.annotation.JaxrsParameterDescribe;
-import com.x.base.core.project.http.ActionResult;
-import com.x.base.core.project.http.EffectivePerson;
-import com.x.base.core.project.http.HttpMediaType;
-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;
-
-@Path("script")
-@JaxrsDescribe("脚本")
-public class ScriptAction extends StandardJaxrsAction {
-
-	private static Logger logger = LoggerFactory.getLogger(ScriptAction.class);
-
-	@JaxrsMethodDescribe(value = "获取Script内容.", action = ActionGet.class)
-	@GET
-	@Path("{id}")
-	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
-	@Consumes(MediaType.APPLICATION_JSON)
-	public void get(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
-			@JaxrsParameterDescribe("标识") @PathParam("id") String id) {
-		ActionResult<ActionGet.Wo> result = new ActionResult<>();
-		EffectivePerson effectivePerson = this.effectivePerson(request);
-		try {
-			result = new ActionGet().execute(effectivePerson, id);
-		} catch (Exception e) {
-			logger.error(e, effectivePerson, request, null);
-			result.error(e);
-		}
-		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
-	}
-
-	@JaxrsMethodDescribe(value = "获取Script内容,并递归附带应用脚本.", action = ActionGetImported.class)
-	@GET
-	@Path("portal/{portal}/name/{name}/imported")
-	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
-	@Consumes(MediaType.APPLICATION_JSON)
-	public void getImported(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
-			@JaxrsParameterDescribe("名称") @PathParam("name") String name,
-			@JaxrsParameterDescribe("门户标识") @PathParam("portal") String portal) {
-		ActionResult<ActionGetImported.Wo> result = new ActionResult<>();
-		EffectivePerson effectivePerson = this.effectivePerson(request);
-		try {
-			result = new ActionGetImported().execute(effectivePerson, name, portal);
-		} catch (Exception e) {
-			logger.error(e, effectivePerson, request, null);
-			result.error(e);
-		}
-		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
-	}
-
-	@JaxrsMethodDescribe(value = "在指定的Portal下根据flag获取Script.", action = ActionFlag.class)
-	@POST
-	@Path("portal/{portal}/name/{name}")
-	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
-	@Consumes(MediaType.APPLICATION_JSON)
-	public void flag(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
-			@JaxrsParameterDescribe("名称") @PathParam("name") String name,
-			@JaxrsParameterDescribe("门户标识") @PathParam("portal") String portal, JsonElement jsonElement) {
-		ActionResult<ActionFlag.Wo> result = new ActionResult<>();
-		EffectivePerson effectivePerson = this.effectivePerson(request);
-		try {
-			result = new ActionFlag().execute(effectivePerson, name, portal, jsonElement);
-		} catch (Exception e) {
-			logger.error(e, effectivePerson, request, jsonElement);
-			result.error(e);
-		}
-		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
-	}
-
-	@JaxrsMethodDescribe(value = "列示属于指定Portal的Script.", action = ActionList.class)
-	@GET
-	@Path("list/portal/{portal}")
-	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
-	@Consumes(MediaType.APPLICATION_JSON)
-	public void list(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
-			@JaxrsParameterDescribe("门户标识") @PathParam("portal") String portal) {
-		ActionResult<List<ActionList.Wo>> result = new ActionResult<>();
-		EffectivePerson effectivePerson = this.effectivePerson(request);
-		try {
-			result = new ActionList().execute(effectivePerson, portal);
-		} catch (Exception e) {
-			logger.error(e, effectivePerson, request, null);
-			result.error(e);
-		}
-		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
-	}
-}

+ 0 - 48
o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/widget/ActionGet.java

@@ -1,48 +0,0 @@
-package com.x.portal.assemble.surface.jaxrs.widget;
-
-import com.x.base.core.container.EntityManagerContainer;
-import com.x.base.core.container.factory.EntityManagerContainerFactory;
-import com.x.base.core.entity.JpaObject;
-import com.x.base.core.project.bean.WrapCopier;
-import com.x.base.core.project.bean.WrapCopierFactory;
-import com.x.base.core.project.http.ActionResult;
-import com.x.base.core.project.http.EffectivePerson;
-import com.x.base.core.project.tools.ListTools;
-import com.x.portal.assemble.surface.Business;
-import com.x.portal.core.entity.Portal;
-import com.x.portal.core.entity.Widget;
-
-class ActionGet extends BaseAction {
-
-	ActionResult<Wo> execute(EffectivePerson effectivePerson, String id) throws Exception {
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			Business business = new Business(emc);
-			ActionResult<Wo> result = new ActionResult<>();
-			Widget widget = business.widget().pick(id);
-			if (null == widget) {
-				throw new ExceptionWidgetNotExist(id);
-			}
-			Portal portal = business.portal().pick(widget.getPortal());
-			if (null == portal) {
-				throw new ExceptionPortalNotExist(widget.getPortal());
-			}
-			if (!business.portal().visible(effectivePerson, portal)) {
-				throw new ExceptionPortalAccessDenied(effectivePerson.getDistinguishedName(), portal.getName(),
-						portal.getId());
-			}
-			Wo wo = Wo.copier.copy(widget);
-			wo.setData(widget.getDataOrMobileData());
-			result.setData(wo);
-			return result;
-		}
-	}
-
-	public static class Wo extends Widget {
-
-		private static final long serialVersionUID = -8067704098385000667L;
-
-		/** 不输出data数据,单独处理 */
-		static WrapCopier<Widget, Wo> copier = WrapCopierFactory.wo(Widget.class, Wo.class, null,
-				ListTools.toList(JpaObject.FieldsInvisible, Widget.data_FIELDNAME, Widget.mobileData_FIELDNAME));
-	}
-}

+ 0 - 47
o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/widget/ActionGetMobile.java

@@ -1,47 +0,0 @@
-package com.x.portal.assemble.surface.jaxrs.widget;
-
-import com.x.base.core.container.EntityManagerContainer;
-import com.x.base.core.container.factory.EntityManagerContainerFactory;
-import com.x.base.core.entity.JpaObject;
-import com.x.base.core.project.bean.WrapCopier;
-import com.x.base.core.project.bean.WrapCopierFactory;
-import com.x.base.core.project.http.ActionResult;
-import com.x.base.core.project.http.EffectivePerson;
-import com.x.portal.assemble.surface.Business;
-import com.x.portal.core.entity.Portal;
-import com.x.portal.core.entity.Widget;
-
-class ActionGetMobile extends BaseAction {
-
-	ActionResult<Wo> execute(EffectivePerson effectivePerson, String id) throws Exception {
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			Business business = new Business(emc);
-			ActionResult<Wo> result = new ActionResult<>();
-			Widget widget = business.widget().pick(id);
-			if (null == widget) {
-				throw new ExceptionWidgetNotExist(id);
-			}
-			Portal portal = business.portal().pick(widget.getPortal());
-			if (null == portal) {
-				throw new ExceptionPortalNotExist(widget.getPortal());
-			}
-			if (!business.portal().visible(effectivePerson, portal)) {
-				throw new ExceptionPortalAccessDenied(effectivePerson.getDistinguishedName(), portal.getName(),
-						portal.getId());
-			}
-			Wo wo = Wo.copier.copy(widget);
-			wo.setData(widget.getMobileDataOrData());
-			result.setData(wo);
-			return result;
-		}
-	}
-
-	public static class Wo extends Widget {
-
-		private static final long serialVersionUID = -8067704098385000667L;
-
-		/** 不输出data数据,单独处理 */
-		static WrapCopier<Widget, Wo> copier = WrapCopierFactory.wo(Widget.class, Wo.class,
-				JpaObject.singularAttributeField(Widget.class, true, true), JpaObject.FieldsInvisible);
-	}
-}

+ 0 - 63
o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/widget/ActionGetWithPortal.java

@@ -1,63 +0,0 @@
-package com.x.portal.assemble.surface.jaxrs.widget;
-
-import com.x.base.core.container.EntityManagerContainer;
-import com.x.base.core.container.factory.EntityManagerContainerFactory;
-import com.x.base.core.entity.JpaObject;
-import com.x.base.core.project.bean.WrapCopier;
-import com.x.base.core.project.bean.WrapCopierFactory;
-import com.x.base.core.project.http.ActionResult;
-import com.x.base.core.project.http.EffectivePerson;
-import com.x.portal.assemble.surface.Business;
-import com.x.portal.core.entity.Portal;
-import com.x.portal.core.entity.Widget;
-import com.x.base.core.project.cache.Cache.CacheKey;
-import com.x.base.core.project.cache.CacheManager;
-import java.util.Optional;
-
-class ActionGetWithPortal extends BaseAction {
-
-	ActionResult<Wo> execute(EffectivePerson effectivePerson, String flag, String portalFlag) throws Exception {
-		ActionResult<Wo> result = new ActionResult<>();
-		Wo wo = null;
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			Business business = new Business(emc);
-			CacheKey cacheKey = new CacheKey(this.getClass(), flag, portalFlag);
-			Optional<?> optional = CacheManager.get(cache, cacheKey);
-			if (optional.isPresent()) {
-				wo = (Wo) optional.get();
-				Portal portal = business.portal().pick(wo.getPortal());
-				if (!business.portal().visible(effectivePerson, portal)) {
-					throw new ExceptionPortalAccessDenied(effectivePerson.getDistinguishedName(), portal.getName(),
-							portal.getId());
-				}
-			} else {
-				Portal portal = emc.flag(portalFlag, Portal.class);
-				if (null == portal) {
-					throw new ExceptionPortalNotExist(portalFlag);
-				}
-				if (!business.portal().visible(effectivePerson, portal)) {
-					throw new ExceptionPortalAccessDenied(effectivePerson.getDistinguishedName(), portal.getName(),
-							portal.getId());
-				}
-				Widget widget = emc.restrictFlag(flag, Widget.class, Widget.portal_FIELDNAME, portal.getId());
-				if (null == widget) {
-					throw new ExceptionWidgetNotExist(flag);
-				}
-				wo = Wo.copier.copy(widget);
-				wo.setData(widget.getDataOrMobileData());
-				CacheManager.put(cache, cacheKey, wo);
-			}
-			result.setData(wo);
-			return result;
-		}
-	}
-
-	public static class Wo extends Widget {
-
-		private static final long serialVersionUID = 3454132769791427909L;
-		/** 不输出data数据,单独处理 */
-		static WrapCopier<Widget, Wo> copier = WrapCopierFactory.wo(Widget.class, Wo.class,
-				JpaObject.singularAttributeField(Widget.class, true, true), JpaObject.FieldsInvisible);
-
-	}
-}

+ 0 - 63
o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/widget/ActionGetWithPortalMobile.java

@@ -1,63 +0,0 @@
-package com.x.portal.assemble.surface.jaxrs.widget;
-
-import com.x.base.core.container.EntityManagerContainer;
-import com.x.base.core.container.factory.EntityManagerContainerFactory;
-import com.x.base.core.entity.JpaObject;
-import com.x.base.core.project.bean.WrapCopier;
-import com.x.base.core.project.bean.WrapCopierFactory;
-import com.x.base.core.project.http.ActionResult;
-import com.x.base.core.project.http.EffectivePerson;
-import com.x.portal.assemble.surface.Business;
-import com.x.portal.core.entity.Portal;
-import com.x.portal.core.entity.Widget;
-import com.x.base.core.project.cache.Cache.CacheKey;
-import com.x.base.core.project.cache.CacheManager;
-import java.util.Optional;
-
-class ActionGetWithPortalMobile extends BaseAction {
-
-	ActionResult<Wo> execute(EffectivePerson effectivePerson, String flag, String portalFlag) throws Exception {
-		ActionResult<Wo> result = new ActionResult<>();
-		Wo wo = null;
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			Business business = new Business(emc);
-			CacheKey cacheKey = new CacheKey(this.getClass(), flag, portalFlag);
-			Optional<?> optional = CacheManager.get(cache, cacheKey);
-			if (optional.isPresent()) {
-				wo = (Wo) optional.get();
-				Portal portal = business.portal().pick(wo.getPortal());
-				if (!business.portal().visible(effectivePerson, portal)) {
-					throw new ExceptionPortalAccessDenied(effectivePerson.getDistinguishedName(), portal.getName(),
-							portal.getId());
-				}
-			} else {
-				Portal portal = emc.flag(portalFlag, Portal.class);
-				if (null == portal) {
-					throw new ExceptionPortalNotExist(portalFlag);
-				}
-				if (!business.portal().visible(effectivePerson, portal)) {
-					throw new ExceptionPortalAccessDenied(effectivePerson.getDistinguishedName(), portal.getName(),
-							portal.getId());
-				}
-				Widget widget = emc.restrictFlag(flag, Widget.class, Widget.portal_FIELDNAME, portal.getId());
-				if (null == widget) {
-					throw new ExceptionWidgetNotExist(flag);
-				}
-				wo = Wo.copier.copy(widget);
-				wo.setData(widget.getMobileDataOrData());
-				CacheManager.put(cache, cacheKey, wo);
-			}
-			result.setData(wo);
-			return result;
-		}
-	}
-
-	public static class Wo extends Widget {
-
-		private static final long serialVersionUID = 3454132769791427909L;
-		/** 不输出data数据,单独处理 */
-		static WrapCopier<Widget, Wo> copier = WrapCopierFactory.wo(Widget.class, Wo.class,
-				JpaObject.singularAttributeField(Widget.class, true, true), JpaObject.FieldsInvisible);
-
-	}
-}

+ 0 - 55
o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/widget/ActionList.java

@@ -1,55 +0,0 @@
-package com.x.portal.assemble.surface.jaxrs.widget;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import com.x.base.core.container.EntityManagerContainer;
-import com.x.base.core.container.factory.EntityManagerContainerFactory;
-import com.x.base.core.entity.JpaObject;
-import com.x.base.core.project.bean.WrapCopier;
-import com.x.base.core.project.bean.WrapCopierFactory;
-import com.x.base.core.project.http.ActionResult;
-import com.x.base.core.project.http.EffectivePerson;
-import com.x.portal.assemble.surface.Business;
-import com.x.portal.core.entity.Page;
-import com.x.portal.core.entity.Portal;
-import com.x.portal.core.entity.Widget;
-
-class ActionList extends BaseAction {
-
-	ActionResult<List<Wo>> execute(EffectivePerson effectivePerson, String portalId) throws Exception {
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			Business business = new Business(emc);
-			ActionResult<List<Wo>> result = new ActionResult<>();
-			List<Wo> wos = new ArrayList<>();
-			Portal portal = business.portal().pick(portalId);
-			if (null == portal) {
-				throw new ExceptionPortalNotExist(portalId);
-			}
-			if (!business.portal().visible(effectivePerson, portal)) {
-				throw new ExceptionPortalAccessDenied(effectivePerson.getDistinguishedName(), portal.getName(),
-						portal.getId());
-			}
-			List<String> ids = business.widget().listWithPortal(portal.getId());
-			for (String id : ids) {
-				Widget o = business.widget().pick(id);
-				if (null == o) {
-					throw new ExceptionWidgetNotExist(id);
-				} else {
-					wos.add(Wo.copier.copy(o));
-				}
-			}
-			result.setData(wos);
-			return result;
-		}
-	}
-
-	public static class Wo extends Page {
-
-		private static final long serialVersionUID = 3454132769791427909L;
-		/** 不输出data数据,单独处理 */
-		static WrapCopier<Widget, Wo> copier = WrapCopierFactory.wo(Widget.class, Wo.class,
-				JpaObject.singularAttributeField(Widget.class, true, true), JpaObject.FieldsInvisible);
-
-	}
-}

+ 0 - 11
o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/widget/BaseAction.java

@@ -1,11 +0,0 @@
-package com.x.portal.assemble.surface.jaxrs.widget;
-
-import com.x.base.core.project.jaxrs.StandardJaxrsAction;
-import com.x.portal.core.entity.Widget;
-import com.x.base.core.project.cache.Cache.CacheCategory;
-
-abstract class BaseAction extends StandardJaxrsAction {
-
-	CacheCategory cache = new CacheCategory(Widget.class);
-
-}

+ 0 - 13
o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/widget/ExceptionPortalAccessDenied.java

@@ -1,13 +0,0 @@
-package com.x.portal.assemble.surface.jaxrs.widget;
-
-import com.x.base.core.project.exception.PromptException;
-
-class ExceptionPortalAccessDenied extends PromptException {
-
-	private static final long serialVersionUID = -4908883340253465376L;
-
-	ExceptionPortalAccessDenied(String person, String name, String id) {
-		super("用户: {}, 访问站点: {}, id: {}, 失败,权限不足.", person, name, id);
-	}
-
-}

+ 0 - 13
o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/widget/ExceptionPortalNotExist.java

@@ -1,13 +0,0 @@
-package com.x.portal.assemble.surface.jaxrs.widget;
-
-import com.x.base.core.project.exception.PromptException;
-
-class ExceptionPortalNotExist extends PromptException {
-
-	private static final long serialVersionUID = -4908883340253465376L;
-
-	ExceptionPortalNotExist(String id) {
-		super("指定的站点不存在:{}.", id);
-	}
-
-}

+ 0 - 13
o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/widget/ExceptionWidgetNotExist.java

@@ -1,13 +0,0 @@
-package com.x.portal.assemble.surface.jaxrs.widget;
-
-import com.x.base.core.project.exception.PromptException;
-
-class ExceptionWidgetNotExist extends PromptException {
-
-	private static final long serialVersionUID = -4908883340253465376L;
-
-	ExceptionWidgetNotExist(String id) {
-		super("指定的部件不存在:{}.", id);
-	}
-
-}

+ 0 - 124
o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/jaxrs/widget/WidgetAction.java

@@ -1,124 +0,0 @@
-package com.x.portal.assemble.surface.jaxrs.widget;
-
-import java.util.List;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.container.AsyncResponse;
-import javax.ws.rs.container.Suspended;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.MediaType;
-
-import com.x.base.core.project.annotation.JaxrsDescribe;
-import com.x.base.core.project.annotation.JaxrsMethodDescribe;
-import com.x.base.core.project.annotation.JaxrsParameterDescribe;
-import com.x.base.core.project.http.ActionResult;
-import com.x.base.core.project.http.EffectivePerson;
-import com.x.base.core.project.http.HttpMediaType;
-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;
-
-@Path("widget")
-@JaxrsDescribe("部件")
-public class WidgetAction extends StandardJaxrsAction {
-
-	private static Logger logger = LoggerFactory.getLogger(WidgetAction.class);
-
-	@JaxrsMethodDescribe(value = "获取部件内容.", action = ActionGet.class)
-	@GET
-	@Path("{id}")
-	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
-	@Consumes(MediaType.APPLICATION_JSON)
-	public void get(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
-			@JaxrsParameterDescribe("标识") @PathParam("id") String id) {
-		ActionResult<ActionGet.Wo> result = new ActionResult<>();
-		EffectivePerson effectivePerson = this.effectivePerson(request);
-		try {
-			result = new ActionGet().execute(effectivePerson, id);
-		} catch (Exception e) {
-			logger.error(e, effectivePerson, request, null);
-			result.error(e);
-		}
-		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
-	}
-
-	@JaxrsMethodDescribe(value = "获取部件内容Mobile.", action = ActionGetMobile.class)
-	@GET
-	@Path("{id}/mobile")
-	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
-	@Consumes(MediaType.APPLICATION_JSON)
-	public void getMobile(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
-			@JaxrsParameterDescribe("标识") @PathParam("id") String id) {
-		ActionResult<ActionGetMobile.Wo> result = new ActionResult<>();
-		EffectivePerson effectivePerson = this.effectivePerson(request);
-		try {
-			result = new ActionGetMobile().execute(effectivePerson, id);
-		} catch (Exception e) {
-			logger.error(e, effectivePerson, request, null);
-			result.error(e);
-		}
-		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
-	}
-
-	@JaxrsMethodDescribe(value = "列示属于指定Portal的部件.", action = ActionList.class)
-	@GET
-	@Path("list/portal/{portal}")
-	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
-	@Consumes(MediaType.APPLICATION_JSON)
-	public void list(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
-			@JaxrsParameterDescribe("门户") @PathParam("portal") String portal) {
-		ActionResult<List<ActionList.Wo>> result = new ActionResult<>();
-		EffectivePerson effectivePerson = this.effectivePerson(request);
-		try {
-			result = new ActionList().execute(effectivePerson, portal);
-		} catch (Exception e) {
-			logger.error(e, effectivePerson, request, null);
-			result.error(e);
-		}
-		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
-	}
-
-	@JaxrsMethodDescribe(value = "列示属于指定Portal的部件,其中Portal可以用name,alias和id标识,部件为在此Portal下的页面.", action = ActionGetWithPortal.class)
-	@GET
-	@Path("{flag}/portal/{portalFlag}")
-	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
-	@Consumes(MediaType.APPLICATION_JSON)
-	public void getWithPortal(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
-			@JaxrsParameterDescribe("标识") @PathParam("flag") String flag,
-			@JaxrsParameterDescribe("门户标识") @PathParam("portalFlag") String portalFlag) {
-		ActionResult<ActionGetWithPortal.Wo> result = new ActionResult<>();
-		EffectivePerson effectivePerson = this.effectivePerson(request);
-		try {
-			result = new ActionGetWithPortal().execute(effectivePerson, flag, portalFlag);
-		} catch (Exception e) {
-			logger.error(e, effectivePerson, request, null);
-			result.error(e);
-		}
-		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
-	}
-
-	@JaxrsMethodDescribe(value = "列示属于指定Portal的部件,其中Portal可以用name,alias和id标识,部件为在此Portal下的页面Mobile.", action = ActionGetWithPortalMobile.class)
-	@GET
-	@Path("{flag}/portal/{portalFlag}/mobile")
-	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
-	@Consumes(MediaType.APPLICATION_JSON)
-	public void getWithPortalMobile(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
-			@JaxrsParameterDescribe("标识") @PathParam("flag") String flag,
-			@JaxrsParameterDescribe("门户标识") @PathParam("portalFlag") String portalFlag) {
-		ActionResult<ActionGetWithPortalMobile.Wo> result = new ActionResult<>();
-		EffectivePerson effectivePerson = this.effectivePerson(request);
-		try {
-			result = new ActionGetWithPortalMobile().execute(effectivePerson, flag, portalFlag);
-		} catch (Exception e) {
-			logger.error(e, effectivePerson, request, null);
-			result.error(e);
-		}
-		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
-	}
-}

+ 18 - 18
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/form/FormAction.java

@@ -141,23 +141,23 @@ public class FormAction extends StandardJaxrsAction {
 		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
 		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
 	}
 	}
 
 
-	@JaxrsMethodDescribe(value = "V2根据工作或完成工作标识获取表单,合并关联表单和关联脚本输出.", action = V2GetWithWorkOrWorkCompleted.class)
-	@GET
-	@Path("v2/workorworkcompleted/{workOrWorkCompleted}")
-	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
-	@Consumes(MediaType.APPLICATION_JSON)
-	public void V2GetWithWorkOrWorkCompleted(@Suspended final AsyncResponse asyncResponse,
-			@Context HttpServletRequest request,
-			@JaxrsParameterDescribe("工作或完成工作标识") @PathParam("workOrWorkCompleted") String workOrWorkCompleted) {
-		ActionResult<V2GetWithWorkOrWorkCompleted.Wo> result = new ActionResult<>();
-		EffectivePerson effectivePerson = this.effectivePerson(request);
-		try {
-			result = new V2GetWithWorkOrWorkCompleted().execute(effectivePerson, workOrWorkCompleted);
-		} catch (Exception e) {
-			logger.error(e, effectivePerson, request, null);
-			result.error(e);
-		}
-		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
-	}
+//	@JaxrsMethodDescribe(value = "V2根据工作或完成工作标识获取表单,合并关联表单和关联脚本输出.", action = V2GetWithWorkOrWorkCompleted.class)
+//	@GET
+//	@Path("v2/workorworkcompleted/{workOrWorkCompleted}")
+//	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+//	@Consumes(MediaType.APPLICATION_JSON)
+//	public void V2GetWithWorkOrWorkCompleted(@Suspended final AsyncResponse asyncResponse,
+//			@Context HttpServletRequest request,
+//			@JaxrsParameterDescribe("工作或完成工作标识") @PathParam("workOrWorkCompleted") String workOrWorkCompleted) {
+//		ActionResult<V2GetWithWorkOrWorkCompleted.Wo> result = new ActionResult<>();
+//		EffectivePerson effectivePerson = this.effectivePerson(request);
+//		try {
+//			result = new V2GetWithWorkOrWorkCompleted().execute(effectivePerson, workOrWorkCompleted);
+//		} catch (Exception e) {
+//			logger.error(e, effectivePerson, request, null);
+//			result.error(e);
+//		}
+//		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+//	}
 
 
 }
 }

この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません