提交 ccac0a88 编写于 作者: F falko.menge

Fixed editor link for Oryx and restricted filter to BPMN 2.0 models

上级 3ced71b1
......@@ -6,6 +6,8 @@ public class OryxConnectorConfiguration extends SignavioConnectorConfiguration {
// these values differ between Oryx and Signavio
protected static String REPOSITORY_BACKEND_URL_SUFFIX = "backend/poem/";
protected static String EDITOR_BACKEND_URL_SUFFIX = "oryx/";
public static String EDITOR_URL_SUFFIX = "editor#/model/";
public OryxConnectorConfiguration() {
}
......@@ -32,4 +34,15 @@ public class OryxConnectorConfiguration extends SignavioConnectorConfiguration {
return EDITOR_BACKEND_URL_SUFFIX;
}
@Override
public String getEditorUrl(String id) {
if (id.startsWith("/")) {
// this is how it should be now
return getEditorBackendUrl() + EDITOR_URL_SUFFIX + id.substring(1);
} else {
// this is how it was in ancient times
return getEditorBackendUrl() + EDITOR_URL_SUFFIX + id;
}
}
}
......@@ -294,7 +294,8 @@ public class SignavioConnector extends AbstractRepositoryConnector<SignavioConne
private ArrayList<RepositoryNode> getModelsFromOryxBackend() throws IOException, JSONException {
ArrayList<RepositoryNode> nodes = new ArrayList<RepositoryNode>();
Response filterResponse = getJsonResponse(getConfiguration().getRepositoryBackendUrl() + "filter?sort=rating");
// extracts only BPMN 2.0 models, since everything else is more or less unsupported
Response filterResponse = getJsonResponse(getConfiguration().getRepositoryBackendUrl() + "filter?type=http%3A%2F%2Fb3mn.org%2Fstencilset%2Fbpmn2.0%23&sort=rating");
JsonRepresentation jsonRepresentation = new JsonRepresentation(filterResponse.getEntity());
JSONArray modelRefs = jsonRepresentation.toJsonArray();
for (int i = 0; i < modelRefs.length(); i++) {
......
......@@ -38,12 +38,12 @@ public class SignavioConnectorConfiguration extends PasswordEnabledRepositoryCon
private boolean loginRequired = false;
// these values differ between Oryx and Signavio
private static String REPOSITORY_BACKEND_URL_SUFFIX = "p/";
protected static String REPOSITORY_BACKEND_URL_SUFFIX = "p/";
protected static String EDITOR_BACKEND_URL_SUFFIX = "editor/";
protected static String EDITOR_URL_SUFFIX = "editor?id=";
public static String REGISTRATION_URL_SUFFIX = "register/";
public static String LOGIN_URL_SUFFIX = "login/";
public static String EDITOR_URL_SUFFIX = "editor?id=";
public static String EXPLORER_URL_SUFFIX = "explorer/";
public static String MODEL_URL_SUFFIX = "model";
public static String DIRECTORY_URL_SUFFIX = "directory";
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册