summaryrefslogtreecommitdiffstats
path: root/winery/org.eclipse.winery.repository/src/main/webapp/jsp
diff options
context:
space:
mode:
Diffstat (limited to 'winery/org.eclipse.winery.repository/src/main/webapp/jsp')
-rw-r--r--winery/org.eclipse.winery.repository/src/main/webapp/jsp/admin/adminindex.jsp41
-rw-r--r--winery/org.eclipse.winery.repository/src/main/webapp/jsp/admin/namespaces.jsp108
-rw-r--r--winery/org.eclipse.winery.repository/src/main/webapp/jsp/admin/repository.jsp101
-rw-r--r--winery/org.eclipse.winery.repository/src/main/webapp/jsp/admin/types/types.jsp105
-rw-r--r--winery/org.eclipse.winery.repository/src/main/webapp/jsp/artifacts/artifacts.jsp141
-rw-r--r--winery/org.eclipse.winery.repository/src/main/webapp/jsp/componentnaming.jspf28
-rw-r--r--winery/org.eclipse.winery.repository/src/main/webapp/jsp/documentation.jsp87
-rw-r--r--winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytemplates/artifacttemplates/artifacttemplate.jsp32
-rw-r--r--winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytemplates/artifacttemplates/files.jsp18
-rw-r--r--winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytemplates/policytemplates/policytemplate.jsp29
-rw-r--r--winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytemplates/properties.jsp92
-rw-r--r--winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypeimplementations/nodetypeimplementations/nodetypeimplementation.jsp33
-rw-r--r--winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypeimplementations/relationshiptypeimplementations/relationshiptypeimplementation.jsp29
-rw-r--r--winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypes/artifacttypes/artifacttype.jsp26
-rw-r--r--winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypes/capabilitytypes/capabilitytype.jsp17
-rw-r--r--winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypes/implementations.jsp63
-rw-r--r--winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypes/instancestates.jsp86
-rw-r--r--winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypes/nodetypes/nodetype.jsp44
-rw-r--r--winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypes/nodetypes/reqandcapdefs/capdefs.jsp17
-rw-r--r--winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypes/nodetypes/reqandcapdefs/reqdefs.jsp17
-rw-r--r--winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypes/nodetypes/visualappearance.jsp68
-rw-r--r--winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypes/policytypes/appliesto.jsp25
-rw-r--r--winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypes/policytypes/language.jsp21
-rw-r--r--winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypes/policytypes/policytype.jsp32
-rw-r--r--winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypes/properties/propertiesDefinition.jsp320
-rw-r--r--winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypes/relationshiptypes/relationshiptype.jsp44
-rw-r--r--winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypes/relationshiptypes/validendings.jsp39
-rw-r--r--winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypes/relationshiptypes/visualappearance.jsp193
-rw-r--r--winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypes/requirementtypes/requiredcapabilitytype.jsp56
-rw-r--r--winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypes/requirementtypes/requirementtype.jsp30
-rw-r--r--winery/org.eclipse.winery.repository/src/main/webapp/jsp/genericcomponentpage.jsp209
-rw-r--r--winery/org.eclipse.winery.repository/src/main/webapp/jsp/hashloading.jsp140
-rw-r--r--winery/org.eclipse.winery.repository/src/main/webapp/jsp/imports/xsdimports/xsdimport.jsp50
-rw-r--r--winery/org.eclipse.winery.repository/src/main/webapp/jsp/inheritance.jsp55
-rw-r--r--winery/org.eclipse.winery.repository/src/main/webapp/jsp/interfaces/interfaces.jsp489
-rw-r--r--winery/org.eclipse.winery.repository/src/main/webapp/jsp/otherElements.jsp44
-rw-r--r--winery/org.eclipse.winery.repository/src/main/webapp/jsp/servicetemplates/boundarydefinitions/boundarydefinitions.jsp1080
-rw-r--r--winery/org.eclipse.winery.repository/src/main/webapp/jsp/servicetemplates/plans/plans.jsp266
-rw-r--r--winery/org.eclipse.winery.repository/src/main/webapp/jsp/servicetemplates/selfservicemetadata/selfservicemetadata.jsp256
-rw-r--r--winery/org.eclipse.winery.repository/src/main/webapp/jsp/servicetemplates/servicetemplate.jsp43
-rw-r--r--winery/org.eclipse.winery.repository/src/main/webapp/jsp/servicetemplates/topologytemplates/topologytemplate.jsp23
-rw-r--r--winery/org.eclipse.winery.repository/src/main/webapp/jsp/servicetemplates/topologytemplates/topologytemplateview.jsp67
-rw-r--r--winery/org.eclipse.winery.repository/src/main/webapp/jsp/setupTriggerRemoveByDELKey.jsp28
-rw-r--r--winery/org.eclipse.winery.repository/src/main/webapp/jsp/tags/tags.jsp14
-rw-r--r--winery/org.eclipse.winery.repository/src/main/webapp/jsp/test.jsp33
-rw-r--r--winery/org.eclipse.winery.repository/src/main/webapp/jsp/xmlSource.jsp20
46 files changed, 0 insertions, 4759 deletions
diff --git a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/admin/adminindex.jsp b/winery/org.eclipse.winery.repository/src/main/webapp/jsp/admin/adminindex.jsp
deleted file mode 100644
index c7ee9f7..0000000
--- a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/admin/adminindex.jsp
+++ /dev/null
@@ -1,41 +0,0 @@
-<%--
-/*******************************************************************************
- * Copyright (c) 2012-2013 University of Stuttgart.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and the Apache License 2.0 which both accompany this distribution,
- * and are available at http://www.eclipse.org/legal/epl-v10.html
- * and http://www.apache.org/licenses/LICENSE-2.0
- *
- * Contributors:
- * Oliver Kopp - initial API and implementation and/or initial documentation
- *******************************************************************************/
---%>
-<%@taglib prefix="t" tagdir="/WEB-INF/tags" %>
-<%@page import="org.eclipse.winery.repository.resources.SubMenuData"%>
-
-<%
-java.util.List<SubMenuData> subMenus = new java.util.ArrayList<SubMenuData>();
-
-SubMenuData data;
-
-data = new SubMenuData("#namespaces", "Namespaces");
-subMenus.add(data);
-
-data = new SubMenuData("#repository", "Repository");
-subMenus.add(data);
-
-data = new SubMenuData("#planlanguages", "Plan Languages");
-subMenus.add(data);
-
-data = new SubMenuData("#plantypes", "Plan Types");
-subMenus.add(data);
-
-data = new SubMenuData("#constrainttypes", "Constraint Types");
-subMenus.add(data);
-%>
-
-<%-- TODO: do not use componentinstance, but introduce a layer inbetween componentinstance.tag and genericpage.tag --%>
-
-<t:componentinstance windowtitle="Admin" cssClass="mainContentContainer admin" selected="admin" subMenus="<%=subMenus%>">
-</t:componentinstance>
diff --git a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/admin/namespaces.jsp b/winery/org.eclipse.winery.repository/src/main/webapp/jsp/admin/namespaces.jsp
deleted file mode 100644
index e80ad1d..0000000
--- a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/admin/namespaces.jsp
+++ /dev/null
@@ -1,108 +0,0 @@
-<%--
-/*******************************************************************************
- * Copyright (c) 2012-2013 University of Stuttgart.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and the Apache License 2.0 which both accompany this distribution,
- * and are available at http://www.eclipse.org/legal/epl-v10.html
- * and http://www.apache.org/licenses/LICENSE-2.0
- *
- * Contributors:
- * Oliver Kopp - initial API and implementation and/or initial documentation
- * Yves Schubert - switch to bootstrap 3
- *******************************************************************************/
---%>
-<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
-<%@ taglib uri="http://www.eclipse.org/winery/repository/functions" prefix="w" %>
-<script>
-var namespacePrefixesTableInfo = {
- id : '#namespacePrefixesTable'
-};
-
-$(function() {
- require(["winery-support"], function(ws) {
- ws.initTable(namespacePrefixesTableInfo);
- });
-});
-
-function addNSprefix() {
- $.ajax({
- url: "${pageContext.request.contextPath}/admin/namespaces/",
- type: "POST",
- async: false,
- data: $('#addNamespacePrefixForm').serialize(),
- error: function(jqXHR, textStatus, errorThrown) {
- vShowAJAXError("Could not add namespace prefix", jqXHR, errorThrown);
- },
- success: function(data, textSTatus, jqXHR) {
- namespacePrefixesTableInfo.table.fnAddData([$('#nsPrefixAdded').val(), $('#namespaceAdded').val()]);
- $('#addNamespacePrefixDiag').modal('hide');
- vShowSuccess("Successfully added namespace prefix.");
- }
- });
-}
-
-</script>
-
-<div class="modal fade" id="addNamespacePrefixDiag">
- <div class="modal-dialog">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
- <h4 class="modal-title">Add namespace prefix</h4>
- </div>
- <div class="modal-body">
- <form id="addNamespacePrefixForm" enctype="multipart/form-data">
- <fieldset>
- <div class="form-group">
- <label for="nsPrefixAdded">Prefix</label>
- <input name="nsPrefix" id="nsPrefixAdded" class="form-control" type="text" />
- </div>
-
- <div class="form-group">
- <label for="namespaceAdded">Namespace</label>
- <input name="namespace" id="namespaceAdded" class="form-control" type="text" />
- </div>
- </fieldset>
- </form>
- </div>
-
- <div class="modal-footer">
- <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
- <button type="button" class="btn btn-primary" onclick="addNSprefix()">Add</button>
- </div>
- </div>
- </div>
-</div>
-
-<div id="namespaces">
- <div class="listheading">
- <label>Defined Prefixes for Namespaces</label>
- <button class="rightbutton btn btn-danger btn-xs" type="button" onclick="deleteOnServerAndInTable(namespacePrefixesTableInfo, 'namespace', 'namespaces/', 1);">Remove</button>
- <button class="rightbutton btn btn-primary btn-xs" type="button" onclick="$('#addNamespacePrefixDiag').modal('show')">Add</button>
- </div>
- <table cellpadding="0" cellspacing="0" border="0" class="display" id="namespacePrefixesTable">
- <thead>
- <tr>
- <th>Prefix</th>
- <th>Namespace</th>
- </tr>
- </thead>
- <tbody>
- <c:forEach var="ns" items="${it.namespacesForJSP}">
- <tr>
- <td class="prefix">${w:getPrefix(ns.decoded)}</td>
- <td>${ns.decoded}</td>
- </tr>
- </c:forEach>
- </tbody>
- </table>
-</div>
-
-<script>
-$(document).on("click", "td.prefix",
- vCreateTdClickFunction(
- "${pageContext.request.contextPath}/admin/namespaces/",
- "nsPrefix",
- "namespace"));
-</script>
diff --git a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/admin/repository.jsp b/winery/org.eclipse.winery.repository/src/main/webapp/jsp/admin/repository.jsp
deleted file mode 100644
index 446bd46..0000000
--- a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/admin/repository.jsp
+++ /dev/null
@@ -1,101 +0,0 @@
-<%--
-/*******************************************************************************
- * Copyright (c) 2012-2013 University of Stuttgart.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and the Apache License 2.0 which both accompany this distribution,
- * and are available at http://www.eclipse.org/legal/epl-v10.html
- * and http://www.apache.org/licenses/LICENSE-2.0
- *
- * Contributors:
- * Oliver Kopp - initial API and implementation and/or initial documentation
- *******************************************************************************/
---%>
-<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
-
-<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
-<%@taglib prefix="t" tagdir="/WEB-INF/tags" %>
-
-<h4>General Repository Commands</h4>
-<div>
- <a href="repository/?dump" class="btn btn-primary">Dump Repository</a>
- <button class="btn btn-danger" onclick="clearRepository();" id="btnclearrepository" data-loading-text="Deleting...">Clear Repository</button>
- <button class="btn btn-default" onclick="$('#upRepoZipDiag').modal('show');">Import Repository</button>
-</div>
-
-<%
-org.eclipse.winery.repository.backend.IRepository rep;
-rep = org.eclipse.winery.repository.Prefs.INSTANCE.getRepository();
-boolean isGitBasedRepo = (rep instanceof org.eclipse.winery.repository.backend.filebased.GitBasedRepository);
-
-org.eclipse.winery.repository.backend.filebased.GitBasedRepository repo = null;
-if (isGitBasedRepo) {
- repo = (org.eclipse.winery.repository.backend.filebased.GitBasedRepository) rep;
-}
-
-// We only support the commit and reset buttons if we can authenticate at the repository
-// This is a hack to offer different versions of winery at dev.winery.opentosca.org and winery.opentosca.org
-isGitBasedRepo = isGitBasedRepo && (repo.authenticationInfoAvailable());
-
-if (isGitBasedRepo) {
-%>
-<h4>Versioning</h4>
-<div>
-<button id="commitBtn" class="btn btn-default" onclick="doCommit();" data-loading-text="committing...">Commit</button>
-<button id="resetBtn" class="btn btn-danger" onclick="doReset();" data-loading-text="resetting...">Reset</button>
-</div>
-
-<script>
-function doCommit() {
- $("#commitBtn").button("loading");
- $.ajax({
- url: "repository/?commit",
- async: false,
- error: function(jqXHR, textStatus, errorThrown) {
- $("#commitBtn").button("reset");
- vShowAJAXError("Could not commit", jqXHR, errorThrown);
- },
- success: function(data, textSTatus, jqXHR) {
- $("#commitBtn").button("reset");
- vShowSuccess("Successfully committed changes.");
- }
- });
-}
-
-function doReset() {
- $("#resetBtn").button("loading");
- $.ajax({
- url: "repository/?reset",
- async: false,
- error: function(jqXHR, textStatus, errorThrown) {
- $("#resetBtn").button("reset");
- vShowAJAXError("Could not reset", jqXHR, errorThrown);
- },
- success: function(data, textSTatus, jqXHR) {
- $("#resetBtn").button("reset");
- vShowSuccess("Successfully reset to last known state.");
- }
- });
-}
-</script>
-<%
-}
-%>
-
-<t:simpleSingleFileUpload
- title="Upload Repository Content"
- text="Repository dump file"
- URL="repository/"
- type="POST"
- id="upRepoZip"
- accept="application/zip" />
-
-<script>
-function clearRepository() {
- deleteResource('the complete repository', 'repository/',
- function() {$("#btnclearrepository").button("reset");},
- function() {$("#btnclearrepository").button("reset");},
- function() {$("#btnclearrepository").button("loading");}
- );
-}
-</script>
diff --git a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/admin/types/types.jsp b/winery/org.eclipse.winery.repository/src/main/webapp/jsp/admin/types/types.jsp
deleted file mode 100644
index 25b2e0f..0000000
--- a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/admin/types/types.jsp
+++ /dev/null
@@ -1,105 +0,0 @@
-<%--
-/*******************************************************************************
- * Copyright (c) 2012-2013 University of Stuttgart.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and the Apache License 2.0 which both accompany this distribution,
- * and are available at http://www.eclipse.org/legal/epl-v10.html
- * and http://www.apache.org/licenses/LICENSE-2.0
- *
- * Contributors:
- * Oliver Kopp - initial API and implementation and/or initial documentation
- * Yves Schubert - switch to bootstrap 3
- *******************************************************************************/
---%>
-<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
-
-<div class="listheading">
- <button class="rightbutton btn btn-danger btn-sm" type="button" onclick="deleteOnServerAndInTable(typesTableInfo, 'Type', '${it.URL}', 1);">Remove</button>
- <button class="rightbutton btn btn-primary btn-sm" type="button" onclick="$('#addTypeShortnameDiag').modal('show');">Add</button>
-</div>
-
-<table id="typeswithshortnametable">
-
-<thead>
- <tr>
- <th>Short name</th>
- <th>Long Name</th>
- </tr>
-</thead>
-
-<tbody>
- <c:forEach var="type" items="${it.types}">
- <tr>
- <td class="shortname editable">${type.shortName}</td>
- <td>${type.type}</td>
- </tr>
- </c:forEach>
-</tbody>
-
-</table>
-
-
-<div class="modal fade" id="addTypeShortnameDiag">
- <div class="modal-dialog">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
- <h4 class="modal-title">Add short name</h4>
- </div>
- <div class="modal-body">
- <form id="addTypeShortnameForm" enctype="multipart/form-data">
- <fieldset>
- <div class="form-group">
- <label for="shortname">Short name</label>
- <input name="shortname" id="shortname" class="form-control" type="text" />
- </div>
- <div class="form-group">
- <label for="type">Type</label>
- <input name="type" id="type" class="form-control" type="text" />
- </div>
- </fieldset>
- </form>
- </div>
-
- <div class="modal-footer">
- <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
- <button type="button" class="btn btn-primary" onclick="addShortNameAndType();">Add</button>
- </div>
- </div>
- </div>
-</div>
-
-
-<script>
-$(document).on("click", "td.shortname",
- vCreateTdClickFunction(
- "${it.URL}",
- "shortname",
- "type"));
-
-var typesTableInfo = {
- id: '#typeswithshortnametable'
-};
-require(["winery-support"], function(ws) {
- ws.initTable(typesTableInfo);
-});
-
-function addShortNameAndType() {
- $.ajax({
- url: "${it.URL}",
- type: "POST",
- async: false,
- data: $('#addTypeShortnameForm').serialize(),
- error: function(jqXHR, textStatus, errorThrown) {
- vShowAJAXError("Could not add type information", jqXHR, errorThrown);
- },
- success: function(data, textSTatus, jqXHR) {
- typesTableInfo.table.fnAddData([$('#shortname').val(), $('#type').val()]);
- $('#addTypeShortnameDiag').modal('hide');
- vShowSuccess("Successfully added type information.");
- }
- });
-}
-
-</script>
diff --git a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/artifacts/artifacts.jsp b/winery/org.eclipse.winery.repository/src/main/webapp/jsp/artifacts/artifacts.jsp
deleted file mode 100644
index 89b6fca..0000000
--- a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/artifacts/artifacts.jsp
+++ /dev/null
@@ -1,141 +0,0 @@
-<%--
-/*******************************************************************************
- * Copyright (c) 2012-2013 University of Stuttgart.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and the Apache License 2.0 which both accompany this distribution,
- * and are available at http://www.eclipse.org/legal/epl-v10.html
- * and http://www.apache.org/licenses/LICENSE-2.0
- *
- * Contributors:
- * Oliver Kopp - initial API and implementation and/or initial documentation
- * Yves Schubert - switch to bootstrap 3
- *******************************************************************************/
---%>
-<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
-<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
-<%@taglib prefix="v" uri="http://www.eclipse.org/winery/repository/functions"%>
-<%@taglib prefix="ct" tagdir="/WEB-INF/tags/common" %>
-
-<%--
-Parameter
-isDeploymentArtifact: true/false
---%>
-
-<script>
-var artifactsTableInfo = {
- id : '#artifactsTable'
-};
-
-<c:choose>
- <c:when test="${it.isDeploymentArtifacts}">
- <c:set var="URL" value="deploymentartifacts/" />
- <c:set var="name" value="Deployment" />
- <c:set var="interfacesOfAssociatedType" value="<%=null%>" />
- </c:when>
- <c:otherwise>
- <c:set var="URL" value="implementationartifacts/" />
- <c:set var="name" value="Implementation" />
- <c:set var="interfacesOfAssociatedType" value="${it.interfacesOfAssociatedType}" />
- </c:otherwise>
-</c:choose>
-
-
-$(function() {
- require(["winery-support"], function(ws) {
- ws.initTable(artifactsTableInfo);
- });
- <jsp:include page="/jsp/setupTriggerRemoveByDELKey.jsp" />
-});
-
-/**
- * This function directly accesses the fields of the dialog, because the return value of the server is XML and we do not want to parse XML
- *
- * @param artifactInfo = {name, interfaceName (may be undefined), operationName (may be undefined), artifactTemplate (QName, may be undefined), artifactTemplateName (may be undefined), artifactType}
- */
-function artifactAddedSuccessfully(artifactInfo) {
- require(["winery-support-common"], function(wsc) {
- var data = [artifactInfo.name<c:if test="${not it.isDeploymentArtifacts}">, artifactInfo.interfaceName, artifactInfo.operationName</c:if>];
-
- // artifactTemplate
- var link = "";
- if (artifactInfo.artifactTemplate) {
- var nsAndId = wsc.getNamespaceAndLocalNameFromQName(artifactInfo.artifactTemplate);
- link = '<a href="';
- link = link + makeArtifactTemplateURL("${pageContext.request.contextPath}", nsAndId.namespace, nsAndId.localname);
- link = link + '">';
- link = link + artifactInfo.name;
- link = link + "</a>";
- }
- // table field has to be filled even if no artifact template has been created
- data.push(link);
-
- // artifactType
- var href = wsc.makeArtifactTypeURLFromQName("${pageContext.request.contextPath}", artifactInfo.artifactType);
- link = '<a href="';
- link = link + href;
- link = link + '">';
- link = link + wsc.getNamespaceAndLocalNameFromQName(artifactInfo.artifactType).localname;
- link = link + "</a>";
- data.push(link);
-
- // artifactSpecificContent is emtpy as we do not allow addition of it in the UI
- data.push("");
-
- artifactsTableInfo.table.fnAddData(data);
- });
-}
-
-</script>
-
-<ct:artifactcreationdialog
- onSuccessfulArtifactCreationFunction="artifactAddedSuccessfully"
- isDeploymentArtifact="${it.isDeploymentArtifacts}"
- interfacesOfAssociatedType="${interfacesOfAssociatedType}"
- name="${name}"
- allArtifactTypes="${it.allArtifactTypes}"
- URL="'${URL}'"
- repositoryURL="${pageContext.request.contextPath}"
- allNamespaces="${v:allNamespaces()}"
- defaultNSForArtifactTemplate="TODO"
-/>
-
-<div id="artifacts">
- <div class="listheading">
- <label>Available ${name} Artifacts</label>
- <button class="rightbutton btn btn-danger btn-xs" type="button" onclick="deleteOnServerAndInTable(artifactsTableInfo, '${name} Artifact', '${URL}');">Remove</button>
- <button class="rightbutton btn btn-primary btn-xs" type="button" onclick="openAdd${name}ArtifactDiag();">Add</button>
- </div>
- <table cellpadding="0" cellspacing="0" border="0" class="display" id="artifactsTable">
- <thead>
- <tr>
- <th>Name</th>
- <c:if test="${not it.isDeploymentArtifacts}">
- <th>Interface Name</th>
- <th>Operation Name</th>
- </c:if>
- <th>Artifact Template</th>
- <th>Artifact Type</th>
- <th>Specific Content</th>
- </tr>
- </thead>
- <tbody>
- <c:forEach var="a" items="${it.allArtifactResources}">
- <tr>
- <td>${a.a.name}</td>
- <c:if test="${not it.isDeploymentArtifacts}">
- <td>${a.a.interfaceName}</td>
- <td>${a.a.operationName}</td>
- </c:if>
- <td><c:if test="${not empty a.a.artifactRef}"><a href="${pageContext.request.contextPath}/artifacttemplates/${v:DoubleURLencode(a.a.artifactRef)}/">${a.a.artifactRef.localPart}</a></c:if></td>
- <td><a href="${pageContext.request.contextPath}/artifacttypes/${v:DoubleURLencode(a.a.artifactType)}">${a.a.artifactType.localPart}</a></td>
- <td><c:if test="${not empty a.a.any}">
- <!-- TODO: convert to bootstrap <a href="javascript: $.msgBox({title: 'Artifact Specific Content', content: '${v:doubleEscapeHTMLAndThenConvertNL2BR(a.a.any)}', type: 'info'});">show</a> -->
- (exists)
- </c:if></td>
-
- </tr>
- </c:forEach>
- </tbody>
- </table>
-</div>
diff --git a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/componentnaming.jspf b/winery/org.eclipse.winery.repository/src/main/webapp/jsp/componentnaming.jspf
deleted file mode 100644
index 877e60c..0000000
--- a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/componentnaming.jspf
+++ /dev/null
@@ -1,28 +0,0 @@
-<%--
-/*******************************************************************************
- * Copyright (c) 2012-2013 University of Stuttgart.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and the Apache License 2.0 which both accompany this distribution,
- * and are available at http://www.eclipse.org/legal/epl-v10.html
- * and http://www.apache.org/licenses/LICENSE-2.0
- *
- * Contributors:
- * Oliver Kopp - initial API and implementation and/or initial documentation
- *******************************************************************************/
---%>
-<%--
-
-Heading for a selected component (service template, node type, relationship type)
-
-Displays name + namespace
-
---%>
-<div class="informationContainer">
- <div class="name">
- ${it.name}
- </div>
- <div class="namespace">
- ${it.namespace}
- </div>
-</div>
diff --git a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/documentation.jsp b/winery/org.eclipse.winery.repository/src/main/webapp/jsp/documentation.jsp
deleted file mode 100644
index 55946a1..0000000
--- a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/documentation.jsp
+++ /dev/null
@@ -1,87 +0,0 @@
-<%--
-/*******************************************************************************
- * Copyright (c) 2012-2013 University of Stuttgart.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and the Apache License 2.0 which both accompany this distribution,
- * and are available at http://www.eclipse.org/legal/epl-v10.html
- * and http://www.apache.org/licenses/LICENSE-2.0
- *
- * Contributors:
- * Oliver Kopp - initial API and implementation and/or initial documentation
- *******************************************************************************/
---%>
-<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
-<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
-<%@taglib prefix="w" uri="http://www.eclipse.org/winery/repository/functions" %>
-
-<%-- TODO: source (external documentation) and lang attributes not yet supported --%>
-
-<c:if test="${empty it}">
- <div class="form-group">
- <div class="form-control" id="documentation"></div>
- </div>
- <script>
- $("#documentation").editable({
- type: "wysihtml5",
- send: "always",
- success: function(response, newValue) {
- $.ajax({
- type: "POST",
- async: false,
- "data": newValue,
- "url": "documentation/",
- dataType: "text",
- contentType: "text/html",
- error: function(jqXHR, textStatus, errorThrown) {
- vShowAJAXError("Could not create documentation", jqXHR, errorThrown);
- },
- success: function(resData, textStatus, jqXHR) {
- vShowSuccess("Successfully created the documentation");
- doTheTabSelection();
- }
- });
- }
- });
- </script>
-</c:if>
-
-
-<c:if test="${not empty it}">
- <script>var documentationURL = {};</script>
- <c:forEach var="documentation" items="${it}" varStatus="status">
- <div class="form-group">
- <%-- we only print a heading if we have multiple documentations. Otherwise, the documentation itself should be displayed --%>
- <c:if test="${fn:length(it) > 1}"><label class="label-form">Documentation ${status.index}</label></c:if>
- <div class="form-control" id="documentation${status.index}">
- <c:forEach items="${documentation.content}" var="content">${content}</c:forEach>
- </div>
- </div>
- <c:set var="text" value="${w:XML(documentation)}"></c:set><!-- required to calculate the hashCode -->
- <c:set var="hash" value="<%=pageContext.getAttribute(\"text\").hashCode()%>"></c:set>
- <script>
- documentationURL[${status.index}] = "documentation/${hash}";
- $("#documentation${status.index}").editable({
- type: "wysihtml5",
- send: "always",
- success: function(response, newValue) {
- $.ajax({
- type: "PUT",
- async: false,
- "data": newValue,
- "url": documentationURL[${status.index}],
- dataType: "text",
- contentType: "text/html",
- error: function(jqXHR, textStatus, errorThrown) {
- vShowAJAXError("Could not update documentation", jqXHR, errorThrown);
- },
- success: function(resData, textStatus, jqXHR) {
- vShowSuccess("Successfully updated the documentation");
- documentationURL[${status.index}] = "documentation/" + resData;
- }
- });
- }
- });
- </script>
- </c:forEach>
-</c:if>
diff --git a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytemplates/artifacttemplates/artifacttemplate.jsp b/winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytemplates/artifacttemplates/artifacttemplate.jsp
deleted file mode 100644
index 60f95f2..0000000
--- a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytemplates/artifacttemplates/artifacttemplate.jsp
+++ /dev/null
@@ -1,32 +0,0 @@
-<%--
-/*******************************************************************************
- * Copyright (c) 2012-2013 University of Stuttgart.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and the Apache License 2.0 which both accompany this distribution,
- * and are available at http://www.eclipse.org/legal/epl-v10.html
- * and http://www.apache.org/licenses/LICENSE-2.0
- *
- * Contributors:
- * Oliver Kopp - initial API and implementation and/or initial documentation
- *******************************************************************************/
---%>
-<%@taglib prefix="t" tagdir="/WEB-INF/tags" %>
-<%@taglib prefix="w" uri="http://www.eclipse.org/winery/repository/functions" %>
-
-<%@page import="org.eclipse.winery.repository.resources.SubMenuData"%>
-
-<%
-java.util.List<SubMenuData> subMenus = new java.util.ArrayList<SubMenuData>();
-
-SubMenuData data;
-
-data = new SubMenuData("#files", "Files");
-subMenus.add(data);
-
-data = new SubMenuData("#properties", "Properties");
-subMenus.add(data);
-%>
-
-<t:componentinstancewithName cssClass="artifactTemplate" selected="ArtifactTemplate" subMenus="<%=subMenus%>" type="${w:artifactTypeQName2href(it.type)}">
-</t:componentinstancewithName>
diff --git a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytemplates/artifacttemplates/files.jsp b/winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytemplates/artifacttemplates/files.jsp
deleted file mode 100644
index 1c06254..0000000
--- a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytemplates/artifacttemplates/files.jsp
+++ /dev/null
@@ -1,18 +0,0 @@
-<%--
-/*******************************************************************************
- * Copyright (c) 2012-2013 University of Stuttgart.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and the Apache License 2.0 which both accompany this distribution,
- * and are available at http://www.eclipse.org/legal/epl-v10.html
- * and http://www.apache.org/licenses/LICENSE-2.0
- *
- * Contributors:
- * Oliver Kopp - initial API and implementation and/or initial documentation
- *******************************************************************************/
---%>
-<%@page contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
-
-<%@taglib prefix="fup" tagdir="/WEB-INF/tags/common"%>
-
-<fup:jquery-file-upload-full loadexistingfiles="true"></fup:jquery-file-upload-full>
diff --git a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytemplates/policytemplates/policytemplate.jsp b/winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytemplates/policytemplates/policytemplate.jsp
deleted file mode 100644
index e0e340c..0000000
--- a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytemplates/policytemplates/policytemplate.jsp
+++ /dev/null
@@ -1,29 +0,0 @@
-<%--
-/*******************************************************************************
- * Copyright (c) 2012-2013 University of Stuttgart.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and the Apache License 2.0 which both accompany this distribution,
- * and are available at http://www.eclipse.org/legal/epl-v10.html
- * and http://www.apache.org/licenses/LICENSE-2.0
- *
- * Contributors:
- * Oliver Kopp - initial API and implementation and/or initial documentation
- *******************************************************************************/
---%>
-<%@taglib prefix="t" tagdir="/WEB-INF/tags" %>
-<%@taglib prefix="w" uri="http://www.eclipse.org/winery/repository/functions" %>
-
-<%@page import="org.eclipse.winery.repository.resources.SubMenuData"%>
-
-<%
-java.util.List<SubMenuData> subMenus = new java.util.ArrayList<SubMenuData>();
-
-SubMenuData data;
-
-data = new SubMenuData("#properties", "Properties");
-subMenus.add(data);
-%>
-
-<t:componentinstancewithName cssClass="policyTemplate" selected="PolicyTemplate" subMenus="<%=subMenus%>" type="${w:policyTypeQName2href(it.type)}">
-</t:componentinstancewithName>
diff --git a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytemplates/properties.jsp b/winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytemplates/properties.jsp
deleted file mode 100644
index 61134f2..0000000
--- a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytemplates/properties.jsp
+++ /dev/null
@@ -1,92 +0,0 @@
-<%--
-/*******************************************************************************
- * Copyright (c) 2012-2013 University of Stuttgart.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and the Apache License 2.0 which both accompany this distribution,
- * and are available at http://www.eclipse.org/legal/epl-v10.html
- * and http://www.apache.org/licenses/LICENSE-2.0
- *
- * Contributors:
- * Oliver Kopp - initial API and implementation and/or initial documentation
- *******************************************************************************/
---%>
-<%@page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
-
-<%@page import="org.eclipse.winery.model.tosca.TEntityTemplate"%>
-<%@page import="org.eclipse.winery.model.tosca.TEntityType"%>
-<%@page import="org.eclipse.winery.common.ModelUtilities"%>
-<%@page import="org.eclipse.winery.repository.Utils"%>
-
-<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
-<%@taglib prefix="props" tagdir="/WEB-INF/tags/common/templates" %>
-<%@taglib prefix="w" uri="http://www.eclipse.org/winery/repository/functions"%>
-<%@taglib prefix="wc" uri="http://www.eclipse.org/winery/functions" %>
-
-<script type="text/javascript" src="${pageContext.request.contextPath}/components/XMLWriter/XMLWriter.js"></script>
-
-<style>
- div.header {
- display: none;
- }
- span.elementName {
- display: none;
- }
- span.namespace {
- display: none;
- }
-</style>
-
-<props:propertiesBasic></props:propertiesBasic>
-
-<c:set var="type" value="${w:typeForTemplate(it.template)}" />
-
-<div id="containerForPropertiesContainer">
-<div> <%-- This div is required by props:properties to be consistent with a node template. This mirrors div class="content" --%>
-<props:properties
- propertiesDefinition="${type.propertiesDefinition}"
- wpd="${wc:winerysPropertiesDefinition(type)}"
- template="${it.template}"
- pathToImages="${w:topologyModelerURI()}/images/">
-</props:properties>
-</div>
-</div>
-
-<c:choose>
- <c:when test="${not empty type.propertiesDefinition or not empty wc:winerysPropertiesDefinition(type)}">
- <button id="propsSaveBtn" data-loading-text="Saving..." type="button" class="btn btn-primary btn-sm" onclick="saveProperties();">Save</button>
- </c:when>
- <c:otherwise>
- The type does not have a &ldquo;properties definition&rdquo;.
- </c:otherwise>
-</c:choose>
-
-<script>
-$(".KVPropertyValue").editable();
-
-// similar to topology modeler's index.jsp save() function
-function saveProperties() {
- $("#propsSaveBtn").button('loading');
- var w = new XMLWriter("utf-8");
- w.writeStartDocument();
- var divContainer = $("#containerForPropertiesContainer");
- savePropertiesFromDivToXMLWriter(divContainer.children("div").children(".propertiesContainer"), w, true);
- w.writeEndDocument();
-
- $.ajax({
- url: "properties/",
- type: "PUT",
- contentType: 'text/xml',
- data: w.flush(),
- success: function(data, textStatus, jqXHR) {
- $("#propsSaveBtn").button('reset');
- vShowSuccess("successfully saved.");
- },
- error: function(jqXHR, textStatus, errorThrown) {
- $("#propsSaveBtn").button('reset');
- vShowAJAXError("Could not save", errorThrown, jqXHR.responseText);
- }
- });
-
-}
-</script>
diff --git a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypeimplementations/nodetypeimplementations/nodetypeimplementation.jsp b/winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypeimplementations/nodetypeimplementations/nodetypeimplementation.jsp
deleted file mode 100644
index eec30c2..0000000
--- a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypeimplementations/nodetypeimplementations/nodetypeimplementation.jsp
+++ /dev/null
@@ -1,33 +0,0 @@
-<%--
-/*******************************************************************************
- * Copyright (c) 2012-2013 University of Stuttgart.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and the Apache License 2.0 which both accompany this distribution,
- * and are available at http://www.eclipse.org/legal/epl-v10.html
- * and http://www.apache.org/licenses/LICENSE-2.0
- *
- * Contributors:
- * Oliver Kopp - initial API and implementation and/or initial documentation
- *******************************************************************************/
---%>
-<%@taglib prefix="t" tagdir="/WEB-INF/tags" %>
-<%@taglib prefix="w" uri="http://www.eclipse.org/winery/repository/functions" %>
-
-<%@page import="org.eclipse.winery.repository.resources.SubMenuData"%>
-
-<%
-java.util.List<SubMenuData> subMenus = new java.util.ArrayList<SubMenuData>();
-
-SubMenuData data;
-
-data = new SubMenuData("#implementationartifacts", "Implementation Artifacts");
-subMenus.add(data);
-
-data = new SubMenuData("#deploymentartifacts", "Deployment Artifacts");
-subMenus.add(data);
-
-%>
-
-<t:componentinstancewithNameDerivedFromAbstractFinal cssClass="nodeTypeImplementation" selected="NodeTypeImplementation" subMenus="<%=subMenus%>" implementationFor="${w:nodeTypeQName2href(it.type)}">
-</t:componentinstancewithNameDerivedFromAbstractFinal>
diff --git a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypeimplementations/relationshiptypeimplementations/relationshiptypeimplementation.jsp b/winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypeimplementations/relationshiptypeimplementations/relationshiptypeimplementation.jsp
deleted file mode 100644
index 97a9ad5..0000000
--- a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypeimplementations/relationshiptypeimplementations/relationshiptypeimplementation.jsp
+++ /dev/null
@@ -1,29 +0,0 @@
-<%--
-/*******************************************************************************
- * Copyright (c) 2012-2013 University of Stuttgart.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and the Apache License 2.0 which both accompany this distribution,
- * and are available at http://www.eclipse.org/legal/epl-v10.html
- * and http://www.apache.org/licenses/LICENSE-2.0
- *
- * Contributors:
- * Oliver Kopp - initial API and implementation and/or initial documentation
- *******************************************************************************/
---%>
-<%@taglib prefix="t" tagdir="/WEB-INF/tags" %>
-<%@ taglib uri="http://www.eclipse.org/winery/repository/functions" prefix="w" %>
-
-<%@page import="org.eclipse.winery.repository.resources.SubMenuData"%>
-
-<%
-java.util.List<SubMenuData> subMenus = new java.util.ArrayList<SubMenuData>();
-
-SubMenuData data;
-
-data = new SubMenuData("#implementationartifacts", "Implementation Artifacts");
-subMenus.add(data);
-%>
-
-<t:componentinstancewithNameDerivedFromAbstractFinal cssClass="relationshipTypeImplementation" selected="RelationshipTypeImplementation" subMenus="<%=subMenus%>" implementationFor="${w:nodeTypeQName2href(it.type)}">
-</t:componentinstancewithNameDerivedFromAbstractFinal>
diff --git a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypes/artifacttypes/artifacttype.jsp b/winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypes/artifacttypes/artifacttype.jsp
deleted file mode 100644
index c51630a..0000000
--- a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypes/artifacttypes/artifacttype.jsp
+++ /dev/null
@@ -1,26 +0,0 @@
-<%--
-/*******************************************************************************
- * Copyright (c) 2012-2013 University of Stuttgart.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and the Apache License 2.0 which both accompany this distribution,
- * and are available at http://www.eclipse.org/legal/epl-v10.html
- * and http://www.apache.org/licenses/LICENSE-2.0
- *
- * Contributors:
- * Oliver Kopp - initial API and implementation and/or initial documentation
- *******************************************************************************/
---%>
-<%@taglib prefix="t" tagdir="/WEB-INF/tags" %>
-
-<%--
-TODO: implement update / subresource "file extension"
-<div class="center">Associated File Extension</div>
-
- <div class="middle" id="ccontainer">
- <input name="fileextension" type="text" onblur="updateValue('fileextension', this.value)" <c:if test="${not empty it.associatedFileExtension}"> value="${it.associatedFileExtension}" </c:if> />
- </div>
---%>
-
-<t:entitytype cssClass="artifactType" selected="ArtifactType">
-</t:entitytype>
diff --git a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypes/capabilitytypes/capabilitytype.jsp b/winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypes/capabilitytypes/capabilitytype.jsp
deleted file mode 100644
index 2e2b2f0..0000000
--- a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypes/capabilitytypes/capabilitytype.jsp
+++ /dev/null
@@ -1,17 +0,0 @@
-<%--
-/*******************************************************************************
- * Copyright (c) 2012-2013 University of Stuttgart.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and the Apache License 2.0 which both accompany this distribution,
- * and are available at http://www.eclipse.org/legal/epl-v10.html
- * and http://www.apache.org/licenses/LICENSE-2.0
- *
- * Contributors:
- * Oliver Kopp - initial API and implementation and/or initial documentation
- *******************************************************************************/
---%>
-<%@taglib prefix="t" tagdir="/WEB-INF/tags" %>
-
-<t:entitytype cssClass="capabilityType" selected="CapabilityType">
-</t:entitytype>
diff --git a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypes/implementations.jsp b/winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypes/implementations.jsp
deleted file mode 100644
index 46ef5a8..0000000
--- a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypes/implementations.jsp
+++ /dev/null
@@ -1,63 +0,0 @@
-<%--
-/*******************************************************************************
- * Copyright (c) 2012-2013 University of Stuttgart.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and the Apache License 2.0 which both accompany this distribution,
- * and are available at http://www.eclipse.org/legal/epl-v10.html
- * and http://www.apache.org/licenses/LICENSE-2.0
- *
- * Contributors:
- * Oliver Kopp - initial API and implementation and/or initial documentation
- * Yves Schubert - switch to bootstrap 3
- *******************************************************************************/
---%>
-<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
-
-<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
-<%@taglib prefix="t" tagdir="/WEB-INF/tags" %>
-
-<t:addComponentInstance
- label="${it.typeStr} Implementation"
- URL="${pageContext.request.contextPath}/${it.type}implementations/"
- onSuccess="implementationsTableInfo.table.fnAddData([$(\"#addComponentInstanceForm :input[name='namespace']\").val(), $(\"#addComponentInstanceForm :input[name='name']\").val()]);"
- type="${it.typeId.QName}"
- openinnewwindow="false"
- />
-
-<script>
-var implementationsTableInfo = {
- id: '#implementationsTable'
-};
-
-require(["winery-support"], function(ws) {
- ws.initTable(implementationsTableInfo, {
- "aoColumns": [
- { "sTitle": "namespace" },
- { "sTitle": "name" }
- ],
- "aaData" : ${it.implementationsTableData}
- });
-});
-
- function openImplementationEditor() {
- var namespace = implementationsTableInfo.table.fnGetData(implementationsTableInfo.selectedRow,0);
- var id = implementationsTableInfo.table.fnGetData(implementationsTableInfo.selectedRow,1);
- window.open("${pageContext.request.contextPath}/${it.type}implementations/" + encodeID(namespace) + "/" + encodeID(id), "_self");
- }
-
-</script>
-
-<p>
-This page shows implementations available for this type.
-Go to <a href="${pageContext.request.contextPath}/other/">Other Elements</a> to get an overview on all implementations stored in this repository.
-</p>
-
- <div id="implementations">
-
- <button class="rightbutton btn btn-danger btn-xs" type="button" onclick="deleteOnServerAndInTable(implementationsTableInfo, '${it.typeStr} Implementation', '${pageContext.request.contextPath}/${it.type}implementations/', 1, 1, 0);">Remove</button>
- <button class="rightbutton btn btn-primary btn-xs" type="button" onclick="openNewCIdiag();">Add</button>
- <button class="rightbutton btn btn-default btn-xs" type="button" onclick="openImplementationEditor();">Edit</button>
-
- <table cellpadding="0" cellspacing="0" border="0" class="display" id="implementationsTable"></table>
- </div>
diff --git a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypes/instancestates.jsp b/winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypes/instancestates.jsp
deleted file mode 100644
index 059ae55..0000000
--- a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypes/instancestates.jsp
+++ /dev/null
@@ -1,86 +0,0 @@
-<%--
-/*******************************************************************************
- * Copyright (c) 2012-2013 University of Stuttgart.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and the Apache License 2.0 which both accompany this distribution,
- * and are available at http://www.eclipse.org/legal/epl-v10.html
- * and http://www.apache.org/licenses/LICENSE-2.0
- *
- * Contributors:
- * Oliver Kopp - initial API and implementation and/or initial documentation
- * Yves Schubert - switch to bootstrap 3
- *******************************************************************************/
---%>
-<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
-
-<div class="modal fade" id="addStateDiag">
- <div class="modal-dialog">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
- <h4 class="modal-title">Add State</h4>
- </div>
- <div class="modal-body">
- <form id="addPropertyForm" enctype="multipart/form-data" method="post">
- <div class="row">
- <label>
- State: <input name="state" id="state" type="text" />
- </label>
- </div>
- </form>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
- <button type="button" class="btn btn-primary" data-dismiss="modal" onclick="createState();">Add</button>
- </div>
- </div>
- </div>
-</div>
-
-<div id="Properties">
- <button class="rightbutton btn btn-danger btn-xs" type="button" onclick="deleteOnServerAndInTable(propertiesTableInfo, 'InstanceState', 'instancestates/');">Remove</button>
- <button class="rightbutton btn btn-primary btn-xs" type="button" onclick="$('#addStateDiag').modal('show');">Add</button>
-
- <table cellpadding="0" cellspacing="0" border="0" class="display" id="propertiesTable">
- <thead>
- <tr>
- <th>State</th>
- </tr>
- </thead>
- <tbody>
- <c:forEach var="t" items="${it.instanceStates}">
- <tr>
- <td>${t}</td>
- </tr>
- </c:forEach>
- </tbody>
- </table>
-</div>
-
-<script>
-var propertiesTableInfo = {
- id: '#propertiesTable'
-};
-
-require(["winery-support"], function(ws) {
- ws.initTable(propertiesTableInfo);
-});
-
-function createState() {
- $.ajax({
- url: "instancestates/",
- type: "POST",
- async: false,
- data: $('#addPropertyForm').serialize(),
- error: function(jqXHR, textStatus, errorThrown) {
- vShowError("Could not add instancestate: " + errorThrown + "<br/>" + jqXHR.responseText);
- },
- success: function(data, textStatus, jqXHR) {
- var dataToAdd = [$('#state').val()];
- propertiesTableInfo.table.fnAddData(dataToAdd);
- $('#addStateDiag').modal('hide');
- }
- });
-}
-</script>
diff --git a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypes/nodetypes/nodetype.jsp b/winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypes/nodetypes/nodetype.jsp
deleted file mode 100644
index f9d52d7..0000000
--- a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypes/nodetypes/nodetype.jsp
+++ /dev/null
@@ -1,44 +0,0 @@
-<%--
-/*******************************************************************************
- * Copyright (c) 2012-2013 University of Stuttgart.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and the Apache License 2.0 which both accompany this distribution,
- * and are available at http://www.eclipse.org/legal/epl-v10.html
- * and http://www.apache.org/licenses/LICENSE-2.0
- *
- * Contributors:
- * Oliver Kopp - initial API and implementation and/or initial documentation
- *******************************************************************************/
---%>
-<%@taglib prefix="t" tagdir="/WEB-INF/tags" %>
-
-<%@page import="org.eclipse.winery.repository.resources.SubMenuData"%>
-
-<%
-java.util.List<SubMenuData> subMenus = new java.util.ArrayList<SubMenuData>();
-
-SubMenuData data;
-
-data = new SubMenuData("#visualappearance", "Visual Appearance");
-subMenus.add(data);
-
-data = new SubMenuData("#instancestates", "Instance States");
-subMenus.add(data);
-
-data = new SubMenuData("#interfaces", "Interfaces");
-subMenus.add(data);
-
-data = new SubMenuData("#implementations", "Implementations");
-subMenus.add(data);
-
-data = new SubMenuData("#requirementdefinitions", "Requirement Definitions");
-subMenus.add(data);
-
-data = new SubMenuData("#capabilitydefinitions", "Capability Definitions");
-subMenus.add(data);
-
-%>
-
-<t:entitytype cssClass="nodeType" selected="NodeType" subMenus="<%=subMenus%>" image="true" twolines="true">
-</t:entitytype>
diff --git a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypes/nodetypes/reqandcapdefs/capdefs.jsp b/winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypes/nodetypes/reqandcapdefs/capdefs.jsp
deleted file mode 100644
index 7f2cc7d..0000000
--- a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypes/nodetypes/reqandcapdefs/capdefs.jsp
+++ /dev/null
@@ -1,17 +0,0 @@
-<%--
-/*******************************************************************************
- * Copyright (c) 2012-2014 University of Stuttgart.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and the Apache License 2.0 which both accompany this distribution,
- * and are available at http://www.eclipse.org/legal/epl-v10.html
- * and http://www.apache.org/licenses/LICENSE-2.0
- *
- * Contributors:
- * Oliver Kopp - initial API and implementation and/or initial documentation
- *******************************************************************************/
---%>
-<%@page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
-<%@taglib prefix="t" tagdir="/WEB-INF/tags/entitytypes/nodetypes/reqandcapdefs" %>
-
-<t:reqandcapdefs allTypes="${it.allTypes}" allSubResources="${it.allEntityResources}" url="capabilitydefinitions/" labelForSingleItem="Capability Definition" typeClass="<%=org.eclipse.winery.model.tosca.TCapabilityType.class%>"/>
diff --git a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypes/nodetypes/reqandcapdefs/reqdefs.jsp b/winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypes/nodetypes/reqandcapdefs/reqdefs.jsp
deleted file mode 100644
index 08657a1..0000000
--- a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypes/nodetypes/reqandcapdefs/reqdefs.jsp
+++ /dev/null
@@ -1,17 +0,0 @@
-<%--
-/*******************************************************************************
- * Copyright (c) 2012-2014 University of Stuttgart.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and the Apache License 2.0 which both accompany this distribution,
- * and are available at http://www.eclipse.org/legal/epl-v10.html
- * and http://www.apache.org/licenses/LICENSE-2.0
- *
- * Contributors:
- * Oliver Kopp - initial API and implementation and/or initial documentation
- *******************************************************************************/
---%>
-<%@page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
-<%@taglib prefix="t" tagdir="/WEB-INF/tags/entitytypes/nodetypes/reqandcapdefs" %>
-
-<t:reqandcapdefs allTypes="${it.allTypes}" allSubResources="${it.allEntityResources}" url="requirementdefinitions/" labelForSingleItem="Requirement Definition" typeClass="<%=org.eclipse.winery.model.tosca.TRequirementType.class%>"/>
diff --git a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypes/nodetypes/visualappearance.jsp b/winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypes/nodetypes/visualappearance.jsp
deleted file mode 100644
index b432be6..0000000
--- a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypes/nodetypes/visualappearance.jsp
+++ /dev/null
@@ -1,68 +0,0 @@
-<%--
-/*******************************************************************************
- * Copyright (c) 2012-2013 University of Stuttgart.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and the Apache License 2.0 which both accompany this distribution,
- * and are available at http://www.eclipse.org/legal/epl-v10.html
- * and http://www.apache.org/licenses/LICENSE-2.0
- *
- * Contributors:
- * Oliver Kopp - initial API and implementation and/or initial documentation
- * Yves Schubert - switch to bootstrap 3
- *******************************************************************************/
---%>
-<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
-<%@taglib prefix="t" tagdir="/WEB-INF/tags" %>
-
-<script type='text/javascript' src='${pageContext.request.contextPath}/components/raphael/raphael.js'></script>
-<script type='text/javascript' src='${pageContext.request.contextPath}/components/colorwheel/javascripts/colorwheel.js'></script>
-
-<script>
-<%-- Required for multiple upload dialogs
- see https://github.com/blueimp/jQuery-File-Upload/wiki/Options --%>
-$(document).bind('drop dragover', function (e) {
- e.preventDefault();
-});
-</script>
-
-<ul class="nav nav-tabs" id="myTab">
- <li class="active"><a href="#icons">Icons</a></li>
- <li><a href="#color">Color</a></li>
-</ul>
-
-<div class="tab-content">
- <div class="tab-pane active" id="icons">
- <br />
- <t:imageUpload
- label="Icon (16x16) used in palette"
- URL="visualappearance/16x16"
- id="upSmall"
- width="16px"
- resize="16"
- accept="image/*"/>
-
- <t:imageUpload
- label="Icon (50x50) used in the node template shapes"
- URL="visualappearance/50x50"
- id="upBig"
- width="50px"
- resize="50"
- accept="image/*"/>
- </div>
- <div class="tab-pane" id="color">
- <br />
- <form>
- <fieldset>
- <t:colorwheel label="Border Color" color="${it.borderColor}" id="bordercolor" url="bordercolor" />
- </fieldset>
- </form>
- </div>
-</div>
-
-<script>
-$('#myTab a').click(function (e) {
- e.preventDefault();
- $(this).tab('show');
-});
-</script>
diff --git a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypes/policytypes/appliesto.jsp b/winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypes/policytypes/appliesto.jsp
deleted file mode 100644
index ff15a39..0000000
--- a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypes/policytypes/appliesto.jsp
+++ /dev/null
@@ -1,25 +0,0 @@
-<%--
-/*******************************************************************************
- * Copyright (c) 2012-2013 University of Stuttgart.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and the Apache License 2.0 which both accompany this distribution,
- * and are available at http://www.eclipse.org/legal/epl-v10.html
- * and http://www.apache.org/licenses/LICENSE-2.0
- *
- * Contributors:
- * Oliver Kopp - initial API and implementation and/or initial documentation
- *******************************************************************************/
---%>
-<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
-
-<c:if test="${empty it.policyType.appliesTo.nodeTypeReference}">&ndash;</c:if>
-
-<ul>
-<c:forEach items="${it.policyType.appliesTo.nodeTypeReference}" var="nodeTypeReference">
-<li>${nodeTypeReference.typeRef}</li>
-</c:forEach>
-</ul>
-
-
-Update not yet implemented.
diff --git a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypes/policytypes/language.jsp b/winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypes/policytypes/language.jsp
deleted file mode 100644
index c1815bd..0000000
--- a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypes/policytypes/language.jsp
+++ /dev/null
@@ -1,21 +0,0 @@
-<%--
-/*******************************************************************************
- * Copyright (c) 2013 University of Stuttgart.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and the Apache License 2.0 which both accompany this distribution,
- * and are available at http://www.eclipse.org/legal/epl-v10.html
- * and http://www.apache.org/licenses/LICENSE-2.0
- *
- * Contributors:
- * Oliver Kopp - initial API and implementation and/or initial documentation
- *******************************************************************************/
---%>
-<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
-
-<c:choose>
- <c:when test="${empty it.language}">&ndash;</c:when>
- <c:otherwise>${it.language}</c:otherwise>
-</c:choose>
-
-Update not yet implemented.
diff --git a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypes/policytypes/policytype.jsp b/winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypes/policytypes/policytype.jsp
deleted file mode 100644
index 694abad..0000000
--- a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypes/policytypes/policytype.jsp
+++ /dev/null
@@ -1,32 +0,0 @@
-<%--
-/*******************************************************************************
- * Copyright (c) 2012-2013 University of Stuttgart.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and the Apache License 2.0 which both accompany this distribution,
- * and are available at http://www.eclipse.org/legal/epl-v10.html
- * and http://www.apache.org/licenses/LICENSE-2.0
- *
- * Contributors:
- * Oliver Kopp - initial API and implementation and/or initial documentation
- *******************************************************************************/
---%>
-<%@taglib prefix="t" tagdir="/WEB-INF/tags" %>
-
-<%@page import="org.eclipse.winery.repository.resources.SubMenuData"%>
-
-<%
-java.util.List<SubMenuData> subMenus = new java.util.ArrayList<SubMenuData>();
-
-SubMenuData data;
-
-data = new SubMenuData("#language", "Language");
-subMenus.add(data);
-
-data = new SubMenuData("#appliesto", "Applies To");
-subMenus.add(data);
-
-%>
-
-<t:entitytype cssClass="policyType" selected="PolicyType" subMenus="<%=subMenus%>">
-</t:entitytype>
diff --git a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypes/properties/propertiesDefinition.jsp b/winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypes/properties/propertiesDefinition.jsp
deleted file mode 100644
index a0e22df..0000000
--- a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypes/properties/propertiesDefinition.jsp
+++ /dev/null
@@ -1,320 +0,0 @@
-<%--
-/*******************************************************************************
- * Copyright (c) 2012-2013 University of Stuttgart.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and the Apache License 2.0 which both accompany this distribution,
- * and are available at http://www.eclipse.org/legal/epl-v10.html
- * and http://www.apache.org/licenses/LICENSE-2.0
- *
- * Contributors:
- * Oliver Kopp - initial API and implementation and/or initial documentation
- * Yves Schubert - switch to bootstrap 3
- *******************************************************************************/
---%>
-<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
-<%@taglib prefix="t" tagdir="/WEB-INF/tags"%>
-<%@taglib prefix="ct" tagdir="/WEB-INF/tags/common"%>
-<%@taglib prefix="w" uri="http://www.eclipse.org/winery/repository/functions"%>
-
-<%-- createResource of winery-support.js could be used. However, currently selects are not supported --%>
-<div class="modal fade" id="addPropertyDiag">
- <div class="modal-dialog">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
- <h4 class="modal-title">Add Property</h4>
- </div>
- <div class="modal-body">
- <form id="addPropertyForm">
- <div class="form-group">
- <label class="control-label" for="propName">Name</label>
- <input name="key" class="form-control" id="propName" type="text" />
- </div>
-
- <div class="form-group">
- <label class="control-label" for="propType">Type</label>
- <select name="type" class="form-control" id="propType">
- <c:forEach var="t" items="${it.availablePropertyTypes}">
- <option value="${t}">${t}</option>
- </c:forEach>
- </select>
- </div>
- </form>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
- <button type="button" class="btn btn-primary" onclick="createProperty();">Add</button>
- </div>
- </div>
- </div>
-</div>
-
-<script>
-function noneClicked() {
- disableKVproperties();
- clearXSDElementSelection();
- clearXSDTypeSelection();
- $.ajax({
- url: "propertiesdefinition/",
- type: 'DELETE',
- async: true,
- error: function(jqXHR, textStatus, errorThrown) {
- vShowAJAXError("Could not remove properties definition", jqXHR, errorThrown);
- }
- });
-}
-
-function clearXSDElementSelection() {
- $("#xsdelement").editable('setValue', "", true);
-}
-
-function clearXSDTypeSelection() {
- $("#xsdtype").editable('setValue', "", true);
-}
-
-$(function(){
- $("#xsdelement").editable({
- type: "select",
- url: "post/",
- pk: 1,
- source: ${w:allXSDElementDefinitionsForTypeAheadSelection()}
- });
- $("#xsdelement").on("click", function(e){
- $("#xsdelementradio").prop("checked", true);
- });
-
- $("#xsdtype").editable({
- type: "select",
- source: ${w:allXSDTypeDefinitionsForTypeAheadSelection()}
- });
- $("#xsdtype").on("click", function(e){
- $("#xsdtyperadio").prop("checked", true);
- });
-
- /* make UI more nice: enable click on label */
- $("#textnone").on("click", function(e){
- $("#nopropdef").prop("checked", true);
- noneClicked();
- });
- $("#textxmlelement").on("click", function(e){
- $("#xsdelementradio").prop("checked", true);
- disableKVproperties();
- clearXSDTypeSelection();
- });
- $("#textxmltype").on("click", function(e){
- $("#xsdtyperadio").prop("checked", true);
- disableKVproperties();
- clearXSDElementSelection();
- });
- $("#textcustomkv").on("click", function(e){
- $("#customkv").prop("checked", true);
- updateKVpropertiesVisibility();
- setKVPropertiesOnServer();
- clearXSDElementSelection();
- clearXSDTypeSelection();
- });
-
- $('#kvPropsTabs a').click(function (e) {
- e.preventDefault();
- $(this).tab('show');
- });
-
- $("#addPropertyDiag").on("shown.bs.modal", function() {
- $("#propName").focus();
- });
-});
-</script>
-
-<p>
- <%-- TODO: if clicked on the "label" of the input field (i.e., the content of the input tag), the input should be selected. This is not the default at HTML5 - see http://www.w3schools.com/tags/tryit.asp?filename=tryhtml5_input_type_radio --%>
-
- <input id="nopropdef" type="radio" name="kind" value="none" <c:if test="${not it.isWineryKeyValueProperties and empty it.entityType.propertiesDefinition.element and empty t.entityType.propertiesDefinition.type}">checked="checked"</c:if>><span class="cursorpointer" id="textnone">(none)</span></input>
- <br/>
-
- <input id="xsdelementradio" type="radio" name="kind" value="element" <c:if test="${not empty it.entityType.propertiesDefinition.element}">checked="checked"</c:if>><span class="cursorpointer" id="textxmlelement">XML element</span></input>
- <a href="#" id="xsdelement" data-url="propertiesdefinition/" data-send="always" data-title="Select XSD Element" data-value="${it.entityType.propertiesDefinition.element}"><c:if test="${not empty it.entityType.propertiesDefinition.element}">${it.entityType.propertiesDefinition.element.localPart}</c:if></a>
- <br/>
-
- <input id="xsdtyperadio" type="radio" name="kind" value="type" <c:if test="${not empty it.entityType.propertiesDefinition.type}">checked="checked"</c:if>><span class="cursorpointer" id="textxmltype">XML type</span></input>
- <a href="#" id="xsdtype" data-url="propertiesdefinition/" data-send="always" data-title="Select XSD Type" data-value="${it.entityType.propertiesDefinition.type}"><c:if test="${not empty it.entityType.propertiesDefinition.type}">${it.entityType.propertiesDefinition.type.localPart}</c:if></a>
- <br/>
-
-
- <input id="customkv" type="radio" name="kind" value="KV" <c:if test="${it.isWineryKeyValueProperties and not it.isWineryKeyValuePropertiesDerivedFromXSD}">checked="checked"</c:if>><span class="cursorpointer" id="textcustomkv">Custom key/value pairs</span></input>
-</p>
-
-<div id="Properties" style="display:none; margin-left:20px;">
- <ul class="nav nav-tabs" id="kvPropsTabs">
- <li class="active"><a href="#kvProps">Properties</a></li>
- <li><a href="#wrapper">Wrapping</a></li>
- </ul>
-
- <div class="tab-content">
- <div class="tab-pane active" id="kvProps">
-
- <button class="rightbutton btn btn-danger btn-xs" type="button" onclick="deleteOnServerAndInTable(propertiesTableInfo, 'Property', 'propertiesdefinition/winery/list/');">Remove</button>
- <button class="rightbutton btn btn-primary btn-xs" type="button" onclick="$('#addPropertyDiag').modal('show');">Add</button>
-
- <table cellpadding="0" cellspacing="0" border="0" class="display" id="propertiesTable">
- <thead>
- <tr>
- <th>Name</th>
- <th>Type</th>
- </tr>
- </thead>
- <tbody>
- <c:if test="${it.isWineryKeyValueProperties}">
- <c:forEach var="t" items="${it.propertyDefinitionKVList}">
- <tr>
- <td>${t.key}</td>
- <%-- FIXME: t.type is the short type, but we need the full type. Currently, there is no way to get the full type for a short type --%>
- <td>${t.type}</td>
- </tr>
- </c:forEach>
- </c:if>
- </tbody>
- </table>
- </div>
-
- <div class="tab-pane" id="wrapper">
- <form id="wrapperelementform" enctype="multipart/form-data">
- <fieldset>
- <div style="width:400px;">
- <div class="form-group">
- <label for="wrapperelement_name">Name of Wrapper Element</label>
- <a href="#" class="form-control" id="wrapperelement_name" data-url="propertiesdefinition/winery/elementname" data-send="always" data-title="Local Name" data-type="text" data-value="${it.elementName}"></a>
- </div>
- <t:namespaceChooser idOfInput="wrapperelement_ns" selected="${it.namespace}" allNamespaces="${w:allNamespaces()}"></t:namespaceChooser>
- </div>
- </fieldset>
- </form>
- </div>
- </div>
-</div>
-
-<script>
-function disableKVproperties() {
- $("#Properties").hide();
-}
-
-function enableKVproperties() {
- $("#Properties").show();
-}
-
-function updateKVpropertiesVisibility() {
- if ($("input[name='kind']:checked").val() == "KV") {
- enableKVproperties();
- } else {
- disableKVproperties();
- }
-}
-
-function setKVPropertiesOnServer() {
- $.ajax({
- url: "propertiesdefinition/winery/",
- type: "POST",
- async: true,
- error: function(jqXHR, textStatus, errorThrown) {
- vShowAJAXError("Could change to custom key/value pairs", jqXHR, errorThrown);
- }
- });
-}
-
-$(function() {
- // put change function on all inputs to get notified of any change by the user
- $("input[name='kind']").on("change", function(e) {
- // we do not POST something to the server as only concrete values really trigger a change on server side
- var target = e.currentTarget.value;
- if (target == "none") {
- noneClicked();
- } else if (target == "element") {
- disableKVproperties();
- clearXSDTypeSelection();
- } else if (target == "type") {
- disableKVproperties();
- clearXSDElementSelection();
- enableKVproperties();
- } else if (target == "KV") {
- <c:if test="${not it.isWineryKeyValuePropertiesDerivedFromXSD}">
- <%-- only empty the k/v properties if not derived from XSD--%>
- setKVPropertiesOnServer();
- </c:if>
- clearXSDElementSelection();
- clearXSDTypeSelection();
- } else {
- vShowError("UI not consistent to code");
- }
- });
-
- // initialization - display the custom box to enter k/vs only if KV is selected
- updateKVpropertiesVisibility();
-
- $("#wrapperelement_name").editable({
- ajaxOptions: {
- type: 'put'
- },
- params: function(params) {
- // adjust params according to Winery's expectations
- delete params.pk;
- params.name = params.value;
- delete params.value;
- return params;
- }
- }).on("save", function(e, params) {
- vShowSuccess("Successfully updated local name of wrapper element");
- });
-
- $("#wrapperelement_ns").on("change", function(e) {
- $.ajax({
- url: "propertiesdefinition/winery/namespace",
- type: "PUT",
- async: true,
- contentType: "text/plain",
- processData: false,
- data: e.val,
- error: function(jqXHR, textStatus, errorThrown) {
- vShowAJAXError("Could not update namespace", jqXHR, errorThrown);
- },
- success: function(data, textStatus, jqXHR) {
- vShowSuccess("Successfully updated namespace");
- }
- });
- });
-});
-
-var propertiesTableInfo = {
- id: '#propertiesTable'
-};
-
-require(["winery-support"], function(ws) {
- ws.initTable(propertiesTableInfo);
-});
-
-function createProperty() {
- var data = {
- key: $("#propName").val(),
- type: $('#propType :selected').text()
- }
- $.ajax({
- url: "propertiesdefinition/winery/list/",
- type: "POST",
- async: true,
- contentType: "application/json",
- processData: false,
- data: JSON.stringify(data),
- error: function(jqXHR, textStatus, errorThrown) {
- vShowAJAXError("Could not add property", jqXHR, errorThrown);
- },
- success: function(data, textStatus, jqXHR) {
- var name = $('#propName').val();
- var type = $('#propType :selected').text();
- var dataToAdd = [name, type];
- propertiesTableInfo.table.fnAddData(dataToAdd);
- vShowSuccess("Property successfully added");
- $('#addPropertyDiag').modal('hide');
- }
- });
-}
-</script>
-
diff --git a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypes/relationshiptypes/relationshiptype.jsp b/winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypes/relationshiptypes/relationshiptype.jsp
deleted file mode 100644
index ba2e6cc..0000000
--- a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypes/relationshiptypes/relationshiptype.jsp
+++ /dev/null
@@ -1,44 +0,0 @@
-<%--
-/*******************************************************************************
- * Copyright (c) 2012-2013 University of Stuttgart.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and the Apache License 2.0 which both accompany this distribution,
- * and are available at http://www.eclipse.org/legal/epl-v10.html
- * and http://www.apache.org/licenses/LICENSE-2.0
- *
- * Contributors:
- * Oliver Kopp - initial API and implementation and/or initial documentation
- *******************************************************************************/
---%>
-<%@taglib prefix="t" tagdir="/WEB-INF/tags" %>
-
-<%@page import="org.eclipse.winery.repository.resources.SubMenuData"%>
-
-<%
-java.util.List<SubMenuData> subMenus = new java.util.ArrayList<SubMenuData>();
-
-SubMenuData data;
-
-data = new SubMenuData("#visualappearance", "Visual Appearance");
-subMenus.add(data);
-
-data = new SubMenuData("#instancestates", "Instance States");
-subMenus.add(data);
-
-data = new SubMenuData("#sourceinterfaces", "Source Interfaces");
-subMenus.add(data);
-
-data = new SubMenuData("#targetinterfaces", "Target Interfaces");
-subMenus.add(data);
-
-data = new SubMenuData("#validendings", "Valid Sources and Targets");
-subMenus.add(data);
-
-data = new SubMenuData("#implementations", "Implementations");
-subMenus.add(data);
-
-%>
-
-<t:entitytype cssClass="relationshipType" selected="RelationshipType" subMenus="<%=subMenus%>" twolines="true">
-</t:entitytype>
diff --git a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypes/relationshiptypes/validendings.jsp b/winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypes/relationshiptypes/validendings.jsp
deleted file mode 100644
index 4bf2145..0000000
--- a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypes/relationshiptypes/validendings.jsp
+++ /dev/null
@@ -1,39 +0,0 @@
-<%--
-/*******************************************************************************
- * Copyright (c) 2012-2013 University of Stuttgart.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and the Apache License 2.0 which both accompany this distribution,
- * and are available at http://www.eclipse.org/legal/epl-v10.html
- * and http://www.apache.org/licenses/LICENSE-2.0
- *
- * Contributors:
- * Oliver Kopp - initial API and implementation and/or initial documentation
- * Yves Schubert - switch to bootstrap 3
- *******************************************************************************/
---%>
-<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
-<%@taglib prefix="rt" tagdir="/WEB-INF/tags/relationshiptype" %>
-
-<h4>Valid Source</h4>
-<input type="radio" name="SourceKind">Node Type:</input>
-<rt:validnodetypeendingsselect shortName="source" currentSelection="${it.validSource}" possibleValidEndings="${it.possibleValidEndings}">
-</rt:validnodetypeendingsselect>
-<br/>
-<input type="radio" name="SourceKind">Requirement Type:</input>
-<select>
- <option>Not yet implemented. Please edit in the XML view</option>
-</select>
-
-
-<br/>
-<br/>
-<h4>Valid Target</h4>
-<input type="radio" name="TargetKind">Node Type:</input>
-<rt:validnodetypeendingsselect shortName="target" currentSelection="${it.validTarget}" possibleValidEndings="${it.possibleValidEndings}">
-</rt:validnodetypeendingsselect>
-<br/>
-<input type="radio" name="TargetKind">Capability Type:</input>
-<select>
- <option>Not yet implemented. Please edit in the XML view</option>
-</select>
diff --git a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypes/relationshiptypes/visualappearance.jsp b/winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypes/relationshiptypes/visualappearance.jsp
deleted file mode 100644
index d30ea01..0000000
--- a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypes/relationshiptypes/visualappearance.jsp
+++ /dev/null
@@ -1,193 +0,0 @@
-<%--
-/*******************************************************************************
- * Copyright (c) 2012-2013 University of Stuttgart.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and the Apache License 2.0 which both accompany this distribution,
- * and are available at http://www.eclipse.org/legal/epl-v10.html
- * and http://www.apache.org/licenses/LICENSE-2.0
- *
- * Contributors:
- * Oliver Kopp - initial API and implementation and/or initial documentation
- * Yves Schubert - switch to bootstrap 3
- *******************************************************************************/
---%>
-<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
-<%@taglib prefix="t" tagdir="/WEB-INF/tags" %>
-
-<script type='text/javascript' src='${pageContext.request.contextPath}/components/raphael/raphael.js'></script>
-<script type='text/javascript' src='${pageContext.request.contextPath}/components/colorwheel/javascripts/colorwheel.js'></script>
-
-<ul class="nav nav-tabs" id="myTab">
- <li class="active"><a href="#icon">Icon</a></li>
- <li><a href="#colors">Colors</a></li>
- <li><a href="#arrow">Arrow</a></li>
-</ul>
-
-<div class="tab-content">
- <div class="tab-pane active" id="icon">
- <br />
- <t:imageUpload
- label="Icon (16x16) used in palette"
- URL="visualappearance/16x16"
- id="upSmall"
- width="16px"
- resize="16"
- accept="image/*"/>
- </div>
-
- <div class="tab-pane" id="colors">
- <br />
- <form>
- <fieldset>
- <t:colorwheel label="Line Color" color="${it.color}" id="color" url="color" />
- <t:colorwheel label="Hover Color" color="${it.hoverColor}" id="hovercolor" url="hovercolor" />
- </fieldset>
- </form>
- </div>
-
- <div class="tab-pane" id="arrow">
- <br />
- <form>
- <fieldset>
- <div class="form-group">
- <label for="arrow">Arrow appearance</label>
- <div style="width:100%" id="arrow">
- <div style="float:left; width:50px;">
- <!-- Same values as the beginning of the file names in src\main\webapp\images\relationshiptype -->
- <select id="dropDownSourceHead">
- <option value="none"></option>
- <option value="PlainArrow"></option>
- <option value="Diamond"></option>
- <!-- not yet supported
- <option value="simpleArrow"></option>
- <option value="doubleArrow"></option>
- <option value="circle"></option>
- <option value="square"></option> -->
- </select>
- </div>
- <div style="float:left; width:80px;">
- <select id="lineSelect">
- <option value="plain"></option>
- <option value="dotted"></option>
- <option value="dotted2"></option>
- </select>
- </div>
- <div style="float:left; width:50px;">
- <select id="dropDownTargetHead">
- <option value="none"></option>
- <option value="PlainArrow"></option>
- <option value="Diamond"></option>
- <!-- not yet supported
- <option value="simpleArrow"></option>
- <option value="doubleArrow"></option>
- <option value="circle"></option>
- <option value="square"></option> -->
- </select>
- </div>
- </div>
- </div>
- </fieldset>
- </form>
- </div>
-</div>
-
-<script>
-$('#myTab a').click(function (e) {
- e.preventDefault();
- $(this).tab('show');
-});
-
-/**
- * @param sourceOrTarget "Source" or "Target"
- */
-function formatArrow(config, sourceOrTarget) {
- var path = "${pageContext.request.contextPath}/images/relationshiptype/" + config.id + sourceOrTarget + ".png";
- return "<img src='" + path +"' />";
-}
-
-var globalAJAXParamsForSelect2VisualAppearance = {
- type : "PUT",
- contentType : "text/plain",
- success : function() {
- vShowSuccess("Successfully updated arrow appearance");
- },
- error : function(jqXHR, textStatus, errorThrown) {
- vShowAJAXError("Could not supdate arrow appearance", jqXHR, errorThrown);
- }
-}
-
-/* source arrow head */
-
-function formatArrowSource(config) {
- return formatArrow(config, "Source");
-}
-
-// set stored value
-$("#dropDownSourceHead").val("${it.sourceArrowHead}")
-// enable storage on change of element
-.on("change", function(e) {
- params = globalAJAXParamsForSelect2VisualAppearance;
- params.url = "visualappearance/sourcearrowhead";
- params.data = e.val;
- $.ajax(params);
-})
-// make the selection box show arrows
-.select2({
- formatResult: formatArrowSource,
- formatSelection: formatArrowSource,
- escapeMarkup: function(m) { return m; },
- minimumResultsForSearch: -1
-});
-
-
-/* line */
-function formatLine(config) {
- var path = "${pageContext.request.contextPath}/images/relationshiptype/" + config.id + "Line.png";
- return "<img src='" + path +"' />";
-}
-
-//set stored value
-$("#lineSelect").val("${it.dash}")
-//enable storage on change of element
-.on("change", function(e) {
- params = globalAJAXParamsForSelect2VisualAppearance;
- params.url = "visualappearance/dash";
- params.data = e.val;
- $.ajax(params);
-})
-//make the selection box show arrows
-.select2({
- formatResult: formatLine,
- formatSelection: formatLine,
- escapeMarkup: function(m) { return m; },
- minimumResultsForSearch: -1
-});
-
-
-
-/* target arrow head */
-
-function formatArrowTarget(config) {
- return formatArrow(config, "Target");
-}
-
-//set stored value
-$("#dropDownTargetHead").val("${it.targetArrowHead}")
-//enable storage on change of element
-.on("change", function(e) {
- params = globalAJAXParamsForSelect2VisualAppearance;
- params.url = "visualappearance/targetarrowhead";
- params.data = e.val;
- $.ajax(params);
-})
-//make the selection box show arrows
-.select2({
- formatResult: formatArrowTarget,
- formatSelection: formatArrowTarget,
- escapeMarkup: function(m) { return m; },
- minimumResultsForSearch: -1
-});
-
-</script>
-
diff --git a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypes/requirementtypes/requiredcapabilitytype.jsp b/winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypes/requirementtypes/requiredcapabilitytype.jsp
deleted file mode 100644
index 0b10277..0000000
--- a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypes/requirementtypes/requiredcapabilitytype.jsp
+++ /dev/null
@@ -1,56 +0,0 @@
-<%--
-/*******************************************************************************
- * Copyright (c) 2012-2013 University of Stuttgart.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and the Apache License 2.0 which both accompany this distribution,
- * and are available at http://www.eclipse.org/legal/epl-v10.html
- * and http://www.apache.org/licenses/LICENSE-2.0
- *
- * Contributors:
- * Oliver Kopp - initial API and implementation and/or initial documentation
- *******************************************************************************/
---%>
-
-<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
-<%@taglib prefix="ct" tagdir="/WEB-INF/tags/common" %>
-
-<c:choose>
- <c:when test="${empty it.requirementType.requiredCapabilityType}">
- <c:set var="selected" value="(none)" />
- </c:when>
- <c:otherwise>
- <c:set var="selected" value="${it.requirementType.requiredCapabilityType}" />
- </c:otherwise>
-</c:choose>
-
-<ct:QNameChooser allQNames="${it.allCapabilityTypes}" idOfSelectField="requiredCapabilityType" labelOfSelectField="" includeNONE="true" selected="${selected}"/>
-
-<script>
-$("#requiredCapabilityType").on("change", function(e) {
- var val = $("#requiredCapabilityType").val();
- if (val == "(none)") {
- // remove required capability type assignment
- $.ajax({
- url: 'requiredcapabilitytype',
- type: "DELETE"
- }).fail(function(jqXHR, textStatus, errorThrown) {
- vShowAJAXError("Could not remove required capability type assignment.", jqXHR, errorThrown);
- }).done(function(data, textStatus, jqXHR) {
- vShowSuccess("Successfully updated required capability type assignment.");
- });
- } else {
- // put new capability type
- $.ajax({
- url: 'requiredcapabilitytype',
- data: val,
- contentType: "text/plain",
- type: "PUT"
- }).fail(function(jqXHR, textStatus, errorThrown) {
- vShowAJAXError("Could not update required capability type assignment.", jqXHR, errorThrown);
- }).done(function(data, textStatus, jqXHR) {
- vShowSuccess("Successfully updated required capability type assignment.");
- });
- }
-});
-</script> \ No newline at end of file
diff --git a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypes/requirementtypes/requirementtype.jsp b/winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypes/requirementtypes/requirementtype.jsp
deleted file mode 100644
index a8b6f43..0000000
--- a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/entitytypes/requirementtypes/requirementtype.jsp
+++ /dev/null
@@ -1,30 +0,0 @@
-<%--
-/*******************************************************************************
- * Copyright (c) 2012-2013 University of Stuttgart.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and the Apache License 2.0 which both accompany this distribution,
- * and are available at http://www.eclipse.org/legal/epl-v10.html
- * and http://www.apache.org/licenses/LICENSE-2.0
- *
- * Contributors:
- * Oliver Kopp - initial API and implementation and/or initial documentation
- *******************************************************************************/
---%>
-<%@taglib prefix="t" tagdir="/WEB-INF/tags" %>
-
-<%@page import="org.eclipse.winery.repository.resources.SubMenuData"%>
-
-<%
-java.util.List<SubMenuData> subMenus = new java.util.ArrayList<SubMenuData>();
-
-SubMenuData data;
-
-data = new SubMenuData("#requiredcapabilitytype", "Required Capability Type");
-subMenus.add(data);
-
-%>
-
-
-<t:entitytype cssClass="requirementType" selected="RequirementType" subMenus="<%=subMenus%>">
-</t:entitytype>
diff --git a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/genericcomponentpage.jsp b/winery/org.eclipse.winery.repository/src/main/webapp/jsp/genericcomponentpage.jsp
deleted file mode 100644
index 0439904..0000000
--- a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/genericcomponentpage.jsp
+++ /dev/null
@@ -1,209 +0,0 @@
-<%--
-/*******************************************************************************
- * Copyright (c) 2012-2013 University of Stuttgart.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and the Apache License 2.0 which both accompany this distribution,
- * and are available at http://www.eclipse.org/legal/epl-v10.html
- * and http://www.apache.org/licenses/LICENSE-2.0
- *
- * Contributors:
- * Oliver Kopp - initial API and implementation and/or initial documentation
- *******************************************************************************/
---%>
-<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
-
-<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
-<%@taglib prefix="v" uri="http://www.eclipse.org/winery/repository/functions" %>
-<%@taglib prefix="t" tagdir="/WEB-INF/tags" %>
-<%@taglib prefix="wc" uri="http://www.eclipse.org/winery/functions" %>
-
-<%-- In English, one can usually form a plural by adding an "s". Therefore, we resue the label to form the window title --%>
-<t:genericpage windowtitle="${it.label}s" selected="${it.type}" cssClass="${it.CSSclass}">
-
-<c:choose>
-<c:when test="${empty pageContext.request.contextPath}">
-<c:set var="URL" value="/" />
-</c:when>
-<c:otherwise>
-<c:set var="URL" value="${pageContext.request.contextPath}/" />
-</c:otherwise>
-</c:choose>
-<t:simpleSingleFileUpload
- title="Upload CSAR"
- text="CSAR file"
- URL="${URL}"
- type="POST"
- id="upCSAR"
- accept="application/zip,.csar"/>
-
-<t:addComponentInstance
- label="${it.label}"
- typeSelectorData="${it.typeSelectorData}"
- />
-
-<div class="middle" id="ccontainer">
- <br />
-
- <table cellpadding=0 cellspacing=0 style="margin-top: 0px; margin-left: 30px;">
- <tr>
- <td valign="top" style="padding-top: 25px; width: 680px;">
-
- <div id="searchBoxContainer">
-
- <input id="searchBox" />
-
- <script>
-
- $('#searchBox').keyup(function() {
- var searchString = $(this).val();
- searchString = searchString.toLowerCase();
-
- $(".entityContainer").each (function() {
- var name = $(this).find(".informationContainer > .name").text();
- var namespace = $(this).find(".informationContainer > .namespace").text();
-
- var t = name + namespace;
- t = t.toLowerCase();
-
- if (t.indexOf(searchString) == -1) {
- $(this).hide();
- } else {
- $(this).show();
- }
-
- });
-
- });
-
- </script>
-
- </div>
-
- <c:forEach var="t" items="${it.componentInstanceIds}">
- <%-- even though the id is an invalid XML, it is used for a simple implementation on a click on the graphical rendering to trigger opening the editor --%>
- <div class="entityContainer ${it.CSSclass}" id="${v:URLencode(t.namespace.encoded)}/${v:URLencode(t.xmlId.encoded)}/">
- <div class="left">
- <c:if test="${it.type eq 'NodeType'}">
- <a href="./${v:URLencode(t.namespace.encoded)}/${v:URLencode(t.xmlId.encoded)}/?edit">
- <img src='./${v:URLencode(t.namespace.encoded)}/${v:URLencode(t.xmlId.encoded)}/visualappearance/50x50' style='margin-top: 21px; margin-left: 30px; height: 40px; width: 40px;' />
- </a>
- </c:if>
- </div>
- <div class="center">
- <div class="informationContainer">
- <div class="name">
- ${wc:escapeHtml4(t.xmlId.decoded)}
- </div>
- <div class="namespace" alt="${wc:escapeHtml4(t.namespace.decoded)}">
- ${wc:escapeHtml4(t.namespace.decoded)}
- </div>
- </div>
- <div class="buttonContainer">
- <a href="${v:URLencode(t.namespace.encoded)}/${v:URLencode(t.xmlId.encoded)}/?csar" class="exportButton"></a>
- <a href="${v:URLencode(t.namespace.encoded)}/${v:URLencode(t.xmlId.encoded)}/?edit" class="editButton"></a>
- <%-- we need double encoding of the URL as the passing to javascript: decodes the given string once --%>
- <a href="javascript:deleteCI('${wc:escapeHtml4(t.xmlId.decoded)}', '${v:URLencode(v:URLencode(t.namespace.encoded))}/${v:URLencode(v:URLencode(t.xmlId.encoded))}/');" class="deleteButton" onclick="element = $(this).parent().parent().parent();"></a>
- </div>
- </div>
- <div class="right"></div>
- </div>
- </c:forEach>
- </td>
- <td id="gcprightcolumn" valign="top">
- <div id="overviewtopshadow"></div>
- <div id="overviewbottomshadow"></div>
- </td>
- <td valign="top">
- <div class="btn-group-vertical" id="buttonList">
- <button type="button" class="btn btn-default" onclick="openNewCIdiag();">Add new</button>
- <button type="button" class="btn btn-default" onclick="importCSAR();">Import CSAR</button>
- </div>
- </td>
- </tr>
- </table>
-</div>
-
-<script>
-
-function entityContainerClicked(e) {
- var target = $(e.target);
- if (target.is("a")) {
- // do nothing as a nested a element is clicked
- } else {
- var ec = target.parents("div.entityContainer");
- var url = ec.attr('id');
- if (e.ctrlKey) {
- // emulate browser's default behavior to open a new tab
- window.open(url);
- } else {
- window.location = url;
- }
- }
-}
-
-$("div.entityContainer").on("click", entityContainerClicked);
-
-/**
- * deletes given component instance
- * uses global variable "element", which stores the DOM element to delete upon successful deletion
- */
-function deleteCI(name, URL) {
- deleteResource(name, URL, function() {
- element.remove();
- });
-}
-
-function importCSAR() {
- $('#upCSARDiag').modal('show');
-}
-
-// If export button is clicked with "CTRL", the plain XML is shown, not the CSAR
-// We use "on" with filters instead as new elements could be added when pressing "Add new" (in the future)
-// contained code is the same as the code of the CSAR button at the topology modeler (see index.jsp)
-$(document).on("click", ".exportButton", function(evt) {
- var url = $(this).attr("href");
- if (evt.ctrlKey) {
- url = url.replace(/csar$/, "definitions");
- }
- window.open(url);
- return false;
-});
-
-<%-- Special feature in the case of the service template --%>
-<c:if test="${it.type eq 'ServiceTemplate'}">
-//If edit button is clicked with "CTRL", the topology modeler is opened, not the service template editor
-//We use "on" with filters instead as new elements could be added when pressing "Add new" (in the future)
-$(document).on("click", ".editButton", function(evt) {
- var url = $(this).attr("href");
- if (evt.ctrlKey) {
- url = url.replace(/\?edit$/, "topologytemplate/?edit");
- // open in new tab
- var newWin = window.open(url);
- // focussing the new window does not work in Chrome
- newWin.focus();
- } else {
- // normal behavior
- window.location = url;
- }
- evt.preventDefault();
-});
-</c:if>
-
-$(".exportButton").tooltip({
- placement: 'bottom',
- html: true,
- title: "Export CSAR.<br/>Hold CTRL key to export XML only."
-});
-$(".editButton").tooltip({
- placement: 'bottom',
- html: true,
- title: <c:if test="${it.type eq 'ServiceTemplate'}">"Edit.<br/>Hold CTRL key to directly open the topology modeler."</c:if><c:if test="${not (it.type eq 'ServiceTemplate')}">"Edit"</c:if>
-});
-$(".deleteButton").tooltip({
- placement: 'bottom',
- title: "Delete"
-});
-</script>
-
-</t:genericpage>
diff --git a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/hashloading.jsp b/winery/org.eclipse.winery.repository/src/main/webapp/jsp/hashloading.jsp
deleted file mode 100644
index eb5bbfa..0000000
--- a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/hashloading.jsp
+++ /dev/null
@@ -1,140 +0,0 @@
-<%--
-/*******************************************************************************
- * Copyright (c) 2012-2013 University of Stuttgart.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and the Apache License 2.0 which both accompany this distribution,
- * and are available at http://www.eclipse.org/legal/epl-v10.html
- * and http://www.apache.org/licenses/LICENSE-2.0
- *
- * Contributors:
- * Oliver Kopp - initial API and implementation and/or initial documentation
- *******************************************************************************/
---%>
-<script>
- function switchStyledTabSelection(element, onSuccess) {
- target = element.attr("href");
- target = target.replace('#','');
- target += "/";
- $(".styledTabMenuButton2ndlevel").removeClass("selected");
- element.addClass("selected");
- $("#ccontainer").html('<div id="loading" style="display:none;">loading...</div>');
- $("#loading").fadeIn(3000);
- $("#ccontainer").load(target, function(response, status, xhr) {
- if (status == "error") {
- vShowError("Could not load tab content: " + xhr.status + " " + xhr.statusText);
- } else {
- if (onSuccess) {
- onSuccess();
- }
- }
- });
- }
-
- /**
- * @param onSuccess called if subTabs are available and the super tab could be loaded
- */
- function doTheTabSelection(onSuccess) {
- var hash = window.location.hash;
-
- // get rid of ";" additions
- var posColon = hash.indexOf(";");
- var subTab;
- if (posColon >= 0) {
- subTab = hash.substr(posColon + 1);
- hash = hash.substr(0, posColon);
- }
-
- if ($.inArray(hash, ${param.validpages}) == -1) {
- hash = "${param.defaultpage}";
- }
-
- var callBack = onSuccess;
- if (subTab) {
- var posColon = subTab.indexOf(";");
- if (posColon > 0) {
- // more information added, for instance xmltree data
- // the first part is the subtab
- subTab = subTab.substr(0, posColon);
- }
- callBack = function () {
- $('#myTab a[href="#' + subTab + '"]').tab('show');
- if (onSuccess) {
- onSuccess();
- }
- };
- }
-
- switchStyledTabSelection($(".styledTabMenuButton2ndlevel[href='" + hash + "']"), callBack);
- }
-
- // Firefox does not fire the "popstate" event at the first load,
- // but Chrome does
- // Because of Firefox, we have to call the refresh here
- doTheTabSelection();
-
- // see http://blog.mgm-tp.com/2011/10/must-know-url-hashtechniques-for-ajax-applications/ for a broad discussion
- $(window).on("hashchange", function(e) {
- if (internalHashChange) {
- // we do nothing
- internalHashChange = false;
- } else {
- // we have to check whether only additional data changed and thus no real change is required
- var oldURL = e.originalEvent.oldURL;
- var idx = oldURL.indexOf("#");
- if (idx != -1) {
- var oldHash = oldURL.substr(idx);
- var newURL = e.originalEvent.newURL;
- // get the hash value only
- idx = newURL.indexOf("#");
- if (idx != -1) {
- var newHash = newURL.substr(idx);
- // search for the first ";"
- idx = oldHash.indexOf(";");
- if (idx != -1) {
- // search for the second ";"
- idx = oldHash.indexOf(";", idx+1);
- if (idx == -1) {
- // The new hash is only a refinement of the old hash:
- // Only a new ";" has been added
- // We do not need to reload
- return;
- } else {
- if (oldHash.substr(0, idx) == newHash.substr(0, idx)) {
- // the two hashes equal until the second ";"
- // we don't have to do any reload
- return;
- }
- }
- }
- }
- }
-
- // switch to the new tab
- doTheTabSelection();
- }
- });
-
- var internalHashChange = false;
-
- $(document).on('shown.bs.tab', "ul.nav-tabs > li > a", function (e) {
- var id = $(e.target).attr("href").substr(1);
- var hash = window.location.hash;
- var additionalData = "";
- var posColon = hash.indexOf(";");
- if (posColon >= 0) {
- // search for additionalData
- secondColon = hash.indexOf(";", posColon+1);
- if (secondColon > 0) {
- // include the ";" in the additional data
- additionalData = hash.substr(secondColon);
- }
-
- // wipe everything after the colon
- hash = hash.substr(0, posColon);
- }
- hash = hash + ";" + id + additionalData;
- internalHashChange = true;
- window.location.hash = hash;
- });
-</script>
diff --git a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/imports/xsdimports/xsdimport.jsp b/winery/org.eclipse.winery.repository/src/main/webapp/jsp/imports/xsdimports/xsdimport.jsp
deleted file mode 100644
index 452e7ad..0000000
--- a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/imports/xsdimports/xsdimport.jsp
+++ /dev/null
@@ -1,50 +0,0 @@
-<%--
-/*******************************************************************************
- * Copyright (c) 2012-2013 University of Stuttgart.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and the Apache License 2.0 which both accompany this distribution,
- * and are available at http://www.eclipse.org/legal/epl-v10.html
- * and http://www.apache.org/licenses/LICENSE-2.0
- *
- * Contributors:
- * Oliver Kopp - initial API and implementation and/or initial documentation
- *******************************************************************************/
---%>
-<%@taglib prefix="t" tagdir="/WEB-INF/tags" %>
-<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
-
-<%-- Quick hack without XML view --%>
-
-<%--
-FIXME: parameters cssClass and selected are somehow ignored, but replaced by the data provided by GenericComponentPageData or similar...
-Symptom: in header.jsp "param.selected" is "XSDImport" instead of "xsdimport"
---%>
-<t:genericpage windowtitle="XSD Imports" cssClass="mainContentContainer xsdimport" selected="xsdimport">
-
- <div class="top">
- <%@ include file="/jsp/componentnaming.jspf" %>
- <!--
- <div style="float:right; margin-right:29px; margin-top: -20px; position:relative;">
- <div style="float:right;">
- <a href="?definitions" class="btn btn-info">XML</a>
- <a href="?csar" class="btn btn-info">ZIP</a>
- </div>
- </div> -->
- </div>
-
- <div class="middle" id="ccontainer">
-
-Associated file:
-<c:if test="${empty it.location}">none</c:if>
-<c:if test="${not empty it.location}"><a href="${it.location}">${it.location}</a></c:if>
-
-<br />
-
-Modification not yet implemented
-
- </div>
-
-</t:genericpage>
-
-
diff --git a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/inheritance.jsp b/winery/org.eclipse.winery.repository/src/main/webapp/jsp/inheritance.jsp
deleted file mode 100644
index 8d1d535..0000000
--- a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/inheritance.jsp
+++ /dev/null
@@ -1,55 +0,0 @@
-<%--
-/*******************************************************************************
- * Copyright (c) 2012-2013 University of Stuttgart.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and the Apache License 2.0 which both accompany this distribution,
- * and are available at http://www.eclipse.org/legal/epl-v10.html
- * and http://www.apache.org/licenses/LICENSE-2.0
- *
- * Contributors:
- * Oliver Kopp - initial API and implementation and/or initial documentation
- *******************************************************************************/
---%>
-<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
-
-<div class="form-group">
- <label class="control-label" for="abstract">Abstract</label>
- <select class="form-control" style="width:100px;" id="isAbstract" onchange="updateValue('abstract', this.options[this.selectedIndex].value);">
- <option value="yes"<c:if test="${it.isAbstract=='yes'}"> selected="selected"</c:if>>yes</option>
- <option value="no"<c:if test="${it.isAbstract=='no'}"> selected="selected"</c:if>>no</option>
- </select>
-</div>
-
-<div class="form-group">
- <label class="control-label">Final</label>
- <select class="form-control" style="width:100px;" id="isFinal" onchange="updateValue('final', this.options[this.selectedIndex].value);">
- <option value="yes"<c:if test="${it.isFinal=='yes'}"> selected="selected"</c:if>>yes</option>
- <option value="no"<c:if test="${it.isFinal=='no'}"> selected="selected"</c:if>>no</option>
- </select>
-</div>
-
-<div class="form-group">
- <label class="control-label">Derived from</label>
- <div style="display: block; width: 100%">
- <select class="form-control" style="width:600px; display:inline; margin-right: 10px;" id="derivedFrom" onchange="updateValue('derivedFrom', this.options[this.selectedIndex].value);">
- <option value=""<c:if test="${empty it.derivedFrom}"> selected="selected"</c:if>>(none)</option>
- <c:forEach items="${it.possibleSuperTypes}" var="type">
- <c:set var="value" value="${type.QName}" />
- <option value="${value}"<c:if test="${value==it.derivedFrom}"> selected="selected"</c:if>>${type.xmlId.decoded}</option>
- </c:forEach>
- </select>
- <button type="button" class="btn btn-info btn-sm" onclick="openSuperType();">Open</button>
- </div>
-</div>
-
-<script>
-function openSuperType() {
- require(["winery-support-common"], function(w) {
- var qname = $("#derivedFrom").val();
- var fragment = w.getURLFragmentOutOfFullQName(qname);
- var url = "../../" + fragment + "/";
- window.location = url;
- });
-}
-</script> \ No newline at end of file
diff --git a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/interfaces/interfaces.jsp b/winery/org.eclipse.winery.repository/src/main/webapp/jsp/interfaces/interfaces.jsp
deleted file mode 100644
index 07ed928..0000000
--- a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/interfaces/interfaces.jsp
+++ /dev/null
@@ -1,489 +0,0 @@
-<%--
-/*******************************************************************************
- * Copyright (c) 2012-2013 University of Stuttgart.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and the Apache License 2.0 which both accompany this distribution,
- * and are available at http://www.eclipse.org/legal/epl-v10.html
- * and http://www.apache.org/licenses/LICENSE-2.0
- *
- * Contributors:
- * Oliver Kopp - initial API and implementation and/or initial documentation
- * Yves Schubert - port to bootstrap 3
- *******************************************************************************/
---%>
-<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
-<%@taglib prefix="t" tagdir="/WEB-INF/tags" %>
-<%@taglib prefix="ct" tagdir="/WEB-INF/tags/common" %>
-<%@taglib prefix="p" tagdir="/WEB-INF/tags/parameters" %>
-<%@taglib prefix="w" uri="http://www.eclipse.org/winery/repository/functions"%>
-
-<%@page import="org.eclipse.winery.common.Util" %>
-<%@page import="org.eclipse.winery.repository.Constants" %>
-
-<link type="text/css" href="${pageContext.request.contextPath}/components/bootstrap-switch/build/css/bootstrap3/bootstrap-switch.css" rel="stylesheet" />
-<script type="text/javascript" src="${pageContext.request.contextPath}/components/bootstrap-switch/build/js/bootstrap-switch.js"></script>
-
-<%-- include basic parameters support --%>
-<p:parametersJS afterLoad="interfaceSelectionChanged();"></p:parametersJS>
-
-<script>
-<%final String URI_LIFECYCLE_INTERFACE = "http://www.example.com/interfaces/lifecycle";%>
-var URI_LIFECYCLE_INTERFACE = "<%=URI_LIFECYCLE_INTERFACE%>";
-
-/**
- * @param noUpdate if given, then the selection is not updated. This is required when Winery itself creates interfaces without user intervention. For instance, that is the case at the lifecycle interface
- */
-function afterInterfaceCreation(serializedArray, resData, textStatus, jqXHR, noUpdate) {
- var text = serializedArray[0].value;
- if (text == URI_LIFECYCLE_INTERFACE) {
- // lifecycle interface has been generated
- // disable button to generate lifecycle interface
- $("#generatelifecycleifacetn").attr("disabled", "disabled");
- }
- addSortedSelectionItem($("#interfaces"), text, text);
- if (!noUpdate) {
- interfaceSelectionChanged();
- }
-}
-
-function afterOperationCreation(serializedArray, resData, textStatus, jqXHR) {
- var text = serializedArray[0].value;
- addSortedSelectionItem($("#operations"), text, text);
- operationSelectionChanged();
-}
-
-function getIfaceURL() {
- var iface = $("#interfaces").find(":selected").val();
- return "${it.urlPrefix}interfaces/" + encodeID(iface) + "/";
-}
-
-function getOperationURL() {
- var op = $("#operations").find(":selected").val();
- return getIfaceURL() + "operations/" + encodeID(op) + "/";
-}
-
-function createInterface() {
- createResource('Interface', [{'label': 'Name', 'name':'interfaceName'}], '${it.urlPrefix}interfaces/', afterInterfaceCreation);
-}
-
-function createOperation() {
- var url = getIfaceURL() + "operations/";
- createResource('Operation', [{'label':'Name', 'name':'name'}], url, afterOperationCreation);
-}
-
-function disableAllOperationButtons() {
- $("#addOpBtn").attr("disabled", "disabled");
- $("#removeOpBtn").attr("disabled", "disabled");
-}
-
-function disableAllInputButtons() {
- $("#addInParBtn").attr("disabled", "disabled");
- $("#removeInParBtn").attr("disabled", "disabled");
-}
-
-function disableAllOutputButtons() {
- $("#addOutParBtn").attr("disabled", "disabled");
- $("#removeOutParBtn").attr("disabled", "disabled");
-}
-
-function interfaceSelectionChanged(noupdate) {
- iface = $("#interfaces").find(":selected");
- if (iface.length == 0) {
- // nothing selected
- $("#operations").empty();
- inputParametersTableInfo.table.fnClearTable();
- outputParametersTableInfo.table.fnClearTable();
- disableAllOperationButtons();
- disableAllInputButtons();
- disableAllOutputButtons();
- $("#removeIfBtn").attr("disabled", "disabled");
- $("#generateiabtn").attr("disabled", "disabled");
- } else {
- $.ajax({
- "url": getIfaceURL() + "operations/",
- dataType: "JSON",
- success: function(data, textStatus, jqXHR) {
- var operations = $("#operations");
- operations.empty();
- $.each(data, function(number, item) {
- var selected;
- if (number == 0) {
- selected = ' selected="selected"';
- } else {
- selected = "";
- }
- operations.append('<option value="' + item + '"' + selected + '>' + item + '</option>');
- });
- operationSelectionChanged();
- $("#removeIfBtn").removeAttr("disabled");
- $("#generateiabtn").removeAttr("disabled");
- }
- });
- }
-}
-
-function operationSelectionChanged() {
- if ($("#operations").find(":selected").length == 0) {
- inputParametersTableInfo.table.fnClearTable();
- outputParametersTableInfo.table.fnClearTable();
- disableAllInputButtons();
- disableAllOutputButtons();
- $("#removeOpBtn").attr("disabled", "disabled");
- if ($("#interfaces").children("option").length == 0) {
- // no interfaces available
- $("#addOpBtn").attr("disabled", "disabled");
- } else {
- $("#addOpBtn").removeAttr("disabled");
- }
- } else {
- updateInputAndOutputParameters(getOperationURL());
- $("#addOpBtn").removeAttr("disabled");
- $("#removeOpBtn").removeAttr("disabled");
- }
-}
-
-
-function determineNextItemToSelect(currentItem) {
- var nextToSelect;
- nextToSelect = currentItem.next();
- if (nextToSelect.length == 0) {
- nextToSelect = currentItem.prev();
- // even if nothing found, the following code works:
- // X.attr("selected", "selected") does not throw any error if X is empty
- }
- return nextToSelect;
-}
-
-function deleteThing(thingId, thingName, urlDetermination, changedFunction) {
- var thing = $("#" + thingId).find(":selected");
- if (thing.length == 0) {
- vShowError("UI in wrong state");
- } else {
- deleteResource(
- thingName + " " + thing.text(),
- urlDetermination(),
- function() {
- nextToSelect = determineNextItemToSelect(thing);
- thing.remove();
- nextToSelect.attr("selected", "selected");
- changedFunction();
- }
- );
- }
-}
-
-function deleteInterface() {
- var iface = $("#interfaces").find(":selected").text();
-
- // if the lifecycle interface is going to be removed,
- // enable the button to generate the lifecycle interface again
- var changedFunction;
- if (iface == URI_LIFECYCLE_INTERFACE) {
- changedFunction = function() {
- $("#generatelifecycleifacetn").removeAttr("disabled");
- interfaceSelectionChanged();
- }
- } else {
- changedFunction = interfaceSelectionChanged;
- }
-
- deleteThing("interfaces", "Interface", getIfaceURL, changedFunction);
-}
-
-function deleteOperation() {
- deleteThing("operations", "Operation", getOperationURL, operationSelectionChanged);
-}
-
-function createArtifactTemplate() {
- // we use the quick way at implementationartifacts/ to auto-generate an artifact template
- // see org.eclipse.winery.repository.resources.artifacts.GenericArtifactsResource<ArtifactResource, ArtifactT> for the REST-interface description;
-
- var url = getTypeImplementationURL() + "implementationartifacts/";
- var data = $("#artifactTemplateNS, #artifactTemplateName, #autoCreateArtifactTemplate, #artifactType, #autoGenerateIA, #interfaces, #javapackage").serialize();
-
- // we use the artifact template name as artifact name
- var artifactName = $("#artifactTemplateName").serialize();
- artifactName = "artifact" + artifactName.substring(16);
- data = data + "&" + artifactName;
-
- $.ajax({
- url: url,
- data: data,
- type: "POST"
- }).fail(function(jqXHR, textStatus, errorThrown) {
- vShowAJAXError("Could not create artifact template", jqXHR, errorThrown);
- $("#generateiabtn").button("reset");
- }).done(function(data, textStatus, jqXHR) {
- var location = jqXHR.getResponseHeader("location");
-
- vShowSuccess('Successfully generated IA. It is currently downloaded and available <a href="' + location + '/../../">here</a>');
-
- // open the downloaded file
- window.open(location, "_blank");
-
- $("#generateiamodal").modal("hide");
- });
-}
-
-function generateIA() {
- $("#generateiabtn").button("loading");
-
- // create type implementation if necessary
- var typeImplementationHasToBeCreated = $("#nodeTypeImplCreationSwitch").bootstrapSwitch('status'); // "status" instead of "state" (!)
- if (typeImplementationHasToBeCreated) {
- var url = "${pageContext.request.contextPath}/${it.relationshipTypeOrNodeTypeURLFragment}implementations/";
- var data = $("#nodetypeimplementationName, #nodetypeimplementationNS, #qnameOfType").serialize();
- $.ajax({
- url: url,
- type: "POST",
- data: data
- }).fail(function(jqXHR, textStatus, errorThrown) {
- vShowAJAXError("Could not create type implementation", jqXHR, errorThrown);
- $("#generateiabtn").button("reset");
- }).done(function() {
- createArtifactTemplate();
- });
- } else {
- createArtifactTemplate();
- }
-}
-
-$(function() {
- $("#generateiamodal").on("show.bs.modal", function() {
- // check whether the required artifact type exists
- $.ajax({
- url: "${pageContext.request.contextPath}/artifacttypes/<%=Util.DoubleURLencode(Constants.NAMESPACE_ARTIFACTTYPE_WAR)%>/<%=Util.DoubleURLencode(Constants.LOCALNAME_ARTIFACTTYPE_WAR)%>/",
- type: "HEAD"
- }).fail(function(jqXHR, textStatus, errorThrown) {
- if (jqXHR.status == 404) {
- vShowError("WAR artifact type does not exist. Please create artifact type WAR");
- $("#generateiabtn").attr("disabled", "disabled");
- } else {
- vShowAJAXError("Could not check for existance of WAR artifact type", jqXHR, errorThrown);
- }
- }).success(function() {
- $("#generateiabtn").removeAttr("disabled");
- });
-
- // dialog is reset at each show
- $("#generateiabtn").button("reset");
-
- // set java package
- $("#javapackage").val("${w:namespaceToJavaPackage(it.namespace)}");
-
- // set node type implementation name
- $("#nodetypeimplementationName").val("${it.name}_impl");
-
- // reset node type implementation namespace
- $("#nodetypeimplementationNS").val("${it.namespace}").attr("selected", "selected");
-
- // the default type impl could exist
- checkNodeTypeImplName();
-
- // reset artifact template namespace
- $("#artifactTemplateNS").val("${it.namespace}").attr("selected", "selected");
-
- require(["artifacttemplateselection", "winery-support"], function(ats, ws) {
- // set artifact template name
- var iface = $("#interfaces").find(":selected");
- var initialATName = "${it.name}_" + ws.makeNCName(iface.text()) + "_IA";
- $("#artifactTemplateName").val(initialATName);
-
- // check if artifact template is a valid name
- ats.checkArtifactTemplateName();
- });
- });
-
- $("#nodetypeimplementationNS").on("blur", checkNodeTypeImplName).on("change", checkNodeTypeImplName).on("focus", flagNodeTypeImplAsUpdating);
- $("#nodetypeimplementationName").typing({
- start: function(event, $elem) {
- flagNodeTypeImplAsUpdating();
- },
- stop: function(event, $elem) {
- checkNodeTypeImplName();
- }
- });
-
-});
-
-<%-- adapted from artifacttemplateselection.tag --%>
-
-function getTypeImplementationURL() {
- var ns = $("#nodetypeimplementationNS").val();
- var name = $("#nodetypeimplementationName").val();
- var url = "${pageContext.request.contextPath}/${it.relationshipTypeOrNodeTypeURLFragment}implementations/" + encodeID(ns) + "/" + encodeID(name) + "/";
- return url;
-}
-
-function checkNodeTypeImplName() {
- var name = $("#nodetypeimplementationName").val();
- if (name == "") {
- var valid = false;
- var invalidReason = "No name provided";
- // TODO: setNodeTypeImplNameValidityStatus(valid, invalidReason);
- } else {
- url = getTypeImplementationURL();
- $.ajax(url, {
- type: 'HEAD',
- dataType: 'html',
- error: function(jqXHR, textStatus, errorThrown) {
- if (jqXHR.status == 404) {
- // node type implementation does not exist
- $("#nodeTypeImplCreationSwitch").bootstrapSwitch('setState', true);
- } else {
- vShowAJAXError("Could not check for type implementation existance", jqXHR, errorThrown);
- // Alternative: setValidityStatus(false, textStatus);
- }
- },
- success: function(data, textStatus, jqXHR) {
- // node type implementation exists
- $("#nodeTypeImplCreationSwitch").bootstrapSwitch('setState', false);
- }
- });
- }
-}
-
-function flagNodeTypeImplAsUpdating() {
- // not yet implemented
-}
-
-function generateLifeCycleInterface() {
- var data = "interfaceName=" + encodeURIComponent(URI_LIFECYCLE_INTERFACE);
- $.ajax({
- url: '${it.urlPrefix}interfaces/',
- data: data,
- type: "POST"
- }).fail(function(jqXHR, textStatus, errorThrown) {
- vShowAJAXError("Could not create interface", jqXHR, errorThrown);
- }).done(function(data, textStatus, jqXHR) {
- var serializedArray = [{value:URI_LIFECYCLE_INTERFACE}];
- afterInterfaceCreation(serializedArray, data, textStatus, jqXHR, true);
-
- var operations = ["install", "configure", "start", "stop", "uninstall"];
- var errorOccurred = false;
-
- $(operations).each(function(i, operationName) {
- // we have to go through one-by-one to keep the order of operations
- // no parallel creation possible
- // Therefore also "async: false" at the AJAX call
-
- var data = "name=" + operationName;
-
- var url = getIfaceURL() + "operations/";
- $.ajax({
- url: url,
- data: data,
- type: "POST",
- async: false
- }).fail(function(jqXHR, textStatus, errorThrown) {
- vShowAJAXError("Could not create operation " + operationName, jqXHR, errorThrown);
- errorOccurred = true;
- }).done(function(data, textStatus, jqXHR) {
- serializedArray = [{value:operationName}];
- afterOperationCreation(serializedArray, data, textStatus, jqXHR);
- });
- });
-
- if (!errorOccurred) {
- vShowSuccess('Successfully generated lifecycle interface');
- }
- });
-}
-
-</script>
-
-<div id="generateiamodal" class="modal fade">
- <div class="modal-dialog">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
- <h4 class="modal-title">Generate Implementation Artifact</h4>
- </div>
- <div class="modal-body">
- <form role="form">
- <div class="form-group">
- <label for="javapackage">Java Package</label>
- <input class="form-control" id="javapackage" name="javapackage" placeholder="Enter java package name" required="required">
- </div>
-
- <div class="form-group-grouping typeimplementation">
- <div class="form-group">
- <label for="nodetypeimplementationName">${it.relationshipTypeOrNodeType} Implementation Name</label>
- <input required="required" class="form-control" id="nodetypeimplementationName" name="name" placeholder="Enter name for node type implementation" pattern="[\i-[:]][\c-[:]]*"><!-- name is an NCName -->
- </div>
-
- <t:namespaceChooser nameOfInput="namespace" idOfInput="nodetypeimplementationNS" allNamespaces="${w:allNamespaces()}" selected="${it.namespace}"></t:namespaceChooser>
-
- <div id="nodeTypeImplCreationSwitch" class="make-switch" data-on-label="will be created" data-off-label="will be reused" style="height:30px; width:250px;">
- <input type="checkbox" disabled="disabled" checked="checked">
- </div>
-
- <input type="hidden" name="type" id="qnameOfType" value="${it.typeQName}">
- </div>
-
- <p class="text-warning">There is no check for the name of the implementation artifact. The artifact template name will be reused as implementation artifact name without any further check.</p>
-
- <ct:artifacttemplateselection repositoryURL="${pageContext.request.contextPath}" defaultNSForArtifactTemplate="${it.namespace}" allNamespaces="${w:allNamespaces()}"></ct:artifacttemplateselection>
- <input type="hidden" name="autoCreateArtifactTemplate" value="true" id="autoCreateArtifactTemplate">
-
- <div class="form-group">
- <label for="artifacttype">Artifact Type</label>
- <a class="form-control" target="_blank" href="${pageContext.request.contextPath}/artifacttypes/<%=Util.DoubleURLencode(Constants.NAMESPACE_ARTIFACTTYPE_WAR)%>/<%=Util.DoubleURLencode(Constants.LOCALNAME_ARTIFACTTYPE_WAR)%>/">WAR</a>
- <input type="hidden" name="artifactType" id="artifactType" value="{<%=Constants.NAMESPACE_ARTIFACTTYPE_WAR%>}<%=Constants.LOCALNAME_ARTIFACTTYPE_WAR%>">
- </div>
-
- <input type="hidden" name="autoGenerateIA" id="autoGenerateIA" value="true">
- </form>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
- <button type="button" class="btn btn-primary" id="generateiabtn" onclick="generateIA();" data-loading-text="Generating...">Generate</button>
- </div>
- </div><!-- /.modal-content -->
- </div><!-- /.modal-dialog -->
-</div><!-- /.modal -->
-
-
-<div><!-- we do not use bootstrap's "container" as the container leads to an overflow -->
- <div class="col-xs-4 bordered">
- <div class="listheading">
- <button class="rightbutton btn btn-danger btn-xs" type="button" onclick="deleteInterface();" disabled="disabled" id="removeIfBtn">Remove</button>
- <button class="rightbutton btn btn-primary btn-xs" type="button" onclick="createInterface();" id="addIfBtn">Add</button>
- <label>Interfaces</label>
- </div>
- <select class="listcontent" id="interfaces" size="18" onchange="interfaceSelectionChanged();" name="interfaceName">
- <c:set var="generatelifcecycleifactebtnDisabled" value=""></c:set>
- <c:set var="URI_LIFECYCLE_INTERFACE" value="<%=URI_LIFECYCLE_INTERFACE%>"></c:set>
- <!-- ${URI_LIFECYCLE_INTERFACE} -->
- <c:forEach var="iface" varStatus="count" items="${it.listOfAllEntityIdsAsList}">
- <c:set var="selected" value=""></c:set>
- <c:if test="${count.index == 0}">
- <c:set var="selected" value=" selected=\"selected\""></c:set>
- </c:if>
- <c:if test="${iface == URI_LIFECYCLE_INTERFACE}">
- <c:set var="generatelifcecycleifactebtnDisabled" value=" disabled=\"disabled\""></c:set>
- </c:if>
- <option value="${iface}"${selected}>${iface}</option>
- </c:forEach>
- </select>
- <button id="generateiabtn" class="btn btn-default btn-xs" data-toggle="modal" data-target="#generateiamodal">Generate Implementation Artifact</button>
- <button id="generatelifecycleifacetn" class="btn btn-default btn-xs" onclick="generateLifeCycleInterface();"${generatelifcecycleifactebtnDisabled}>Generate lifecycle interface</button>
- </div>
-
- <div class="col-xs-4 middlebox bordered">
- <div class="listheading">
- <button class="rightbutton btn btn-danger btn-xs" type="button" onclick="deleteOperation();" id="removeOpBtn">Remove</button>
- <button class="rightbutton btn btn-primary btn-xs" type="button" onclick="createOperation();" id="addOpBtn">Add</button>
- <label>Operations</label>
- </div>
- <select class="listcontent" id="operations" size="18" onchange="operationSelectionChanged();">
- </select>
- </div>
-
- <div class="col-xs-4 bordered">
- <p:parametersInput baseURL="getOperationURL()"></p:parametersInput>
- <br /><br />
- <p:parametersOutput baseURL="getOperationURL()"></p:parametersOutput>
- </div>
-</div>
diff --git a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/otherElements.jsp b/winery/org.eclipse.winery.repository/src/main/webapp/jsp/otherElements.jsp
deleted file mode 100644
index 15d3e7d..0000000
--- a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/otherElements.jsp
+++ /dev/null
@@ -1,44 +0,0 @@
-<%--
-/*******************************************************************************
- * Copyright (c) 2012-2013 University of Stuttgart.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and the Apache License 2.0 which both accompany this distribution,
- * and are available at http://www.eclipse.org/legal/epl-v10.html
- * and http://www.apache.org/licenses/LICENSE-2.0
- *
- * Contributors:
- * Oliver Kopp - initial API and implementation and/or initial documentation
- *******************************************************************************/
---%>
-<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
-
-<%@taglib prefix="t" tagdir="/WEB-INF/tags" %>
-
-<t:genericpage windowtitle="Other Elements" selected="OtherElements" cssClass="otherelements">
-
-<p>
-The following items list TOSCA elements contained in TOSCA's <code>Definitions</code> element, which are not listed as separate tabs.
-</p>
-
-<h4>Artifacts</h4>
-<a class="btn btn-default" href="${pageContext.request.contextPath}/artifacttypes/">Artifact Types</a>
-<a class="btn btn-default" href="${pageContext.request.contextPath}/artifacttemplates/">Artifact Templates</a>
-
-<h4>Requirements and Capabilities</h4>
-<a class="btn btn-default" href="${pageContext.request.contextPath}/requirementtypes/">Requirement Types</a>
-<a class="btn btn-default" href="${pageContext.request.contextPath}/capabilitytypes/">Capability Types</a>
-
-<h4>Implementations</h4>
-<a class="btn btn-default" href="${pageContext.request.contextPath}/nodetypeimplementations/">Node Type Implementations</a>
-<a class="btn btn-default" href="${pageContext.request.contextPath}/relationshiptypeimplementations/">Relationship Type Implementations</a>
-
-<h4>Policies</h4>
-<a class="btn btn-default" href="${pageContext.request.contextPath}/policytypes/">Policy Types</a>
-<a class="btn btn-default" href="${pageContext.request.contextPath}/policytemplates/">Policy Templates</a>
-
-<h4>Imports</h4>
-<a class="btn btn-default" href="${pageContext.request.contextPath}/imports/http%253A%252F%252Fwww.w3.org%252F2001%252FXMLSchema">XML Schema Definitions</a>
-<a class="btn btn-default" href="${pageContext.request.contextPath}/imports/http%253A%252F%252Fschemas.xmlsoap.org%252Fwsdl%252F">WSDLs</a>
-
-</t:genericpage>
diff --git a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/servicetemplates/boundarydefinitions/boundarydefinitions.jsp b/winery/org.eclipse.winery.repository/src/main/webapp/jsp/servicetemplates/boundarydefinitions/boundarydefinitions.jsp
deleted file mode 100644
index aadec72..0000000
--- a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/servicetemplates/boundarydefinitions/boundarydefinitions.jsp
+++ /dev/null
@@ -1,1080 +0,0 @@
-<%--
-/*******************************************************************************
- * Copyright (c) 2013 University of Stuttgart.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and the Apache License 2.0 which both accompany this distribution,
- * and are available at http://www.eclipse.org/legal/epl-v10.html
- * and http://www.apache.org/licenses/LICENSE-2.0
- *
- * Contributors:
- * Oliver Kopp - initial API and implementation and/or initial documentation
- * Tobias Binz - communication with the nested iframe
- *******************************************************************************/
---%>
-
-<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
-<%@taglib prefix="w" tagdir="/WEB-INF/tags"%>
-<%@taglib prefix="o" tagdir="/WEB-INF/tags/common/orioneditor"%>
-<%@taglib prefix="b" tagdir="/WEB-INF/tags/servicetemplates/boundarydefinitions"%>
-<%@taglib prefix="pol" tagdir="/WEB-INF/tags/common/policies" %>
-<%@taglib prefix="wc" uri="http://www.eclipse.org/winery/functions"%>
-<%@taglib prefix="wr" uri="http://www.eclipse.org/winery/repository/functions"%>
-
-<%@page import="org.eclipse.winery.common.ModelUtilities"%>
-
-<pol:policydiag allPolicyTypes="${it.allPolicyTypes}" repositoryURL="${it.repositoryURL}" />
-
-<b:browseForServiceTemplatePropertyReqOrCap definedPropertiesAsJSONString="${it.definedPropertiesAsJSONString}" />
-
-<div class="modal fade" id="propertyMappingDiag">
- <div class="modal-dialog">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
- <h4 class="modal-title">Add property mapping</h4>
- </div>
- <div class="modal-body">
- <form id="propertyMappingForm" enctype="multipart/form-data">
- <fieldset>
- <div class="form-group">
- <label for="serviceTemplatePropertyRef">Service Template Property</label>
- <div class="row">
- <div class="col-xs-10">
- <input name="serviceTemplatePropertyRef" id="serviceTemplatePropertyRef" class="form-control" type="text" required="required">
- </div>
- <div class="col-xs-2">
- <button type="button" class="btn btn-default btn-sm" onclick="browseForServiceTemplateProperty($('#serviceTemplatePropertyRef'));">Browse</button>
- </div>
- </div>
- </div>
-
- <div class="form-group">
- <label for="targetObjectRef">Target: Node Template, Requirement, Capability, or Relationship Template</label>
- <div class="row">
- <div class="col-xs-4">
- <input name="targetObjectRef" id="targetObjectRef" class="form-control" type="text" required="required">
- </div>
- <div class="col-xs-2">
- <button type="button" class="btn btn-default btn-sm" onclick="browseForTemplateAndProperty();">Browse</button>
- </div>
- </div>
- </div>
-
- <div class="form-group">
- <label for="targetPropertyRef">Target Property</label>
- <input name="targetPropertyRef" id="targetPropertyRef" class="form-control" type="text" required="required"/>
- </div>
- </fieldset>
- </form>
- </div>
-
- <div class="modal-footer">
- <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
- <button id="addPropertyMapping" type="button" class="btn btn-primary" onclick="addPropertyMapping()">Add</button>
- <button id="updatePropertyMapping" type="button" class="btn btn-primary" onclick="updatePropertyMapping()">Update</button>
- </div>
- </div>
- </div>
-</div>
-
-<div class="modal fade" id="propertyConstraintDiag">
- <div class="modal-dialog">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
- <h4 class="modal-title">Add property constraint</h4>
- </div>
- <div class="modal-body">
- <form id="propertyMappingForm" enctype="multipart/form-data">
- <fieldset>
- <div class="form-group">
- <label for="serviceTemplatePropertyRef">Service Template Property</label>
- <div class="row">
- <div class="col-xs-10">
- <input name="serviceTemplatePropertyRef" id="serviceTemplatePropertyRefForConstraint" class="form-control" type="text" />
- </div>
- <div class="col-xs-2">
- <button type="button" class="btn btn-default btn-sm" onclick="browseForServiceTemplateProperty($('#serviceTemplatePropertyRefForConstraint'));">Browse</button>
- </div>
- </div>
- </div>
-
- <w:typeswithshortnameasselect label="Constraint Type" selectname="constraintType" type="constrainttype" typesWithShortNames="${it.constraintTypes}"/>
-
- <div class="form-group">
- ... constraint fragment ...
- </div>
- </fieldset>
- </form>
- </div>
-
- <div class="modal-footer">
- <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
- <button id="addPropertyConstraint" type="button" class="btn btn-primary" onclick="addPropertyMapping()">Add</button>
- <button id="updatePropertyConstraint" type="button" class="btn btn-primary" onclick="updatePropertyMapping()">Update</button>
- </div>
- </div>
- </div>
-</div>
-
-
-
-<div id="alltabswithcontent">
-<ul class="nav nav-tabs" id="myTab">
- <li class="active"><a href="#properties">Properties</a></li>
- <li><a href="#propertymappings">Property Mappings</a></li>
- <li><a href="#propertyconstraints">Property Constraints</a></li>
- <li><a href="#requirements">Requirements</a></li>
- <li><a href="#capabilities">Capabilities</a></li>
- <li><a href="#policies">Policies</a></li>
- <li><a href="#interfaces">Interfaces</a></li>
- <li><a href="#xml">XML</a></li>
-</ul>
-
-<div class="tab-content">
-
- <div class="tab-pane active" id="properties">
- <%-- reloadAfterSuccess is necessary as the XMLtree has to be changed --%>
- <o:orioneditorarea areaid="XMLtextarea" url="boundarydefinitions/properties" reloadAfterSuccess="true">${it.definedPropertiesAsEscapedHTML}</o:orioneditorarea>
- </div>
-
- <div class="tab-pane" id="propertymappings">
- <c:choose>
- <c:when test="${empty it.definedPropertiesAsEscapedHTML}">
- <p>No properties available. Thus, no properties can be mapped. Please define properties.</p>
- </c:when>
- <c:otherwise>
- <button id="deleteRequirement" class="rightbutton btn btn-xs btn-danger" onclick="deleteOnServerAndInTable(propertyMappingsTableInfo, 'Property Mapping', 'boundarydefinitions/propertymappings/');">Remove</button>
- <button class="rightbutton btn btn-xs btn-info" onclick="openAddPropertyMappingDiag();">Add</button>
- <button class="rightbutton btn btn-xs btn-primary" onclick="openUpdatePropertyMappingDiag();">Edit</button>
- <table id="propertyMappingsTable">
- <thead>
- <tr>
- <th>Service Template Property</th>
- <th>Target</th>
- <th>Target Property</th>
- </tr>
- </thead>
- <tbody>
- <c:if test="${not empty it.defs.properties and not empty it.defs.properties.propertyMappings and not empty it.defs.properties.propertyMappings.propertyMapping}">
- <c:forEach items="${it.defs.properties.propertyMappings.propertyMapping}" var="propertyMapping">
- <tr>
- <td>${propertyMapping.serviceTemplatePropertyRef}</td>
- <td>${propertyMapping.targetObjectRef.id}</td> <%-- .name cannot be used as it is not an Id. Future work: Store the id in a seperate field and show the name to the user --%>
- <td>${propertyMapping.targetPropertyRef}</td>
- </tr>
- </c:forEach>
- </c:if>
- </tbody>
- </table>
- </c:otherwise>
- </c:choose>
- </div>
-
- <%-- TODO: provide this as .tag. The property constraint resource should also be provided as tag --%>
- <div class="tab-pane" id="propertyconstraints">
- <button class="rightbutton btn btn-xs btn-danger" onclick="deleteOnServerAndInTable(propertyConstraintsTableInfo, 'Property Constraint', 'propertyconstraints/');">Remove</button>
- <button class="rightbutton btn btn-xs btn-info" onclick="openAddPropertyConstraintDiag();">Add</button>
- <button class="rightbutton btn btn-xs btn-primary" onclick="openUpdatePropertyConstraintDiag();">Edit</button>
- <table id="propertyconstraintstable">
- <thead>
- <tr>
- <th>(internal id)</th>
- <th>Service Template Property</th>
- <th>Constraint Type</th>
- <th>Constraint</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>example</td>
- <td>/demo</td>
- <td>http://www.example.com/accessrestrictions</td>
- <td>(not yet implemented)</td>
- </tr>
- </tbody>
- </table>
- </div>
-
- <div class="tab-pane" id="requirements">
- <button class="rightbutton btn btn-xs btn-danger" onclick="deleteOnServerAndInTable(requirementsTableInfo, 'Requirement', 'boundarydefinitions/requirements/');">Remove</button>
- <button class="rightbutton btn btn-xs btn-info" onclick="openReqEditor(false);">Add</button>
- <button class="rightbutton btn btn-xs btn-primary" onclick="openReqEditor(true);">Edit</button>
- <table id="requirementstable">
- <thead>
- <tr>
- <th>(Id)</th><%-- of the boundary requirement, also used as the id of this element--%>
- <th>Name</th>
- <th>Reference</th>
- </tr>
- </thead>
- <tbody>
- <c:forEach var="item" items="${it.defs.requirements.requirement}">
- <tr>
- <td>${wr:determineIdUsingHashCode(item)}</td>
- <td>${item.name}</td>
- <td>${item.ref.id}</td>
- </tr>
- </c:forEach>
- </tbody>
- </table>
- </div>
-
- <div class="tab-pane" id="capabilities">
- <%-- mirrored from requirements --%>
- <button class="rightbutton btn btn-xs btn-danger" onclick="deleteOnServerAndInTable(capabilitiesTableInfo, 'Capability', 'boundarydefinitions/capabilities/');">Remove</button>
- <button class="rightbutton btn btn-xs btn-info" onclick="openCapEditor(false);">Add</button>
- <button class="rightbutton btn btn-xs btn-primary" onclick="openCapEditor(true);">Edit</button>
- <table id="capabilitiestable">
- <thead>
- <tr>
- <th>(Id)</th><%-- of the boundary requirement, also used as the id of this element--%>
- <th>Name</th>
- <th>Reference</th>
- </tr>
- </thead>
- <tbody>
- <c:forEach var="item" items="${it.defs.capabilities.capability}">
- <tr>
- <td>${wr:determineIdUsingHashCode(item)}</td>
- <td>${item.name}</td>
- <td>${item.ref.id}</td>
- </tr>
- </c:forEach>
- </tbody>
- </table>
- </div>
-
- <div class="tab-pane" id="policies">
- <pol:policies list="${it.defs.policies.policy}" repositoryURL="${it.repositoryURL}" />
- <br />
- <button class="btn btn-default btn-sm btn-primary" onclick="savePolicies();">Save</button>
- </div>
- <script>
- // work around for topology modeler's policy usage
- $(".addnewpolicy").show();
-
- // required for the policy addition dialog
- winery.repositoryURL = "${it.repositoryURL}";
-
- function savePolicies() {
- require(["winery-support-common", "XMLWriter"], function(wsc) {
- var xmlw = new XMLWriter("utf-8");
- xmlw.writeStartDocument();
-
- wsc.writeCollectionDefinedByATextArea(xmlw,
- $("div.policiesContainer").children("div.content").children("div.policy"),
- "Policies");
-
- xmlw.writeEndDocument();
-
- var data = xmlw.flush();
-
- $.ajax({
- url: "boundarydefinitions/policies",
- data: data,
- type: "PUT",
- contentType: "application/xml",
- }).done(function (result) {
- vShowSuccess("Sucessfully saved policies");
- }).fail(function(jqXHR, textStatus, errorThrown) {
- vShowAJAXError("Could not save policies", jqXHR, errorThrown);
- });
- });
- }
- </script>
-
- <b:browseForX XLong="node template" XShort="NodeTemplate"/>
- <script>
- /**
- * called from browseForX
- */
- function setNodeTemplateRef() {
- var newRef = $("#NodeTemplateReferenceField").val();
- $("#nodeTemplateRefForOperation").val(newRef);
- storeNewReference(newRef);
- updateTargetInterfaceAndOperation(true);
- $("#browseForNodeTemplateDiag").modal("hide");
- }
-
- function browseForNodeTemplate() {
- $("#NodeTemplateReferenceField").val($("#nodeTemplateRefForOperation").val());
- $("#browseForNodeTemplateDiag").modal("show");
- }
- </script>
-
- <b:browseForX XLong="relationship template" XShort="RelationshipTemplate"/>
- <script>
- /**
- * called from browseForX
- */
- function setRelationshipTemplateRef() {
- var newRef = $("#RelationshipTemplateReferenceField").val();
- $("#relationshipTemplateRefForOperation").val(newRef);
- storeNewReference(newRef);
- updateTargetInterfaceAndOperation(false);
- $("#browseForRelationshipTemplateDiag").modal("hide");
- }
-
- function browseForRelationshipTemplate() {
- $("#RelationshipTemplateReferenceField").val($("#relationshipTemplateRefForOperation").val());
- $("#browseForRelationshipTemplateDiag").modal("show");
- }
- </script>
-
- <script>
- function browseForPlan() {
- vShowError("not yet implemented.");
- }
- </script>
-
- <div class="tab-pane" id="interfaces">
- <h4>Provided Interface and Operation</h4>
-
- <form class="form-horizontal">
- <div class="form-group">
- <label for="interface" class="col-sm-1 control-label">Interface</label>
- <div class="col-sm-8">
- <input id="interface" class="form-control" placeholder="NCName or URI">
- </div>
- <button type="button" class="btn btn-danger btn-sm col-sm-1" onclick="deleteCurrentlySelectedInterface();">Delete</button>
- </div>
- <div class="form-group">
- <label for="operation" class="col-sm-1 control-label">Operation</label>
- <div class="col-sm-8">
- <input id="operation" class="form-control" placeholder="NCName">
- </div>
- <button type="button" class="btn btn-danger btn-sm col-sm-1" onclick="deleteCurrentlySelectedOperation();">Delete</button>
- </div>
- </form>
-
- <h4>Target</h4>
-
- <form id="reftargettypeForm">
- <label>
- <input id="nodeRadio" type="radio" name="reftargettype" value="node" checked="checked">
- Node Template
- </label>
- <label>
- <input id="relationshipRadio" type="radio" name="reftargettype" value="relationship">
- Relationship Template
- </label>
- <label>
- <input id="planRadio" type="radio" name="reftargettype" value="plan">
- Plan
- </label>
- </form>
-
- <form class="form-horizontal">
- <div class="form-group" id="selectNodeTemplateDiv">
- <label for="nodeTemplateRefForOperation" class="col-sm-1 control-label">Reference</label>
- <div class="col-sm-8">
- <input id="nodeTemplateRefForOperation" class="form-control">
- </div>
- <button type="button" class="btn btn-default btn-sm col-sm-1" onclick="browseForNodeTemplate();">Browse</button>
- </div>
-
- <div class="form-group" id="selectRelationshipTemplateDiv" style="display:none;">
- <label for="relationshipTemplateRefForOperation" class="col-sm-1 control-label">Reference</label>
- <div class="col-sm-8">
- <input id="relationshipTemplateRefForOperation" class="form-control">
- </div>
- <button type="button" class="btn btn-default btn-sm col-sm-1" onclick="browseForRelationshipTemplate();">Browse</button>
- </div>
-
- <div class="form-group" id="selectPlanDiv" style="display:none;">
- <label for="planRefForOperation" class="col-sm-1 control-label">Reference</label>
- <div class="col-sm-8">
- <c:choose>
- <c:when test="${empty it.listOfAllPlans}">
- <p>No plans available>
- </c:when>
- <c:otherwise>
- <a id="planRefForOperation" href="#"></a>
- </c:otherwise>
- </c:choose>
- </div>
- </div>
- </form>
-
- <h4>Target Interface and Operation</h4>
- <form class="form-horizontal">
- <div class="form-group" id="selectInterfaceNameDiv">
- <label for="TargetInterface" class="col-sm-1 control-label">Interface</label>
- <div class="col-sm-8">
- <input id="TargetInterface" class="form-control">
- </div>
- </div>
-
- <div class="form-group" id="selectOperationNameDiv">
- <label for="TargetOperation" class="col-sm-1 control-label">Operation</label>
- <div class="col-sm-8">
- <input id="TargetOperation" class="form-control">
- </div>
- </div>
- </form>
-
- <div id="notApplicableDiv" style="display:none;">
- <p>not applicable in the case of plans</p>
- </div>
-
- </div>
-
- <script>
- // initialize interface selection
- require(["winery-support-common"], function(wsc) {
- wsc.fetchSelect2DataAndInitSelect2("interface", "boundarydefinitions/interfaces/?select2", function() {
- $("#interface").on("change", function() {
- updateOperationsField();
- });
- if ($("#interface").select2("val") != "") {
- updateOperationsField();
- }
- }, true);
- });
-
- function getInterfacesAndInterfaceURLs() {
- var iface = $("#interface").select2("val");
- iface = encodeID(iface);
-
- var ifacesURL = "boundarydefinitions/interfaces/";
- var ifaceURL = ifacesURL + iface + "/";
- return {
- ifacesURL: ifacesURL,
- ifaceURL: ifaceURL
- }
- }
-
- function getOperationsAndOperationURLs() {
- var ifaceURL = getInterfacesAndInterfaceURLs().ifaceURL;
- var operation = $("#operation").select2("val");
- operation = encodeID(operation);
-
- var operationsURL = ifaceURL + "exportedoperations/";
- var operationURL = operationsURL + operation + "/";
- return {
- operationsURL: operationsURL,
- operationURL: operationURL
- }
- }
-
- /**
- * Updates the field of the exported operation
- */
- function updateOperationsField() {
- var iface = $("#interface").select2("val");
- var urls = getInterfacesAndInterfaceURLs();
-
- $.ajax({
- url: urls.ifaceURL,
- type: "HEAD",
- async: false,
- error: function(jqXHR, textStatus, errorThrown) {
- if (jqXHR.status == 404) {
- // everything allright -> user entered a new interface
- $.ajax({
- url: urls.ifacesURL,
- async: false,
- type: "POST",
- data: JSON.stringify({name: iface}),
- contentType: "application/json"
- }).done(function (result) {
- vShowSuccess("Sucessfully created interface");
- }).fail(function(jqXHR, textStatus, errorThrown) {
- vShowAJAXError("Could not create interface", jqXHR, errorThrown);
- });
- } else {
- vShowAJAXError("Could not check for interface existance", jqXHR, errorThrown);
- }
- }
- });
-
- var url = urls.ifaceURL + "exportedoperations/?select2";
- require("winery-support-common").fetchSelect2DataAndInitSelect2("operation", url, function(){
- updateTarget();
- }, true);
- }
-
- $("#operation").on("change", function() {
- var operation = $("#operation").select2("val");
- var urls = getOperationsAndOperationURLs();
- $.ajax({
- url: urls.operationURL,
- type: "HEAD",
- async: false,
- error: function(jqXHR, textStatus, errorThrown) {
- if (jqXHR.status == 404) {
- // everything allright -> user entered a new operation
- $.ajax({
- url: urls.operationsURL,
- async: false,
- type: "POST",
- data: JSON.stringify({name: operation}),
- contentType: "application/json"
- }).done(function (result) {
- vShowSuccess("Sucessfully created operation");
- }).fail(function(jqXHR, textStatus, errorThrown) {
- vShowAJAXError("Could not create interface", jqXHR, errorThrown);
- });
- } else {
- vShowAJAXError("Could not check for interface operation", jqXHR, errorThrown);
- }
- }
- });
-
- updateTarget();
- })
-
- /**
- * Updates the content at "Target": Reference and Target Interface/Operation
- */
- function updateTarget() {
- var operation = $("#operation").select2("val");
- if (operation != "") {
- var urls = getOperationsAndOperationURLs();
- // At the beginning of the usage, there is no operation selected
- // Just fill the data if an operation is chosen
- var url = urls.operationURL;
-
- // store URL for later use - this avoids global JavaScript variables
- $("#operation").data("url", url);
-
- $.ajax({
- url: url,
- dataType: "json"
- }).done(function (data) {
- if ((data.type == "NodeOperation") || (data.type == "RelationshipOperation")) {
- if (data.type == "NodeOperation") {
- $("#nodeRadio").prop("checked", true);
- $("#nodeTemplateRefForOperation").val(data.ref);
- updateTargetInterfaceAndOperation(true, data.interfacename, data.operationname);
- } else {
- $("#relationshipRadio").prop("checked", true);
- $("#relationshipTemplateRefForOperation").val(data.ref);
- updateTargetInterfaceAndOperation(false, data.interfacename, data.operationname);
- }
- } else if (data.type == "Plan") {
- $("#planRadio").prop("checked", true);
- $("#planRefForOperation").editable("setValue", data.ref);
- } else if (data.type == null) {
- // nothing set yet; set node as type
- putType("NodeOperation");
- $("#nodeRadio").prop("checked", true);
- // no reference is set if no type is set -> clear field
- $("#nodeTemplateRefForOperation").val("");
- } else {
- vShowError("Unexpected type '" + data.type + "'.");
- return;
- }
- adaptVisibilityOfDivsAccordingToReferenceType();
- }).fail(function(jqXHR, textStatus, errorThrown) {
- vShowAJAXError("Could not fetch data of exported operation from " + url, jqXHR, errorThrown);
- });
- }
-
- }
-
- function adaptVisibilityOfDivsAccordingToReferenceType() {
- var checked = $('input[name=reftargettype]:checked').val();
- if (checked == "node") {
- $("#selectNodeTemplateDiv").show();
- $("#selectRelationshipTemplateDiv").hide();
- $("#selectPlanDiv").hide();
- $("#selectInterfaceNameDiv").show();
- $("#selectOperationNameDiv").show();
- $("#notApplicableDiv").hide();
- } else if (checked == "relationship") {
- $("#selectNodeTemplateDiv").hide();
- $("#selectRelationshipTemplateDiv").show();
- $("#selectPlanDiv").hide();
- $("#selectInterfaceNameDiv").show();
- $("#selectOperationNameDiv").show();
- $("#notApplicableDiv").hide();
- } else if (checked == "plan") {
- $("#selectNodeTemplateDiv").hide();
- $("#selectRelationshipTemplateDiv").hide();
- $("#selectPlanDiv").show();
- $("#selectInterfaceNameDiv").hide();
- $("#selectOperationNameDiv").hide();
- $("#notApplicableDiv").show();
- } else {
- vShowError("UI in inconsistent state: wrong branch in adaptVisibilityOfDivsAccordingToReferenceType");
- }
- }
- </script>
-
- <div class="tab-pane" id="xml">
- <o:orioneditorarea areaid="XML" url="boundarydefinitions/" reloadAfterSuccess="true">${it.boundaryDefinitionsAsXMLStringEncoded}</o:orioneditorarea>
- </div>
-</div>
-</div>
-
-<script>
-$('#myTab a').click(function (e) {
- e.preventDefault();
- $(this).tab('show');
-});
-
-function openPropertyConstraintEditor() {
- vShowError("not yet implemented");
- // TODO: fill diag with the values of the table
- // $('#addPropertyConstraintDiag').modal('show');
-}
-
-
-var propertyConstraintsTableInfo = {
- id: '#propertyconstraintstable'
-};
-var requirementsTableInfo = {
- id: '#requirementstable'
-};
-var capabilitiesTableInfo = {
- id: '#capabilitiestable'
-};
-var interfacesTableInfo = {
- id: '#interfacestable'
-};
-var propertyMappingsTableInfo = {
- id: '#propertyMappingsTable'
- };
-
-require(["winery-support"], function(ws) {
- var firstColumnIsHidden = {
- aoColumnDefs: [
- { "bSearchable": false, "bVisible": false, "aTargets": [ 0 ] }
- ]
- };
-
- ws.initTable(propertyConstraintsTableInfo, firstColumnIsHidden);
- ws.initTable(requirementsTableInfo, firstColumnIsHidden);
- ws.initTable(capabilitiesTableInfo, firstColumnIsHidden);
-
- ws.initTable(interfacesTableInfo);
- ws.initTable(propertyMappingsTableInfo);
-});
-
-<%-- === BEGIN: Property Constraints === --%>
-
-function openUpdatePropertyConstraintDiag() {
- if (propertyConstraintsTableInfo.selectedRow) {
- require(["winery-support"], function(ws) {
- if (ws.isEmptyTable(propertyConstraintsTableInfo)) {
- vShowError("No property constraints available");
- return;
- }
-
- $("#addPropertyConstraint").hide();
- $("#updatePropertyConstraint").show();
-
- // put value in fields
- var children = $(propertyMappingsTableInfo.selectedRow).children("td");
- $("#serviceTemplatePropertyRefForConstraint").val($(children[1]).text());
- $("#constraintType").val($(children[2]).text());
- // TODO: value of the constraint
-
- $('#propertyConstraintDiag').modal('show');
-
- vShowError("Not yet implemented.");
- });
- } else {
- vShowError("No property constraint selected");
- }
-}
-
-function openAddPropertyConstraintDiag() {
- $("#addPropertyConstraint").show();
- $("#updatePropertyConstraint").hide();
-
- // reset all fields
- $("#serviceTemplatePropertyRefForConstraint").val("");
- // TODO: value of the constraint
-
- $('#propertyConstraintDiag').modal('show');
-
- vShowError("Not yet implemented.");
-}
-
-<%-- === END: Property Constraints === --%>
-
-
-<%-- === BEGIN: Property Mapping === --%>
-
-function openUpdatePropertyMappingDiag() {
- if (propertyMappingsTableInfo.selectedRow) {
- require(["winery-support"], function(ws) {
- if (ws.isEmptyTable(propertyMappingsTableInfo)) {
- vShowError("No property mappings available");
- return;
- }
-
- $("#addPropertyMapping").hide();
- $("#updatePropertyMapping").show();
-
- // put value in fields
- var children = $(propertyMappingsTableInfo.selectedRow).children("td");
- $("#serviceTemplatePropertyRef").val($(children[0]).text());
- $("#targetObjectRef").val($(children[1]).text());
- $("#targetPropertyRef").val($(children[2]).text());
-
- $('#propertyMappingDiag').modal('show');
- });
- } else {
- vShowError("No property mapping selected");
- }
-}
-
-function openAddPropertyMappingDiag() {
- $("#addPropertyMapping").show();
- $("#updatePropertyMapping").hide();
-
- // reset all fields
- $("#serviceTemplatePropertyRef").val("");
- $("#targetObjectRef").val("");
- $("#targetPropertyRef").val("");
-
- $('#propertyMappingDiag').modal('show');
-}
-
-function addOrUpdatePropertyMapping(add) {
- var serviceTemplatePropertyRef = $("#serviceTemplatePropertyRef").val();
- var targetObjectRef = $("#targetObjectRef").val();
- var targetPropertyRef = $("#targetPropertyRef").val();
-
- $.ajax({
- url: "boundarydefinitions/propertymappings",
- type: "POST",
- async: false,
- data: {
- serviceTemplatePropertyRef: serviceTemplatePropertyRef,
- targetObjectRef: targetObjectRef,
- targetPropertyRef: targetPropertyRef
- },
- error: function(jqXHR, textStatus, errorThrown) {
- vShowAJAXError("Could not POST property mapping", jqXHR, errorThrown);
- },
- success: function(data, textSTatus, jqXHR) {
- // put value from fields into table
- if (add) {
- propertyMappingsTableInfo.table.fnAddData([serviceTemplatePropertyRef, targetObjectRef, targetPropertyRef]);
- } else {
- var children = $(propertyMappingsTableInfo.selectedRow).children("td");
- $(children[0]).text(serviceTemplatePropertyRef);
- $(children[1]).text(targetObjectRef);
- $(children[2]).text(targetPropertyRef);
- }
-
- $('#propertyMappingDiag').modal('hide');
-
- vShowSuccess("Successfully posted property mapping.");
- }
- });
-}
-
-function addPropertyMapping() {
- addOrUpdatePropertyMapping(true);
-}
-
-function updatePropertyMapping() {
- addOrUpdatePropertyMapping(false);
-}
-
-<%-- === END: Property Mapping === --%>
-
-
-//window.addEventListener('message', function(event){var v = document.getElementById('%s');if(v){v=v.firstChild; if(v && v.contentWindow === event.source){%s}}})
-window.addEventListener('message', function(event) {
- if (event.data) {
- if (event.data.targetObjectRef) {
- // current API expects both fields
- $(".newObjectRef").val(event.data.targetObjectRef);
- $("#newObjectPropertyRef").val(event.data.targetPropertyRef);
- } else if (event.data.reqRef) {
- $("#ReqReferenceField").val(event.data.reqRef);
- } else if (event.data.capRef) {
- $("#CapReferenceField").val(event.data.capRef);
- } else if (event.data.targetRelationshipTemplateRef) {
- $("#RelationshipTemplateReferenceField").val(event.data.targetRelationshipTemplateRef);
- }
- }
-});
-
-function storeNewReference(ref) {
- var url = $("#operation").data("url") + "/ref";
- $.ajax({
- url: url,
- data: ref,
- type: "PUT",
- contentType: "text/plain",
- }).done(function (result) {
- vShowSuccess("Sucessfully saved reference");
- }).fail(function(jqXHR, textStatus, errorThrown) {
- vShowAJAXError("Could not set reference", jqXHR, errorThrown);
- });
-}
-
-<c:if test="${not empty it.listOfAllPlans}">
-$("#planRefForOperation").editable({
- type: "select",
- source: [
- <c:forEach var="item" items="${it.listOfAllPlans}">
- {value: "${item.id}",
- text: "${item.text}"},
- </c:forEach>
- ]
-}).on("save", function(e, params) {
- var newRef = params.newValue;
- storeNewReference(newRef)
-});
-</c:if>
-
-function putType(type) {
- var url = $("#operation").data("url") + "/type";
- $.ajax({
- url: url,
- data: type,
- type: "PUT",
- contentType: "text/plain",
- }).done(function (result) {
- vShowSuccess("Sucessfully changed reference type");
- adaptVisibilityOfDivsAccordingToReferenceType();
- }).fail(function(jqXHR, textStatus, errorThrown) {
- vShowAJAXError("Could not set new reference type", jqXHR, errorThrown);
- });
-}
-
-function getInterfaceDataFromURL(ifaceURL) {
- var select2data = null;
- $.ajax({
- url: ifaceURL + "?select2",
- async: false,
- type: "GET",
- dataType: "json",
- success: function (data) {
- select2data = data;
- },
- error: function(jqXHR, textStatus, errorThrown) {
- vShowAJAXError("Could not get interface data", jqXHR, errorThrown);
- }
- });
- return select2data;
-}
-
-function getDataForUpdateTargetOperation(url, showError) {
- var select2data = null;
- $.ajax({
- url: url + "?select2",
- async: false,
- type: "GET",
- dataType: "json",
- success: function (data) {
- select2data = data;
- },
- error: function(jqXHR, textStatus, errorThrown) {
- if (showError) {
- vShowAJAXError("Could not get operation data", jqXHR, errorThrown);
- }
- }
- });
- return select2data;
-}
-
-function updateTargetOperation(operationNameToSelect) {
- var ifaceURL = $("#TargetInterface").data("url2");
- var select2data = null;
- var operationsURL;
-
- // we don't store the interface-URL at #TargetInterface, but do a quick hack here
- if (ifaceURL != null) {
- operationsURL = ifaceURL + "/" + encodeID($("#TargetInterface").val()) + "/operations/";
- select2data = getDataForUpdateTargetOperation(operationsURL, false);
- }
-
- // either only one URL or nothing found at second URL --> try first URL
- if (select2data == null) {
- ifaceURL = $("#TargetInterface").data("url1");
- operationsURL = ifaceURL + "/" + encodeID($("#TargetInterface").val()) + "/operations/";
- select2data = getDataForUpdateTargetOperation(operationsURL, true);
- }
-
- if (select2data != null) {
- $("#TargetOperation").select2({
- data:select2data
- });
- var valueToSelect = null;
- if ((typeof operationNameToSelect !== "undefined") && (operationNameToSelect != null)) {
- valueToSelect = operationNameToSelect;
- } else {
- // called without existing data --> insert pseudo data and store it at the backend to ensure consistency
- if (select2data.length > 0) {
- valueToSelect = select2data[0].id;
- storeTargetOperation(valueToSelect);
- }
- }
- if (valueToSelect != null) {
- $("#TargetOperation").select2('val', valueToSelect);
- }
- }
-
-}
-
-function updateTargetInterfaceAndOperationFromInterfaceURL(ifaceURL, interfaceNameToSelect, operationNameToSelect) {
- var select2data;
- if (typeof ifaceURL === "string") {
- select2data = getInterfaceDataFromURL(ifaceURL);
- $("#TargetInterface").data("url1", ifaceURL);
- $("#TargetInterface").data("url2", null);
- } else {
- // TODO: instead of hacking with two urls (especially at other places in the code), we should prefix the entries with S| at the source interface and T| at the target interface
- select2data = getInterfaceDataFromURL(ifaceURL[0]);
- var select2data2 = getInterfaceDataFromURL(ifaceURL[1]);
- $.merge(select2data, select2data2);
- $("#TargetInterface").data("url1", ifaceURL[0]);
- $("#TargetInterface").data("url2", ifaceURL[1]);
- }
- $("#TargetInterface").select2({data:select2data});
-
- var valueToSelect = null;
- if ((typeof interfaceNameToSelect !== "undefined") && (interfaceNameToSelect != null)) {
- valueToSelect = interfaceNameToSelect;
- } else {
- // called without existing data --> insert pseudo data and store it at the backend to ensure consistency
- if (select2data.length > 0) {
- valueToSelect = select2data[0].id;
- storeTargetInterface(valueToSelect);
- }
- }
- if (valueToSelect != null) {
- $("#TargetInterface").select2('val', valueToSelect);
- }
-
- updateTargetOperation(operationNameToSelect);
-}
-
-function updateTargetInterfaceAndOperation(isNodeTemplate, interfaceNameToSelect, operationNameToSelect) {
- var url = "topologytemplate/";
- url = url + (isNodeTemplate ? "nodetemplates" : "relationshiptemplates" + "/");
- var templateId = isNodeTemplate ? $("#nodeTemplateRefForOperation").val() : $("#relationshipTemplateRefForOperation").val();
- if (templateId == "") {
- // if no template is provided, we just return
- return;
- }
- url = url + "/" + templateId + "/type";
- $.ajax({
- url: url,
- type: "GET",
- dataType: "text"
- }).done(function (typeQName) {
- require(["winery-support-common"], function(wsc) {
- var urlDetermination = isNodeTemplate ? wsc.makeNodeTypeURLFromQName : wsc.makeRelationshipTypeURLFromQName;
- var typeURL = urlDetermination("${it.repositoryURL}", typeQName)
- if (isNodeTemplate) {
- updateTargetInterfaceAndOperationFromInterfaceURL(typeURL + "/interfaces", interfaceNameToSelect, operationNameToSelect);
- } else {
- updateTargetInterfaceAndOperationFromInterfaceURL([typeURL + "/sourceinterfaces/", typeURL + "/targetinterfaces/"], interfaceNameToSelect, operationNameToSelect);
- }
- });
- }).fail(function(jqXHR, textStatus, errorThrown) {
- vShowAJAXError("Could not get type of node / relationship", jqXHR, errorThrown);
- });
-
-}
-
-$("#nodeRadio").on("change", function() {
- putType("NodeOperation");
- updateTargetInterfaceAndOperation(true);
-});
-$("#relationshipRadio").on("change", function() {
- putType("RelationshipOperation");
- updateTargetInterfaceAndOperation(false);
-});
-$("#planRadio").on("change", function() {
- putType("Plan");
-});
-
-$("#nodeTemplateRefForOperation").on("change", function() {
- updateTargetInterfaceAndOperation(true);
-});
-
-$("#relationshipTemplateRefForOperation").on("change", function() {
- updateTargetInterfaceAndOperation(false);
-});
-
-function storeTargetInterface(val) {
- val = val || $("#TargetInterface").select2("val");
- var url = $("#operation").data("url") + "interfacename";
- // when selecting a new operation, both targetinterface and targetoperation are updated; this leads to race conditions at the backend and one chang would be lost. Therefore, we do the calls synchronously
- $.ajax({
- url: url,
- data: val,
- type: "PUT",
- contentType: "text/plain",
- async:false
- }).done(function (result) {
- vShowSuccess("Sucessfully saved interface name");
- }).fail(function(jqXHR, textStatus, errorThrown) {
- vShowAJAXError("Could not set interface name", jqXHR, errorThrown);
- });
-}
-
-function storeTargetOperation(val) {
- val = val || $("#TargetOperation").select2("val");
- var url = $("#operation").data("url") + "operationname";
- // when selecting a new operation, both targetinterface and targetoperation are updated; this leads to race conditions at the backend and one chang would be lost. Therefore, we do the calls synchronously
- $.ajax({
- url: url,
- data: val,
- type: "PUT",
- contentType: "text/plain",
- async:false
- }).done(function (result) {
- vShowSuccess("Sucessfully saved operation name");
- }).fail(function(jqXHR, textStatus, errorThrown) {
- vShowAJAXError("Could not set operation name", jqXHR, errorThrown);
- });
-}
-
-$("#TargetInterface").on("change", function() {
- storeTargetInterface();
- updateTargetOperation();
-});
-
-$("#TargetOperation").on("change", function() {
- storeTargetOperation();
-});
-
-function deleteCurrentlySelectedInterface() {
- vConfirmYesNo("Do you really want to delete this interface?", function() {
- var url = getInterfacesAndInterfaceURLs().ifaceURL;
- $.ajax({
- url: url,
- type: "DELETE"
- }).done(function () {
- require(["winery-support-common"], function (wsc) {
- wsc.removeItemFromSelect2Field($("#interface"), $("#interface").select2("data").id);
- vShowSuccess("Successfully deleted interface");
- });
- }).fail(function(jqXHR, textStatus, errorThrown) {
- vShowAJAXError("Could not delete interface", jqXHR, errorThrown);
- });
- });
-}
-
-function deleteCurrentlySelectedOperation() {
- vConfirmYesNo("Do you really want to delete this operation?", function() {
- var url = getOperationsAndOperationURLs().operationURL;
- $.ajax({
- url: url,
- type: "DELETE"
- }).done(function () {
- require(["winery-support-common"], function (wsc) {
- wsc.removeItemFromSelect2Field($("#operation"), $("#operation").select2("data").id);
- vShowSuccess("Successfully deleted operation");
- });
- }).fail(function(jqXHR, textStatus, errorThrown) {
- vShowAJAXError("Could not delete operation", jqXHR, errorThrown);
- });
- });
-}
-
-</script>
diff --git a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/servicetemplates/plans/plans.jsp b/winery/org.eclipse.winery.repository/src/main/webapp/jsp/servicetemplates/plans/plans.jsp
deleted file mode 100644
index ca50be4..0000000
--- a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/servicetemplates/plans/plans.jsp
+++ /dev/null
@@ -1,266 +0,0 @@
-<%--
-/*******************************************************************************
- * Copyright (c) 2012-2013 University of Stuttgart.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and the Apache License 2.0 which both accompany this distribution,
- * and are available at http://www.eclipse.org/legal/epl-v10.html
- * and http://www.apache.org/licenses/LICENSE-2.0
- *
- * Contributors:
- * Oliver Kopp - initial API and implementation and/or initial documentation
- * Yves Schubert - switch to bootstrap 3
- *******************************************************************************/
---%>
-<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
-<%@taglib prefix="p" tagdir="/WEB-INF/tags/parameters" %>
-<%@taglib prefix="t" tagdir="/WEB-INF/tags" %>
-
-<script>
-
-var embeddedPlansTableInfo = {
- id: '#embeddedPlansTable'
-};
-
-var linkedPlansTableInfo = {
- id: '#linkedPlansTable'
-};
-
-$(function() {
- require(["winery-support"], function(ws) {
- ws.initTable(embeddedPlansTableInfo, {
- "aoColumns": [
- { "bVisible": false, "bSearchable": false}, // ID column
- { "sTitle": "Precondition" },
- { "sTitle": "Name" },
- { "sTitle": "Type" },
- { "sTitle": "Language" }
- ],
- "aaData" : ${it.embeddedPlansTableData}
- });
-
- ws.initTable(linkedPlansTableInfo, {
- "aoColumns": [
- { "bVisible": false, "bSearchable": false}, // ID column
- { "sTitle": "Precondition" },
- { "sTitle": "Name" },
- { "sTitle": "Type" },
- { "sTitle": "Language" },
- { "sTitle": "Reference" }
- ],
- "aaData" : ${it.linkedPlansTableData}
- });
- });
-});
-
-function editIOParameters() {
- if (embeddedPlansTableInfo.selectedRow) {
- require(["winery-support"], function(ws) {
- if (ws.isEmptyTable(embeddedPlansTableInfo)) {
- vShowError("No plans available");
- return;
- }
- updateInputAndOutputParameters(getPlanURL());
- $("#editParametersDiag").modal("show");
- });
- } else {
- vShowError("No plan selected");
- }
-}
- function createPlan(data) {
- if (highlightRequiredFields()) {
- vShowError("Please fill out all required fields");
- return;
- }
- data.submit();
- }
-
- function getPlanURL() {
- var id = embeddedPlansTableInfo.table.fnGetData(embeddedPlansTableInfo.selectedRow, 0);
- return "plans/" + encodeURIComponent(id) + "/";
- }
-
- function openPlanEditor() {
- if (embeddedPlansTableInfo.selectedRow) {
- var isEmptyTable = embeddedPlansTableInfo.table.children("tbody").children("tr").first().children("td").hasClass("dataTables_empty");
- if (isEmptyTable) {
- vShowError("No plans available");
- return;
- }
- window.open(getPlanURL() + "?edit", "_blank");
- } else {
- vShowError("No plan selected");
- }
- }
-
- function letUserChooseAPlan() {
- $('#planFileInput').trigger('click');
- $('#planChooseBtn').focus();
- }
-
- requirejs(["jquery.fileupload"], function(){
- $('#addPlanForm').fileupload().bind("fileuploadadd", function(e, data) {
- $.each(data.files, function (index, file) {
- $("#planFileText").val(file.name);
- });
- $("#addPlanBtnFUP").off("click");
- $("#addPlanBtnFUP").on("click", function() {
- createPlan(data);
- });
- }).bind("fileuploadstart", function(e) {
- $("#addPlanBtnFUP").button("loading");
- }).bind('fileuploadfail', function(e, data) {
- vShowAJAXError("Could not add plan", data.jqXHR, data.errorThrown);
- $("#addPlanBtnFUP").button("reset");
- }).bind('fileuploaddone', function(e, data) {
- vShowSuccess("Plan created successfully");
-
- // reset the add button
- $("#addPlanBtnFUP").button("reset");
- // do not allow submission of the old files on a click if the dialog is opened another time
- $("#addPlanBtnFUP").off("click");
-
- // TODO: if id is already present in table, delete row in table
-
- embeddedPlansTableInfo.table.fnAddData(data.result.tableData);
-
- $('#addPlanDiag').modal('hide');
- });
- });
-</script>
-
-<div class="modal fade" id="addPlanDiag">
- <div class="modal-dialog">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
- <h4 class="modal-title">Add Plan</h4>
- </div>
- <div class="modal-body">
- <form id="addPlanForm" enctype="multipart/form-data" action="plans/" method="post">
- <div class="form-group">
- <label class="control-label">Name</label>
- <input name="planName" id="planName" type="text" class="form-control" required="required">
- </div>
-
- <t:typeswithshortnameasselect label="Type" type="plantype" selectname="planType" typesWithShortNames="${it.planTypes}">
- </t:typeswithshortnameasselect>
-
- <t:typeswithshortnameasselect label="Language" type="planlanguage" selectname="planLanguage" typesWithShortNames="${it.planLanguages}">
- </t:typeswithshortnameasselect>
-
- <div class="form-group" id="fileDiv">
- <label class="control-label" for="planFileDiv">Archive</label>
- <div style="display: block; width: 100%" id="planFileDiv">
- <input id="planFileInput" name="file" type="file" style="display:none">
- <input name="fileText" id="planFileText" type="text" class="form-control" style="width:300px; display:inline;" onclick="letUserChooseAPlan();" required="required">
- <button type="button" id="planChooseBtn" class="btn btn-default btn-xs" onclick="letUserChooseAPlan();">Choose</button>
- </div>
- </div>
- </form>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
- <button type="button" class="btn btn-primary" data-loading-text="Uploading..." id="addPlanBtnFUP">Add</button>
- <button type="button" class="btn btn-primary" style="display:none;" id="addPlanBtnBPMN4TOSCA">Add</button>
- </div>
- </div>
- </div>
-</div>
-
-<script>
-$("#planLanguage").on("change", function(e) {
- var lang = $("#planLanguage").val();
- if (lang == "http://www.opentosca.org/bpmn4tosca") {
- $("#fileDiv").hide();
- $("#addPlanBtnFUP").hide();
- $("#addPlanBtnBPMN4TOSCA").show();
- } else {
- $("#fileDiv").show();
- $("#addPlanBtnFUP").show();
- $("#addPlanBtnBPMN4TOSCA").hide();
- }
-});
-
-$("#addPlanBtnBPMN4TOSCA").on("click", function() {
- var data = new FormData();
- data.append("planName", $("#planName").val());
- data.append("planType", $("#planType").val());
- data.append("planLanguage", $("#planLanguage").val());
-
- $.ajax({
- url: "plans/",
- type: "POST",
- async: false,
- contentType: false, // jQuery automatically sets multipart/form-data; boundary=...
- data: data,
- processData: false,
- error: function(jqXHR, textStatus, errorThrown) {
- vShowAJAXError("Could not add BPMN4TOSCSA plan", jqXHR, errorThrown);
- },
- success: function(data, textStatus, jqXHR) {
- //typesTableInfo.table.fnAddData([$('#shortname').val(), $('#type').val()]);
- $('#addPlanDiag').modal('hide');
- vShowSuccess("Successfully added plan. Please refresh the page.");
- }
- });
-
-});
-</script>
-
-<p:parametersJS></p:parametersJS>
-
-<div class="modal fade" id="editParametersDiag">
- <div class="modal-dialog">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
- <h4 class="modal-title">Edit Parameters</h4>
- </div>
- <div class="modal-body">
- <p:parametersInput baseURL="getPlanURL()"></p:parametersInput>
- <p:parametersOutput baseURL="getPlanURL()"></p:parametersOutput>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
- </div>
- </div>
- </div>
-</div>
-
- <div id="managementPlans">
- <h4>Embedded Plans</h4>
- <button class="rightbutton btn btn-xs btn-danger" onclick="deleteOnServerAndInTable(embeddedPlansTableInfo, 'Plan', 'plans/', 0, 2);">Remove</button>
- <button class="rightbutton btn btn-xs btn-info" onclick="$('#addPlanDiag').modal('show');">Add</button>
- <button class="rightbutton btn btn-xs btn-default" onclick="editIOParameters();">I/O Parameters</button>
- <button class="rightbutton btn btn-xs btn-primary" onclick="openPlanEditor();">Edit</button>
-<%
-if (org.eclipse.winery.repository.Prefs.INSTANCE.isPlanBuilderAvailable()) {
-%>
- <script>
- function generateBuildPlan() {
- $("#btnGenerateBuildPlan").button('loading');
- $.ajax({
- url: 'topologytemplate/',
- // targeting method triggerGenerateBuildPlan in TopologyTemplateResource.java
- dataType: "text"
- }).fail(function(jqXHR, textStatus, errorThrown) {
- $("#btnGenerateBuildPlan").button('reset');
- vShowAJAXError("Could not trigger plan generation.", jqXHR, errorThrown);
- }).done(function(data, textStatus, jqXHR) {
- $("#btnGenerateBuildPlan").button('reset');
- var resultText = "Successfully generated build plan. Please refresh the page.";
- vShowSuccess(resultText);
- });
- }
- </script>
- <button id="btnGenerateBuildPlan" class="btn btn-xs btn-default" data-loading-text="Generating..." onclick="generateBuildPlan();">Generate Build Plan</button>
-<%
-}
-%>
- <table cellpadding="0" cellspacing="0" border="0" class="display" id="embeddedPlansTable"></table>
-
- <br /><br />
- <h4>Linked Plans</h4>
- <table cellpadding="0" cellspacing="0" border="0" class="display" id="linkedPlansTable"></table>
- </div>
diff --git a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/servicetemplates/selfservicemetadata/selfservicemetadata.jsp b/winery/org.eclipse.winery.repository/src/main/webapp/jsp/servicetemplates/selfservicemetadata/selfservicemetadata.jsp
deleted file mode 100644
index d4d9233..0000000
--- a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/servicetemplates/selfservicemetadata/selfservicemetadata.jsp
+++ /dev/null
@@ -1,256 +0,0 @@
-<%--
-/*******************************************************************************
- * Copyright (c) 2012-2013 University of Stuttgart.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and the Apache License 2.0 which both accompany this distribution,
- * and are available at http://www.eclipse.org/legal/epl-v10.html
- * and http://www.apache.org/licenses/LICENSE-2.0
- *
- * Contributors:
- * Oliver Kopp - initial API and implementation and/or initial documentation
- *******************************************************************************/
---%>
-<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
-
-<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
-<%@taglib prefix="o" tagdir="/WEB-INF/tags/common/orioneditor"%>
-<%@taglib prefix="t" tagdir="/WEB-INF/tags" %>
-<%@taglib prefix="w" uri="http://www.eclipse.org/winery/repository/functions"%>
-
-<%-- Upload functionality inspired by plans.jsp. That code could be generalized somehow in a .tag file --%>
-
-<ul class="nav nav-tabs" id="myTab">
- <li class="active"><a href="#description">Description</a></li>
- <li><a href="#images">Images</a></li>
- <li><a href="#options">Options</a></li>
- <li><a href="#xml" id="showXMLTab">XML</a></li>
-</ul>
-
-<div class="tab-content">
-
- <div class="tab-pane active" id="description">
- <div class="form-group">
- <label class="label-form">Name</label>
- <a href="#" class="form-control" data-send="always" id="displayName" data-url="selfserviceportal/displayname" data-tile="Enter Display Name">${it.application.displayName}</a>
- </div>
-
- <div class="form-group">
- <label class="label-form">Description</label>
- <div class="form-control" id="applicationDescriptionDiv">${it.application.description}</div>
- </div>
- </div>
-
- <div class="tab-pane" id="images">
-
- <t:imageUpload
- label="Icon"
- URL="selfserviceportal/icon.jpg"
- id="upIcon"
- width="16px"
- accept="image/*"/>
-
- <t:imageUpload
- label="Preview"
- URL="selfserviceportal/image.jpg"
- id="upImage"
- width="100px"
- accept="image/*"/>
-
- </div>
-
- <div class="tab-pane" id="options">
- <button class="rightbutton btn btn-xs btn-danger" name="remove" onclick="deleteOnServerAndInTable(optionsTableInfo, 'Option', 'selfserviceportal/options/', 0, 1);">Remove</button>
- <button class="rightbutton btn btn-xs btn-info" name="add" onclick="$('#addOptionDiag').modal('show');">Add</button>
- <!-- <button class="rightbutton btn btn-xs btn-default" name="edit" onclick="openOptionEditor();">Edit</button> -->
-
- <table id="optionsTable">
- <thead>
- <tr>
- <th>Id</th>
- <th>Name</th>
- <th>Icon</th>
- <th>Plan Service Name</th>
- </tr>
- </thead>
- <tbody>
- <c:if test="${not empty it.application}">
- <c:forEach var="option" items="${it.application.options.option}">
- <tr>
- <td>${option.id}</td>
- <td>${option.name}</td>
- <td><img src="selfserviceportal/options/${w:URLencode(option.id)}/icon.jpg" style="width:50px;"></td>
- <td>${option.planServiceName}</td>
- </tr>
- </c:forEach>
- </c:if>
- </tbody>
- </table>
- </div>
-
- <div class="tab-pane" id="xml">
- <o:orioneditorarea areaid="XML" url="selfserviceportal/" reloadAfterSuccess="true">${it.applicationAsXMLStringEncoded}</o:orioneditorarea>
- </div>
-
-</div>
-
-<script>
-function letUserChooseAFile() {
- $('#fileInput').trigger('click');
- $('#chooseBtn').focus();
-}
-
-$('#showXMLTab').on('shown.bs.tab', function (e) {
- window.winery.orionareas['XML'].fixEditorHeight();
-});
-</script>
-
-<div class="modal fade" id="addOptionDiag">
- <div class="modal-dialog">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
- <h4 class="modal-title">Add Option</h4>
- </div>
- <div class="modal-body">
- <form id="addOptionForm" enctype="multipart/form-data" action="selfserviceportal/options/" method="post">
- <div class="form-group">
- <label class="control-label">Name</label>
- <input name="name" type="text" class="form-control" required="required">
- </div>
-
- <div class="form-group">
- <label class="control-label">Description</label>
- <textarea id="optionDescription" name="description" class="form-control" required="required"></textarea>
- </div>
-
- <div class="form-group">
- <label class="control-label" for="fileDiv">Icon</label>
- <div style="display: block; width: 100%" id="iconDiv">
- <input id="fileInput" name="file" type="file" style="display:none" accept="image/*">
- <input name="fileText" id="fileText" type="text" class="form-control" style="width:300px; display:inline;" onclick="letUserChooseAFile();" required="required">
- <button type="button" id="chooseBtn" class="btn btn-default btn-xs" onclick="letUserChooseAFile();">Choose</button>
- </div>
- </div>
-
- <div class="form-group">
- <label class="control-label">Plan Service Name</label>
- <input name="planServiceName" type="text" class="form-control" required="required">
- </div>
-
- <div class="form-group">
- <label class="control-label">Plan Input Message</label>
- <textarea name="planInputMessage" class="form-control" required="required" rows="20">&lt;soapenv:Envelope xmlns:soapenv=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;
-&lt;soapenv:Header/&gt;
-&lt;soapenv:Body&gt;
-&lt;/soapenv:Body&gt;
-&lt;/soapenv:Envelope&gt;</textarea>
- </div>
-
- </form>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
- <button type="button" class="btn btn-primary" data-loading-text="Uploading..." id="addOptionBtn">Add</button>
- </div>
- </div>
- </div>
-</div>
-
-
-<script>
-$("#displayName").editable({
- ajaxOptions: {type: "PUT"},
- success: function() {
- vShowSuccess("Successfully updated display name");
- },
- error: function(response) {
- vShowError("Could not update display name: " + response.status + " " + response.responseText);
- }
-});
-
-$("#applicationDescriptionDiv").editable({
- type: "wysihtml5",
- send: "always",
- url: "selfserviceportal/description",
- ajaxOptions: {type: "PUT"},
- success: function() {
- vShowSuccess("Successfully updated description");
- },
- error: function(response) {
- vShowError("Could not update description: " + response.status + " " + response.responseText);
- }
-});
-
-$("#optionDescription").wysihtml5();
-
-var optionsTableInfo = {
- id: '#optionsTable'
-};
-
-$('#myTab a').click(function (e) {
- e.preventDefault();
- $(this).tab('show');
-});
-
-$(function() {
- // initialize table and hide first column
- require(["winery-support"], function(ws) {
- ws.initTable(optionsTableInfo, {
- "aoColumnDefs": [
- { "bSearchable": false, "bVisible": false, "aTargets": [ 0 ] }
- ]
- });
- });
-
- $("#addOptionDiag").on("hidden.bs.modal", function() {
- // we currently do not send data back from the server
- // we emulate the AJAX refresh by a reaload
- doTheTabSelection(function() {
- $('#myTab a[href="#options"]').tab('show');
- });
- });
-});
-
-function createOption(data) {
- if (highlightRequiredFields()) {
- vShowError("Please fill out all required fields");
- return;
- }
- data.submit();
-}
-
-requirejs(["jquery.fileupload"], function(){
- $('#addOptionForm').fileupload({
- // dropping should only be available in the addOptionDialog. This, however, does not work correctly
- dropZone: $("#addOptionDiag")
- }).bind("fileuploadadd", function(e, data) {
- $.each(data.files, function (index, file) {
- $("#fileText").val(file.name);
- });
- $("#addOptionBtn").off("click");
- $("#addOptionBtn").on("click", function() {
- createOption(data);
- });
- }).bind("fileuploadstart", function(e) {
- $("#addOptionBtn").button("loading");
- }).bind('fileuploadfail', function(e, data) {
- vShowAJAXError("Could not add option", data.jqXHR, data.errorThrown);
- $("#addOptionBtn").button("reset");
- }).bind('fileuploaddone', function(e, data) {
- vShowSuccess("Option created successfully.");
-
- // reset the add button
- $("#addOptionBtn").button("reset");
- // do not allow submission of the old files on a click if the dialog is opened another time
- $("#addOptionBtn").off("click");
-
- // TODO: add data
- //embeddedPlansTableInfo.table.fnAddData(data.result.tableData);
- // current workaround: event on hidden.bs.modal
-
- $('#addOptionDiag').modal('hide');
- });
-});
-
-</script>
diff --git a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/servicetemplates/servicetemplate.jsp b/winery/org.eclipse.winery.repository/src/main/webapp/jsp/servicetemplates/servicetemplate.jsp
deleted file mode 100644
index b5349d6..0000000
--- a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/servicetemplates/servicetemplate.jsp
+++ /dev/null
@@ -1,43 +0,0 @@
-<%--
-/*******************************************************************************
- * Copyright (c) 2012-2013, 2015 University of Stuttgart.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and the Apache License 2.0 which both accompany this distribution,
- * and are available at http://www.eclipse.org/legal/epl-v10.html
- * and http://www.apache.org/licenses/LICENSE-2.0
- *
- * Contributors:
- * Oliver Kopp - initial API and implementation and/or initial documentation
- *******************************************************************************/
---%>
-<%@page import="org.eclipse.winery.repository.resources.SubMenuData"%>
-
-<%@taglib prefix="t" tagdir="/WEB-INF/tags" %>
-
-<%-- add submenus after the submenus defined for the type --%>
-<%
-java.util.List<SubMenuData> subMenus = new java.util.ArrayList<SubMenuData>(5);
-
-SubMenuData data;
-
-data = new SubMenuData("#topologytemplate", "Topology Template");
-subMenus.add(data);
-
-data = new SubMenuData("#plans", "Plans");
-subMenus.add(data);
-
-data = new SubMenuData("#selfserviceportal", "Self-service Portal");
-subMenus.add(data);
-
-data = new SubMenuData("#boundarydefinitions", "Boundary Definitions");
-subMenus.add(data);
-
-//Tags are currently not implemented -> Don't confuse users by showing the tab
-//has to be enabled again, when tags are implemented
-//data = new SubMenuData("#tags", "Tags");
-//subMenus.add(data);
-%>
-
-<t:componentinstance cssClass="serviceTemplate" selected="ServiceTemplate" subMenus="<%=subMenus%>">
-</t:componentinstance>
diff --git a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/servicetemplates/topologytemplates/topologytemplate.jsp b/winery/org.eclipse.winery.repository/src/main/webapp/jsp/servicetemplates/topologytemplates/topologytemplate.jsp
deleted file mode 100644
index b5424ae..0000000
--- a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/servicetemplates/topologytemplates/topologytemplate.jsp
+++ /dev/null
@@ -1,23 +0,0 @@
-<%--
-/*******************************************************************************
- * Copyright (c) 2012-2013,2015 University of Stuttgart.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and the Apache License 2.0 which both accompany this distribution,
- * and are available at http://www.eclipse.org/legal/epl-v10.html
- * and http://www.apache.org/licenses/LICENSE-2.0
- *
- * Contributors:
- * Oliver Kopp - initial API and implementation and/or initial documentation
- *******************************************************************************/
---%>
-<%@page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
-
-<div>
- <a class="btn btn-primary" id="newtab" style="cursor:pointer;" href="${it.location}" target="_blank" >Open Editor</a>
- <a class="btn btn-info" href="topologytemplate/?view" target="_blank" >Open View</a>
- <br>
- <br>
- <div id="loading" class="topologyTemplatePreviewSizing" style="position:absolute; background-color: white; z-index:5;">Loading preview...</div>
- <iframe id="topologyTemplatePreview" class="topologyTemplatePreviewSizing" src="topologytemplate/?view=small" onload="$('#loading').hide(1000);"></iframe>
-</div>
diff --git a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/servicetemplates/topologytemplates/topologytemplateview.jsp b/winery/org.eclipse.winery.repository/src/main/webapp/jsp/servicetemplates/topologytemplates/topologytemplateview.jsp
deleted file mode 100644
index 789c174..0000000
--- a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/servicetemplates/topologytemplates/topologytemplateview.jsp
+++ /dev/null
@@ -1,67 +0,0 @@
-<%--
-/*******************************************************************************
- * Copyright (c) 2013 University of Stuttgart.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and the Apache License 2.0 which both accompany this distribution,
- * and are available at http://www.eclipse.org/legal/epl-v10.html
- * and http://www.apache.org/licenses/LICENSE-2.0
- *
- * Contributors:
- * Oliver Kopp - initial API and implementation and/or initial documentation
- *******************************************************************************/
---%>
-<%@page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
-<%@page buffer="none" %>
-
-<%@page import="org.eclipse.winery.common.interfaces.IWineryRepository"%>
-<%@page import="org.eclipse.winery.repository.Prefs" %>
-<%@page import="org.eclipse.winery.repository.client.WineryRepositoryClientFactory"%>
-<%@page import="org.eclipse.winery.repository.client.IWineryRepositoryClient"%>
-<%@page import="org.eclipse.winery.repository.client.WineryRepositoryClient"%>
-
-<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
-<%@taglib prefix="t" tagdir="/WEB-INF/tags" %>
-<%@taglib prefix="w" uri="http://www.eclipse.org/winery/repository/functions"%>
-
-<html>
-<head>
- <meta name="application-name" content="Winery" />
- <meta charset="UTF-8">
- <link rel="icon" href="${w:topologyModelerURI()}/favicon.png" type="image/png">
-
- <link rel="stylesheet" href="${pageContext.request.contextPath}/components/bootstrap/dist/css/bootstrap.css" />
- <link rel="stylesheet" href="${pageContext.request.contextPath}/components/bootstrap/dist/css/bootstrap-theme.css" />
-
- <script type='text/javascript' src='${pageContext.request.contextPath}/components/requirejs/require.js'></script>
-
- <!-- jquery and jquery UI have to be loaded using the old fashioned way to avoid incompatibilities with bootstrap v3 -->
- <script type='text/javascript' src='${pageContext.request.contextPath}/components/jquery/jquery.js'></script>
- <script type='text/javascript' src='${pageContext.request.contextPath}/3rdparty/jquery-ui/js/jquery-ui.js'></script>
- <script type='text/javascript' src='${pageContext.request.contextPath}/components/bootstrap/dist/js/bootstrap.js'></script>
- <script>
- require.config({
- baseUrl: "${pageContext.request.contextPath}/js",
- paths: {
- "datatables": "../components/datatables/media/js/jquery.dataTables",
- "jquery": "../components/jquery/jquery",
-
- // required for jsplumb
- "jquery.ui": "../3rdparty/jquery-ui/js/jquery-ui",
-
- "jsplumb": "../components/jsPlumb/dist/js/jquery.jsPlumb-1.5.4",
-
- "winery-sugiyamaLayouter": "${w:topologyModelerURI()}/js/winery-sugiyamaLayouter"
- }
- });
- </script>
- <c:if test="${not empty it.additionalScript}">
- <script type='text/javascript' src='${it.additionalScript}'></script>
- </c:if>
-</head>
-<body>
-
-<t:topologyTemplateRenderer topology="${it.topologyTemplate}" repositoryURL="<%=Prefs.INSTANCE.getResourcePath()%>" client="${it.client}" fullscreen="true" additonalCSS="${it.additonalCSS}" autoLayoutOnLoad="${it.autoLayoutOnLoad}"/>
-
-</body>
-</html>
diff --git a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/setupTriggerRemoveByDELKey.jsp b/winery/org.eclipse.winery.repository/src/main/webapp/jsp/setupTriggerRemoveByDELKey.jsp
deleted file mode 100644
index ea47832..0000000
--- a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/setupTriggerRemoveByDELKey.jsp
+++ /dev/null
@@ -1,28 +0,0 @@
-<%--
-/*******************************************************************************
- * Copyright (c) 2012-2013 University of Stuttgart.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and the Apache License 2.0 which both accompany this distribution,
- * and are available at http://www.eclipse.org/legal/epl-v10.html
- * and http://www.apache.org/licenses/LICENSE-2.0
- *
- * Contributors:
- * Oliver Kopp - initial API and implementation and/or initial documentation
- *******************************************************************************/
---%>
-<%--
-JavaScript snippet binding the delete button to a trigger of the "Remove" button in case there is only one such button and that no input field is selected
---%>
-
- var removeButtons = $("button:contains('Remove')");
- if (removeButtons.length == 1) {
- requirejs(["keyboardjs"], function(KeyboardJS) {
- KeyboardJS.on("del", function() {
- if ($(document.activeElement).is("body")) {
- // we are not in an input field etc.
- removeButtons.trigger("click");
- }
- });
- });
- }
diff --git a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/tags/tags.jsp b/winery/org.eclipse.winery.repository/src/main/webapp/jsp/tags/tags.jsp
deleted file mode 100644
index c47271d..0000000
--- a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/tags/tags.jsp
+++ /dev/null
@@ -1,14 +0,0 @@
-<%--
-/*******************************************************************************
- * Copyright (c) 2012-2013 University of Stuttgart.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and the Apache License 2.0 which both accompany this distribution,
- * and are available at http://www.eclipse.org/legal/epl-v10.html
- * and http://www.apache.org/licenses/LICENSE-2.0
- *
- * Contributors:
- * Oliver Kopp - initial API and implementation and/or initial documentation
- *******************************************************************************/
---%>
-Not yet implemented
diff --git a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/test.jsp b/winery/org.eclipse.winery.repository/src/main/webapp/jsp/test.jsp
deleted file mode 100644
index 2fbfb99..0000000
--- a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/test.jsp
+++ /dev/null
@@ -1,33 +0,0 @@
-<%--
-/*******************************************************************************
- * Copyright (c) 2012-2013 University of Stuttgart.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and the Apache License 2.0 which both accompany this distribution,
- * and are available at http://www.eclipse.org/legal/epl-v10.html
- * and http://www.apache.org/licenses/LICENSE-2.0
- *
- * Contributors:
- * Oliver Kopp - initial API and implementation and/or initial documentation
- *******************************************************************************/
---%>
-<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
-
-<%@taglib prefix="t" tagdir="/WEB-INF/tags" %>
-
-<t:genericpage windowtitle="Test" selected="Admin" cssClass="admin">
-
-<input id="fileupload" type="file" name="files[]" multiple
- data-url="/path/to/upload/handler.json"
- data-sequential-uploads="true"
- data-form-data='{"script": "true"}'>
-
-<script>
-var fu = $("#fileupload");
-requirejs(["jquery.fileupload"], function() {
- fu.fileupload({autoUpload:true});
-});
-</script>
-
-
-</t:genericpage>
diff --git a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/xmlSource.jsp b/winery/org.eclipse.winery.repository/src/main/webapp/jsp/xmlSource.jsp
deleted file mode 100644
index bec5e11..0000000
--- a/winery/org.eclipse.winery.repository/src/main/webapp/jsp/xmlSource.jsp
+++ /dev/null
@@ -1,20 +0,0 @@
-<%--
-/*******************************************************************************
- * Copyright (c) 2013 University of Stuttgart.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and the Apache License 2.0 which both accompany this distribution,
- * and are available at http://www.eclipse.org/legal/epl-v10.html
- * and http://www.apache.org/licenses/LICENSE-2.0
- *
- * Contributors:
- * Oliver Kopp - initial API and implementation and/or initial documentation
- *******************************************************************************/
---%>
-
-<%@taglib prefix="wc" uri="http://www.eclipse.org/winery/functions" %>
-<%@taglib prefix="o" tagdir="/WEB-INF/tags/common/orioneditor"%>
-
-<o:orioneditorarea areaid="XML">${wc:escapeHtml4(it.definitionsAsXMLString)}</o:orioneditorarea>
-
-<p class="text-muted">Save leads to a synchronization with the other tabs</p> \ No newline at end of file