Skip to content

Commit

Permalink
Merge pull request #167 from TimU02/master
Browse files Browse the repository at this point in the history
Pull Request for the implemented Changes in the WoPeD Client during the "Integrationsseminar"
TaminoFischer authored Nov 11, 2024
2 parents bc45144 + dee699c commit 1b2d967
Showing 24 changed files with 2,461 additions and 1,127 deletions.
Original file line number Diff line number Diff line change
@@ -3,17 +3,18 @@
<xs:element name="Configuration">
<xs:complexType>
<xs:all>
<xs:element name="gui" type="GUI"/>
<xs:element name="editor" type="Editor"/>
<xs:element name="general" type="General"/>
<xs:element name="tools" type="Tool"/>
<xs:element name="apromoreServers" type="ApromoreServers" minOccurs="0" maxOccurs="1"/>
<xs:element name="p2t" type="Process2Text"/>
<xs:element name="t2p" type="Text2Process"/>
<xs:element name="businessdashboard" type="BusinessDashboard"/>
<xs:element name="coloring" type="Coloring"/>
<xs:element name="metrics" type="Metrics"/>
<xs:element name="registration" type="Registration"/>
<xs:element name="gui" type="GUI"/>
<xs:element name="editor" type="Editor"/>
<xs:element name="general" type="General"/>
<xs:element name="tools" type="Tool"/>
<xs:element name="apromoreServers" type="ApromoreServers" minOccurs="0" maxOccurs="1"/>
<xs:element name="p2t" type="Process2Text"/>
<xs:element name="t2p" type="Text2Process"/>
<xs:element name="Gpt" type="GPTSettings"/>
<xs:element name="businessdashboard" type="BusinessDashboard"/>
<xs:element name="coloring" type="Coloring"/>
<xs:element name="metrics" type="Metrics"/>
<xs:element name="registration" type="Registration"/>
</xs:all>
</xs:complexType>
</xs:element>
@@ -101,22 +102,22 @@

<xs:complexType name="ApromoreServers">
<xs:sequence>
<xs:element name="apromoreServer" type="ApromoreServer" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="apromoreServer" type="ApromoreServer" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="ApromoreServer">
<xs:sequence>
<xs:element name="apromoreServerID" type="xs:int" minOccurs="1" maxOccurs="1"/>
<xs:element name="apromoreServerName" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="apromoreServerURL" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="apromoreServerPort" type="xs:int" minOccurs="0" maxOccurs="1"/>
<xs:element name="apromoreManagerPath" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="apromoreUserName" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="apromorePassword" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="apromoreUseProxy" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
<xs:element name="apromoreProxyName" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="apromoreProxyPort" type="xs:int" minOccurs="0" maxOccurs="1"/>
<xs:element name="apromoreServerID" type="xs:int" minOccurs="1" maxOccurs="1"/>
<xs:element name="apromoreServerName" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="apromoreServerURL" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="apromoreServerPort" type="xs:int" minOccurs="0" maxOccurs="1"/>
<xs:element name="apromoreManagerPath" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="apromoreUserName" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="apromorePassword" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="apromoreUseProxy" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
<xs:element name="apromoreProxyName" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="apromoreProxyPort" type="xs:int" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>

@@ -136,6 +137,17 @@
<xs:element name="t2pServerURI" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>

<xs:complexType name="GPTSettings">
<xs:sequence>
<xs:element name="GptApiKey" type="xs:string" minOccurs="0" />
<xs:element name="GptShowAgain" type="xs:boolean" minOccurs="0" />
<xs:element name="GptPrompt" type="xs:string" minOccurs="0" />
<xs:element name="GptUseNew" type="xs:boolean" minOccurs="0" />
<xs:element name="GptModel" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="BusinessDashboard">
<xs:sequence>
<xs:element name="usebydefault" type="xs:boolean" default="false" minOccurs="0" />
@@ -191,20 +203,20 @@
</xs:complexType>
<xs:complexType name="Metrics">
<xs:sequence>
<xs:element name="useMetrics" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
<xs:element name="variableDecimalPlaces" type="xs:int" minOccurs="0" maxOccurs="1"/>
<xs:element name="algorithmDecimalPlaces" type="xs:int" minOccurs="0" maxOccurs="1"/>
<xs:element name="useAlgorithmHighlighting" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
<xs:element name="showNamesInBuilder" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
<xs:element name="showAdvancedErrorMessages" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
<xs:element name="useMetrics" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
<xs:element name="variableDecimalPlaces" type="xs:int" minOccurs="0" maxOccurs="1"/>
<xs:element name="algorithmDecimalPlaces" type="xs:int" minOccurs="0" maxOccurs="1"/>
<xs:element name="useAlgorithmHighlighting" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
<xs:element name="showNamesInBuilder" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
<xs:element name="showAdvancedErrorMessages" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="Registration">
<xs:sequence>
<xs:element name="emailAddress" type="xs:string" default="" minOccurs="0" maxOccurs="1"/>
<xs:element name="launchCounter" type="xs:int" default="0" minOccurs="0" maxOccurs="1"/>
<xs:element name="showOnStartup" type="xs:boolean" default="true" minOccurs="0" maxOccurs="1"/>
<xs:element name="registered" type="xs:boolean" default="false" minOccurs="0" maxOccurs="1"/>
<xs:element name="emailAddress" type="xs:string" default="" minOccurs="0" maxOccurs="1"/>
<xs:element name="launchCounter" type="xs:int" default="0" minOccurs="0" maxOccurs="1"/>
<xs:element name="showOnStartup" type="xs:boolean" default="true" minOccurs="0" maxOccurs="1"/>
<xs:element name="registered" type="xs:boolean" default="false" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
11 changes: 9 additions & 2 deletions WoPeD-CommonLibs/pom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
@@ -21,6 +21,13 @@
</properties>

<dependencies>
<dependency>
<groupId>de.dhbw.woped</groupId>
<artifactId>jgraph</artifactId>
<version>5.10.2</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/jgraph-5.10.2.jar</systemPath>
</dependency>
<dependency>
<groupId>de.dhbw.woped</groupId>
<artifactId>jgraph</artifactId>
Original file line number Diff line number Diff line change
@@ -78,6 +78,9 @@ public boolean initConfig() {
if (getConfDocument().getConfiguration().getMetrics() == null)
getConfDocument().getConfiguration().addNewMetrics();

if(getConfDocument().getConfiguration().getGpt() == null)
getConfDocument().getConfiguration().addNewGpt();

// Check if metrics configuration should be loaded
// and react accordingly
if (getConfDocument().getConfiguration().getMetrics().getUseMetrics()) {
@@ -1475,6 +1478,64 @@ public String getText2ProcessServerURI() {
return getConfDocument().getConfiguration().getT2P().getT2PServerURI();
} else return ConfigurationManager.getStandardConfiguration().getText2ProcessServerURI();
}
@Override
public String getGptApiKey() {
if(getConfDocument().getConfiguration().getGpt().isSetGptApiKey()){
return getConfDocument().getConfiguration().getGpt().getGptApiKey();
}else return ConfigurationManager.getStandardConfiguration().getGptApiKey();
}

@Override
public void setGptApiKey(String apiKey) {
getConfDocument().getConfiguration().getGpt().setGptApiKey(apiKey);
}

public String getGptModel(){
if(getConfDocument().getConfiguration().getGpt().isSetGptModel()){
return getConfDocument().getConfiguration().getGpt().getGptModel();
} else return ConfigurationManager.getStandardConfiguration().getGptModel();
}

public void setGptModel(String model){
getConfDocument().getConfiguration().getGpt().setGptModel(model);
}

@Override
public boolean getGptShowAgain() {
if(getConfDocument().getConfiguration().getGpt().isSetGptShowAgain()){
return getConfDocument().getConfiguration().getGpt().getGptShowAgain();
}else return ConfigurationManager.getStandardConfiguration().getGptShowAgain();
}

@Override
public void setGptShowAgain(boolean showAgain) {
getConfDocument().getConfiguration().getGpt().setGptShowAgain(showAgain);
}

@Override
public String getGptPrompt() {
if(getConfDocument().getConfiguration().getGpt().isSetGptPrompt()){
return getConfDocument().getConfiguration().getGpt().getGptPrompt();
}else return ConfigurationManager.getStandardConfiguration().getGptPrompt();
}

@Override
public void setGptPrompt(String prompt) {
getConfDocument().getConfiguration().getGpt().setGptPrompt(prompt);
}

@Override
public void setGptUseNew(boolean useNew){
getConfDocument().getConfiguration().getGpt().setGptUseNew(useNew);
}

@Override
public boolean getGptUseNew(){
if(getConfDocument().getConfiguration().getGpt().getGptUseNew()){
return getConfDocument().getConfiguration().getGpt().getGptUseNew();
} else return ConfigurationManager.getStandardConfiguration().getGptUseNew();
}


@Override
public void setText2ProcessServerURI(String uri) {
@@ -1605,4 +1666,6 @@ public void setYAWLExportGroups(boolean exportGroups) {
.getExporting()
.setYawlExportGroups(exportGroups);
}


}
Original file line number Diff line number Diff line change
@@ -116,4 +116,10 @@
<t2pServerPort>8081</t2pServerPort>
<t2pServerURI>/t2p</t2pServerURI>
</t2p>
<Gpt>
<GptApiKey>test</GptApiKey>
<GptPrompt>test</GptPrompt>
<GptUseNew>true</GptUseNew>
</Gpt>

</Configuration>
Original file line number Diff line number Diff line change
@@ -33,4 +33,5 @@ public static boolean hasNonStaticMetricsConfiguration() {
if (metricsConfiguration != null) return true;
else return false;
}

}
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@
/**
* Class that provides fallback configuration settings for the general WoPeD configuration part
*
* @author Philip Allgaier
* @autor Philip Allgaier
*/
@SuppressWarnings("JavadocReference")
public class DefaultStaticConfiguration implements IGeneralConfiguration {
@@ -190,6 +190,32 @@ public class DefaultStaticConfiguration implements IGeneralConfiguration {

private boolean yawlExportGroups = false;

// GPT settings
private String gptApiKey = "";
private boolean gptShowAgain = true;
private String gptPrompt = "Create a clearly structured and comprehensible continuous text from the given BPMN that is understandable for an uninformed reader. The text should be easy to read in the summary and contain all important content; if there are subdivided points, these are integrated into the text with suitable sentence beginnings in order to obtain a well-structured and easy-to-read text. Under no circumstances should the output contain sub-items or paragraphs, but should cover all processes in one piece!";
private boolean gptUseNew = false;
private String gptModel = null;

public boolean isGptUseNew() {
return gptUseNew;
}

public void setGptUseNew(boolean gptUseNew) {
this.gptUseNew = gptUseNew;
}
public boolean getGptUseNew(){
return gptUseNew;
}

public void setGptModel(String gptModel) {
this.gptModel = gptModel;
}

public String getGptModel() {
return gptModel;
}

public DefaultStaticConfiguration() {
initConfig();
}
@@ -919,29 +945,29 @@ public ApromoreServer[] getApromoreServers() {

@Override
public void addApromoreServer(
int ID,
String name,
String url,
int port,
String path,
String user,
String pwd,
boolean useProxy,
String proxyUrl,
int proxyPort) {}
int ID,
String name,
String url,
int port,
String path,
String user,
String pwd,
boolean useProxy,
String proxyUrl,
int proxyPort) {}

@Override
public void changeApromoreServerSettings(
int ID,
String name,
String url,
int port,
String path,
String user,
String pwd,
boolean useProxy,
String proxyUrl,
int proxyPort) {}
int ID,
String name,
String url,
int port,
String path,
String user,
String pwd,
boolean useProxy,
String proxyUrl,
int proxyPort) {}

@Override
public void removeApromoreServer(int index) {}
@@ -1083,4 +1109,35 @@ public boolean isYAWLExportGroups() {
public void setYAWLExportGroups(boolean exportGroups) {
this.yawlExportGroups = exportGroups;
}

// GPT settings
@Override
public String getGptApiKey() {
return gptApiKey;
}

@Override
public void setGptApiKey(String apiKey) {
this.gptApiKey = apiKey;
}

@Override
public boolean getGptShowAgain() {
return gptShowAgain;
}

@Override
public void setGptShowAgain(boolean showAgain) {
this.gptShowAgain = showAgain;
}

@Override
public String getGptPrompt() {
return gptPrompt;
}

@Override
public void setGptPrompt(String prompt) {
this.gptPrompt = prompt;
}
}
Loading

0 comments on commit 1b2d967

Please sign in to comment.