Skip to content

Commit

Permalink
Feat #192: Added logo and description fields
Browse files Browse the repository at this point in the history
  • Loading branch information
fjlopez committed Oct 24, 2024
1 parent 2d32447 commit c2d151c
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ public class ApplicationDto {
private String srs;
@JsonProperty("situation-map")
private String situationMap;
private String logo;
private String description;

// The following fields are related to the Territory

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@
public class ApplicationDtoLittle {
private int id;
private String title;
private String logo;
private String description;
}
14 changes: 14 additions & 0 deletions src/main/java/org/sitmun/domain/application/Application.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import org.sitmun.domain.cartography.permission.CartographyPermission;
import org.sitmun.domain.role.Role;
import org.sitmun.domain.tree.Tree;
import org.sitmun.infrastructure.persistence.type.basic.Http;
import org.sitmun.infrastructure.persistence.type.codelist.CodeList;
import org.sitmun.infrastructure.persistence.type.list.StringListAttributeConverter;
import org.sitmun.infrastructure.persistence.type.srs.Srs;
Expand Down Expand Up @@ -54,6 +55,19 @@ public class Application {
@NotBlank
private String name;

/**
* Application description.
*/
@Column(name = "APP_DESCRIPTION", length = PersistenceConstants.LONG_DESCRIPTION)
private String description;

/**
* Link to the application logo.
*/
@Column(name = "APP_LOGO", length = PersistenceConstants.URL)
@Http
private String logo;

/**
* Application type (external or internal).
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ void applicationDetails() throws Exception {
mvc.perform(get(URIConstants.CONFIG_CLIENT_PROFILE_URI, 1, 1))
.andExpect(status().isOk())
.andExpect(jsonPath("$.application.theme", is("sitmun-base")))
.andExpect(jsonPath("$.application.logo", is("https://sitmun.org/Documents/Imatges/8480img1320220524090127.jpg")))
.andExpect(jsonPath("$.application.srs", is("EPSG:25831")))
.andExpect(jsonPath("$.application.initialExtent", hasItems(363487.0, 4561229.0, 481617.0, 4686464.0)));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,8 @@ CREATE TABLE STM_APP
APP_TYPE VARCHAR2 (250) NOT NULL,
APP_TITLE VARCHAR2 (250),
APP_THEME VARCHAR2 (30),
APP_LOGO VARCHAR2 (4000),
APP_DESCRIPTION VARCHAR2 (4000),
APP_SCALES VARCHAR2 (250),
APP_PROJECT VARCHAR2 (250),
APP_TEMPLATE VARCHAR2 (250),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ CREATE TABLE STM_APP
APP_SCALES VARCHAR2 (250 CHAR),
APP_PROJECT VARCHAR2 (50 CHAR),
APP_THEME VARCHAR2 (30 CHAR),
APP_LOGO VARCHAR2 (4000 CHAR),
APP_DESCRIPTION VARCHAR2 (4000 CHAR),
APP_TITLE VARCHAR2 (250 CHAR),
APP_REFRESH NUMBER (1, 0),
APP_TYPE VARCHAR2 (50 CHAR),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ CREATE TABLE STM_APP
APP_SCALES VARCHAR(250),
APP_PROJECT VARCHAR(50),
APP_THEME VARCHAR(30),
APP_LOGO VARCHAR(4000),
APP_DESCRIPTION VARCHAR(4000),
APP_TITLE VARCHAR(250),
APP_REFRESH BOOLEAN,
APP_TYPE VARCHAR(50),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,9 @@ databaseChangeLog:
- column:
name: APP_CREATED
type: DATETIME
- column:
name: APP_LOGO
type: STRING
- sql:
sql: INSERT INTO STM_SEQUENCE(SEQ_NAME, SEQ_COUNT) VALUES ('APP_ID', 5);
- loadData:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
APP_ID,APP_NAME,APP_TYPE,APP_TITLE,APP_THEME,APP_SCALES,APP_PROJECT,APP_TEMPLATE,APP_REFRESH,APP_GGIID,APP_CREATED
1,SITMUN - Provincial,I,SITMUN - Provincial,sitmun-base,"2000000,1000000,700000,600000,500000,250000,100000,75000,50000,25000,20000,15000,10000,5000,2000,1000,500",EPSG:25831,"",1,3,2011-04-29 11:41:56
2,SITMUN - Municipal,I,SITMUN - Municipal,sitmun-base,"100000,75000,50000,25000,20000,15000,10000,5000,2000,1000,500",EPSG:25831,"",1,NULL,2011-04-29 11:41:56
3,SITMUN - Supramunicipal,I,SITMUN - Supramunicipal,sitmun-base,"2000000,1000000,500000,250000,100000,75000,50000,25000,20000,15000,10000,5000,2000,1000,500",EPSG:25831,"",1,NULL,2011-04-29 11:41:56
4,SITMUN - Externa,E,SITMUN - Externa,NULL,NULL,NULL,http://example.com/?ter.codmun=${MUN_INE}&codusr=${USU_CODIGO},0,NULL,2011-04-29 11:41:56
5,SITMUN - Externa protegida,E,SITMUN - Externa protegida,NULL,NULL,NULL,http://example.com/?ter.codmun=${MUN_INE}&codusr=${USU_CODIGO},0,NULL,2011-04-29 11:41:56
APP_ID,APP_NAME,APP_TYPE,APP_TITLE,APP_THEME,APP_SCALES,APP_PROJECT,APP_TEMPLATE,APP_REFRESH,APP_GGIID,APP_CREATED,APP_LOGO
1,SITMUN - Provincial,I,SITMUN - Provincial,sitmun-base,"2000000,1000000,700000,600000,500000,250000,100000,75000,50000,25000,20000,15000,10000,5000,2000,1000,500",EPSG:25831,"",1,3,2011-04-29 11:41:56,https://sitmun.org/Documents/Imatges/8480img1320220524090127.jpg
2,SITMUN - Municipal,I,SITMUN - Municipal,sitmun-base,"100000,75000,50000,25000,20000,15000,10000,5000,2000,1000,500",EPSG:25831,"",1,NULL,2011-04-29 11:41:56,NULL
3,SITMUN - Supramunicipal,I,SITMUN - Supramunicipal,sitmun-base,"2000000,1000000,500000,250000,100000,75000,50000,25000,20000,15000,10000,5000,2000,1000,500",EPSG:25831,"",1,NULL,2011-04-29 11:41:56,NULL
4,SITMUN - Externa,E,SITMUN - Externa,NULL,NULL,NULL,http://example.com/?ter.codmun=${MUN_INE}&codusr=${USU_CODIGO},0,NULL,2011-04-29 11:41:56,NULL
5,SITMUN - Externa protegida,E,SITMUN - Externa protegida,NULL,NULL,NULL,http://example.com/?ter.codmun=${MUN_INE}&codusr=${USU_CODIGO},0,NULL,2011-04-29 11:41:56,NULL
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,9 @@ databaseChangeLog:
- column:
name: APP_CREATED
type: DATETIME
- column:
name: APP_LOGO
type: STRING
- sql:
sql: INSERT INTO STM_SEQUENCE(SEQ_NAME, SEQ_COUNT) VALUES ('APP_ID', 4);
- loadData:
Expand Down

0 comments on commit c2d151c

Please sign in to comment.