Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
196 commits
Select commit Hold shift + click to select a range
9c2af76
Added all the current generated code
LourencoPonces Sep 9, 2025
4dbc155
Added abstractions
LourencoPonces Sep 9, 2025
ae18315
Added all the dsl code
LourencoPonces Sep 9, 2025
970dd5f
Added README explaining how to use the dsl
LourencoPonces Sep 9, 2025
937205b
Added a genaration of gitignore
LourencoPonces Oct 1, 2025
2001355
Solved issues with dtos and controllers
LourencoPonces Oct 1, 2025
0ea271e
Solved issues with dtos and controllers
LourencoPonces Oct 1, 2025
121f244
Solve some issues with execution functionality
LourencoPonces Oct 1, 2025
2f1098a
Solved some issues related with dtos
LourencoPonces Oct 3, 2025
5c620dd
Solved all the issues with the dtos
LourencoPonces Oct 3, 2025
8e2cc5c
Solved some issues with agregate domains
LourencoPonces Oct 3, 2025
04b74f0
Solved some events issues
LourencoPonces Oct 7, 2025
327758b
Solve List and type issues
LourencoPonces Oct 12, 2025
86e51d5
Solved issue of OptionDto
LourencoPonces Oct 12, 2025
7ce1906
Improve the answers example
LourencoPonces Oct 12, 2025
730b6ff
Naming solved
LourencoPonces Oct 12, 2025
fb996dc
Refactored entity generator
LourencoPonces Oct 12, 2025
574609d
Refactor #01
LourencoPonces Oct 12, 2025
3ce35c5
Refactor #02
LourencoPonces Oct 12, 2025
3f6fa93
After final refactor
LourencoPonces Oct 12, 2025
c4ee2c3
New refactor and changes in the asbtraction files
LourencoPonces Oct 14, 2025
363adc8
Missing chnages from previous commit
LourencoPonces Oct 14, 2025
c291675
Removed old files
LourencoPonces Oct 14, 2025
566dc4f
Solved issue with missing comma
LourencoPonces Oct 14, 2025
fd70062
Small changes
LourencoPonces Oct 30, 2025
fb36ec9
Solved issues with factory
LourencoPonces Oct 31, 2025
15d8cad
Generates the folder of sagas/coording with basic code for each funct…
LourencoPonces Oct 31, 2025
e2e4a9e
Some more corrections in functionalities
LourencoPonces Nov 5, 2025
1db414e
Solved some issues related with the user entity
LourencoPonces Nov 10, 2025
0f145d9
Solved some more issues related with user
LourencoPonces Nov 10, 2025
4b8aed8
Solve course issues
LourencoPonces Nov 10, 2025
d174a49
Refactor repository method names for consistency and added validation…
LourencoPonces Nov 10, 2025
39cbd27
VerifyInvariants is always generated even if there arent any invariants
LourencoPonces Nov 10, 2025
606ee3b
Corrections regarding question
LourencoPonces Nov 10, 2025
1a391a9
Added buildDtos methods
LourencoPonces Nov 11, 2025
3ab1d26
Solved some issues related with dto mapping and imports
LourencoPonces Nov 11, 2025
4b45c23
Some simple changes on quiz abstraction
LourencoPonces Nov 11, 2025
2dd1d9f
Solve the initial setup problem
LourencoPonces Nov 12, 2025
8de1f09
Solved some errors w/ constructor builds
LourencoPonces Nov 12, 2025
40cdf34
Refactor dto
LourencoPonces Nov 14, 2025
04bcd90
Dto doesnt need a indepent file - solved some issues related to this …
LourencoPonces Nov 18, 2025
7fe4274
Updated extension
LourencoPonces Nov 18, 2025
262d0ac
Major resolution of aggregates and dtos
LourencoPonces Nov 19, 2025
e35cdd9
Solved all dtos issues (major change)
LourencoPonces Nov 19, 2025
2a3a3ce
Major resolution on the aggregates files
LourencoPonces Nov 19, 2025
ed668be
Chnaged customRepository to repository
LourencoPonces Nov 24, 2025
ab4a72f
Started creating a step by step manual that explains the dsl
LourencoPonces Nov 24, 2025
ef200bf
Solved some events issues
LourencoPonces Nov 27, 2025
ebfb10e
Solved some errors related with repo and error messages (remove ambig…
LourencoPonces Nov 29, 2025
0134eb8
Solved grammar ambiguity
LourencoPonces Nov 29, 2025
06d4a72
Solve some more issues in grammar relate w/ steps
LourencoPonces Nov 29, 2025
dc1652b
Solved issues with validation of queries in repos
LourencoPonces Nov 29, 2025
8aa597d
Refactor validation
LourencoPonces Nov 29, 2025
d9789fc
Added more validations for query repos
LourencoPonces Nov 29, 2025
cb68bf8
Improved jpql parser
LourencoPonces Nov 29, 2025
5327e85
Grammar refactor
LourencoPonces Nov 29, 2025
7ead482
Refactor grammar again
LourencoPonces Nov 29, 2025
2779155
Finish solving the erros with repos and custom repos
LourencoPonces Dec 1, 2025
9feda35
Change the grammar of subscribe events
LourencoPonces Dec 1, 2025
92bcf6e
Improved generators for subscribe events
LourencoPonces Dec 1, 2025
34c751d
Updated extension
LourencoPonces Dec 1, 2025
479bb51
Small change
LourencoPonces Dec 1, 2025
81cba69
Improved validation in events
LourencoPonces Dec 1, 2025
ecbbfba
Solved some issues with events
LourencoPonces Dec 11, 2025
120fb66
Added basic crud service operations for all of the aggregates
LourencoPonces Dec 11, 2025
dfaa9f7
Refactor import statements in saga DTOs and coordination classes to u…
LourencoPonces Dec 12, 2025
6ea414c
Refactor event processing classes to utilize SagaUnitOfWork and imple…
LourencoPonces Dec 16, 2025
7387a35
Refactor functionality classes to streamline imports, saga workflows,…
LourencoPonces Dec 16, 2025
2058a7e
Added new states generation for each aggregate, refactored user saga …
LourencoPonces Dec 16, 2025
27ba4b3
Implemented getAll functionality added corresponding endpoint in the …
LourencoPonces Dec 16, 2025
e472f70
Implemented user search functionality with a new endpoint that will b…
LourencoPonces Dec 17, 2025
d4de45e
Refactor functionality classes by removing unused factory fields.
LourencoPonces Dec 17, 2025
0a16711
Improved search functionalities across multiple services by adding mo…
LourencoPonces Dec 17, 2025
d1515b5
Refactor
LourencoPonces Dec 17, 2025
f1213d1
Simplified answer
LourencoPonces Dec 17, 2025
08a8fdf
Refactor functionality classes by removing unused imports and updatin…
LourencoPonces Dec 17, 2025
2c3b9c7
Added input validation methods across various functionality classes t…
LourencoPonces Dec 17, 2025
2c49787
Refactor saga functionality constructors to standardize parameter order
LourencoPonces Dec 18, 2025
a1ffc78
Updated DTO classes to replace object references with aggregate IDs
LourencoPonces Dec 18, 2025
81149f4
Refactoed update methods in functionality classes to remove aggregate…
LourencoPonces Dec 18, 2025
3167479
Refactored update methods in controllers and services to eliminate ag…
LourencoPonces Jan 7, 2026
5067fbd
Solved identation issue
LourencoPonces Jan 8, 2026
7e4fac7
Simplified the delete functionality
LourencoPonces Jan 8, 2026
2868811
Removed the generation the dto imports
LourencoPonces Jan 8, 2026
60a3a50
Simplified the create functionality
LourencoPonces Jan 8, 2026
66f7c7e
Removed old files
LourencoPonces Jan 8, 2026
c4fc69c
Solve all the functionalities issues, the only error missing is in to…
LourencoPonces Jan 8, 2026
7ece8d9
Solved the generator for checkInput method for tournament Functionali…
LourencoPonces Jan 8, 2026
2177fb8
Removed old files
LourencoPonces Jan 8, 2026
e62eded
First complete version of the docs
LourencoPonces Jan 8, 2026
27dc423
Updated README
LourencoPonces Jan 8, 2026
9831f49
Added tea store abstraction
LourencoPonces Jan 8, 2026
c2b94b4
Added the generated code for teastore
LourencoPonces Jan 8, 2026
6984d13
Added the generation of non root entities dtos
LourencoPonces Jan 13, 2026
c97ec68
Simplified the mapping in the grammar
LourencoPonces Jan 13, 2026
3d127c6
New version of the extension
LourencoPonces Jan 13, 2026
f380d4b
Removed root entity id warning
LourencoPonces Jan 20, 2026
3f01044
Updated the extension to reflect the previous change
LourencoPonces Jan 20, 2026
e554772
Removed old invariants
LourencoPonces Jan 20, 2026
2898582
Small change
LourencoPonces Jan 26, 2026
4cdb550
mapping to another entity and fields are all inside the same block, a…
LourencoPonces Jan 26, 2026
495b178
Added super() to the constructor of the event
LourencoPonces Jan 26, 2026
c803074
Solved some issues with a bad configuration in coordination
LourencoPonces Jan 26, 2026
409f3a9
Simplified the "uses" keyword
LourencoPonces Jan 26, 2026
3addc27
Updated DSL definitions to include @GenerateCrud annotation for autom…
LourencoPonces Jan 27, 2026
80746b7
Updated extension
LourencoPonces Jan 27, 2026
758b09b
Removed docker generator and deleted old files
LourencoPonces Jan 27, 2026
286dee3
Simplified abstraction mapping
LourencoPonces Jan 27, 2026
25559cf
Clean the folder before generating
LourencoPonces Jan 27, 2026
52ecc7a
Simplified abstraction so we dont need to add the fields extended fro…
LourencoPonces Jan 27, 2026
5699f05
Stable state after a lot of changes
LourencoPonces Jan 27, 2026
0993528
The generation of answers doesnt have any errors
LourencoPonces Jan 27, 2026
4c11ac5
Removed old comments being generated
LourencoPonces Jan 27, 2026
5fe55b2
Solved some issues with identation
LourencoPonces Jan 27, 2026
0d489cb
Removed update request dtos
LourencoPonces Jan 27, 2026
61dc9de
Added unitOfWorkService in services
LourencoPonces Jan 27, 2026
4d153fa
Solve some issues that appear with the introduction of unitOfWork ser…
LourencoPonces Jan 27, 2026
9aba3ab
Added register event
LourencoPonces Jan 27, 2026
58652d3
Removed the generation of old code
LourencoPonces Jan 27, 2026
62c74fa
Updated imports generation
LourencoPonces Jan 27, 2026
365ca58
Regsitered update event in update methods
LourencoPonces Jan 27, 2026
3d364fc
Add event processing for user and execution updates in Answer, Execut…
LourencoPonces Feb 3, 2026
410a10e
Stable version
LourencoPonces Feb 3, 2026
3adce6e
New version of nebula extension
LourencoPonces Feb 3, 2026
63aed3b
Implemented methods for adding, retrieving, updating, and removing qu…
LourencoPonces Feb 9, 2026
15dd597
Add response status annotations for create and delete operations in c…
LourencoPonces Feb 9, 2026
d37e687
Refactor service update methods to use new instances for modification…
LourencoPonces Feb 9, 2026
5346bd7
Add invariants checks for Answer, Course, Execution, Question, Quiz, …
LourencoPonces Feb 9, 2026
872b78c
Remove unused event processing methods and handlers for user and ques…
LourencoPonces Feb 9, 2026
1881e57
Refactor constructors in aggregate classes to include missing propert…
LourencoPonces Feb 9, 2026
2210f8f
Updated .gitignore
LourencoPonces Feb 9, 2026
1fe99d0
Update .gitignore to correct the path for the verification directory
LourencoPonces Feb 9, 2026
e5dc298
Update .gitignore to modify the verification directory path for bette…
LourencoPonces Feb 9, 2026
0b29174
Update .gitignore to ensure the verification directory is treated as …
LourencoPonces Feb 9, 2026
d52f723
Refactor event subscription constructors to use event class reference…
LourencoPonces Feb 9, 2026
e344adf
Refactor AnswersSimulator configuration to improve package scanning a…
LourencoPonces Feb 9, 2026
aeb7f00
Add application configuration files for AnswersSimulator, including YAML
LourencoPonces Feb 9, 2026
a82358a
Add dependency injection and generator framework with service registr…
LourencoPonces Feb 10, 2026
df3659e
Refactor EntityOrchestrator
LourencoPonces Feb 10, 2026
4027f71
Add EventContextBuilder for event generation context management
LourencoPonces Feb 10, 2026
b21a5a5
Refactored grammar
LourencoPonces Feb 10, 2026
abdcd62
More grammar refactor
LourencoPonces Feb 10, 2026
721f314
Removed old code
LourencoPonces Feb 10, 2026
acb8a74
Improved docs
LourencoPonces Feb 10, 2026
c699938
Removed features
LourencoPonces Feb 10, 2026
229530f
Refactor answer and execution entities to use new mapping syntax, imp…
LourencoPonces Feb 10, 2026
d23dd31
Add basePackage support to generation options across various generato…
LourencoPonces Feb 10, 2026
c1db0f5
missing file
LourencoPonces Feb 10, 2026
324da65
Improved project configuration by adding versioning and simulator fra…
LourencoPonces Feb 10, 2026
8b4526d
Deleted old extension versions
LourencoPonces Feb 13, 2026
5b30904
Solved some small issues
LourencoPonces Feb 13, 2026
04ea7d4
Deleted older files
LourencoPonces Feb 13, 2026
c97b262
Refactored code
LourencoPonces Feb 13, 2026
751ec6a
Refactored boolean fields to use Boolean type for better null handlin…
LourencoPonces Feb 13, 2026
19eeecb
Refactored services to improve error handling and consistency in exce…
LourencoPonces Feb 13, 2026
d3c1de7
Removed unused fields from various entities
LourencoPonces Feb 14, 2026
e18ed03
Refactored template rendering methods and updated method logic placeh…
LourencoPonces Feb 15, 2026
2011d9e
Removed old comments
LourencoPonces Feb 15, 2026
ff72eea
New code generation
LourencoPonces Feb 23, 2026
2f64f1c
Improved logs
LourencoPonces Feb 23, 2026
a2d45a9
Updated code of the others applications
LourencoPonces Feb 23, 2026
a6bd738
Update to the logs and code in general
LourencoPonces Feb 23, 2026
483f0db
missing file from previous commit
LourencoPonces Feb 23, 2026
348ca4f
Updated developer docs
LourencoPonces Feb 23, 2026
cd5aa95
Solved some issues
LourencoPonces Feb 23, 2026
3348332
Solved warnings
LourencoPonces Feb 23, 2026
1b78a42
Solve last warning
LourencoPonces Feb 23, 2026
e1c7c32
Updated docs
LourencoPonces Feb 23, 2026
da98630
Refactor exception handling and method generation in functionalities
LourencoPonces Feb 23, 2026
a091f4d
Changed exception generation logic and improved type extraction methods
LourencoPonces Feb 23, 2026
7a36fd2
Imrproved docs by adding examples
LourencoPonces Feb 23, 2026
c427f54
Added more examples
LourencoPonces Feb 23, 2026
f1d1e6a
Solved some errors while creating the docs. Created a script that cre…
LourencoPonces Feb 23, 2026
5c58eec
Found more errors while creating the docs and solved them
LourencoPonces Feb 23, 2026
3746157
Update the name of the folders of the examples
LourencoPonces Feb 23, 2026
79962ba
Add initial implementation of the Answers application, including core…
LourencoPonces Feb 23, 2026
4b2c6e7
Generated in the wrong place
LourencoPonces Feb 23, 2026
318f049
Solved issues with teastore
LourencoPonces Feb 23, 2026
7ea8ef8
Small change
LourencoPonces Feb 23, 2026
cd868ff
Added info extension
LourencoPonces Feb 23, 2026
a20b03a
Improved generation to not generated not used imports
LourencoPonces Feb 23, 2026
f89b953
Removed not used imports from the generation
LourencoPonces Feb 24, 2026
ab90b78
Improved docs
LourencoPonces Feb 24, 2026
264a9ff
Small improvement on the docs
LourencoPonces Feb 24, 2026
4226126
Imrprovements on the docs
LourencoPonces Feb 24, 2026
1ffa389
Merge remote-tracking branch 'origin/master' into nebula-new-simulato…
LourencoPonces Feb 24, 2026
4f50446
Solved merge conflicts
LourencoPonces Feb 24, 2026
e0d7b00
Equal to master
LourencoPonces Feb 24, 2026
8352860
Changed the generators to produce the code for the new version of sim…
LourencoPonces Feb 24, 2026
6201ea6
Updated docs for new simulator
LourencoPonces Feb 24, 2026
7798106
Merge branch 'master' into nebula-new-simulator-version
LourencoPonces Feb 24, 2026
6bd1670
Small fix in the output of the folder generated
LourencoPonces Mar 4, 2026
417dd5e
Updated nebula.config.json files to include simulator version and rem…
LourencoPonces Mar 4, 2026
fa4c18a
Refactor command imports to use the new command structure in the work…
LourencoPonces Mar 4, 2026
ea238da
Solve one more problem about imports
LourencoPonces Mar 5, 2026
b229d5c
Also updated the generation
LourencoPonces Mar 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ data/figs/.DS_Store
*.iws
*.iml
*.ipr
.vscode/

### NetBeans ###
/nbproject/private/
Expand Down
11 changes: 11 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"java.compile.nullAnalysis.mode": "automatic",
"[handlebars]": {
"editor.formatOnSave": false,
"editor.formatOnPaste": false,
"editor.formatOnType": false
},
"files.associations": {
"*.hbs": "handlebars"
}
}
30 changes: 30 additions & 0 deletions applications/answers/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Build output
target/
build/

# Logs
logs/
*.log

# IDE
.idea/
.vscode/
*.iml
*.iws
*.ipr
.project
.classpath
.settings/
.factorypath

# OS
.DS_Store
Thumbs.db

# Application specific
HELP.md
**/BehaviourReport.txt

# Environment files
src/main/resources/application-dev.properties
src/main/resources/application-prod.properties
144 changes: 144 additions & 0 deletions applications/answers/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.5.3</version>
<relativePath/>
</parent>
<groupId>pt.ulisboa.tecnico.socialsoftware</groupId>
<artifactId>answers</artifactId>
<version>1.0.0-SNAPSHOT</version>
<name>answers</name>
<description>answers - Generated with Nebula DSL</description>
<properties>
<java.version>21</java.version>
</properties>
<dependencies>
<!-- MicroservicesSimulator Framework Dependency -->
<!-- To install locally: cd ../../simulator && mvn clean install -DskipTests -->
<dependency>
<groupId>pt.ulisboa.tecnico.socialsoftware</groupId>
<artifactId>MicroservicesSimulator</artifactId>
<version>3.1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hibernate.orm</groupId>
<artifactId>hibernate-core</artifactId>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.retry</groupId>
<artifactId>spring-retry</artifactId>
</dependency>
</dependencies>
<profiles>
<profile>
<id>dev</id>
<properties>
<activatedProperties>dev</activatedProperties>
</properties>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
</profile>
<profile>
<id>sagas</id>
<properties>
<activatedProperties>sagas</activatedProperties>
</properties>
</profile>
<profile>
<id>dev-sagas</id>
<properties>
<activatedProperties>dev,sagas</activatedProperties>
</properties>
</profile>
<profile>
<id>test-sagas</id>
<properties>
<activatedProperties>test,sagas</activatedProperties>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.gmavenplus</groupId>
<artifactId>gmavenplus-plugin</artifactId>
<version>4.2.0</version>
<executions>
<execution>
<goals>
<goal>addTestSources</goal>
<goal>compileTests</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>test</id>
<properties>
<activatedProperties>test</activatedProperties>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.gmavenplus</groupId>
<artifactId>gmavenplus-plugin</artifactId>
<version>4.2.0</version>
<executions>
<execution>
<goals>
<goal>addTestSources</goal>
<goal>compileTests</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
package pt.ulisboa.tecnico.socialsoftware.answers;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.context.annotation.PropertySource;
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.retry.annotation.EnableRetry;
import org.springframework.scheduling.annotation.EnableScheduling;
import pt.ulisboa.tecnico.socialsoftware.ms.domain.event.EventService;

@PropertySource({"classpath:application.properties"})
@EnableJpaRepositories(basePackages = {
"pt.ulisboa.tecnico.socialsoftware.ms",
"pt.ulisboa.tecnico.socialsoftware.answers"
})
@EntityScan(basePackages = {
"pt.ulisboa.tecnico.socialsoftware.ms",
"pt.ulisboa.tecnico.socialsoftware.answers"
})
@EnableTransactionManagement
@EnableJpaAuditing

@EnableScheduling


@EnableRetry

@SpringBootApplication(scanBasePackages = {
"pt.ulisboa.tecnico.socialsoftware.ms",
"pt.ulisboa.tecnico.socialsoftware.answers"
})
public class AnswersSimulator implements InitializingBean {

@Autowired
private EventService eventService;


public static void main(String[] args) {
SpringApplication.run(AnswersSimulator.class, args);
}

@Override
public void afterPropertiesSet() {

eventService.clearEventsAtApplicationStartUp();

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package pt.ulisboa.tecnico.socialsoftware.answers;

public enum ServiceMapping {
ANSWER("answer"),
COURSE("course"),
EXECUTION("execution"),
QUESTION("question"),
QUIZ("quiz"),
TOPIC("topic"),
TOURNAMENT("tournament"),
USER("user");

private final String serviceName;

ServiceMapping(String serviceName) {
this.serviceName = serviceName;
}

public String getServiceName() {
return serviceName;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package pt.ulisboa.tecnico.socialsoftware.answers.command.answer;

import pt.ulisboa.tecnico.socialsoftware.ms.coordination.unitOfWork.UnitOfWork;
import pt.ulisboa.tecnico.socialsoftware.ms.coordination.workflow.command.Command;
import pt.ulisboa.tecnico.socialsoftware.answers.shared.dtos.AnswerQuestionDto;

public class AddAnswerQuestionCommand extends Command {
private final Integer answerId;
private final Integer questionAggregateId;
private final AnswerQuestionDto questionDto;

public AddAnswerQuestionCommand(UnitOfWork unitOfWork, String serviceName, Integer answerId, Integer questionAggregateId, AnswerQuestionDto questionDto) {
super(unitOfWork, serviceName, null);
this.answerId = answerId;
this.questionAggregateId = questionAggregateId;
this.questionDto = questionDto;
}

public Integer getAnswerId() { return answerId; }
public Integer getQuestionAggregateId() { return questionAggregateId; }
public AnswerQuestionDto getQuestionDto() { return questionDto; }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package pt.ulisboa.tecnico.socialsoftware.answers.command.answer;

import pt.ulisboa.tecnico.socialsoftware.ms.coordination.unitOfWork.UnitOfWork;
import pt.ulisboa.tecnico.socialsoftware.ms.coordination.workflow.command.Command;
import pt.ulisboa.tecnico.socialsoftware.answers.shared.dtos.AnswerQuestionDto;
import java.util.List;

public class AddAnswerQuestionsCommand extends Command {
private final Integer answerId;
private final List<AnswerQuestionDto> questionDtos;

public AddAnswerQuestionsCommand(UnitOfWork unitOfWork, String serviceName, Integer answerId, List<AnswerQuestionDto> questionDtos) {
super(unitOfWork, serviceName, null);
this.answerId = answerId;
this.questionDtos = questionDtos;
}

public Integer getAnswerId() { return answerId; }
public List<AnswerQuestionDto> getQuestionDtos() { return questionDtos; }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package pt.ulisboa.tecnico.socialsoftware.answers.command.answer;

import pt.ulisboa.tecnico.socialsoftware.ms.coordination.unitOfWork.UnitOfWork;
import pt.ulisboa.tecnico.socialsoftware.ms.coordination.workflow.command.Command;
import pt.ulisboa.tecnico.socialsoftware.answers.microservices.answer.coordination.webapi.requestDtos.CreateAnswerRequestDto;

public class CreateAnswerCommand extends Command {
private final CreateAnswerRequestDto createRequest;

public CreateAnswerCommand(UnitOfWork unitOfWork, String serviceName, CreateAnswerRequestDto createRequest) {
super(unitOfWork, serviceName, null);
this.createRequest = createRequest;
}

public CreateAnswerRequestDto getCreateRequest() { return createRequest; }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package pt.ulisboa.tecnico.socialsoftware.answers.command.answer;

import pt.ulisboa.tecnico.socialsoftware.ms.coordination.unitOfWork.UnitOfWork;
import pt.ulisboa.tecnico.socialsoftware.ms.coordination.workflow.command.Command;

public class DeleteAnswerCommand extends Command {


public DeleteAnswerCommand(UnitOfWork unitOfWork, String serviceName, Integer aggregateId) {
super(unitOfWork, serviceName, aggregateId);

}


}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package pt.ulisboa.tecnico.socialsoftware.answers.command.answer;

import pt.ulisboa.tecnico.socialsoftware.ms.coordination.unitOfWork.UnitOfWork;
import pt.ulisboa.tecnico.socialsoftware.ms.coordination.workflow.command.Command;

public class GetAllAnswersCommand extends Command {


public GetAllAnswersCommand(UnitOfWork unitOfWork, String serviceName) {
super(unitOfWork, serviceName, null);

}


}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package pt.ulisboa.tecnico.socialsoftware.answers.command.answer;

import pt.ulisboa.tecnico.socialsoftware.ms.coordination.unitOfWork.UnitOfWork;
import pt.ulisboa.tecnico.socialsoftware.ms.coordination.workflow.command.Command;

public class GetAnswerByIdCommand extends Command {


public GetAnswerByIdCommand(UnitOfWork unitOfWork, String serviceName, Integer aggregateId) {
super(unitOfWork, serviceName, aggregateId);

}


}
Loading