Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
logwire-bo-sdk
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
薛涛 Toby Xue
logwire-bo-sdk
Commits
294a1b11
Commit
294a1b11
authored
Feb 09, 2021
by
姜逸青 Jameson Jiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#1971 文档更新完成
parent
fbe6ce2b
Pipeline
#5711
failed with stages
Changes
13
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
69 additions
and
89 deletions
+69
-89
OperationEventHandler.java
...a/logwire/core/bo/eventhandler/OperationEventHandler.java
+0
-11
BizObjectFactoryEventHandler.java
...logwire/core/bo/factory/BizObjectFactoryEventHandler.java
+1
-1
BizObjectFactoryHandler.java
...java/logwire/core/bo/factory/BizObjectFactoryHandler.java
+1
-1
Handler.java
src/main/java/logwire/core/bo/handler/Handler.java
+0
-36
ListOperationHandler.java
...in/java/logwire/core/bo/handler/ListOperationHandler.java
+0
-18
OperationHandler.java
src/main/java/logwire/core/bo/handler/OperationHandler.java
+0
-6
BizList.java
src/main/java/logwire/core/bo/list/BizList.java
+19
-11
DefaultListOperationProvider.java
.../core/bo/operation/list/DefaultListOperationProvider.java
+0
-2
ListOperationEventHandler.java
...ire/core/bo/operation/list/ListOperationEventHandler.java
+14
-0
ListOperationHandler.java
.../logwire/core/bo/operation/list/ListOperationHandler.java
+20
-0
SmartListOperationHandler.java
...ire/core/bo/operation/list/SmartListOperationHandler.java
+12
-0
ObjectOperationEventHandler.java
...core/bo/operation/object/ObjectOperationEventHandler.java
+1
-2
ObjectOperationHandler.java
...wire/core/bo/operation/object/ObjectOperationHandler.java
+1
-1
No files found.
src/main/java/logwire/core/bo/eventhandler/OperationEventHandler.java
deleted
100644 → 0
View file @
fbe6ce2b
package
logwire
.
core
.
bo
.
eventhandler
;
import
logwire.core.bo.handler.Handler
;
public
interface
OperationEventHandler
extends
Handler
{
default
boolean
isAfter
()
{
return
true
;
}
}
src/main/java/logwire/core/bo/factory/BizObjectFactoryEventHandler.java
View file @
294a1b11
...
...
@@ -3,7 +3,7 @@ package logwire.core.bo.factory;
import
logwire.core.bo.object.BizObject
;
public
interface
BizObjectFactoryEventHandler
<
X
extends
BizObject
>
{
String
get
Operation
Name
();
String
getName
();
void
doBefore
(
Class
<
X
>
xClass
,
Object
...
args
);
...
...
src/main/java/logwire/core/bo/factory/BizObjectFactoryHandler.java
View file @
294a1b11
...
...
@@ -4,7 +4,7 @@ import logwire.core.bo.object.BizObject;
public
interface
BizObjectFactoryHandler
<
X
extends
BizObject
>
{
String
get
Operation
Name
();
String
getName
();
// 取消enable这个参数,配置文件和程序里都有配置会导致混淆
// 只会从配置文件中读取,只有在配置文件中配置的,才会进行加载
...
...
src/main/java/logwire/core/bo/handler/Handler.java
deleted
100644 → 0
View file @
fbe6ce2b
package
logwire
.
core
.
bo
.
handler
;
public
interface
Handler
{
/**
* 操作名称
*
* @return
*/
String
getOperation
();
/**
* 是否启用
*
* @return
*/
boolean
isEnabled
();
/**
*
* //TODO getQuery???
* @return
*/
default
String
getQuery
()
{
return
""
;
}
/**
* 优先级, 值越小优先级越高
*
* @return
*/
default
Integer
getOrder
()
{
return
1000
;
}
}
src/main/java/logwire/core/bo/handler/ListOperationHandler.java
deleted
100644 → 0
View file @
fbe6ce2b
package
logwire
.
core
.
bo
.
handler
;
import
logwire.core.bo.object.BizObject
;
import
java.util.List
;
public
interface
ListOperationHandler
<
X
extends
BizObject
>
extends
OperationHandler
{
default
String
getQuery
()
{
return
""
;
}
default
boolean
accept
(
List
<
X
>
xList
,
Object
...
args
)
{
return
true
;
}
Object
execute
(
List
<
X
>
xList
,
Object
...
args
);
}
src/main/java/logwire/core/bo/handler/OperationHandler.java
deleted
100644 → 0
View file @
fbe6ce2b
package
logwire
.
core
.
bo
.
handler
;
public
interface
OperationHandler
extends
Handler
{
}
src/main/java/logwire/core/bo/list/BizList.java
View file @
294a1b11
package
logwire
.
core
.
bo
.
list
;
import
logwire.core.bo.annotation.Operation
;
import
logwire.core.bo.object.BizObject
;
import
logwire.core.bo.operation.list.DefaultListOperationProvider
;
import
java.util.Map
;
public
interface
BizList
<
X
extends
BizObject
>
extends
Iterable
<
X
>
{
public
abstract
class
BizList
<
X
extends
BizObject
>
implements
Iterable
<
X
>,
DefaultListOperationProvider
<
X
>
{
De
@Operation
(
name
=
"findById"
)
abstract
X
findById
(
Long
id
);
X
findOne
(
String
field
,
Object
value
);
@Operation
(
name
=
"findOne"
)
abstract
X
findOne
(
String
field
,
Object
value
);
X
findOne
(
Map
fields
);
@Operation
(
name
=
"findOneByMap"
)
abstract
X
findOneByMap
(
Map
fields
);
/* 暂不支持lql
X find(String query);
*/
@Operation
(
name
=
"create"
)
abstract
X
create
();
X
create
();
@Operation
(
name
=
"createByMap"
)
abstract
X
createByMap
(
Map
fields
);
X
create
(
Map
fields
);
@Operation
(
name
=
"find"
)
abstract
BizList
<
X
>
find
(
String
field
,
Object
value
);
BizList
<
X
>
find
(
String
field
,
Object
value
);
BizList
<
X
>
find
(
Map
fields
);
@Operation
(
name
=
"findByMap"
)
abstract
BizList
<
X
>
findByMap
(
Map
fields
);
/* 暂不支持lql
BizList<X> find(String query);
*/
BizList
<
X
>
findAll
();
@Operation
(
name
=
"findAll"
)
abstract
BizList
<
X
>
findAll
();
}
\ No newline at end of file
src/main/java/logwire/core/bo/operation/list/DefaultListOperationProvider.java
View file @
294a1b11
...
...
@@ -7,8 +7,6 @@ import logwire.core.bo.object.BizObject;
//所有BO Object 默认ListOperation定义
@ListOperationProvider
(
type
=
BizObject
.
class
)
public
interface
DefaultListOperationProvider
<
X
extends
BizObject
>
{
@Operation
(
name
=
"getProvider"
)
DefaultListOperationProvider
<
X
>
getProvider
();
@Operation
(
name
=
"save"
)
void
save
();
@Operation
(
name
=
"delete"
)
...
...
src/main/java/logwire/core/bo/
eventhandler
/ListOperationEventHandler.java
→
src/main/java/logwire/core/bo/
operation/list
/ListOperationEventHandler.java
View file @
294a1b11
package
logwire
.
core
.
bo
.
eventhandler
;
package
logwire
.
core
.
bo
.
operation
.
list
;
import
logwire.core.bo.list.BizList
;
import
logwire.core.bo.object.BizObject
;
import
java.util.List
;
public
interface
ListOperationEventHandler
<
X
extends
BizObject
>
extends
OperationEventHandler
{
default
String
getQuery
()
{
return
""
;
}
default
void
doBefore
(
List
<
X
>
xList
,
Object
...
args
)
{
public
interface
ListOperationEventHandler
<
X
extends
BizObject
>
{
String
getName
();
default
void
doBefore
(
BizList
<
X
>
xList
,
Object
...
args
){
//调用行为同名方法
}
default
void
doAfter
(
List
<
X
>
xList
,
Object
result
,
Object
...
args
)
{
default
void
doAfter
(
BizList
<
X
>
xList
,
Object
result
,
Object
...
args
){
//调用行为同名方法
}
}
\ No newline at end of file
}
src/main/java/logwire/core/bo/operation/list/ListOperationHandler.java
0 → 100644
View file @
294a1b11
package
logwire
.
core
.
bo
.
operation
.
list
;
import
logwire.core.bo.list.BizList
;
import
logwire.core.bo.object.BizObject
;
public
interface
ListOperationHandler
<
X
extends
BizObject
>
{
String
getName
();
/**
boolean isEnabled();
String getQuery() default "";
defalut int getOrder(){return 1000;}
**/
default
boolean
accept
(
BizList
<
X
>
xList
,
Object
...
args
)
{
return
true
;
}
Object
execute
(
BizList
<
X
>
xList
,
Object
...
args
);
}
src/main/java/logwire/core/bo/operation/list/SmartListOperationHandler.java
0 → 100644
View file @
294a1b11
package
logwire
.
core
.
bo
.
operation
.
list
;
import
logwire.core.bo.list.BizList
;
import
logwire.core.bo.object.BizObject
;
public
interface
SmartListOperationHandler
<
X
extends
BizObject
>
extends
ListOperationHandler
<
X
>
{
default
Object
execute
(
BizList
<
X
>
xList
,
Object
...
args
)
{
//调用与Operation同名方法
//目的增加代码可读性
return
null
;
}
}
src/main/java/logwire/core/bo/operation/object/ObjectOperationEventHandler.java
View file @
294a1b11
...
...
@@ -3,8 +3,7 @@ package logwire.core.bo.operation.object;
import
logwire.core.bo.object.BizObject
;
public
interface
ObjectOperationEventHandler
<
X
extends
BizObject
>
{
String
getOperationName
();
default
boolean
isAfter
()
{
return
true
;}
String
getName
();
default
void
doBefore
(
X
x
,
Object
...
args
){
//调用行为同名方法
}
...
...
src/main/java/logwire/core/bo/operation/object/ObjectOperationHandler.java
View file @
294a1b11
...
...
@@ -3,7 +3,7 @@ package logwire.core.bo.operation.object;
import
logwire.core.bo.object.BizObject
;
public
interface
ObjectOperationHandler
<
X
extends
BizObject
>
{
String
get
Operation
Name
();
String
getName
();
/*boolean isEnabled();
default int getOrder(){return 1000;}*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment