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
f09f1d0f
Commit
f09f1d0f
authored
Nov 30, 2020
by
薛涛 Toby Xue
🆒
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
load handler
parent
b6697b5f
Pipeline
#4023
canceled with stages
Changes
8
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
69 additions
and
37 deletions
+69
-37
ListOperationEventHandler.java
...gwire/core/bo/eventhandler/ListOperationEventHandler.java
+1
-12
ObjectOperationEventHandler.java
...ire/core/bo/eventhandler/ObjectOperationEventHandler.java
+1
-12
OperationEventHandler.java
...a/logwire/core/bo/eventhandler/OperationEventHandler.java
+8
-1
TypeOperationEventHandler.java
...gwire/core/bo/eventhandler/TypeOperationEventHandler.java
+14
-0
Handler.java
src/main/java/logwire/core/bo/handler/Handler.java
+36
-0
ListOperationHandler.java
...in/java/logwire/core/bo/handler/ListOperationHandler.java
+4
-0
ObjectOperationHandler.java
.../java/logwire/core/bo/handler/ObjectOperationHandler.java
+4
-0
OperationHandler.java
src/main/java/logwire/core/bo/handler/OperationHandler.java
+1
-12
No files found.
src/main/java/logwire/core/bo/eventhandler/ListOperationEvent
Event
Handler.java
→
src/main/java/logwire/core/bo/eventhandler/ListOperationEventHandler.java
View file @
f09f1d0f
...
@@ -4,23 +4,12 @@ import logwire.core.bo.object.BizObject;
...
@@ -4,23 +4,12 @@ import logwire.core.bo.object.BizObject;
import
java.util.List
;
import
java.util.List
;
public
interface
ListOperationEventEventHandler
<
X
extends
BizObject
>
extends
OperationEventHandler
{
public
interface
ListOperationEventHandler
<
X
extends
BizObject
>
extends
OperationEventHandler
{
String
getOperation
();
boolean
isEnabled
();
default
String
getQuery
()
{
default
String
getQuery
()
{
return
""
;
return
""
;
}
}
default
boolean
isAfter
()
{
return
true
;
}
default
int
getOrder
()
{
return
1000
;
}
default
void
doBefore
(
List
<
X
>
xList
,
Object
...
args
)
{
default
void
doBefore
(
List
<
X
>
xList
,
Object
...
args
)
{
//调用行为同名方法
//调用行为同名方法
}
}
...
...
src/main/java/logwire/core/bo/eventhandler/ObjectOperationEvent
Event
Handler.java
→
src/main/java/logwire/core/bo/eventhandler/ObjectOperationEventHandler.java
View file @
f09f1d0f
...
@@ -2,23 +2,12 @@ package logwire.core.bo.eventhandler;
...
@@ -2,23 +2,12 @@ package logwire.core.bo.eventhandler;
import
logwire.core.bo.object.BizObject
;
import
logwire.core.bo.object.BizObject
;
public
interface
ObjectOperationEventEventHandler
<
X
extends
BizObject
>
extends
OperationEventHandler
{
public
interface
ObjectOperationEventHandler
<
X
extends
BizObject
>
extends
OperationEventHandler
{
String
getOperation
();
boolean
isEnabled
();
default
String
getQuery
()
{
default
String
getQuery
()
{
return
""
;
return
""
;
}
}
default
boolean
isAfter
()
{
return
true
;
}
default
int
getOrder
()
{
return
1000
;
}
default
void
doBefore
(
X
x
,
Object
...
args
)
{
default
void
doBefore
(
X
x
,
Object
...
args
)
{
//调用行为同名方法
//调用行为同名方法
}
}
...
...
src/main/java/logwire/core/bo/eventhandler/OperationEventHandler.java
View file @
f09f1d0f
package
logwire
.
core
.
bo
.
eventhandler
;
package
logwire
.
core
.
bo
.
eventhandler
;
public
interface
OperationEventHandler
{
import
logwire.core.bo.handler.Handler
;
public
interface
OperationEventHandler
extends
Handler
{
default
boolean
isAfter
()
{
return
true
;
}
}
}
src/main/java/logwire/core/bo/eventhandler/TypeOperationEvent
Event
Handler.java
→
src/main/java/logwire/core/bo/eventhandler/TypeOperationEventHandler.java
View file @
f09f1d0f
...
@@ -2,22 +2,7 @@ package logwire.core.bo.eventhandler;
...
@@ -2,22 +2,7 @@ package logwire.core.bo.eventhandler;
import
logwire.core.bo.object.BizObject
;
import
logwire.core.bo.object.BizObject
;
public
interface
TypeOperationEventEventHandler
<
X
extends
BizObject
>
extends
OperationEventHandler
{
public
interface
TypeOperationEventHandler
<
X
extends
BizObject
>
extends
OperationEventHandler
{
String
getOperation
();
boolean
isEnabled
();
default
String
getQuery
()
{
return
""
;
}
default
boolean
isAfter
()
{
return
true
;
}
default
int
getOrder
()
{
return
1000
;
}
default
void
doBefore
(
Class
<
X
>
xClass
,
Object
...
args
)
{
default
void
doBefore
(
Class
<
X
>
xClass
,
Object
...
args
)
{
//调用行为同名方法
//调用行为同名方法
...
...
src/main/java/logwire/core/bo/handler/Handler.java
0 → 100644
View file @
f09f1d0f
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
View file @
f09f1d0f
...
@@ -6,6 +6,10 @@ import java.util.List;
...
@@ -6,6 +6,10 @@ import java.util.List;
public
interface
ListOperationHandler
<
X
extends
BizObject
>
extends
OperationHandler
{
public
interface
ListOperationHandler
<
X
extends
BizObject
>
extends
OperationHandler
{
default
String
getQuery
()
{
return
""
;
}
default
boolean
accept
(
List
<
X
>
xList
,
Object
...
args
)
{
default
boolean
accept
(
List
<
X
>
xList
,
Object
...
args
)
{
return
true
;
return
true
;
}
}
...
...
src/main/java/logwire/core/bo/handler/ObjectOperationHandler.java
View file @
f09f1d0f
...
@@ -4,6 +4,10 @@ import logwire.core.bo.object.BizObject;
...
@@ -4,6 +4,10 @@ import logwire.core.bo.object.BizObject;
public
interface
ObjectOperationHandler
<
X
extends
BizObject
>
extends
OperationHandler
{
public
interface
ObjectOperationHandler
<
X
extends
BizObject
>
extends
OperationHandler
{
default
String
getQuery
()
{
return
""
;
}
default
boolean
accept
(
X
x
,
Object
...
args
)
{
default
boolean
accept
(
X
x
,
Object
...
args
)
{
return
true
;
return
true
;
}
}
...
...
src/main/java/logwire/core/bo/handler/OperationHandler.java
View file @
f09f1d0f
package
logwire
.
core
.
bo
.
handler
;
package
logwire
.
core
.
bo
.
handler
;
public
interface
OperationHandler
{
public
interface
OperationHandler
extends
Handler
{
String
getOperation
();
boolean
isEnabled
();
default
String
getQuery
()
{
return
""
;
}
default
Integer
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