Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
浙江兰德纵横网络技术股份有限公司
o2oa
提交
aaeb9f40
o2oa
项目概览
浙江兰德纵横网络技术股份有限公司
/
o2oa
通知
333
Star
10
Fork
6
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
o2oa
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
aaeb9f40
编写于
3月 10, 2021
作者:
NoSubject
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'develop' into 'master'
Develop See merge request o2oa/o2oa!3112
上级
c553d20e
411f2b32
变更
13
隐藏空白更改
内联
并排
Showing
13 changed file
with
273 addition
and
282 deletion
+273
-282
o2server/x_base_core_project/src/main/java/com/x/base/core/project/jaxrs/proxy/StandardJaxrsActionProxy.java
...se/core/project/jaxrs/proxy/StandardJaxrsActionProxy.java
+118
-118
o2server/x_calendar_assemble_control/src/main/java/com/x/calendar/assemble/control/jaxrs/calendar/CalendarAction.java
...endar/assemble/control/jaxrs/calendar/CalendarAction.java
+26
-19
o2server/x_calendar_assemble_control/src/main/java/com/x/calendar/assemble/control/jaxrs/event/Calendar_EventAction.java
...ar/assemble/control/jaxrs/event/Calendar_EventAction.java
+13
-24
o2server/x_calendar_assemble_control/src/main/java/com/x/calendar/assemble/control/jaxrs/event/Calendar_EventMessageAction.java
...mble/control/jaxrs/event/Calendar_EventMessageAction.java
+3
-5
o2server/x_calendar_assemble_control/src/main/java/com/x/calendar/assemble/control/jaxrs/setting/CalendarSettingAction.java
...assemble/control/jaxrs/setting/CalendarSettingAction.java
+6
-9
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/output/OutputAction.java
...com/x/cms/assemble/control/jaxrs/output/OutputAction.java
+15
-10
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/permission/PermissionAction.java
...s/assemble/control/jaxrs/permission/PermissionAction.java
+12
-9
o2server/x_mind_assemble_control/src/main/java/com/x/mind/assemble/control/jaxrs/folder/MindFolderInfoAction.java
...d/assemble/control/jaxrs/folder/MindFolderInfoAction.java
+34
-33
o2server/x_mind_assemble_control/src/main/java/com/x/mind/assemble/control/jaxrs/mind/MindInfoAction.java
...om/x/mind/assemble/control/jaxrs/mind/MindInfoAction.java
+39
-50
o2web/source/o2_core/o2.js
o2web/source/o2_core/o2.js
+1
-1
o2web/source/o2_core/o2/xDesktop/Default.js
o2web/source/o2_core/o2/xDesktop/Default.js
+3
-3
o2web/source/x_component_process_Work/Main.js
o2web/source/x_component_process_Work/Main.js
+2
-0
o2web/source/x_component_process_Xform/Documenteditor.js
o2web/source/x_component_process_Xform/Documenteditor.js
+1
-1
未找到文件。
o2server/x_base_core_project/src/main/java/com/x/base/core/project/jaxrs/proxy/StandardJaxrsActionProxy.java
浏览文件 @
aaeb9f40
package
com.x.base.core.project.jaxrs.proxy
;
import
com.x.base.core.project.Context
;
import
com.x.base.core.project.annotation.AuditLog
;
import
com.x.base.core.project.annotation.JaxrsMethodDescribe
;
import
com.x.base.core.project.config.Config
;
import
com.x.base.core.project.http.EffectivePerson
;
import
com.x.base.core.project.logger.Audit
;
import
com.x.base.core.project.logger.Logger
;
import
com.x.base.core.project.logger.LoggerFactory
;
import
net.sf.cglib.proxy.Enhancer
;
import
net.sf.cglib.proxy.MethodInterceptor
;
import
net.sf.cglib.proxy.MethodProxy
;
import
org.apache.commons.lang3.ArrayUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
java.lang.annotation.Annotation
;
import
java.lang.reflect.Method
;
public
class
StandardJaxrsActionProxy
implements
MethodInterceptor
{
private
Enhancer
enhancer
=
new
Enhancer
();
private
Context
context
;
public
StandardJaxrsActionProxy
(
Context
context
)
{
this
.
context
=
context
;
}
public
Object
getProxy
(
Class
clazz
){
enhancer
.
setSuperclass
(
clazz
);
enhancer
.
setCallback
(
this
);
return
enhancer
.
create
();
}
@Override
public
Object
intercept
(
Object
o
,
Method
method
,
Object
[]
objects
,
MethodProxy
methodProxy
)
throws
Throwable
{
Object
result
=
methodProxy
.
invokeSuper
(
o
,
objects
);
try
{
//尝试记录审计日志
if
(
Config
.
logLevel
().
audit
().
enable
()
){
tryToRecordAuditLog
(
o
,
method
,
objects
,
methodProxy
);
}
}
catch
(
Exception
e
){
e
.
printStackTrace
();
}
return
result
;
}
/**
* 根据调用方法的注释判断该类的操作是否需要记录到审计日志
* 如果需要记录,则执行审计日志记录方法
* @param o
* @param method
* @param objects
* @param methodProxy
* @throws ClassNotFoundException
*/
private
void
tryToRecordAuditLog
(
Object
o
,
Method
method
,
Object
[]
objects
,
MethodProxy
methodProxy
)
throws
ClassNotFoundException
{
//分析调用过程,记录审计日志
Annotation
[]
annotations_auditLog
=
method
.
getAnnotationsByType
(
AuditLog
.
class
);
//该方法是否有AuditLog注解,如果有,则需要记录审计日志
if
(
ArrayUtils
.
isNotEmpty
(
annotations_auditLog
)){
//获取操作名称,首选AuditLog的value属性属性,如果没有,则选择JaxrsMethodDescribe的value属性
String
operationName
=
getOperationName
(
method
,
annotations_auditLog
);
//有AuditLog注解,说明需要记录审计日志
doRecordAuditLog
(
method
,
objects
,
operationName
);
}
}
/**
* 获取方法的操作名称,首选AuditLog的value属性属性,如果没有,则选择JaxrsMethodDescribe的value属性
* @param method
* @param annotations_auditLog
* @return
*/
private
String
getOperationName
(
Method
method
,
Annotation
[]
annotations_auditLog
)
{
String
operationName
=
((
AuditLog
)
annotations_auditLog
[
0
]).
operation
();
Annotation
[]
annotations_jaxrsMethodDescribe
=
null
;
if
(
StringUtils
.
isEmpty
(
operationName
)){
//取JaxrsMethodDescribe
annotations_jaxrsMethodDescribe
=
method
.
getAnnotationsByType
(
JaxrsMethodDescribe
.
class
);
if
(
ArrayUtils
.
isNotEmpty
(
annotations_jaxrsMethodDescribe
)){
operationName
=
((
JaxrsMethodDescribe
)
annotations_auditLog
[
0
]).
value
();
}
}
return
operationName
;
}
/**
* 记录审计日志执行方法
* @param method
* @param objects
* @param operationName
*/
private
void
doRecordAuditLog
(
Method
method
,
Object
[]
objects
,
String
operationName
)
throws
ClassNotFoundException
{
if
(
StringUtils
.
isEmpty
(
operationName
)){
operationName
=
method
.
getName
();
}
int
parameterCount
=
method
.
getParameterCount
();
Class
<?>[]
parameterClasses
=
method
.
getParameterTypes
();
EffectivePerson
effectivePerson
=
null
;
if
(
parameterCount
>
0
&&
ArrayUtils
.
isNotEmpty
(
parameterClasses
)
&&
ArrayUtils
.
isNotEmpty
(
objects
)
){
//解析出参数effectivePerson
int
effectivePersonParamIndex
=
99
;
for
(
int
i
=
0
;
i
<
parameterClasses
.
length
;
i
++
){
if
(
StringUtils
.
equals
(
"com.x.base.core.project.http.EffectivePerson"
,
parameterClasses
[
i
].
getName
()
)){
effectivePersonParamIndex
=
i
;
break
;
}
}
if
(
effectivePersonParamIndex
<
99
){
effectivePerson
=
(
EffectivePerson
)
objects
[
effectivePersonParamIndex
];
Logger
logger
=
LoggerFactory
.
getLogger
(
Class
.
forName
(
method
.
getDeclaringClass
().
getName
()
));
Audit
audit
=
logger
.
audit
(
effectivePerson
);
audit
.
log
(
null
,
operationName
);
}
}
}
}
//
package com.x.base.core.project.jaxrs.proxy;
//
//
import com.x.base.core.project.Context;
//
import com.x.base.core.project.annotation.AuditLog;
//
import com.x.base.core.project.annotation.JaxrsMethodDescribe;
//
import com.x.base.core.project.config.Config;
//
import com.x.base.core.project.http.EffectivePerson;
//
import com.x.base.core.project.logger.Audit;
//
import com.x.base.core.project.logger.Logger;
//
import com.x.base.core.project.logger.LoggerFactory;
//
import net.sf.cglib.proxy.Enhancer;
//
import net.sf.cglib.proxy.MethodInterceptor;
//
import net.sf.cglib.proxy.MethodProxy;
//
import org.apache.commons.lang3.ArrayUtils;
//
import org.apache.commons.lang3.StringUtils;
//
//
import java.lang.annotation.Annotation;
//
import java.lang.reflect.Method;
//
//
public class StandardJaxrsActionProxy implements MethodInterceptor {
//
private Enhancer enhancer = new Enhancer();
//
private Context context;
//
//
public StandardJaxrsActionProxy(Context context) {
//
this.context = context;
//
}
//
//
public Object getProxy(Class clazz){
//
enhancer.setSuperclass(clazz);
//
enhancer.setCallback(this);
//
return enhancer.create();
//
}
//
//
@Override
//
public Object intercept( Object o, Method method, Object[] objects, MethodProxy methodProxy ) throws Throwable {
//
Object result = methodProxy.invokeSuper(o, objects);
//
try{
//
//尝试记录审计日志
//
if( Config.logLevel().audit().enable() ){
//
tryToRecordAuditLog( o, method, objects, methodProxy );
//
}
//
}catch(Exception e){
//
e.printStackTrace();
//
}
//
return result;
//
}
//
//
/**
//
* 根据调用方法的注释判断该类的操作是否需要记录到审计日志
//
* 如果需要记录,则执行审计日志记录方法
//
* @param o
//
* @param method
//
* @param objects
//
* @param methodProxy
//
* @throws ClassNotFoundException
//
*/
//
private void tryToRecordAuditLog(Object o, Method method, Object[] objects, MethodProxy methodProxy) throws ClassNotFoundException {
//
//分析调用过程,记录审计日志
//
Annotation[] annotations_auditLog = method.getAnnotationsByType(AuditLog.class);
//
//该方法是否有AuditLog注解,如果有,则需要记录审计日志
//
if( ArrayUtils.isNotEmpty( annotations_auditLog )){
//
//获取操作名称,首选AuditLog的value属性属性,如果没有,则选择JaxrsMethodDescribe的value属性
//
String operationName = getOperationName( method, annotations_auditLog );
//
//有AuditLog注解,说明需要记录审计日志
//
doRecordAuditLog( method, objects, operationName );
//
}
//
}
//
//
/**
//
* 获取方法的操作名称,首选AuditLog的value属性属性,如果没有,则选择JaxrsMethodDescribe的value属性
//
* @param method
//
* @param annotations_auditLog
//
* @return
//
*/
//
private String getOperationName( Method method, Annotation[] annotations_auditLog ) {
//
String operationName = ((AuditLog)annotations_auditLog[0]).operation();
//
Annotation[] annotations_jaxrsMethodDescribe = null;
//
if( StringUtils.isEmpty(operationName)){
//
//取JaxrsMethodDescribe
//
annotations_jaxrsMethodDescribe = method.getAnnotationsByType(JaxrsMethodDescribe.class);
//
if( ArrayUtils.isNotEmpty( annotations_jaxrsMethodDescribe )){
//
operationName = ((JaxrsMethodDescribe)annotations_auditLog[0]).value();
//
}
//
}
//
return operationName;
//
}
//
//
/**
//
* 记录审计日志执行方法
//
* @param method
//
* @param objects
//
* @param operationName
//
*/
//
private void doRecordAuditLog( Method method, Object[] objects, String operationName ) throws ClassNotFoundException {
//
if( StringUtils.isEmpty(operationName)){
//
operationName = method.getName();
//
}
//
int parameterCount = method.getParameterCount();
//
Class<?>[] parameterClasses = method.getParameterTypes();
//
EffectivePerson effectivePerson = null;
//
if( parameterCount > 0 && ArrayUtils.isNotEmpty( parameterClasses ) && ArrayUtils.isNotEmpty( objects ) ){
//
//解析出参数effectivePerson
//
int effectivePersonParamIndex = 99;
//
for( int i = 0 ; i< parameterClasses.length; i++ ){
//
if(StringUtils.equals( "com.x.base.core.project.http.EffectivePerson", parameterClasses[i].getName() )){
//
effectivePersonParamIndex = i;
//
break;
//
}
//
}
//
if( effectivePersonParamIndex < 99 ){
//
effectivePerson = (EffectivePerson) objects[effectivePersonParamIndex];
//
Logger logger = LoggerFactory.getLogger(Class.forName( method.getDeclaringClass().getName() ));
//
Audit audit = logger.audit(effectivePerson);
//
audit.log(null, operationName);
//
}
//
}
//
}
//
}
o2server/x_calendar_assemble_control/src/main/java/com/x/calendar/assemble/control/jaxrs/calendar/CalendarAction.java
浏览文件 @
aaeb9f40
...
...
@@ -26,16 +26,13 @@ import com.x.base.core.project.http.HttpMediaType;
import
com.x.base.core.project.http.WrapOutBoolean
;
import
com.x.base.core.project.jaxrs.ResponseFactory
;
import
com.x.base.core.project.jaxrs.StandardJaxrsAction
;
import
com.x.base.core.project.jaxrs.proxy.StandardJaxrsActionProxy
;
import
com.x.base.core.project.logger.Logger
;
import
com.x.base.core.project.logger.LoggerFactory
;
import
com.x.calendar.assemble.control.ThisApplication
;
@Path
(
"calendar"
)
@JaxrsDescribe
(
"日历信息管理服务"
)
public
class
CalendarAction
extends
StandardJaxrsAction
{
private
StandardJaxrsActionProxy
proxy
=
new
StandardJaxrsActionProxy
(
ThisApplication
.
context
());
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
CalendarAction
.
class
);
@JaxrsMethodDescribe
(
value
=
"获取我能访问到的所有日历信息列表"
,
action
=
ActionListWhatICanView
.
class
)
...
...
@@ -49,8 +46,9 @@ public class CalendarAction extends StandardJaxrsAction {
Boolean
check
=
true
;
if
(
check
)
{
try
{
result
=
((
ActionListWhatICanView
)
proxy
.
getProxy
(
ActionListWhatICanView
.
class
)).
execute
(
request
,
effectivePerson
);
result
=
new
ActionListWhatICanView
().
execute
(
request
,
effectivePerson
);
// result = ((ActionListWhatICanView) proxy.getProxy(ActionListWhatICanView.class)).execute(request,
// effectivePerson);
}
catch
(
Exception
e
)
{
result
=
new
ActionResult
<>();
Exception
exception
=
new
ExceptionCalendarInfoProcess
(
e
,
"获取我能访问到的所有日历信息列表时发生异常!"
);
...
...
@@ -73,8 +71,9 @@ public class CalendarAction extends StandardJaxrsAction {
if
(
check
)
{
try
{
result
=
((
ActionListPublicCalendar
)
proxy
.
getProxy
(
ActionListPublicCalendar
.
class
)).
execute
(
request
,
effectivePerson
);
result
=
new
ActionListPublicCalendar
().
execute
(
request
,
effectivePerson
);
// result = ((ActionListPublicCalendar) proxy.getProxy(ActionListPublicCalendar.class)).execute(request,
// effectivePerson);
}
catch
(
Exception
e
)
{
result
=
new
ActionResult
<>();
Exception
exception
=
new
ExceptionCalendarInfoProcess
(
e
,
"获取所有公开的日历信息列表时发生异常!"
);
...
...
@@ -98,7 +97,8 @@ public class CalendarAction extends StandardJaxrsAction {
if
(
check
)
{
try
{
result
=
((
ActionGet
)
proxy
.
getProxy
(
ActionGet
.
class
)).
execute
(
request
,
effectivePerson
,
id
);
result
=
new
ActionGet
().
execute
(
request
,
effectivePerson
,
id
);
// result = ((ActionGet) proxy.getProxy(ActionGet.class)).execute(request, effectivePerson, id);
}
catch
(
Exception
e
)
{
result
=
new
ActionResult
<>();
Exception
exception
=
new
ExceptionCalendarInfoProcess
(
e
,
"根据ID获取日历信息时发生异常!"
);
...
...
@@ -122,8 +122,9 @@ public class CalendarAction extends StandardJaxrsAction {
if
(
check
)
{
try
{
result
=
((
ActionListWithCondition
)
proxy
.
getProxy
(
ActionListWithCondition
.
class
)).
execute
(
request
,
effectivePerson
,
jsonElement
);
result
=
new
ActionListWithCondition
().
execute
(
request
,
effectivePerson
,
jsonElement
);
// result = ((ActionListWithCondition) proxy.getProxy(ActionListWithCondition.class)).execute(request,
// effectivePerson, jsonElement);
}
catch
(
Exception
e
)
{
result
=
new
ActionResult
<>();
Exception
exception
=
new
ExceptionCalendarInfoProcess
(
e
,
"根据条件查询日历信息列表时发生异常!"
);
...
...
@@ -146,7 +147,8 @@ public class CalendarAction extends StandardJaxrsAction {
if
(
check
)
{
try
{
result
=
((
ActionIsManager
)
proxy
.
getProxy
(
ActionIsManager
.
class
)).
execute
(
request
,
effectivePerson
);
result
=
new
ActionIsManager
().
execute
(
request
,
effectivePerson
);
// result = ((ActionIsManager) proxy.getProxy(ActionIsManager.class)).execute(request, effectivePerson);
}
catch
(
Exception
e
)
{
result
=
new
ActionResult
<>();
Exception
exception
=
new
ExceptionCalendarInfoProcess
(
e
,
"判断当前用户是否有管理员权限时发生异常!"
);
...
...
@@ -170,8 +172,9 @@ public class CalendarAction extends StandardJaxrsAction {
if
(
check
)
{
try
{
result
=
((
ActionFollowCalendar
)
proxy
.
getProxy
(
ActionFollowCalendar
.
class
)).
execute
(
request
,
effectivePerson
,
id
);
result
=
new
ActionFollowCalendar
().
execute
(
request
,
effectivePerson
,
id
);
// result = ((ActionFollowCalendar) proxy.getProxy(ActionFollowCalendar.class)).execute(request,
// effectivePerson, id);
}
catch
(
Exception
e
)
{
result
=
new
ActionResult
<>();
Exception
exception
=
new
ExceptionCalendarInfoProcess
(
e
,
"关注一个公开的日历信息时发生异常!"
);
...
...
@@ -195,8 +198,9 @@ public class CalendarAction extends StandardJaxrsAction {
if
(
check
)
{
try
{
result
=
((
ActionFollowCalendarCancel
)
proxy
.
getProxy
(
ActionFollowCalendarCancel
.
class
))
.
execute
(
request
,
effectivePerson
,
id
);
result
=
new
ActionFollowCalendarCancel
().
execute
(
request
,
effectivePerson
,
id
);
// result = ((ActionFollowCalendarCancel) proxy.getProxy(ActionFollowCalendarCancel.class))
// .execute(request, effectivePerson, id);
}
catch
(
Exception
e
)
{
result
=
new
ActionResult
<>();
Exception
exception
=
new
ExceptionCalendarInfoProcess
(
e
,
"取消关注一个公开的日历信息时发生异常!"
);
...
...
@@ -220,8 +224,9 @@ public class CalendarAction extends StandardJaxrsAction {
if
(
check
)
{
try
{
result
=
((
ActionIsCalendarManager
)
proxy
.
getProxy
(
ActionIsCalendarManager
.
class
)).
execute
(
request
,
effectivePerson
,
accountId
);
result
=
new
ActionIsCalendarManager
().
execute
(
request
,
effectivePerson
,
accountId
);
// result = ((ActionIsCalendarManager) proxy.getProxy(ActionIsCalendarManager.class)).execute(request,
// effectivePerson, accountId);
}
catch
(
Exception
e
)
{
result
=
new
ActionResult
<>();
Exception
exception
=
new
ExceptionCalendarInfoProcess
(
e
,
"判断当前用户是否对指定的日历有管理员权限时发生异常!"
);
...
...
@@ -244,7 +249,8 @@ public class CalendarAction extends StandardJaxrsAction {
if
(
check
)
{
try
{
result
=
((
ActionSave
)
proxy
.
getProxy
(
ActionSave
.
class
)).
execute
(
request
,
effectivePerson
,
jsonElement
);
result
=
new
ActionSave
().
execute
(
request
,
effectivePerson
,
jsonElement
);
// result = ((ActionSave) proxy.getProxy(ActionSave.class)).execute(request, effectivePerson, jsonElement);
}
catch
(
Exception
e
)
{
result
=
new
ActionResult
<>();
Exception
exception
=
new
ExceptionCalendarInfoProcess
(
e
,
"新建或者更新日历信息时发生异常!"
);
...
...
@@ -268,7 +274,8 @@ public class CalendarAction extends StandardJaxrsAction {
if
(
check
)
{
try
{
result
=
((
ActionDelete
)
proxy
.
getProxy
(
ActionDelete
.
class
)).
execute
(
request
,
effectivePerson
,
id
);
result
=
new
ActionDelete
().
execute
(
request
,
effectivePerson
,
id
);
// result = ((ActionDelete) proxy.getProxy(ActionDelete.class)).execute(request, effectivePerson, id);
}
catch
(
Exception
e
)
{
result
=
new
ActionResult
<>();
Exception
exception
=
new
ExceptionCalendarInfoProcess
(
e
,
"根据ID删除日历信息及所有事件时发生异常!"
);
...
...
o2server/x_calendar_assemble_control/src/main/java/com/x/calendar/assemble/control/jaxrs/event/Calendar_EventAction.java
浏览文件 @
aaeb9f40
...
...
@@ -25,16 +25,15 @@ 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.jaxrs.proxy.StandardJaxrsActionProxy
;
import
com.x.base.core.project.logger.Logger
;
import
com.x.base.core.project.logger.LoggerFactory
;
import
com.x.calendar.assemble.control.ThisApplication
;
@Path
(
"event"
)
@JaxrsDescribe
(
"日历事件信息管理服务"
)
public
class
Calendar_EventAction
extends
StandardJaxrsAction
{
private
StandardJaxrsActionProxy
proxy
=
new
StandardJaxrsActionProxy
(
ThisApplication
.
context
());
// private StandardJaxrsActionProxy proxy = new
// StandardJaxrsActionProxy(ThisApplication.context());
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
Calendar_EventAction
.
class
);
@JaxrsMethodDescribe
(
value
=
"根据ID获取日历事件信息"
,
action
=
ActionGet
.
class
)
...
...
@@ -50,7 +49,7 @@ public class Calendar_EventAction extends StandardJaxrsAction {
if
(
check
)
{
try
{
result
=
((
ActionGet
)
proxy
.
getProxy
(
ActionGet
.
class
)
).
execute
(
request
,
effectivePerson
,
id
);
result
=
new
ActionGet
(
).
execute
(
request
,
effectivePerson
,
id
);
}
catch
(
Exception
e
)
{
result
=
new
ActionResult
<>();
Exception
exception
=
new
ExceptionEventProcess
(
e
,
"根据ID获取日历事件信息时发生异常!"
);
...
...
@@ -74,8 +73,7 @@ public class Calendar_EventAction extends StandardJaxrsAction {
if
(
check
)
{
try
{
result
=
((
ActionGetRFCContent
)
proxy
.
getProxy
(
ActionGetRFCContent
.
class
)).
execute
(
request
,
effectivePerson
,
id
);
result
=
new
ActionGetRFCContent
().
execute
(
request
,
effectivePerson
,
id
);
}
catch
(
Exception
e
)
{
result
=
new
ActionResult
<>();
Exception
exception
=
new
ExceptionEventProcess
(
e
,
"根据ID获取日历事件信息的RFC内容时发生异常!"
);
...
...
@@ -99,8 +97,7 @@ public class Calendar_EventAction extends StandardJaxrsAction {
if
(
check
)
{
try
{
result
=
((
ActionDestroySingleEventWithId
)
proxy
.
getProxy
(
ActionDestroySingleEventWithId
.
class
))
.
execute
(
request
,
effectivePerson
,
eventId
);
result
=
new
ActionDestroySingleEventWithId
().
execute
(
request
,
effectivePerson
,
eventId
);
}
catch
(
Exception
e
)
{
result
=
new
ActionResult
<>();
Exception
exception
=
new
ExceptionEventProcess
(
e
,
"根据ID删除日历事件信息时发生异常!"
);
...
...
@@ -125,8 +122,7 @@ public class Calendar_EventAction extends StandardJaxrsAction {
if
(
check
)
{
try
{
result
=
((
ActionDestroyWithMaster
)
proxy
.
getProxy
(
ActionDestroyWithMaster
.
class
)).
execute
(
request
,
effectivePerson
,
eventId
);
result
=
new
ActionDestroyWithMaster
().
execute
(
request
,
effectivePerson
,
eventId
);
}
catch
(
Exception
e
)
{
result
=
new
ActionResult
<>();
Exception
exception
=
new
ExceptionEventProcess
(
e
,
"根据指定事件ID删除所有的重复日历事件信息时发生异常!"
);
...
...
@@ -150,8 +146,7 @@ public class Calendar_EventAction extends StandardJaxrsAction {
if
(
check
)
{
try
{
result
=
((
ActionDestroyAfterEventId
)
proxy
.
getProxy
(
ActionDestroyAfterEventId
.
class
)).
execute
(
request
,
effectivePerson
,
eventId
);
result
=
new
ActionDestroyAfterEventId
().
execute
(
request
,
effectivePerson
,
eventId
);
}
catch
(
Exception
e
)
{
result
=
new
ActionResult
<>();
Exception
exception
=
new
ExceptionEventProcess
(
e
,
"删除重复日程事件中指定事件开始后续所有的日程事件信息时发生异常!"
);
...
...
@@ -175,8 +170,7 @@ public class Calendar_EventAction extends StandardJaxrsAction {
if
(
check
)
{
try
{
result
=
((
ActionListWithCondition
)
proxy
.
getProxy
(
ActionListWithCondition
.
class
)).
execute
(
request
,
effectivePerson
,
jsonElement
);
result
=
new
ActionListWithCondition
().
execute
(
request
,
effectivePerson
,
jsonElement
);
}
catch
(
Exception
e
)
{
result
=
new
ActionResult
<>();
Exception
exception
=
new
ExceptionEventProcess
(
e
,
"根据条件查询日历事件信息列表!"
);
...
...
@@ -200,8 +194,7 @@ public class Calendar_EventAction extends StandardJaxrsAction {
if
(
check
)
{
try
{
result
=
((
ActionSimpleListWithCondition
)
proxy
.
getProxy
(
ActionSimpleListWithCondition
.
class
))
.
execute
(
request
,
effectivePerson
,
jsonElement
);
result
=
new
ActionSimpleListWithCondition
().
execute
(
request
,
effectivePerson
,
jsonElement
);
}
catch
(
Exception
e
)
{
result
=
new
ActionResult
<>();
Exception
exception
=
new
ExceptionEventProcess
(
e
,
"根据条件查询日历事件信息列表!"
);
...
...
@@ -224,8 +217,7 @@ public class Calendar_EventAction extends StandardJaxrsAction {
if
(
check
)
{
try
{
result
=
((
ActionCreate
)
proxy
.
getProxy
(
ActionCreate
.
class
)).
execute
(
request
,
effectivePerson
,
jsonElement
);
result
=
new
ActionCreate
().
execute
(
request
,
effectivePerson
,
jsonElement
);
}
catch
(
Exception
e
)
{
result
=
new
ActionResult
<>();
Exception
exception
=
new
ExceptionEventProcess
(
e
,
"新建或者更新日历事件信息时发生异常!"
);
...
...
@@ -251,8 +243,7 @@ public class Calendar_EventAction extends StandardJaxrsAction {
if
(
check
)
{
try
{
result
=
((
ActionUpdateWithMaster
)
proxy
.
getProxy
(
ActionUpdateWithMaster
.
class
)).
execute
(
request
,
effectivePerson
,
eventId
,
jsonElement
);
result
=
new
ActionUpdateWithMaster
().
execute
(
request
,
effectivePerson
,
eventId
,
jsonElement
);
}
catch
(
Exception
e
)
{
result
=
new
ActionResult
<>();
Exception
exception
=
new
ExceptionEventProcess
(
e
,
"更新日历事件信息时发生异常!"
);
...
...
@@ -277,8 +268,7 @@ public class Calendar_EventAction extends StandardJaxrsAction {
if
(
check
)
{
try
{
result
=
((
ActionUpdateAfterEventId
)
proxy
.
getProxy
(
ActionUpdateAfterEventId
.
class
)).
execute
(
request
,
effectivePerson
,
eventId
,
jsonElement
);
result
=
new
ActionUpdateAfterEventId
().
execute
(
request
,
effectivePerson
,
eventId
,
jsonElement
);
}
catch
(
Exception
e
)
{
result
=
new
ActionResult
<>();
Exception
exception
=
new
ExceptionEventProcess
(
e
,
"更新日历事件信息时发生异常!"
);
...
...
@@ -303,8 +293,7 @@ public class Calendar_EventAction extends StandardJaxrsAction {
if
(
check
)
{
try
{
result
=
((
ActionUpdateSingleEventWithId
)
proxy
.
getProxy
(
ActionUpdateSingleEventWithId
.
class
))
.
execute
(
request
,
effectivePerson
,
eventId
,
jsonElement
);
result
=
new
ActionUpdateSingleEventWithId
().
execute
(
request
,
effectivePerson
,
eventId
,
jsonElement
);
}
catch
(
Exception
e
)
{
result
=
new
ActionResult
<>();
Exception
exception
=
new
ExceptionEventProcess
(
e
,
"更新日历事件信息时发生异常!"
);
...
...
o2server/x_calendar_assemble_control/src/main/java/com/x/calendar/assemble/control/jaxrs/event/Calendar_EventMessageAction.java
浏览文件 @
aaeb9f40
...
...
@@ -17,16 +17,15 @@ 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.proxy.StandardJaxrsActionProxy
;
import
com.x.base.core.project.logger.Logger
;
import
com.x.base.core.project.logger.LoggerFactory
;
import
com.x.calendar.assemble.control.ThisApplication
;
@Path
(
"message"
)
@JaxrsDescribe
(
"消息处理"
)
public
class
Calendar_EventMessageAction
extends
BaseAction
{
private
StandardJaxrsActionProxy
proxy
=
new
StandardJaxrsActionProxy
(
ThisApplication
.
context
());
// private StandardJaxrsActionProxy proxy = new
// StandardJaxrsActionProxy(ThisApplication.context());
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
Calendar_EventMessageAction
.
class
);
@JaxrsMethodDescribe
(
value
=
"接收日历消息"
,
action
=
ActionMessageReceive
.
class
)
...
...
@@ -38,8 +37,7 @@ public class Calendar_EventMessageAction extends BaseAction {
ActionResult
<
ActionMessageReceive
.
Wo
>
result
=
new
ActionResult
<>();
EffectivePerson
effectivePerson
=
this
.
effectivePerson
(
request
);
try
{
result
=
((
ActionMessageReceive
)
proxy
.
getProxy
(
ActionMessageReceive
.
class
)).
execute
(
request
,
effectivePerson
,
jsonElement
);
result
=
new
ActionMessageReceive
().
execute
(
request
,
effectivePerson
,
jsonElement
);
}
catch
(
Exception
e
)
{
logger
.
error
(
e
,
effectivePerson
,
request
,
jsonElement
);
result
.
error
(
e
);
...
...
o2server/x_calendar_assemble_control/src/main/java/com/x/calendar/assemble/control/jaxrs/setting/CalendarSettingAction.java
浏览文件 @
aaeb9f40
...
...
@@ -24,16 +24,14 @@ import com.x.base.core.project.http.HttpMediaType;
import
com.x.base.core.project.http.WrapOutBoolean
;
import
com.x.base.core.project.jaxrs.ResponseFactory
;
import
com.x.base.core.project.jaxrs.StandardJaxrsAction
;
import
com.x.base.core.project.jaxrs.proxy.StandardJaxrsActionProxy
;
import
com.x.base.core.project.logger.Logger
;
import
com.x.base.core.project.logger.LoggerFactory
;
import
com.x.calendar.assemble.control.ThisApplication
;
@Path
(
"setting"
)
@JaxrsDescribe
(
"系统设置信息管理服务"
)
public
class
CalendarSettingAction
extends
StandardJaxrsAction
{
private
StandardJaxrsActionProxy
proxy
=
new
StandardJaxrsActionProxy
(
ThisApplication
.
context
());
//
private StandardJaxrsActionProxy proxy = new StandardJaxrsActionProxy(ThisApplication.context());
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
CalendarSettingAction
.
class
);
@JaxrsMethodDescribe
(
value
=
"获取所有系统配置信息列表"
,
action
=
ActionListAll
.
class
)
...
...
@@ -49,7 +47,7 @@ public class CalendarSettingAction extends StandardJaxrsAction {
if
(
check
)
{
try
{
result
=
((
ActionListAll
)
proxy
.
getProxy
(
ActionListAll
.
class
)
).
execute
(
request
,
effectivePerson
);
result
=
new
ActionListAll
(
).
execute
(
request
,
effectivePerson
);
}
catch
(
Exception
e
)
{
result
=
new
ActionResult
<>();
Exception
exception
=
new
ExceptionSettingInfoProcess
(
e
,
"获取所有系统配置信息列表时发生异常!"
);
...
...
@@ -73,7 +71,7 @@ public class CalendarSettingAction extends StandardJaxrsAction {
if
(
check
)
{
try
{
result
=
((
ActionGet
)
proxy
.
getProxy
(
ActionGet
.
class
)
).
execute
(
request
,
effectivePerson
,
id
);
result
=
new
ActionGet
(
).
execute
(
request
,
effectivePerson
,
id
);
}
catch
(
Exception
e
)
{
result
=
new
ActionResult
<>();
Exception
exception
=
new
ExceptionSettingInfoProcess
(
e
,
"根据ID获取系统配置信息时发生异常!"
);
...
...
@@ -97,8 +95,7 @@ public class CalendarSettingAction extends StandardJaxrsAction {
if
(
check
)
{
try
{
result
=
((
ActionGetWithCode
)
proxy
.
getProxy
(
ActionGetWithCode
.
class
)).
execute
(
request
,
effectivePerson
,
code
);
result
=
new
ActionGetWithCode
().
execute
(
request
,
effectivePerson
,
code
);
}
catch
(
Exception
e
)
{
result
=
new
ActionResult
<>();
Exception
exception
=
new
ExceptionSettingInfoProcess
(
e
,
"根据Code获取系统配置信息时发生异常!"
);
...
...
@@ -121,7 +118,7 @@ public class CalendarSettingAction extends StandardJaxrsAction {
if
(
check
)
{
try
{
result
=
((
ActionIsManager
)
proxy
.
getProxy
(
ActionIsManager
.
class
)
).
execute
(
request
,
effectivePerson
);
result
=
new
ActionIsManager
(
).
execute
(
request
,
effectivePerson
);
}
catch
(
Exception
e
)
{
result
=
new
ActionResult
<>();
Exception
exception
=
new
ExceptionSettingInfoProcess
(
e
,
"判断当前用户是否有管理员权限时发生异常!"
);
...
...
@@ -144,7 +141,7 @@ public class CalendarSettingAction extends StandardJaxrsAction {
if
(
check
)
{
try
{
result
=
((
ActionSave
)
proxy
.
getProxy
(
ActionSave
.
class
)
).
execute
(
request
,
effectivePerson
,
jsonElement
);
result
=
new
ActionSave
(
).
execute
(
request
,
effectivePerson
,
jsonElement
);
}
catch
(
Exception
e
)
{
result
=
new
ActionResult
<>();
Exception
exception
=
new
ExceptionSettingInfoProcess
(
e
,
"新建或者更新系统配置信息时发生异常!"
);
...
...
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/output/OutputAction.java
浏览文件 @
aaeb9f40
package
com.x.cms.assemble.control.jaxrs.output
;
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.PUT
;
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
;
...
...
@@ -9,18 +24,8 @@ 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.jaxrs.proxy.StandardJaxrsActionProxy
;
import
com.x.base.core.project.logger.Logger
;
import
com.x.base.core.project.logger.LoggerFactory
;
import
com.x.cms.assemble.control.ThisApplication
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.ws.rs.*
;
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
java.util.List
;
@Path
(
"output"
)
@JaxrsDescribe
(
"导出CMS"
)
...
...
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/permission/PermissionAction.java
浏览文件 @
aaeb9f40
package
com.x.cms.assemble.control.jaxrs.permission
;
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
;
...
...
@@ -9,17 +21,8 @@ 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.jaxrs.proxy.StandardJaxrsActionProxy
;
import
com.x.base.core.project.logger.Logger
;
import
com.x.base.core.project.logger.LoggerFactory
;
import
com.x.cms.assemble.control.ThisApplication
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.ws.rs.*
;
import
javax.ws.rs.container.AsyncResponse
;
import
javax.ws.rs.container.Suspended
;
import
javax.ws.rs.core.Context
;
import
javax.ws.rs.core.MediaType
;
@Path
(
"permission"
)
@JaxrsDescribe
(
"栏目分类权限配置操作"
)
...
...
o2server/x_mind_assemble_control/src/main/java/com/x/mind/assemble/control/jaxrs/folder/MindFolderInfoAction.java
浏览文件 @
aaeb9f40
package
com.x.mind.assemble.control.jaxrs.folder
;
import
java.util.List
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.ws.rs.Consumes
;
import
javax.ws.rs.DELETE
;
import
javax.ws.rs.GET
;
import
javax.ws.rs.POST
;
import
javax.ws.rs.PUT
;
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
;
...
...
@@ -8,24 +24,15 @@ 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.proxy.StandardJaxrsActionProxy
;
import
com.x.base.core.project.logger.Logger
;
import
com.x.base.core.project.logger.LoggerFactory
;
import
com.x.mind.assemble.control.ThisApplication
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.ws.rs.*
;
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
java.util.List
;
@Path
(
"folder"
)
@JaxrsDescribe
(
"脑图目录信息管理服务"
)
public
class
MindFolderInfoAction
extends
BaseAction
{
private
StandardJaxrsActionProxy
proxy
=
new
StandardJaxrsActionProxy
(
ThisApplication
.
context
());
// private StandardJaxrsActionProxy proxy = new
// StandardJaxrsActionProxy(ThisApplication.context());
private
Logger
logger
=
LoggerFactory
.
getLogger
(
MindFolderInfoAction
.
class
);
@JaxrsMethodDescribe
(
value
=
"保存(创建或者更新)一个目录信息"
,
action
=
ActionFolderSave
.
class
)
...
...
@@ -33,89 +40,83 @@ public class MindFolderInfoAction extends BaseAction {
@Path
(
"save"
)
@Produces
(
HttpMediaType
.
APPLICATION_JSON_UTF_8
)
@Consumes
(
MediaType
.
APPLICATION_JSON
)
public
void
saveFolder
(
@Suspended
final
AsyncResponse
asyncResponse
,
@Context
HttpServletRequest
request
,
JsonElement
jsonElement
)
{
public
void
saveFolder
(
@Suspended
final
AsyncResponse
asyncResponse
,
@Context
HttpServletRequest
request
,
JsonElement
jsonElement
)
{
EffectivePerson
effectivePerson
=
this
.
effectivePerson
(
request
);
ActionResult
<
ActionFolderSave
.
Wo
>
result
=
new
ActionResult
<>();
try
{
result
=
((
ActionFolderSave
)
proxy
.
getProxy
(
ActionFolderSave
.
class
))
.
execute
(
request
,
effectivePerson
,
jsonElement
);
result
=
new
ActionFolderSave
().
execute
(
request
,
effectivePerson
,
jsonElement
);
}
catch
(
Exception
e
)
{
result
=
new
ActionResult
<>();
logger
.
error
(
e
,
effectivePerson
,
request
,
null
);
}
asyncResponse
.
resume
(
ResponseFactory
.
getEntityTagActionResultResponse
(
request
,
result
));
}
@JaxrsMethodDescribe
(
value
=
"将指定的脑图和文件夹移动到指定的文件夹内"
,
action
=
ActionMoveToFolder
.
class
)
@PUT
@Path
(
"move/{folderId}"
)
@Produces
(
HttpMediaType
.
APPLICATION_JSON_UTF_8
)
@Consumes
(
MediaType
.
APPLICATION_JSON
)
public
void
moveMindAndFolder
(
@Suspended
final
AsyncResponse
asyncResponse
,
@Context
HttpServletRequest
request
,
@JaxrsParameterDescribe
(
"文件夹ID"
)
@PathParam
(
"folderId"
)
String
folderId
,
JsonElement
jsonElement
)
{
public
void
moveMindAndFolder
(
@Suspended
final
AsyncResponse
asyncResponse
,
@Context
HttpServletRequest
request
,
@JaxrsParameterDescribe
(
"文件夹ID"
)
@PathParam
(
"folderId"
)
String
folderId
,
JsonElement
jsonElement
)
{
EffectivePerson
effectivePerson
=
this
.
effectivePerson
(
request
);
ActionResult
<
ActionMoveToFolder
.
Wo
>
result
=
new
ActionResult
<>();
try
{
result
=
((
ActionMoveToFolder
)
proxy
.
getProxy
(
ActionMoveToFolder
.
class
))
.
execute
(
request
,
effectivePerson
,
folderId
,
jsonElement
);
result
=
new
ActionMoveToFolder
().
execute
(
request
,
effectivePerson
,
folderId
,
jsonElement
);
}
catch
(
Exception
e
)
{
result
=
new
ActionResult
<>();
logger
.
error
(
e
,
effectivePerson
,
request
,
null
);
}
asyncResponse
.
resume
(
ResponseFactory
.
getEntityTagActionResultResponse
(
request
,
result
));
}
@JaxrsMethodDescribe
(
value
=
"列出用户自己的个人脑图文件夹(所有文件夹,按上下级树型组织信息)"
,
action
=
ActionListMyFolder
.
class
)
@GET
@Path
(
"tree/my"
)
@Produces
(
HttpMediaType
.
APPLICATION_JSON_UTF_8
)
@Consumes
(
MediaType
.
APPLICATION_JSON
)
public
void
treeMyFolder
(
@Suspended
final
AsyncResponse
asyncResponse
,
@Context
HttpServletRequest
request
)
{
public
void
treeMyFolder
(
@Suspended
final
AsyncResponse
asyncResponse
,
@Context
HttpServletRequest
request
)
{
EffectivePerson
effectivePerson
=
this
.
effectivePerson
(
request
);
ActionResult
<
List
<
ActionListMyFolder
.
Wo
>>
result
=
new
ActionResult
<>();
try
{
result
=
((
ActionListMyFolder
)
proxy
.
getProxy
(
ActionListMyFolder
.
class
))
.
execute
(
request
,
effectivePerson
);
result
=
new
ActionListMyFolder
().
execute
(
request
,
effectivePerson
);
}
catch
(
Exception
e
)
{
result
=
new
ActionResult
<>();
logger
.
error
(
e
,
effectivePerson
,
request
,
null
);
}
asyncResponse
.
resume
(
ResponseFactory
.
getEntityTagActionResultResponse
(
request
,
result
));
}
@JaxrsMethodDescribe
(
value
=
"根据ID删除一个目录,如果目录是非空目录,则无法删除)"
,
action
=
ActionFolderDelete
.
class
)
@DELETE
@Path
(
"{id}"
)
@Produces
(
HttpMediaType
.
APPLICATION_JSON_UTF_8
)
@Consumes
(
MediaType
.
APPLICATION_JSON
)
public
void
folderDelete
(
@Suspended
final
AsyncResponse
asyncResponse
,
@Context
HttpServletRequest
request
,
@JaxrsParameterDescribe
(
"文件夹ID"
)
@PathParam
(
"id"
)
String
id
)
{
@JaxrsParameterDescribe
(
"文件夹ID"
)
@PathParam
(
"id"
)
String
id
)
{
EffectivePerson
effectivePerson
=
this
.
effectivePerson
(
request
);
ActionResult
<
ActionFolderDelete
.
Wo
>
result
=
new
ActionResult
<>();
try
{
result
=
((
ActionFolderDelete
)
proxy
.
getProxy
(
ActionFolderDelete
.
class
))
.
execute
(
request
,
effectivePerson
,
id
);
result
=
new
ActionFolderDelete
().
execute
(
request
,
effectivePerson
,
id
);
}
catch
(
Exception
e
)
{
result
=
new
ActionResult
<>();
logger
.
error
(
e
,
effectivePerson
,
request
,
null
);
}
asyncResponse
.
resume
(
ResponseFactory
.
getEntityTagActionResultResponse
(
request
,
result
));
}
@JaxrsMethodDescribe
(
value
=
"根据ID强制删除一个目录,包括下级目录以及文件"
,
action
=
ActionFolderDeleteForce
.
class
)
@DELETE
@Path
(
"{id}/force"
)
@Produces
(
HttpMediaType
.
APPLICATION_JSON_UTF_8
)
@Consumes
(
MediaType
.
APPLICATION_JSON
)
public
void
folderDeleteForce
(
@Suspended
final
AsyncResponse
asyncResponse
,
@Context
HttpServletRequest
request
,
@JaxrsParameterDescribe
(
"文件夹ID"
)
@PathParam
(
"id"
)
String
id
)
{
@JaxrsParameterDescribe
(
"文件夹ID"
)
@PathParam
(
"id"
)
String
id
)
{
EffectivePerson
effectivePerson
=
this
.
effectivePerson
(
request
);
ActionResult
<
ActionFolderDeleteForce
.
Wo
>
result
=
new
ActionResult
<>();
try
{
result
=
((
ActionFolderDeleteForce
)
proxy
.
getProxy
(
ActionFolderDeleteForce
.
class
))
.
execute
(
request
,
effectivePerson
,
id
);
result
=
new
ActionFolderDeleteForce
().
execute
(
request
,
effectivePerson
,
id
);
}
catch
(
Exception
e
)
{
result
=
new
ActionResult
<>();
logger
.
error
(
e
,
effectivePerson
,
request
,
null
);
...
...
o2server/x_mind_assemble_control/src/main/java/com/x/mind/assemble/control/jaxrs/mind/MindInfoAction.java
浏览文件 @
aaeb9f40
package
com.x.mind.assemble.control.jaxrs.mind
;
import
java.util.List
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.ws.rs.Consumes
;
import
javax.ws.rs.DELETE
;
import
javax.ws.rs.GET
;
import
javax.ws.rs.POST
;
import
javax.ws.rs.PUT
;
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.glassfish.jersey.media.multipart.FormDataContentDisposition
;
import
org.glassfish.jersey.media.multipart.FormDataParam
;
import
com.google.gson.JsonElement
;
import
com.x.base.core.project.annotation.JaxrsDescribe
;
import
com.x.base.core.project.annotation.JaxrsMethodDescribe
;
...
...
@@ -8,27 +27,15 @@ 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.proxy.StandardJaxrsActionProxy
;
import
com.x.base.core.project.logger.Logger
;
import
com.x.base.core.project.logger.LoggerFactory
;
import
com.x.mind.assemble.control.ThisApplication
;
import
org.glassfish.jersey.media.multipart.FormDataContentDisposition
;
import
org.glassfish.jersey.media.multipart.FormDataParam
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.ws.rs.*
;
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
javax.ws.rs.core.Response
;
import
java.util.List
;
@Path
(
"mind"
)
@JaxrsDescribe
(
"脑图信息管理服务"
)
public
class
MindInfoAction
extends
BaseAction
{
private
StandardJaxrsActionProxy
proxy
=
new
StandardJaxrsActionProxy
(
ThisApplication
.
context
());
// private StandardJaxrsActionProxy proxy = new
// StandardJaxrsActionProxy(ThisApplication.context());
private
Logger
logger
=
LoggerFactory
.
getLogger
(
MindInfoAction
.
class
);
@JaxrsMethodDescribe
(
value
=
"根据ID获取脑图信息"
,
action
=
ActionMindGetWithId
.
class
)
...
...
@@ -41,8 +48,7 @@ public class MindInfoAction extends BaseAction {
EffectivePerson
effectivePerson
=
this
.
effectivePerson
(
request
);
ActionResult
<
ActionMindGetWithId
.
Wo
>
result
=
new
ActionResult
<>();
try
{
result
=
((
ActionMindGetWithId
)
proxy
.
getProxy
(
ActionMindGetWithId
.
class
)).
execute
(
request
,
id
,
effectivePerson
);
result
=
new
ActionMindGetWithId
().
execute
(
request
,
id
,
effectivePerson
);
}
catch
(
Exception
e
)
{
result
=
new
ActionResult
<>();
logger
.
error
(
e
,
effectivePerson
,
request
,
null
);
...
...
@@ -60,8 +66,7 @@ public class MindInfoAction extends BaseAction {
EffectivePerson
effectivePerson
=
this
.
effectivePerson
(
request
);
ActionResult
<
ActionMindIconGetWithId
.
Wo
>
result
=
new
ActionResult
<>();
try
{
result
=
((
ActionMindIconGetWithId
)
proxy
.
getProxy
(
ActionMindIconGetWithId
.
class
)).
execute
(
request
,
effectivePerson
,
id
);
result
=
new
ActionMindIconGetWithId
().
execute
(
request
,
effectivePerson
,
id
);
}
catch
(
Exception
e
)
{
result
=
new
ActionResult
<>();
logger
.
error
(
e
,
effectivePerson
,
request
,
null
);
...
...
@@ -79,8 +84,7 @@ public class MindInfoAction extends BaseAction {
EffectivePerson
effectivePerson
=
this
.
effectivePerson
(
request
);
ActionResult
<
List
<
ActionListVersionsWithMindId
.
Wo
>>
result
=
new
ActionResult
<>();
try
{
result
=
((
ActionListVersionsWithMindId
)
proxy
.
getProxy
(
ActionListVersionsWithMindId
.
class
))
.
execute
(
request
,
effectivePerson
,
id
);
result
=
new
ActionListVersionsWithMindId
().
execute
(
request
,
effectivePerson
,
id
);
}
catch
(
Exception
e
)
{
result
=
new
ActionResult
<>();
logger
.
error
(
e
,
effectivePerson
,
request
,
null
);
...
...
@@ -98,8 +102,7 @@ public class MindInfoAction extends BaseAction {
EffectivePerson
effectivePerson
=
this
.
effectivePerson
(
request
);
ActionResult
<
List
<
ActionListShareRecordsWithMindId
.
Wo
>>
result
=
new
ActionResult
<>();
try
{
result
=
((
ActionListShareRecordsWithMindId
)
proxy
.
getProxy
(
ActionListShareRecordsWithMindId
.
class
))
.
execute
(
request
,
effectivePerson
,
id
);
result
=
new
ActionListShareRecordsWithMindId
().
execute
(
request
,
effectivePerson
,
id
);
}
catch
(
Exception
e
)
{
result
=
new
ActionResult
<>();
logger
.
error
(
e
,
effectivePerson
,
request
,
null
);
...
...
@@ -119,8 +122,7 @@ public class MindInfoAction extends BaseAction {
EffectivePerson
effectivePerson
=
this
.
effectivePerson
(
request
);
ActionResult
<
List
<
ActionMyShareMindNextWithFilter
.
Wo
>>
result
=
new
ActionResult
<>();
try
{
result
=
((
ActionMyShareMindNextWithFilter
)
proxy
.
getProxy
(
ActionMyShareMindNextWithFilter
.
class
))
.
execute
(
request
,
effectivePerson
,
id
,
count
,
jsonElement
);
result
=
new
ActionMyShareMindNextWithFilter
().
execute
(
request
,
effectivePerson
,
id
,
count
,
jsonElement
);
}
catch
(
Exception
e
)
{
result
=
new
ActionResult
<>();
result
.
error
(
e
);
...
...
@@ -141,8 +143,7 @@ public class MindInfoAction extends BaseAction {
EffectivePerson
effectivePerson
=
this
.
effectivePerson
(
request
);
ActionResult
<
List
<
ActionMyRecycleNextWithFilter
.
Wo
>>
result
=
new
ActionResult
<>();
try
{
result
=
((
ActionMyRecycleNextWithFilter
)
proxy
.
getProxy
(
ActionMyRecycleNextWithFilter
.
class
))
.
execute
(
request
,
effectivePerson
,
id
,
count
,
jsonElement
);
result
=
new
ActionMyRecycleNextWithFilter
().
execute
(
request
,
effectivePerson
,
id
,
count
,
jsonElement
);
}
catch
(
Exception
e
)
{
result
=
new
ActionResult
<>();
result
.
error
(
e
);
...
...
@@ -163,8 +164,7 @@ public class MindInfoAction extends BaseAction {
EffectivePerson
effectivePerson
=
this
.
effectivePerson
(
request
);
ActionResult
<
List
<
ActionMyReciveMindNextWithFilter
.
Wo
>>
result
=
new
ActionResult
<>();
try
{
result
=
((
ActionMyReciveMindNextWithFilter
)
proxy
.
getProxy
(
ActionMyReciveMindNextWithFilter
.
class
))
.
execute
(
request
,
effectivePerson
,
id
,
count
,
jsonElement
);
result
=
new
ActionMyReciveMindNextWithFilter
().
execute
(
request
,
effectivePerson
,
id
,
count
,
jsonElement
);
}
catch
(
Exception
e
)
{
result
=
new
ActionResult
<>();
result
.
error
(
e
);
...
...
@@ -183,8 +183,7 @@ public class MindInfoAction extends BaseAction {
EffectivePerson
effectivePerson
=
this
.
effectivePerson
(
request
);
ActionResult
<
ActionMindViewWithId
.
Wo
>
result
=
new
ActionResult
<>();
try
{
result
=
((
ActionMindViewWithId
)
proxy
.
getProxy
(
ActionMindViewWithId
.
class
)).
execute
(
request
,
id
,
effectivePerson
);
result
=
new
ActionMindViewWithId
().
execute
(
request
,
id
,
effectivePerson
);
}
catch
(
Exception
e
)
{
result
=
new
ActionResult
<>();
logger
.
error
(
e
,
effectivePerson
,
request
,
null
);
...
...
@@ -202,8 +201,7 @@ public class MindInfoAction extends BaseAction {
EffectivePerson
effectivePerson
=
this
.
effectivePerson
(
request
);
ActionResult
<
ActionMindVersionViewWithId
.
Wo
>
result
=
new
ActionResult
<>();
try
{
result
=
((
ActionMindVersionViewWithId
)
proxy
.
getProxy
(
ActionMindVersionViewWithId
.
class
)).
execute
(
request
,
id
,
effectivePerson
);
result
=
new
ActionMindVersionViewWithId
().
execute
(
request
,
id
,
effectivePerson
);
}
catch
(
Exception
e
)
{
result
=
new
ActionResult
<>();
logger
.
error
(
e
,
effectivePerson
,
request
,
null
);
...
...
@@ -221,8 +219,7 @@ public class MindInfoAction extends BaseAction {
EffectivePerson
effectivePerson
=
this
.
effectivePerson
(
request
);
ActionResult
<
ActionMindSave
.
Wo
>
result
=
new
ActionResult
<>();
try
{
result
=
((
ActionMindSave
)
proxy
.
getProxy
(
ActionMindSave
.
class
)).
execute
(
request
,
effectivePerson
,
jsonElement
);
result
=
new
ActionMindSave
().
execute
(
request
,
effectivePerson
,
jsonElement
);
}
catch
(
Exception
e
)
{
result
=
new
ActionResult
<>();
logger
.
error
(
e
,
effectivePerson
,
request
,
null
);
...
...
@@ -243,8 +240,7 @@ public class MindInfoAction extends BaseAction {
ActionResult
<
ActionMindIconUpdate
.
Wo
>
result
=
new
ActionResult
<>();
EffectivePerson
effectivePerson
=
this
.
effectivePerson
(
request
);
try
{
result
=
((
ActionMindIconUpdate
)
proxy
.
getProxy
(
ActionMindIconUpdate
.
class
)).
execute
(
request
,
effectivePerson
,
mindId
,
size
,
bytes
,
disposition
);
result
=
new
ActionMindIconUpdate
().
execute
(
request
,
effectivePerson
,
mindId
,
size
,
bytes
,
disposition
);
}
catch
(
Exception
e
)
{
logger
.
error
(
e
,
effectivePerson
,
request
,
null
);
result
.
error
(
e
);
...
...
@@ -263,8 +259,7 @@ public class MindInfoAction extends BaseAction {
EffectivePerson
effectivePerson
=
this
.
effectivePerson
(
request
);
ActionResult
<
List
<
ActionMindListNextWithFilter
.
Wo
>>
result
=
new
ActionResult
<>();
try
{
result
=
((
ActionMindListNextWithFilter
)
proxy
.
getProxy
(
ActionMindListNextWithFilter
.
class
))
.
execute
(
request
,
id
,
count
,
jsonElement
,
effectivePerson
);
result
=
new
ActionMindListNextWithFilter
().
execute
(
request
,
id
,
count
,
jsonElement
,
effectivePerson
);
}
catch
(
Exception
e
)
{
result
=
new
ActionResult
<>();
result
.
error
(
e
);
...
...
@@ -283,8 +278,7 @@ public class MindInfoAction extends BaseAction {
EffectivePerson
effectivePerson
=
this
.
effectivePerson
(
request
);
ActionResult
<
ActionMindRestore
.
Wo
>
result
=
new
ActionResult
<>();
try
{
result
=
((
ActionMindRestore
)
proxy
.
getProxy
(
ActionMindRestore
.
class
)).
execute
(
request
,
effectivePerson
,
id
);
result
=
new
ActionMindRestore
().
execute
(
request
,
effectivePerson
,
id
);
}
catch
(
Exception
e
)
{
result
=
new
ActionResult
<>();
logger
.
error
(
e
,
effectivePerson
,
request
,
null
);
...
...
@@ -302,8 +296,7 @@ public class MindInfoAction extends BaseAction {
EffectivePerson
effectivePerson
=
this
.
effectivePerson
(
request
);
ActionResult
<
ActionMindShare
.
Wo
>
result
=
new
ActionResult
<>();
try
{
result
=
((
ActionMindShare
)
proxy
.
getProxy
(
ActionMindShare
.
class
)).
execute
(
request
,
effectivePerson
,
id
,
jsonElement
);
result
=
new
ActionMindShare
().
execute
(
request
,
effectivePerson
,
id
,
jsonElement
);
}
catch
(
Exception
e
)
{
result
=
new
ActionResult
<>();
logger
.
error
(
e
,
effectivePerson
,
request
,
null
);
...
...
@@ -321,8 +314,7 @@ public class MindInfoAction extends BaseAction {
EffectivePerson
effectivePerson
=
this
.
effectivePerson
(
request
);
ActionResult
<
ActionMindShareCancel
.
Wo
>
result
=
new
ActionResult
<>();
try
{
result
=
((
ActionMindShareCancel
)
proxy
.
getProxy
(
ActionMindShareCancel
.
class
)).
execute
(
request
,
effectivePerson
,
shareId
);
result
=
new
ActionMindShareCancel
().
execute
(
request
,
effectivePerson
,
shareId
);
}
catch
(
Exception
e
)
{
result
=
new
ActionResult
<>();
logger
.
error
(
e
,
effectivePerson
,
request
,
null
);
...
...
@@ -340,8 +332,7 @@ public class MindInfoAction extends BaseAction {
EffectivePerson
effectivePerson
=
this
.
effectivePerson
(
request
);
ActionResult
<
ActionMindDestroyFromNormal
.
Wo
>
result
=
new
ActionResult
<>();
try
{
result
=
((
ActionMindDestroyFromNormal
)
proxy
.
getProxy
(
ActionMindDestroyFromNormal
.
class
)).
execute
(
request
,
effectivePerson
,
id
);
result
=
new
ActionMindDestroyFromNormal
().
execute
(
request
,
effectivePerson
,
id
);
}
catch
(
Exception
e
)
{
result
=
new
ActionResult
<>();
logger
.
error
(
e
,
effectivePerson
,
request
,
null
);
...
...
@@ -359,8 +350,7 @@ public class MindInfoAction extends BaseAction {
EffectivePerson
effectivePerson
=
this
.
effectivePerson
(
request
);
ActionResult
<
ActionMindDestroyFromRecycle
.
Wo
>
result
=
new
ActionResult
<>();
try
{
result
=
((
ActionMindDestroyFromRecycle
)
proxy
.
getProxy
(
ActionMindDestroyFromRecycle
.
class
))
.
execute
(
request
,
effectivePerson
,
recycleId
);
result
=
new
ActionMindDestroyFromRecycle
().
execute
(
request
,
effectivePerson
,
recycleId
);
}
catch
(
Exception
e
)
{
result
=
new
ActionResult
<>();
logger
.
error
(
e
,
effectivePerson
,
request
,
null
);
...
...
@@ -378,8 +368,7 @@ public class MindInfoAction extends BaseAction {
EffectivePerson
effectivePerson
=
this
.
effectivePerson
(
request
);
ActionResult
<
ActionMindRecycle
.
Wo
>
result
=
new
ActionResult
<>();
try
{
result
=
((
ActionMindRecycle
)
proxy
.
getProxy
(
ActionMindRecycle
.
class
)).
execute
(
request
,
effectivePerson
,
id
);
result
=
new
ActionMindRecycle
().
execute
(
request
,
effectivePerson
,
id
);
}
catch
(
Exception
e
)
{
result
=
new
ActionResult
<>();
logger
.
error
(
e
,
effectivePerson
,
request
,
null
);
...
...
o2web/source/o2_core/o2.js
浏览文件 @
aaeb9f40
...
...
@@ -77,7 +77,7 @@ if (!window.Promise){
}
this
.
o2
=
window
.
o2
||
{};
this
.
o2
.
version
=
{
"
v
"
:
"
5.4.1
"
,
"
v
"
:
"
6.0
"
,
"
build
"
:
"
2020.06.12
"
,
"
info
"
:
"
O2OA 活力办公 创意无限. Copyright © 2020, o2oa.net O2 Team All rights reserved.
"
};
...
...
o2web/source/o2_core/o2/xDesktop/Default.js
浏览文件 @
aaeb9f40
...
...
@@ -1386,9 +1386,9 @@ o2.xDesktop.Default.StartMenu = new Class({
if
(
this
.
checkMenuItem
(
value
,
currentNames
)
)
this
.
createApplicationMenuItem
(
value
);
}.
bind
(
this
));
if
(
json_portal
&&
json_portal
.
length
)
json_portal
.
each
(
function
(
value
){
this
.
createPortalMenuItem
(
value
);
}.
bind
(
this
));
//
if (json_portal && json_portal.length) json_portal.each(function(value){
//
this.createPortalMenuItem(value);
//
}.bind(this));
if
(
json_portal
&&
json_portal
.
length
)
json_portal
.
each
(
function
(
value
){
value
.
type
=
"
portal
"
;
...
...
o2web/source/x_component_process_Work/Main.js
浏览文件 @
aaeb9f40
...
...
@@ -725,6 +725,8 @@ MWF.xApplication.process.Work.Main = new Class({
this
.
appForm
.
workAction
=
this
.
action
;
this
.
appForm
.
app
=
this
;
if
(
layout
.
desktop
.
type
!==
"
layout
"
)
layout
.
appForm
=
this
.
appForm
;
if
(
this
.
$events
&&
this
.
$events
.
queryLoadForm
){
this
.
appForm
.
addEvent
(
"
queryLoad
"
,
function
()
{
this
.
fireEvent
(
"
queryLoadForm
"
);
...
...
o2web/source/x_component_process_Xform/Documenteditor.js
浏览文件 @
aaeb9f40
...
...
@@ -1079,7 +1079,7 @@ MWF.xApplication.process.Xform.Documenteditor = MWF.APPDocumenteditor = new Cla
paddingTop
=
0
;
}
if
(
p
.
y
<
paddingTop
){
if
(
p
.
y
<
paddingTop
&&
this
.
toolNode
.
offsetParent
){
this
.
toolbarNode
.
inject
(
this
.
scrollNode
);
this
.
toolbarNode
.
setStyles
({
"
position
"
:
"
absolute
"
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录