Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • simonrose/naming-backend
  • anderslindh1/naming-backend
  • andersharrisson/naming-backend
3 results
Show changes
Showing
with 0 additions and 2851 deletions
File added
Purpose of README to help understand content for refactoring of Naming.
from naming-convention-tool (database, backend, frontend)
to naming-backend (database, backend)
The purpose of Naming is to handle Naming of ESS wide physical and logical devices according to ESS Naming Convention.
Naming backend is a web application implemented as a REST style web service backed by a relational database.
The web service is implemented as a Spring Boot application and the database is available as PostgreSQL.
----------------------------------------------------------------------------------------------------
About
Mainly documentation for refactoring of naming-convention-tool (existing Naming).
Naming backend captures and contains functionality in naming-convention-tool with belonging database.
Functionality is transformed into refactored database and backend with REST API.
1. Background and motivation, followed by database investigation, design, reviews, proof-of-concept (theoretical), migration scripts.
database suggestion 4 selected for further work
see folder(s) background_thoughts_database
2. Early proof-of-concept implementation, performance measurements (and comparisons of REST API performance with different Java versions), preparing presentation.
see folder(s) presentation, prototype
3. Looking into architecture and expanding proof-of-concept implementation and having presentation and reviews.
see folder(s) architecture, implementation
4. Expanding sketches and design for frontend, REST API, backend.
see folder(s) planning, rest_api, templates, ui
Understanding
One way to better understand application and refactoring is to examine naming-convention-tool from different perspectives.
Concepts - what is System structure, Device structure, Name
UI - what is available in UI, menu options in particular, and what it means in terms of server interaction
Database - how are structures stored
Frontend and backend can not readily be separated
See
background_thoughts_database
planning/what_and_how.txt
Note
While documentation is past, present and future, it is also work-in-progress and may change.
Proof-of-concept implementation in close cooperation with existing Naming.
See also
ESS Naming convention
https://chess.esss.lu.se/enovia/link/ESS-0000757/21308.51166.45568.45993/valid
Git repositories
https://gitlab.esss.lu.se/ics-software/naming-convention-tool (Naming - existing)
https://gitlab.esss.lu.se/ics-software/naming-backend (Naming backend - refactored)
----------------------------------------------------------------------------------------------------
Folders, sub folders and key files
architecture (folder)
naming_next_gen_rest_api (ods)
naming_refactoring_architecture (odg, pdf)
background_thoughts_database (folder)
database_diagrams (odg, pdf)
database_diagrams_add_on (odg, pdf)
naming_thoughts_of_refactoring (odt, pdf + folders Appendix A1-A5, B1-B2)
implementation (folder)
http_status_codes (txt)
naming_simplification_restapi_beans (txt)
planning (folder)
pictures (folder)
existing (folder)
refactoring (folder)
design_frontend_restapi_backend (odg, pdf)
refactoring_tasks (ods)
what_and_how (txt)
presentation (folder)
Naming_refactoring (pdf, pptx)
prototype (folder)
performance_measurement (folder)
naming_existing_refactored_times (xlsx)
script_index (txt)
rest_api (folder)
endpoints (folder)
naming_rest_api (ods)
naming_rest_api_refactored (ods, xlsx)
naming_concepts_and_terminology (odt, pdf)
naming_rest_api_brief_introduction (odt, pdf)
templates (folder)
test (folder)
NameElementCommand (xlsx)
StructureElementCommand (xlsx)
ui (folder)
naming_ui_thoughts_sketches (odg, pdf)
ui_thoughts (txt)
----------------------------------------------------------------------------------------------------
File deleted
-- --------------------------------------------------------------------------------
-- structure
-- --------------------------------------------------------------------------------
CREATE TABLE namepartrevision_systemgroup (
id bigint NOT NULL,
version integer,
uuid character varying(255),
name character varying(255),
mnemonic character varying(255),
mnemonicEq character varying(255),
description character varying(255),
status character varying(255),
deleted boolean NOT NULL,
requested timestamp without time zone,
requestedBy character varying(255),
requestedComment character varying(255),
processed timestamp without time zone,
processedBy character varying(255),
processedComment character varying(255)
);
CREATE TABLE namepartrevision_system (
id bigint NOT NULL,
version integer,
uuid character varying(255),
namepartrevision_systemgroup_uuid character varying(255),
name character varying(255),
mnemonic character varying(255),
mnemonicEq character varying(255),
description character varying(255),
status character varying(255),
deleted boolean NOT NULL,
requested timestamp without time zone,
requestedBy character varying(255),
requestedComment character varying(255),
processed timestamp without time zone,
processedBy character varying(255),
processedComment character varying(255)
);
CREATE TABLE namepartrevision_subsystem (
id bigint NOT NULL,
version integer,
uuid character varying(255),
namepartrevision_system_uuid character varying(255),
name character varying(255),
mnemonic character varying(255),
mnemonicEq character varying(255),
description character varying(255),
status character varying(255),
deleted boolean NOT NULL,
requested timestamp without time zone,
requestedBy character varying(255),
requestedComment character varying(255),
processed timestamp without time zone,
processedBy character varying(255),
processedComment character varying(255)
);
-- --------------------------------------------------------------------------------
CREATE TABLE namepartrevision_discipline (
id bigint NOT NULL,
version integer,
uuid character varying(255),
name character varying(255),
mnemonic character varying(255),
mnemonicEq character varying(255),
description character varying(255),
status character varying(255),
deleted boolean NOT NULL,
requested timestamp without time zone,
requestedBy character varying(255),
requestedComment character varying(255),
processed timestamp without time zone,
processedBy character varying(255),
processedComment character varying(255)
);
CREATE TABLE namepartrevision_devicegroup (
id bigint NOT NULL,
version integer,
uuid character varying(255),
namepartrevision_discipline_uuid character varying(255),
name character varying(255),
mnemonic character varying(255),
mnemonicEq character varying(255),
description character varying(255),
status character varying(255),
deleted boolean NOT NULL,
requested timestamp without time zone,
requestedBy character varying(255),
requestedComment character varying(255),
processed timestamp without time zone,
processedBy character varying(255),
processedComment character varying(255)
);
CREATE TABLE namepartrevision_devicetype (
id bigint NOT NULL,
version integer,
uuid character varying(255),
namepartrevision_devicegroup_uuid character varying(255),
name character varying(255),
mnemonic character varying(255),
mnemonicEq character varying(255),
description character varying(255),
status character varying(255),
deleted boolean NOT NULL,
requested timestamp without time zone,
requestedBy character varying(255),
requestedComment character varying(255),
processed timestamp without time zone,
processedBy character varying(255),
processedComment character varying(255)
);
-- --------------------------------------------------------------------------------
CREATE TABLE devicerevision_device(
id bigint NOT NULL,
version integer,
uuid character varying(255),
namepartrevision_systemgroup_uuid character varying(255),
namepartrevision_system_uuid character varying(255),
namepartrevision_subsystem_uuid character varying(255),
namepartrevision_devicetype_uuid character varying(255),
conventionName character varying(255),
conventionNameEq character varying(255),
instanceIndex character varying(255),
instanceIndexEq character varying(255),
description character varying(255),
status character varying(255),
deleted boolean NOT NULL,
requested timestamp without time zone,
requestedBy character varying(255),
requestedComment character varying(255),
processed timestamp without time zone,
processedBy character varying(255),
processedComment character varying(255)
);
-- --------------------------------------------------------------------------------
---------------------------------------------
2xx success
200 OK
201 CREATED
( 204 NO CONTENT )
4xx client errors
400 BAD REQUEST
401 UNAUTHORIZED
403 FORBIDDEN
404 NOT FOUND
409 CONFLICT
422 UNPROCESSABLE ENTITY
424 FAILED DEPENDENCY
5xx server errors
500 INTERNAL SERVER ERROR
503 SERVICE UNAVAILABLE
---------------------------------------------
2xx success
200 OK
The request succeeded. The result meaning of "success" depends on the HTTP method:
GET: The resource has been fetched and transmitted in the message body.
HEAD: The representation headers are included in the response without any message body.
PUT or POST: The resource describing the result of the action is transmitted in the message body.
TRACE: The message body contains the request message as received by the server.
201 CREATED
The request succeeded, and a new resource was created as a result.
This is typically the response sent after POST requests, or some PUT requests.
( 204 NO CONTENT )
There is no content to send for this request, but the headers may be useful.
The user agent may update its cached headers for this resource with the new ones.
4xx client errors
400 BAD REQUEST
The server cannot or will not process the request due to something that is perceived to be a client error
(e.g., malformed request syntax, invalid request message framing, or deceptive request routing).
401 UNAUTHORIZED
Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated".
That is, the client must authenticate itself to get the requested response.
403 FORBIDDEN
The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing
to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server.
404 NOT FOUND
The server can not find the requested resource. In the browser, this means the URL is not recognized.
In an API, this can also mean that the endpoint is valid but the resource itself does not exist.
Servers may also send this response instead of 403 Forbidden to hide the existence of a resource from an unauthorized client.
This response code is probably the most well known due to its frequent occurrence on the web.
409 CONFLICT
This response is sent when a request conflicts with the current state of the server.
422 UNPROCESSABLE ENTITY
The request was well-formed but was unable to be followed due to semantic errors.
424 FAILED DEPENDENCY
The request failed due to failure of a previous request.
5xx server errors
500 INTERNAL SERVER ERROR
The server has encountered a situation it does not know how to handle.
503 SERVICE UNAVAILABLE
The server is not ready to handle the request. Common causes are a server that is down for maintenance or that is overloaded.
Note that together with this response, a user-friendly page explaining the problem should be sent.
This response should be used for temporary conditions and the Retry-After HTTP header should, if possible,
contain the estimated time before the recovery of the service. The webmaster must also take care about
the caching-related headers that are sent along with this response, as these temporary condition responses should usually not be cached.
----------------------------------------------------------------------------------------------------
NameElement
uuid
description
status
latest
deleted
when
who
comment
parentsystemstructure
parentdevicestructure
systemstructure
devicestructure
index
name
StructureElement
uuid
description
status
latest
deleted
when
who
comment
type
parent
name
mnemonic
mnemonicpath
level
----------------------------------------------------------------------------------------------------
CUD - create, update, delete
CUDNameElement
uuid
parentsystemstructure (uuid)
parentdevicestructure (uuid)
index
description
comment
create - parentsystemstructure, parentdevicestructure (optional), index, description, comment
update - uuid, parentsystemstructure, parentdevicestructure (optional), index, description, comment
delete - uuid, comment
CUDStructureElement
uuid
type (SYSTEMGROUP, SYSTEM, SUBSYSTEM, DISCIPLINE, DEVICEGROUP, DEVICETYPE)
parent (uuid)
name
mnemonic
description
comment
create - type, parent, name, mnemonic, description, comment
update - uuid, type, parent, name, mnemonic, description, comment
delete - uuid, type comment
----------------------------------------------------------------------------------------------------
have
public abstract class BaseNameElement implements Serializable {
public abstract class BaseStructureElement implements Serializable {
public class NameElement extends BaseNameElement implements Serializable {
public class StructureElement extends BaseStructureElement implements Serializable {
or
public abstract class CUDNameElement implements Serializable {
public abstract class CUDStructureElement implements Serializable {
public class NameElement extends CUDNameElement implements Serializable {
public class StructureElement extends CUDStructureElement implements Serializable {
or
public abstract class NameElement implements Serializable {
public abstract class StructureElement implements Serializable {
public class NameElementAll extends NameElement implements Serializable {
public class StructureElementAll extends StructureElement implements Serializable {
or
public abstract class NameElement implements Serializable {
public abstract class StructureElement implements Serializable {
public class RNameElement extends NameElement implements Serializable {
public class RStructureElement extends StructureElement implements Serializable {
instead of
public abstract class NameStructureElement implements Serializable {
public class NameElement extends NameStructureElement implements Serializable {
public class StructureElement extends NameStructureElement implements Serializable {
----------------------------------------------------------------------------------------------------
NameStructureElement
uuid
description
status
latest
deleted
when
who
comment
NameElement extends NameStructureElement
parentsystemstructure
parentdevicestructure
systemstructure
devicestructure
index
name
StructureElement extends NameStructureElement
type
parent
name
mnemonic
mnemonicpath
level
----------------------------------------------------------------------------------------------------
BaseNameElement
uuid
parentsystemstructure
parentdevicestructure
index
description
comment
BaseStructureElement
uuid
type
parent
name
mnemonic
description
comment
NameElement extends BaseNameElement
status
latest
deleted
when
who
systemstructure
devicestructure
name
StructureElement extends BaseStructureElement
status
latest
deleted
when
who
mnemonicpath
level
----------------------------------------------------------------------------------------------------
NameElement
NameElementCU
NameElementDACR
StructureElement
StructureElementCU
StructureElementDACR
NameElement
NameElementMedium
NameElementShort
StructureElement
StructureElementMedium
StructureElementShort
NameElement
NameElementMidi
NameElementMini
StructureElement
StructureElementMidi
StructureElementMini
NameElement
NameElementCreate
NameElementUpdate
NameElementDelete
StructureElement
StructureElementCreate
StructureElementUpdate
StructureElementDelete
StructureElementDecision
NameElementBase
NameElement
NameElementCreate
NameElementUpdate
NameElementDelete
StructureElementBase
StructureElement
StructureElementCreate
StructureElementUpdate
StructureElementDelete
StructureElementDecision
NameElement
NameElementCreate
NameElementUpdate
NameElementDelete
StructureElement
StructureElementCreate
StructureElementCreateWithParent
StructureElementUpdate
StructureElementUpdateWithParent
StructureElementDelete
StructureElementDecision
----------------------------------------------------------------------------------------------------
NameElementBase
NameElement
uuid
description
status
latest
deleted
when
who
comment
parentsystemstructure
parentdevicestructure
systemstructure
devicestructure
index
name
NameElementCreate
parentsystemstructure
parentdevicestructure
index
description
comment
NameElementUpdate
uuid
parentsystemstructure
parentdevicestructure
index
description
comment
NameElementDelete
uuid
comment
StructureElementBase
StructureElement
uuid
description
status
latest
deleted
when
who
comment
type
parent
name
mnemonic
mnemonicpath
level
StructureElementCreate
type (SYSTEMGROUP, SYSTEM, SUBSYSTEM, DISCIPLINE, DEVICEGROUP, DEVICETYPE)
parent (uuid)
name
mnemonic
description
comment
StructureElementUpdate
uuid
type (SYSTEMGROUP, SYSTEM, SUBSYSTEM, DISCIPLINE, DEVICEGROUP, DEVICETYPE)
parent (uuid)
name
mnemonic
description
comment
StructureElementDelete
uuid
type (SYSTEMGROUP, SYSTEM, SUBSYSTEM, DISCIPLINE, DEVICEGROUP, DEVICETYPE)
comment
StructureElementDecision
uuid
type (SYSTEMGROUP, SYSTEM, SUBSYSTEM, DISCIPLINE, DEVICEGROUP, DEVICETYPE)
comment