Skip to content

Commit

Permalink
Merge pull request #9 from OpenMetaInfo/starters
Browse files Browse the repository at this point in the history
Upgrade to V0.2.0
  • Loading branch information
roganw authored Jul 22, 2024
2 parents 3ad15d4 + 5054f87 commit b708bcc
Show file tree
Hide file tree
Showing 110 changed files with 3,461 additions and 107 deletions.
6 changes: 3 additions & 3 deletions apps/demo-app/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<artifactId>apps</artifactId>
<groupId>info.openmeta</groupId>
<version>0.1.8</version>
<version>0.2.0</version>
</parent>

<artifactId>demo-app</artifactId>
Expand All @@ -15,8 +15,8 @@
<dependencies>
<dependency>
<groupId>info.openmeta</groupId>
<artifactId>web</artifactId>
<version>${project.version}</version>
<artifactId>metadata-starter</artifactId>
<version>0.2.0</version>
</dependency>

</dependencies>
Expand Down
28 changes: 14 additions & 14 deletions apps/demo-app/src/main/resources/application-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,17 @@ spring:
# index:
# changelog: demo_dev_changelog

#rocketmq:
# name-server: 127.0.0.1:9876
# producer:
# group: my-producer-group
# send-message-timeout: 3000
# consumer:
# group: my-consumer-group
# topics:
# cron-task:
# change-log:
# flow-async-task:
# flow-event:
# common-log:
# reload-metadata:
rocketmq:
name-server: 127.0.0.1:9876
producer:
group: my-producer-group
send-message-timeout: 3000
consumer:
group: my-consumer-group
topics:
cron-task:
change-log:
flow-async-task:
flow-event:
common-log:
reload-metadata:
2 changes: 1 addition & 1 deletion apps/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<artifactId>openmeta</artifactId>
<groupId>info.openmeta</groupId>
<version>0.1.8</version>
<version>0.2.0</version>
</parent>

<artifactId>apps</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion framework/base/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>info.openmeta</groupId>
<artifactId>framework</artifactId>
<version>0.1.8</version>
<version>0.2.0</version>
</parent>

<artifactId>base</artifactId>
Expand Down
6 changes: 1 addition & 5 deletions framework/orm/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>info.openmeta</groupId>
<artifactId>framework</artifactId>
<version>0.1.8</version>
<version>0.2.0</version>
</parent>

<artifactId>orm</artifactId>
Expand Down Expand Up @@ -61,10 +61,6 @@
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
<exclusion>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
</exclusion>
<exclusion>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java-util</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,26 +1,15 @@
package info.openmeta.framework.orm.constant;

import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;

import java.time.LocalDate;
import java.util.Map;
import java.util.Set;

/**
* Model constant
*/
public interface ModelConstant {

/** Version control model mapping relationship between design state and runtime state */
Map<String, String> VERSION_CONTROL_MODELS = ImmutableMap.<String, String>builder()
.put("DesignModel", "MetaModel")
.put("DesignField", "MetaField")
.put("DesignModelIndex", "SysModelIndex")
.put("DesignMenu", "SysMenu")
.put("DesignView", "SysView")
.build();

/** Model attribute constants */
String ID = "id";
String UUID = "uuid";
Expand Down
2 changes: 1 addition & 1 deletion framework/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>info.openmeta</groupId>
<artifactId>openmeta</artifactId>
<version>0.1.8</version>
<version>0.2.0</version>
</parent>

<artifactId>framework</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion framework/web/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>info.openmeta</groupId>
<artifactId>framework</artifactId>
<version>0.1.8</version>
<version>0.2.0</version>
</parent>

<artifactId>web</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package info.openmeta.framework.web.config;

import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;

public class RestTemplateConfig {

@Bean
public RestTemplate restTemplate() {
return new RestTemplate();
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
package info.openmeta.framework.web.controller.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;

import jakarta.validation.constraints.NotEmpty;

/**
* Simple VO of a modelName and a fieldName
*/
Expand All @@ -13,11 +12,11 @@
public class ModelField {

@Schema(description = "Model name")
@NotEmpty(message = "The model name cannot be empty!")
@NotBlank(message = "The model name cannot be empty!")
private String model;

@Schema(description = "Field name")
@NotEmpty(message = "The field name cannot be empty!")
@NotBlank(message = "The field name cannot be empty!")
private String field;

}
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package info.openmeta.framework.web.controller.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;

import jakarta.validation.constraints.NotEmpty;
import java.util.Set;

/**
Expand All @@ -14,7 +14,7 @@
public class ModelFields {

@Schema(description = "Model name")
@NotEmpty(message = "The model name cannot be empty!")
@NotBlank(message = "The model name cannot be empty!")
private String model;

@Schema(description = "Field names. If it is empty, all fields meet the conditions by default.")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package info.openmeta.framework.web.dto;

import info.openmeta.framework.orm.enums.FileType;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class FileInfo {

private FileType fileType;

private String content;

}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package info.openmeta.framework.web.bo;
package info.openmeta.framework.web.dto;

import lombok.Data;
import lombok.NoArgsConstructor;
Expand All @@ -10,15 +10,20 @@
import java.util.Map;

/**
* Runtime model upgrade package
* Metadata upgrade package
*/
@Data
@NoArgsConstructor
public class UpgradeModelPackage implements Serializable {
public class MetadataUpgradePackage implements Serializable {

@Serial
private static final long serialVersionUID = 1L;

private String modelName;

private List<Map<String, Object>> createRows = new ArrayList<>();

private List<Map<String, Object>> updateRows = new ArrayList<>();
private List<String> deleteCodes = new ArrayList<>();

private List<Serializable> deleteCodes = new ArrayList<>();
}
Loading

0 comments on commit b708bcc

Please sign in to comment.