Skip to content
Snippets Groups Projects
Commit 4f62447a authored by Florian Lambers's avatar Florian Lambers
Browse files

added author

parent 1e9e8364
No related branches found
No related tags found
No related merge requests found
Showing
with 103 additions and 5 deletions
......@@ -2,6 +2,9 @@ package de.fhmuenster.masterthesis.Testgenerator.bpmn.data;
import de.fhmuenster.masterthesis.testgeneratorDSL.Constraint;
/**
* @author Florian Lambers
*/
public class TaskSpecificConstraint {
private String taskId;
......
......@@ -93,6 +93,9 @@ public class BPMNVariableFormFieldScanner {
.findFirst();
if(formDocumentOpt.isPresent()) {
/**
* @author Florian Lambers
*/
Document formDocument = formDocumentOpt.get().getDocument();
Elements inputs = formDocument.getElementsByTag("input");
for(Element input : inputs) {
......@@ -182,6 +185,9 @@ public class BPMNVariableFormFieldScanner {
addConstraints(formField, baseElement.getId());
}
/**
* @author Florian Lambers
*/
private void addConstraints(CamundaFormField field, String taskId) {
Long minLength = getCamundaConstraintLong(field, CONSTRAINT_MIN_LENGTH);
Long maxLength = getCamundaConstraintLong(field, CONSTRAINT_MAX_LENGTH);
......
package de.fhmuenster.masterthesis.Testgenerator.migration;
/**
* This class stores the different action types that exist (enum).
*
* @author Florian Lambers
*/
public enum ActionType {
ACTIVITY_ADD_MANUAL_TASK, ACTIVITY_ADD_USER_TASK_REQUIRED, ACTIVITY_ADD_USER_TASK_NOT_REQUIRED,
ACTIVITY_ADD_BUSINESS_RULE_TASK,
......
......@@ -13,6 +13,12 @@ import de.fhmuenster.masterthesis.testgeneratorDSL.FlowElement;
import de.fhmuenster.masterthesis.testgeneratorDSL.FlowElementReference;
import de.fhmuenster.masterthesis.testgeneratorDSL.Test;
/**
* This class is an entity used to store a detected change (contains the flow where the change happened,
* the actionType, the changed flowElement, the migrationResult and the affectedTests).
*
* @author Florian Lambers
*/
public class FlowChangeWrapper {
private Flow flow;
......
......@@ -6,6 +6,11 @@ import java.util.List;
import de.fhmuenster.masterthesis.Testgenerator.rest.dto.FlowChangeWrapperDTO;
import de.fhmuenster.masterthesis.Testgenerator.rest.dto.MigrationResultWrapperDTO;
/**
* This class stores the change detection results grouped by flag.
*
* @author Florian Lambers
*/
public class MigrationResultWrapper {
private List<FlowChangeWrapper> greenResults;
......
......@@ -50,7 +50,11 @@ import de.fhmuenster.masterthesis.testgeneratorDSL.Constraint;
import de.fhmuenster.masterthesis.testgeneratorDSL.EndFlowElement;
import de.fhmuenster.masterthesis.testgeneratorDSL.Flag;
import de.fhmuenster.masterthesis.utils.TestgeneratorDSLUtils;
/**
* MigrationService to detect all the changes in a model.
*
* @author Florian Lambers
*/
@Service
public class MigrationService {
......
......@@ -13,7 +13,11 @@ import de.fhmuenster.masterthesis.Testgenerator.rest.dto.BPMNFlowDTO;
import de.fhmuenster.masterthesis.Testgenerator.rest.dto.BPMNFlowSetDTO;
import de.fhmuenster.masterthesis.Testgenerator.rest.dto.FlowElementDTO;
/**
* This class stores the current migration status.
*
* @author Florian Lambers
*/
public class MigrationStatus {
private boolean migrating;
......
......@@ -6,7 +6,11 @@ import javax.annotation.PostConstruct;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
/**
* This class stores all the given migration states for each project.
*
* @author Florian Lambers
*/
@Component
@Scope("singleton")
public class MigrationStatusContainer {
......
package de.fhmuenster.masterthesis.Testgenerator.rest.dto;
/**
* @author Florian Lambers
*/
public class MigrationResultDTO {
private String status;
private int priority;
......
......@@ -2,6 +2,9 @@ package de.fhmuenster.masterthesis.Testgenerator.rest.dto;
import java.util.List;
/**
* @author Florian Lambers
*/
public class MigrationResultWrapperDTO {
private List<FlowChangeWrapperDTO> greenResults;
......
......@@ -183,6 +183,12 @@ public class ChangeController {
return dto;
}
/**
* method to store the current migration status so that it can be continued later.
* @param projectId, flowSetDTO
* @return
* @author Florian Lambers
*/
@RequestMapping(path = "/project/{projectId}/migration/save", method = RequestMethod.POST)
public void saveMigrationStatus(@PathVariable(required = true) Long projectId,
@RequestBody BPMNFlowSetDTO flowSetDTO) {
......@@ -204,7 +210,13 @@ public class ChangeController {
}
/**
* method to detect the changes of a pda version. Calls the migrationService and copies the models before.
* moreover, it copies the given test cases to the new dsl (copying of mocks, endchecks, variables, manually added variables, ...)
* @param projectId, flowSetDTO
* @return MigrationResultWrapperDTO
* @author Florian Lambers
*/
@RequestMapping(path = "/project/{projectId}/migration/changes", method = RequestMethod.POST)
public MigrationResultWrapperDTO detectChanges(@PathVariable(required = true) Long projectId, @RequestBody BPMNFlowSetDTO flowSetDTO) {
......@@ -525,6 +537,12 @@ public class ChangeController {
}
/**
* method to return the current migrationStatus for a project
* @param projectId
* @return BPMNFlowSetDTO[]
* @author Florian Lambers
*/
@RequestMapping(path = "/project/{projectId}/migration/status", method = RequestMethod.GET)
public BPMNFlowSetDTO[] getMigrationStatus(@PathVariable(required = true) Long projectId) {
......@@ -538,6 +556,12 @@ public class ChangeController {
}
}
/**
* method to get the initial flow matching for a migration
* @param projectId
* @return BPMNFlowSetDTO
* @author Florian Lambers
*/
@RequestMapping(path = "/project/{projectId}/migration/initialmatching", method = RequestMethod.GET)
public BPMNFlowSetDTO getInitialFlowMatching(@PathVariable(required = true) Long projectId) {
return this.migrationStatusContainer.getMigrationStatusForProject(projectId).getInitialOldFlowsMatching();
......
......@@ -319,6 +319,9 @@ public class ProjectService {
removeProjectConfig(projectsConfig, projectConfig);
}
/**
* @author Florian Lambers
*/
public void copyModelsToBackupFolder(Long projectId) {
LOGGER.info("starting copy process to backup folder");
Project project = getProjectForId(projectId);
......
......@@ -261,7 +261,10 @@ public class TestService {
if (!testId.equals(testcase.getName())) {
checkTestIdAlreadyTaken(testcase.getName(), serializer);
}
/**
* @author Florian Lambers
* up to line 321
*/
//Test-Flag aktualisieren
testcase.setFlag("GREEN");
......
......@@ -188,6 +188,10 @@ public class BPMNParseUtils {
getProposals(b, variableTestdata.get(b), Boolean.class))) //
.collect(Collectors.toList());
//Constraints hinzufügen
/**
* @author Florian Lambers
* up to line 256
*/
List<Constraint> constraintsToAdd = new BasicEList<>();
for(StringVariable sv : stringVariables) {
List<BPMNFieldConstraint> constraintsForVariable = formFields.getVariableConstraints().get(sv.getName());
......@@ -317,6 +321,9 @@ public class BPMNParseUtils {
return externalTopic;
}
/**
* @author Florian Lambers
*/
public static String getResultVariable(BusinessRuleTask businessRuleTask) {
String resultVariable = businessRuleTask.getAttributeValueNs(NAMESPACE_URI_BPMN, "resultVariable");
return resultVariable;
......
package de.fhmuenster.masterthesis.Testgenerator.yaml;
/**
* @author Florian Lambers
*/
public class Activity {
private ActivityAdd add;
......
package de.fhmuenster.masterthesis.Testgenerator.yaml;
/**
* @author Florian Lambers
*/
public class ActivityAdd {
private RequiredType userTask;
......
package de.fhmuenster.masterthesis.Testgenerator.yaml;
/**
* @author Florian Lambers
*/
public class ActivityDelete {
private MigrationResult userTask;
......
package de.fhmuenster.masterthesis.Testgenerator.yaml;
/**
* @author Florian Lambers
*/
public class ChangeConstraint {
private MigrationResult fromNotRequiredToRequired;
......
package de.fhmuenster.masterthesis.Testgenerator.yaml;
/**
* @author Florian Lambers
*/
public class ChangeType {
private RequiredType fromXTaskToUserTask;
......
package de.fhmuenster.masterthesis.Testgenerator.yaml;
/**
* @author Florian Lambers
*/
public class Configuration {
private int green;
private int yellow;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment