Commit b6697b5f authored by 薛涛 Toby Xue's avatar 薛涛 Toby Xue 🆒

sdk

parent 021815ad
Pipeline #4017 canceled with stages
...@@ -6,18 +6,17 @@ ...@@ -6,18 +6,17 @@
<groupId>logwire</groupId> <groupId>logwire</groupId>
<artifactId>logwire-bo-sdk</artifactId> <artifactId>logwire-bo-sdk</artifactId>
<version>1.0</version> <version>1.0.0</version>
<build> <parent>
<plugins> <groupId>logwire</groupId>
<plugin> <artifactId>logwire-parent</artifactId>
<groupId>org.apache.maven.plugins</groupId> <version>1.4.0</version>
<artifactId>maven-compiler-plugin</artifactId> </parent>
<configuration> <properties>
<source>8</source> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<target>8</target> <java.version>1.8</java.version>
</configuration> <maven.compiler.target>1.8</maven.compiler.target>
</plugin> <maven.compiler.source>1.8</maven.compiler.source>
</plugins> </properties>
</build>
</project> </project>
\ No newline at end of file
package logwire.web.bo.annotation; package logwire.core.bo.annotation;
public @interface Array{ public @interface Array{
String label() default ""; String label() default "";
......
package logwire.web.bo.annotation; package logwire.core.bo.annotation;
public @interface AuxField { public @interface AuxField {
String label() default ""; String label() default "";
......
package logwire.web.bo.annotation; package logwire.core.bo.annotation;
import java.lang.annotation.ElementType; import java.lang.annotation.ElementType;
import java.lang.annotation.Retention; import java.lang.annotation.Retention;
......
package logwire.web.bo.annotation; package logwire.core.bo.annotation;
import java.lang.annotation.ElementType; import java.lang.annotation.ElementType;
import java.lang.annotation.Retention; import java.lang.annotation.Retention;
......
package logwire.web.bo.annotation; package logwire.core.bo.annotation;
import java.lang.annotation.*; import java.lang.annotation.*;
......
package logwire.web.bo.annotation; package logwire.core.bo.annotation;
import java.lang.annotation.ElementType; import java.lang.annotation.ElementType;
import java.lang.annotation.Retention; import java.lang.annotation.Retention;
......
package logwire.web.bo.annotation; package logwire.core.bo.annotation;
import logwire.web.bo.field.IChoice; import logwire.core.bo.field.IChoice;
import java.lang.annotation.ElementType; import java.lang.annotation.ElementType;
import java.lang.annotation.Retention; import java.lang.annotation.Retention;
......
package logwire.web.bo.annotation; package logwire.core.bo.annotation;
import java.lang.annotation.ElementType; import java.lang.annotation.ElementType;
import java.lang.annotation.Retention; import java.lang.annotation.Retention;
......
package logwire.web.bo.annotation; package logwire.core.bo.annotation;
public @interface Composite { public @interface Composite {
String label() default ""; String label() default "";
......
package logwire.web.bo.annotation; package logwire.core.bo.annotation;
import java.lang.annotation.ElementType; import java.lang.annotation.ElementType;
import java.lang.annotation.Retention; import java.lang.annotation.Retention;
......
package logwire.web.bo.annotation; package logwire.core.bo.annotation;
public @interface Item { public @interface Item {
String label() default ""; String label() default "";
......
package logwire.web.bo.annotation; package logwire.core.bo.annotation;
import logwire.web.bo.object.BizObject; import logwire.core.bo.object.BizObject;
import java.lang.annotation.ElementType; import java.lang.annotation.ElementType;
import java.lang.annotation.Retention; import java.lang.annotation.Retention;
......
package logwire.web.bo.annotation; package logwire.core.bo.annotation;
public @interface Many { public @interface Many {
String label() default ""; String label() default "";
......
package logwire.web.bo.annotation; package logwire.core.bo.annotation;
import logwire.web.bo.object.BizObject; import logwire.core.bo.object.BizObject;
import java.lang.annotation.ElementType; import java.lang.annotation.ElementType;
import java.lang.annotation.Retention; import java.lang.annotation.Retention;
......
package logwire.web.bo.annotation; package logwire.core.bo.annotation;
import java.lang.annotation.ElementType; import java.lang.annotation.ElementType;
import java.lang.annotation.Retention; import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy; import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target; import java.lang.annotation.Target;
@Target({ElementType.TYPE}) @Target({ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME) @Retention(RetentionPolicy.RUNTIME)
public @interface Operation { public @interface Operation {
String label() default ""; String label() default "";
OperationArg[] args(); OperationArg[] args() default {};
/** /**
* 对结果做线程缓存,当self、输入参数一致时直接返回上次计算结果 * 对结果做线程缓存,当self、输入参数一致时直接返回上次计算结果
*
* @return * @return
*/ */
boolean cached() default false; boolean cached() default false;
......
package logwire.web.bo.annotation; package logwire.core.bo.annotation;
/** /**
* Operation参数说明 * Operation参数说明
*/ */
public @interface OperationArg { public @interface OperationArg {
String name(); String name() default "";
String label() default ""; String label() default "";
} }
package logwire.web.bo.annotation; package logwire.core.bo.annotation;
public @interface OperationParameter { public @interface OperationParameter {
String label() default ""; String label() default "";
......
package logwire.web.bo.annotation; package logwire.core.bo.annotation;
public @interface SlaveMany { public @interface SlaveMany {
String label() default ""; String label() default "";
......
package logwire.web.bo.annotation; package logwire.core.bo.annotation;
public @interface Text { public @interface Text {
String label() default ""; String label() default "";
......
package logwire.web.bo.annotation; package logwire.core.bo.annotation;
import logwire.web.bo.object.BizObject; import logwire.core.bo.object.BizObject;
import java.lang.annotation.ElementType; import java.lang.annotation.ElementType;
import java.lang.annotation.Retention; import java.lang.annotation.Retention;
......
package logwire.web.bo.eventhandler; package logwire.core.bo.eventhandler;
import logwire.web.bo.object.BizObject; import logwire.core.bo.object.BizObject;
import java.util.List; import java.util.List;
public interface ListOperationEventHandler<X extends BizObject> { public interface ListOperationEventEventHandler<X extends BizObject> extends OperationEventHandler {
String getOperation(); String getOperation();
boolean isEnabled(); boolean isEnabled();
......
package logwire.web.bo.eventhandler; package logwire.core.bo.eventhandler;
import logwire.web.bo.object.BizObject; import logwire.core.bo.object.BizObject;
public interface ObjectOperationEventHandler<X extends BizObject> { public interface ObjectOperationEventEventHandler<X extends BizObject> extends OperationEventHandler {
String getOperation(); String getOperation();
boolean isEnabled(); boolean isEnabled();
......
package logwire.core.bo.eventhandler;
public interface OperationEventHandler {
}
package logwire.web.bo.eventhandler; package logwire.core.bo.eventhandler;
import logwire.web.bo.object.BizObject; import logwire.core.bo.object.BizObject;
public interface TypeOperationEventHandler<X extends BizObject> { public interface TypeOperationEventEventHandler<X extends BizObject> extends OperationEventHandler {
String getOperation(); String getOperation();
boolean isEnabled(); boolean isEnabled();
......
package logwire.web.bo.field; package logwire.core.bo.field;
public interface BizArray<X> extends Iterable<X> { public interface BizArray<X> extends Iterable<X> {
void add(X x); void add(X x);
......
package logwire.web.bo.field; package logwire.core.bo.field;
public interface BizComposite { public interface BizComposite {
} }
package logwire.web.bo.field; package logwire.core.bo.field;
import logwire.web.bo.object.BizObject; import logwire.core.bo.object.BizObject;
public interface BizExpando<X extends BizObject> extends BizComposite { public interface BizExpando<X extends BizObject> extends BizComposite {
......
package logwire.web.bo.field; package logwire.core.bo.field;
import logwire.web.bo.object.BizObject; import logwire.core.bo.object.BizObject;
import logwire.web.bo.list.BizList; import logwire.core.bo.list.BizList;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import java.util.Map; import java.util.Map;
......
package logwire.web.bo.field; package logwire.core.bo.field;
import logwire.web.bo.object.BizObject; import logwire.core.bo.object.BizObject;
import logwire.web.bo.list.BizList; import logwire.core.bo.list.BizList;
public interface BizMany<X extends BizObject> extends Iterable<Object> { public interface BizMany<X extends BizObject> extends Iterable<Object> {
void add(Long id); void add(Long id);
......
package logwire.web.bo.field; package logwire.core.bo.field;
import logwire.web.bo.object.ModelObject; import logwire.core.bo.object.ModelObject;
public interface BizOne<X extends ModelObject> { public interface BizOne<X extends ModelObject> {
Long getValue(); Long getValue();
......
package logwire.web.bo.field; package logwire.core.bo.field;
public interface BizText { public interface BizText {
String getValue(); String getValue();
......
package logwire.web.bo.field; package logwire.core.bo.field;
/** /**
* 枚举字典接口 * 枚举字典接口
......
package logwire.web.bo.handler; package logwire.core.bo.handler;
import logwire.web.bo.object.BizObject; import logwire.core.bo.object.BizObject;
import java.util.List; import java.util.List;
public interface ListOperationHandler<X extends BizObject> { public interface ListOperationHandler<X extends BizObject> extends OperationHandler {
String getOperation();
boolean isEnabled();
default String getQuery() {
return "";
}
default int getOrder() {
return 1000;
}
default boolean accept(List<X> xList, Object... args) { default boolean accept(List<X> xList, Object... args) {
return true; return true;
......
package logwire.core.bo.handler;
import logwire.core.bo.object.BizObject;
public interface ObjectOperationHandler<X extends BizObject> extends OperationHandler {
default boolean accept(X x, Object... args) {
return true;
}
Object execute(X x, Object... args);
}
package logwire.web.bo.handler; package logwire.core.bo.handler;
import logwire.web.bo.object.BizObject;
public interface ObjectOperationHandler<X extends BizObject> { public interface OperationHandler {
String getOperation(); String getOperation();
boolean isEnabled(); boolean isEnabled();
...@@ -11,13 +10,8 @@ public interface ObjectOperationHandler<X extends BizObject> { ...@@ -11,13 +10,8 @@ public interface ObjectOperationHandler<X extends BizObject> {
return ""; return "";
} }
default int getOrder() { default Integer getOrder() {
return 1000; return 1000;
} }
default boolean accept(X x, Object... args) {
return true;
}
Object execute(X x, Object... args);
} }
package logwire.web.bo.handler; package logwire.core.bo.handler;
import logwire.web.bo.object.BizObject; import logwire.core.bo.object.BizObject;
public interface TypeOperationHandler<X extends BizObject> { public interface TypeOperationHandler<X extends BizObject> extends OperationHandler {
String getOperation();
boolean isEnabled();
default int getOrder() {
return 1000;
}
default boolean accept(Class<X> xClass, Object... args) { default boolean accept(Class<X> xClass, Object... args) {
return true; return true;
......
package logwire.web.bo.list; package logwire.core.bo.list;
import logwire.web.bo.object.BizObject; import logwire.core.bo.object.BizObject;
import java.util.Map; import java.util.Map;
......
package logwire.web.bo.object; package logwire.core.bo.object;
import logwire.web.bo.annotation.Column;
import logwire.web.bo.annotation.Composite;
import logwire.web.bo.field.BizExpando;
import logwire.web.bo.field.BizOne;
import logwire.core.bo.annotation.Column;
import logwire.core.bo.annotation.Composite;
import logwire.core.bo.field.BizExpando;
import logwire.core.bo.field.BizOne;
import java.time.OffsetDateTime; import java.time.OffsetDateTime;
import java.util.Map; import java.util.Map;
......
package logwire.web.bo.object; package logwire.core.bo.object;
/** /**
*考虑兼容平台的XML Model *考虑兼容平台的XML Model
......
package logwire.web.bo.object; package logwire.core.bo.object;
import logwire.web.bo.annotation.BizModel; import logwire.core.bo.annotation.BizModel;
import logwire.web.bo.annotation.Column; import logwire.core.bo.annotation.Column;
@BizModel(label = "用户") @BizModel(label = "用户")
public abstract class User extends ModelObject { public abstract class User extends ModelObject {
......
package logwire.web.bo.select; package logwire.core.bo.select;
public interface BizChildSelect extends BizSelect { public interface BizChildSelect extends BizSelect {
} }
package logwire.web.bo.select; package logwire.core.bo.select;
public interface BizSelect { public interface BizSelect {
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment