Skip to content

Commit

Permalink
Merge branch '1.2.0-coding'
Browse files Browse the repository at this point in the history
# Conflicts:
#	README.md
  • Loading branch information
admin-kowalski committed Apr 10, 2023
2 parents b343527 + 0796265 commit 1fbeae0
Show file tree
Hide file tree
Showing 83 changed files with 2,073 additions and 715 deletions.
4 changes: 2 additions & 2 deletions ice-client-spring-boot-autoconfigure/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.waitmoon.ice</groupId>
<artifactId>ice</artifactId>
<version>1.1.0</version>
<version>1.2.0</version>
</parent>
<packaging>jar</packaging>
<artifactId>ice-client-spring-boot-autoconfigure</artifactId>
Expand All @@ -16,7 +16,7 @@
<dependency>
<groupId>com.waitmoon.ice</groupId>
<artifactId>ice-client</artifactId>
<version>1.1.0</version>
<version>1.2.0</version>
</dependency>
</dependencies>

Expand Down
4 changes: 2 additions & 2 deletions ice-client-spring-boot-starter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.waitmoon.ice</groupId>
<artifactId>ice</artifactId>
<version>1.1.0</version>
<version>1.2.0</version>
</parent>
<packaging>jar</packaging>
<artifactId>ice-client-spring-boot-starter</artifactId>
Expand All @@ -16,7 +16,7 @@
<dependency>
<groupId>com.waitmoon.ice</groupId>
<artifactId>ice-client-spring-boot-autoconfigure</artifactId>
<version>1.1.0</version>
<version>1.2.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
Expand Down
4 changes: 2 additions & 2 deletions ice-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.waitmoon.ice</groupId>
<artifactId>ice</artifactId>
<version>1.1.0</version>
<version>1.2.0</version>
</parent>
<packaging>jar</packaging>
<artifactId>ice-client</artifactId>
Expand All @@ -16,7 +16,7 @@
<dependency>
<groupId>com.waitmoon.ice</groupId>
<artifactId>ice-core</artifactId>
<version>1.1.0</version>
<version>1.2.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
import org.springframework.context.annotation.DependsOn;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
* waiting ice nio client init
*
Expand All @@ -19,7 +17,7 @@
@DependsOn("iceSpringBeanFactory")
public class IceNioClientInit implements InitializingBean, DisposableBean {

@Resource
@Autowired
private IceClientProperties properties;

private IceNioClient iceNioClient;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
/**
* use AutowireCapableBeanFactory
* for autowired spring beans for leaf node
*
* @author waitmoon
*/
@Component
Expand Down
2 changes: 1 addition & 1 deletion ice-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.waitmoon.ice</groupId>
<artifactId>ice</artifactId>
<version>1.1.0</version>
<version>1.2.0</version>
</parent>

<artifactId>ice-common</artifactId>
Expand Down
12 changes: 12 additions & 0 deletions ice-common/src/main/java/com/ice/common/constant/Constant.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package com.ice.common.constant;

public final class Constant {
public static final String REGEX_COMMA = ",";

public static String removeLast(StringBuilder sb) {
if (sb == null || sb.length() == 0) {
return "";
}
return sb.substring(0, sb.length() - 1);
}
}
2 changes: 2 additions & 0 deletions ice-common/src/main/java/com/ice/common/dto/IceConfDto.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ public final class IceConfDto {

private Byte debug;

private Byte errorState;

private Boolean inverse;

private String name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ public enum NodeRunStateEnum {
this.state = state;
}

public static NodeRunStateEnum getEnum(byte state) {
public static NodeRunStateEnum getEnumDefaultShutdown(Byte state) {
if (state == null) {
//default shutdown
return SHUT_DOWN;
}
return MAP.get(state);
}

Expand Down
19 changes: 12 additions & 7 deletions ice-common/src/main/java/com/ice/common/model/IceShowNode.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.ice.common.model;

import com.ice.common.enums.NodeRunStateEnum;
import lombok.Data;

import java.util.List;
Expand All @@ -11,7 +10,7 @@
@Data
public class IceShowNode {

private NodeConf showConf;
private NodeShowConf showConf;

private IceShowNode forward;

Expand All @@ -33,20 +32,20 @@ public class IceShowNode {

private Byte timeType;

private Boolean edit;

/**
* @author waitmoon
*/
@Data
public static final class NodeConf {
public static final class NodeShowConf {
private String uniqueKey;

private Long nodeId;

private Boolean debug;

private Boolean inverse;
private Byte errorState;

private NodeRunStateEnum errorStateEnum;
private Boolean inverse;

private Byte nodeType;

Expand All @@ -57,5 +56,11 @@ public static final class NodeConf {
private String confName;

private String confField;
//updating or not
private Boolean updating;

private Boolean haveMeta;

private LeafNodeInfo nodeInfo;
}
}
16 changes: 8 additions & 8 deletions ice-common/src/main/java/com/ice/common/model/LeafNodeInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,15 @@
*/
@Data
public final class LeafNodeInfo {
private byte type;
private Byte type;
private String clazz;
private String name;
private String desc;
private List<FieldInfo> fields;
private List<IceFieldInfo> iceFields;
private List<IceFieldInfo> hideFields;

/**
* @author waitmoon
*/
@Data
public static class FieldInfo {
public static class IceFieldInfo {
//field name
private String field;
//name
Expand All @@ -28,7 +26,9 @@ public static class FieldInfo {
private String desc;
//client type clazz name, first from config, then declared type
private String type;
//value of json while show client conf
private String value;

//assemble in server admin node conf
private Object value; //json value for web
private Boolean valueNull;
}
}
86 changes: 0 additions & 86 deletions ice-common/src/main/java/com/ice/common/utils/JacksonUtils.java

This file was deleted.

4 changes: 2 additions & 2 deletions ice-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.waitmoon.ice</groupId>
<artifactId>ice</artifactId>
<version>1.1.0</version>
<version>1.2.0</version>
</parent>
<packaging>jar</packaging>
<artifactId>ice-core</artifactId>
Expand All @@ -16,7 +16,7 @@
<dependency>
<groupId>com.waitmoon.ice</groupId>
<artifactId>ice-common</artifactId>
<version>1.1.0</version>
<version>1.2.0</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
Expand Down
2 changes: 1 addition & 1 deletion ice-core/src/main/java/com/ice/core/IceDispatcher.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.ice.core;


import com.ice.common.utils.JacksonUtils;
import com.ice.core.base.BaseNode;
import com.ice.core.cache.IceConfCache;
import com.ice.core.cache.IceHandlerCache;
Expand All @@ -10,6 +9,7 @@
import com.ice.core.context.IceRoam;
import com.ice.core.handler.IceHandler;
import com.ice.core.utils.IceExecutor;
import com.ice.core.utils.JacksonUtils;
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;

Expand Down
15 changes: 15 additions & 0 deletions ice-core/src/main/java/com/ice/core/annotation/IceIgnore.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package com.ice.core.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
* @author waitmoon
* ignore node/filed
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.FIELD, ElementType.TYPE})
public @interface IceIgnore {
}
3 changes: 0 additions & 3 deletions ice-core/src/main/java/com/ice/core/base/BaseLeaf.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,4 @@ protected NodeRunStateEnum processNode(IceContext ctx) {
* process leaf
*/
protected abstract NodeRunStateEnum doLeaf(IceContext ctx);

public void afterPropertiesSet() {
}
}
Loading

0 comments on commit 1fbeae0

Please sign in to comment.