aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorttsanton2014-02-07 16:12:32 (EST)
committerttsanton2014-02-07 16:12:32 (EST)
commit7717d39cd1d305dfb1d4774608d069c4de8934cd (patch)
tree629c3d2d16b2286062f205ad2ad89280c3585a92
parent9ca5e17d8b426af76cca7edfa194dae3c3fbaea7 (diff)
downloadorg.eclipse.lyo.rio-7717d39cd1d305dfb1d4774608d069c4de8934cd.zip
org.eclipse.lyo.rio-7717d39cd1d305dfb1d4774608d069c4de8934cd.tar.gz
org.eclipse.lyo.rio-7717d39cd1d305dfb1d4774608d069c4de8934cd.tar.bz2
Bug 427595 - Enable previews in Change Managementrefs/changes/47/21647/2
Change-Id: I8cb5195cce0a5f87208571f0f9eb0503ad57a987 Signed-off-by: ttsanton <ttsanton@us.ibm.com>
-rw-r--r--org.eclipse.lyo.oslc4j.changemanagement/WebContent/web/changerequest_preview_large.jsp38
-rw-r--r--org.eclipse.lyo.oslc4j.changemanagement/src/org/eclipse/lyo/oslc4j/changemanagement/resources/ChangeRequestResource.java3
2 files changed, 39 insertions, 2 deletions
diff --git a/org.eclipse.lyo.oslc4j.changemanagement/WebContent/web/changerequest_preview_large.jsp b/org.eclipse.lyo.oslc4j.changemanagement/WebContent/web/changerequest_preview_large.jsp
new file mode 100644
index 0000000..78e402f
--- /dev/null
+++ b/org.eclipse.lyo.oslc4j.changemanagement/WebContent/web/changerequest_preview_large.jsp
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<%--
+ Copyright (c) 2011, 2014 IBM Corporation.
+
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ and Eclipse Distribution License v. 1.0 which accompanies this distribution.
+
+ The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ and the Eclipse Distribution License is available at
+ http://www.eclipse.org/org/documents/edl-v10.php.
+
+ Contributors:
+
+ Sam Padgett - initial API and implementation
+ Michael Fiedler - adapt for OSLC4J
+--%>
+<%@ page contentType="text/html" language="java" pageEncoding="UTF-8" %>
+<%@ page import="java.net.*,java.util.*" %>
+<%@ page import="org.eclipse.lyo.oslc4j.changemanagement.ChangeRequest" %>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
+<%
+ChangeRequest changeRequest = (ChangeRequest) request.getAttribute("changeRequest");
+%>
+<html>
+<head>
+<title>Change Request: <c:out value="${changeRequest.title}"/> (<c:out value="${changeRequest.identifier}"/>)</title>
+</head>
+<body>
+Large Compact Preview<hr/>
+URI: <a href="<%= changeRequest.getAbout() %>"><%= changeRequest.getAbout() %></a> <br/>
+Title: <c:out value="${changeRequest.title}"/><br/>
+Description: <c:out value="${changeRequest.description}">No Description Available</c:out><br/>
+Identifier: <c:out value="${changeRequest.identifier}"/><br/>
+Created: <%= changeRequest.getCreated().toLocaleString() %><br/>
+Last Modified: <%= changeRequest.getModified().toLocaleString() %><br/>
+</body>
+</html> \ No newline at end of file
diff --git a/org.eclipse.lyo.oslc4j.changemanagement/src/org/eclipse/lyo/oslc4j/changemanagement/resources/ChangeRequestResource.java b/org.eclipse.lyo.oslc4j.changemanagement/src/org/eclipse/lyo/oslc4j/changemanagement/resources/ChangeRequestResource.java
index 6808739..eff8a76 100644
--- a/org.eclipse.lyo.oslc4j.changemanagement/src/org/eclipse/lyo/oslc4j/changemanagement/resources/ChangeRequestResource.java
+++ b/org.eclipse.lyo.oslc4j.changemanagement/src/org/eclipse/lyo/oslc4j/changemanagement/resources/ChangeRequestResource.java
@@ -224,7 +224,7 @@ public class ChangeRequestResource
compact.setIcon(iconURI);
}
- //TODO //Create and set attributes for preview resource
+ //Create and set attributes for preview resource
final Preview largePreview = new Preview();
largePreview.setHintHeight("20em");
largePreview.setHintWidth("45em");
@@ -239,7 +239,6 @@ public class ChangeRequestResource
throw new WebApplicationException(Status.NOT_FOUND);
}
- //TODO
@GET
@Path("{changeRequestId}/largePreview")
@Produces({ MediaType.TEXT_HTML })