dloy avatar dloy committed 6f88a0c

Add retrieveENC

Comments (0)

Files changed (9)

html-jsp/src/main/webapp/html/getdbpw.html

+<html>
+<head>
+    <title>Get database pw</title>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+</head>
+<body>
+<h3>Get database pw</h3>
+<form METHOD=POST ACTION="../jsp/getdbpw.jsp">
+    db key: <input type="text" name="key" /><br />
+    <input type="submit" value="Submit" />
+</form>
+</body>
+</html>

html-jsp/src/main/webapp/jsp/add.html

-<html>
-<head>
-    <title>Test Store</title>
-    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-</head>
-<body>
-<h3>Test Store</h3>
-<form METHOD=PUT ACTION="add.jsp">
-<table>
-<tr>
-<td>
-Delivery format:<br>
-<input type="radio" name="format" value="xml" CHECKED>xml<br>
-<input type="radio" name="format" value="json">json<br>
-<input type="radio" name="format" value="turtle">turtle<br>
-<input type="radio" name="format" value="rdf">rdf<br>
-<input type="radio" name="format" value="xhtml">xhtml<br>
-<input type="radio" name="format" value="anvl">ANVL
-<input type="radio" name="format" value="">none
-</td>
-</tr>
-<tr>
-<td>
-Action:<br>
-<input type="radio" name="action" value="resume">resume<br>
-<input type="radio" name="action" value="pause">pause<br>
-<input type="radio" name="action" value="shutdown">shutdown<br>
-</td>
-</tr>
-
-</table>
-</form>
-</body>
-</html>

html-jsp/src/main/webapp/jsp/add.jsp

-<%@ page import="java.util.*" %>
-<%@ page import="java.io.*" %>
-<%@ page import="org.cdlib.mrt.utility.*" %>
-<%@ page import="org.cdlib.mrt.core.*" %>
-<%
-    FixityClient client = new FixityClient();
-    StringBuffer servletPath = request.getRequestURL();
-    String path = servletPath.toString();
-    int pos = path.lastIndexOf("/");
-    if (pos >= 0) path = path.substring(0,pos);
-    pos = path.lastIndexOf("/");
-    if (pos >= 0) path = path.substring(0,pos);
-
-    String validate = request.getParameter("action");
-    String formatType = request.getParameter("format");
-    Properties prop = client.addVersion(
-            link,
-            nodeIDS,
-            objectIDS,
-            context,
-            identifier,
-            manifestS,
-            urlS,
-            validate,
-            formatType);
-    response.setContentType(prop.getProperty("header.Content-Type"));
-    String outdata = prop.getProperty("add.state");
-    //String outdata = PropertiesUtil.dumpProperties("add", prop);
-    out.clear();
-    out.print(outdata);
-%>

html-jsp/src/main/webapp/jsp/add_example.jsp

-<%@ page import="java.util.*" %>
-<%@ page import="java.io.*" %>
-<%@ page import="org.cdlib.mrt.utility.*" %>
-<%
-    File test = new File("C:/Documents and Settings/dloy/My Documents/CDLMerritt/data/test/test.xml");
-    String outdata = FileUtil.file2String(test);
-    response.setContentType("text/xml");
-    out.clear();
-    out.print(outdata);
-%>

html-jsp/src/main/webapp/jsp/getdbpw.jsp

+<%@page pageEncoding="UTF-8"%>
+<%@page contentType="text/html;charset=UTF-8"%>
+<%@ page import="org.cdlib.mrt.utility.URLEncoder" %>
+<%@ page import="java.util.*" %>
+<%@ page import="java.net.*" %>
+<%@ page import="org.cdlib.mrt.utility.*" %>
+<%@ page import="org.cdlib.mrt.fixity.db.FixityItemDB" %>
+<%
+    request.setCharacterEncoding("UTF-8");
+    String key = request.getParameter("key");
+    String msg = FixityItemDB.retrieveENC(key);
+%>
+<html>
+<head>
+    <title>Get database pw</title>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+</head>
+<body>
+
+<h3>Get database pw</h3>
+<% if (StringUtil.isNotEmpty(msg)) { %>
+<table>
+    <tr>
+        <td><b>Input key:</b></td>
+        <td><%= key %>
+    </tr>
+    <tr>
+        <td><b>Encrypted key:</b></td>
+        <td><%= msg %>
+    </tr>
+</table>
+<% } else { %>
+<h4>ERROR: no value returned</h4>
+<% } %>
+</body>
+</html>

html-jsp/src/main/webapp/jsp/service-badger.html

+<html>
+<head>
+    <title>Test Store</title>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+</head>
+<body>
+<h3>Test Service</h3>
+<form METHOD=POST ACTION="http://badger.cdlib.org:33143/service/resume">
+<table>
+<tr>
+<td>
+<hr>
+<input type="submit" value="resume">
+</td></tr>
+</table>
+</form>
+
+<form METHOD=POST ACTION="http://badger.cdlib.org:33143/service/pause">
+<table>
+<tr>
+<td>
+<hr>
+<input type="submit" value="pause">
+</td></tr>
+</table>
+</form><form METHOD=POST ACTION="http://badger.cdlib.org:33143/service/shutdown">
+<table>
+<tr>
+<td>
+<hr>
+<input type="submit" value="shutdown">
+</td></tr>
+</table>
+</form>
+</body>
+</html>

html-jsp/src/main/webapp/jsp/service-hokusai.html

+<html>
+<head>
+    <title>Test Store</title>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+</head>
+<body>
+<h3>Test Service</h3>
+<form METHOD=POST ACTION="http://hokusai.cdlib.org:28080/mrtfixity/service/resume">
+<table>
+<tr>
+<td>
+<hr>
+<input type="submit" value="resume">
+</td></tr>
+</table>
+</form>
+
+<form METHOD=POST ACTION="http://hokusai.cdlib.org:28080/mrtfixity/service/pause">
+<table>
+<tr>
+<td>
+<hr>
+<input type="submit" value="pause">
+</td></tr>
+</table>
+</form><form METHOD=POST ACTION="http://hokusai.cdlib.org:28080/mrtfixity/service/shutdown">
+<table>
+<tr>
+<td>
+<hr>
+<input type="submit" value="shutdown">
+</td></tr>
+</table>
+</form>
+</body>
+</html>

html-jsp/src/main/webapp/jsp/testVersion.jsp

-<%@page pageEncoding="UTF-8"%>
-<%@page contentType="text/html;charset=UTF-8"%>
-<!-- filename: short-2-head-ctest -->
-<html>
-<head>
-    <title>Test Store</title>
-    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-</head>
-<body>
-<h3>Test Store</h3>
-<form METHOD=POST ACTION="version.jsp">
-<table>
-<tr>
-<td>
-Remote Link: <input type="text" name="link" SIZE="60" value="http://localhost:28080/storage"><br>
-</td>
-</tr>
-<tr>
-<td>
-Delivery format:<br>
-<input type="radio" name="format" value="xml" checked>xml<br>
-<input type="radio" name="format" value="json">json<br>
-<input type="radio" name="format" value="turtle">turtle<br>
-<input type="radio" name="format" value="rdf">rdf<br>
-<input type="radio" name="format" value="xhtml">xhtml<br>
-<input type="radio" name="format" value="anvl">ANVL
-</td>
-</tr>
-<tr>
-<td>
-Archive format:<br>
-<input type="radio" name="archiveFormat" value="zip" checked>zip<br>
-<input type="radio" name="archiveFormat" value="targz" >tar.gz<br>
-<input type="radio" name="archiveFormat" value="tar">tar
-</td>
-</tr>
-<tr>
-<td>
-nodeID<INPUT TYPE=text name="nodeID" SIZE="5" MAXLENGTH=30 value="15">
-</td>
-</tr>
-<tr>
-<td>
-objectID<INPUT TYPE=text name="objectID" SIZE="30" MAXLENGTH=30 value="12345-abcde">
-</td>
-</tr>
-<tr>
-<td>
-versionID<INPUT TYPE=text name="versionID" SIZE="5" MAXLENGTH=30 value="3">
-</td>
-</tr>
-<tr>
-<td>
-fileName<INPUT TYPE=text name="fileName" SIZE="30" MAXLENGTH=30 value="fptr109.xls">
-</td>
-</tr>
-<tr>
-<td>
-context<INPUT TYPE=text name="context" SIZE="30" MAXLENGTH=30 value="UCI_GroupA001001">
-</td>
-</tr>
-<tr>
-<td>
-localID<INPUT TYPE=text name="localID" SIZE="30" MAXLENGTH=30 value="uci:10432">
-</td>
-</tr>
-<tr>
-<td>
-<hr>
-<input type="submit" name="submit" value="submit">
-</td></tr>
-</table>
-</form>
-</body>
-</html>
- 

html-jsp/src/main/webapp/jsp/version.jsp

-<%@page pageEncoding="UTF-8"%>
-<%@page contentType="text/html;charset=UTF-8"%>
-<%@ page import="org.cdlib.mrt.utility.URLEncoder" %>
-<%@ page import="java.util.*" %>
-<%@ page import="java.net.*" %>
-<%@ page import="org.cdlib.mrt.utility.*" %>
-<%@ page import="org.cdlib.mrt.store.app.jersey.KeyNameHttpInf" %>
-<%
-    request.setCharacterEncoding("UTF-8");
-    StringBuffer servletPath = request.getRequestURL();
-    String path = servletPath.toString();
-    int pos = path.lastIndexOf("/");
-    if (pos >= 0) path = path.substring(0,pos);
-    pos = path.lastIndexOf("/");
-    if (pos >= 0) path = path.substring(0,pos);
-    String link = request.getParameter("link");
-    String locDir = link + "/" ;
-    String nodeID = request.getParameter("nodeID");
-    String objectID = request.getParameter("objectID");
-    if (objectID != null)
-        objectID = URLEncoder.encode(objectID, "UTF-8");
-    String versionID = request.getParameter("versionID");
-    String fileName = request.getParameter("fileName");
-    if (StringUtil.isNotEmpty(fileName)) 
-	    fileName = URLEncoder.encode(fileName, "UTF-8");
-    String context = request.getParameter("context");
-    if (StringUtil.isNotEmpty(context))
-	    context = URLEncoder.encode(context, "UTF-8");
-    String localID = request.getParameter("localID");
-    if (StringUtil.isNotEmpty(localID))
-	    localID = URLEncoder.encode(localID, "UTF-8");
-    String manifest = request.getParameter("manifest");
-    String manifestPath = request.getParameter("manifestPath");
-    String format = request.getParameter("format");
-    String archiveFormat = request.getParameter("archiveFormat");
-    String versionResponseMode = request.getParameter("responseMode");
-    if (StringUtil.isEmpty(format))
-	     format = "xml";
-
-%>
-<html>
-<head>
-    <title>Test Store Version</title>
-    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-</head>
-<body>
-
-<h3>Test Store Version</h3>
-<h4><%= path %></h4>
-
-
-<h4>ServiceState - <%= locDir %>serviceState</h4>
-<form name="serviceState" method="get" action="<%= locDir %>state">
-   <input type="hidden" name="<%= KeyNameHttpInf.RESPONSEFORM %>" value="<%= format %>">
-   <input type="submit" value="Submit">
-</form>
-<hr/>
-
-<h4>NodeState - <%= locDir %>nodeState/<%= nodeID %></h4>
-<form name="nodeState" method="get" action="<%= locDir %>state/<%= nodeID %>">
-   <input type="hidden" name="<%= KeyNameHttpInf.RESPONSEFORM %>" value="<%= format %>"><br>
-   <input type="submit" value="Submit">
-</form>
-<hr/>
-
-<h4>ObjectState - <%= locDir %>state/<%= nodeID %>/<%= objectID %></h4>
-<form name="objectState" method="get" action="<%= locDir %>state/<%= nodeID %>/<%= objectID %>">
-   <input type="hidden" name="<%= KeyNameHttpInf.RESPONSEFORM %>" value="<%= format %>"><br>
-   <input type="submit" value="Submit">
-</form>
-<hr/>
-
-<h4>VersionState - <%= locDir %>state/<%= nodeID %>/<%= objectID %>/0</h4>
-<form name="versionState" method="get" action="<%= locDir %>state/<%= nodeID %>/<%= objectID %>/0">
-   <input type="hidden" name="<%= KeyNameHttpInf.RESPONSEFORM %>" value="<%= format %>">
-   <input type="submit" value="Submit">
-</form>
-<hr/>
-
-<h4>VersionState - <%= locDir %>state/<%= nodeID %>/<%= objectID %>/<%= versionID %></h4>
-<form name="versionState" method="get" action="<%= locDir %>state/<%= nodeID %>/<%= objectID %>/<%= versionID %>">
-   <input type="hidden" name="<%= KeyNameHttpInf.RESPONSEFORM %>" value="<%= format %>">
-   <input type="submit" value="Submit">
-</form>
-<hr/>
-
-<h4>FileState - <%= locDir %>state/<%= nodeID %>/<%= objectID %>/<%= versionID %>/<%= fileName %></h4>
-<form name="fileState" method="get" action="<%= locDir %>state/<%= nodeID %>/<%= objectID %>/<%= versionID %>/<%= fileName %>">
-   <input type="hidden" name="<%= KeyNameHttpInf.RESPONSEFORM %>" value="<%= format %>">
-   <input type="submit" value="Submit">
-</form>
-<hr/>
-
-<h4>FileFixityState - <%= locDir %>fixity/<%= nodeID %>/<%= objectID %>/<%= versionID %>/<%= fileName %></h4>
-<form name="fileFixityState" method="get" action="<%= locDir %>fixity/<%= nodeID %>/<%= objectID %>/<%= versionID %>/<%= fileName %>">
-   <input type="hidden" name="<%= KeyNameHttpInf.RESPONSEFORM %>" value="<%= format %>">
-   <input type="submit" value="Submit">
-</form>
-<hr/>
-
-<h4>PrimaryIDState - <%= locDir %>primary/<%= nodeID %>/<%= context %>/<%= localID %></h4>
-<form name="versionState" method="get" action="<%= locDir %>primary/<%= nodeID %>/<%= context %>/<%= localID %>">
-   <input type="hidden" name="<%= KeyNameHttpInf.RESPONSEFORM %>" value="<%= format %>">
-   <input type="submit" value="Submit">
-</form>
-<hr/>
-
-<h4>File - <%= locDir %>content/<%= nodeID %>/<%= objectID %>/<%= versionID %>/<%= fileName %></h4>
-<form name="fileState" method="get" action="<%= locDir %>content/<%= nodeID %>/<%= objectID %>/<%= versionID %>/<%= fileName %>">
-   <input type="hidden" name="<%= KeyNameHttpInf.RESPONSEFORM %>" value="<%= format %>">
-   <input type="submit" value="Submit">
-</form>
-<hr/>
-
-<h4>VersionArchive - <%= locDir %>content/<%= nodeID %>/<%= objectID %>/<%= versionID %> ? t=<%= archiveFormat %></h4>
-<form name="versionArchive" method="get" action="<%= locDir %>content/<%= nodeID %>/<%= objectID %>/<%= versionID %>">
-   <input type="hidden" name="<%= KeyNameHttpInf.RESPONSEFORM %>" value="<%= archiveFormat %>">
-   <input type="hidden" name="r" value="by-value">
-   <input type="submit" value="Submit">
-</form>
-<hr/>
-
-<h4>VersionLink - <%= locDir %>content/<%= nodeID %>/<%= objectID %>/<%= versionID %></h4>
-<form name="versionLink" method="get" action="<%= locDir %>content/<%= nodeID %>/<%= objectID %>/<%= versionID %>">
-   <input type="hidden" name="r" value="by-reference">
-   <input type="submit" value="Submit">
-</form>
-<hr/>
-
-<h4>ObjectArchive - <%= locDir %>content/<%= nodeID %>/<%= objectID %> ? t=<%= archiveFormat %></h4>
-<form name="versionArchive" method="get" action="<%= locDir %>content/<%= nodeID %>/<%= objectID %>">
-   <input type="hidden" name="<%= KeyNameHttpInf.RESPONSEFORM %>" value="<%= archiveFormat %>">
-   <input type="hidden" name="r" value="by-value">
-   <input type="submit" value="Submit">
-</form>
-<hr/>
-
-<h4>ObjectLink - <%= locDir %>content/<%= nodeID %>/<%= objectID %></h4>
-<form name="versionLink" method="get" action="<%= locDir %>content/<%= nodeID %>/<%= objectID %>">
-   <input type="hidden" name="r" value="by-reference">
-   <input type="submit" value="Submit">
-</form>
-<hr/>
-
-<h4>AddLink - <%= locDir %>add/<%= nodeID %>/<%= objectID %></h4>
-<form name="addVersionLink" method="post" action="<%= locDir %>add/<%= nodeID %>/<%= objectID %>">
-Manifest URL: : <input type="text" name="url" SIZE="60" value="<%= path %>/manifest/testmanifest1.txt"><br>
-   <input type="hidden" name="<%= KeyNameHttpInf.RESPONSEFORM %>" value="<%= format %>">
-   <input type="submit" value="Submit">
-</form>
-<hr/>
-
-<h4>AddMultipart - <%= locDir %>add/<%= nodeID %>/<%= objectID %></h4>
-<form action="<%= locDir %>add/<%= nodeID %>/<%= objectID %>"
-       name="addMultipart"
-       enctype="multipart/form-data"
-       method="post">
-Manifest File: : <input type="file" name="manifest" SIZE="60" value="<%= manifestPath %>"><br>
-   <input type="hidden" name="<%= KeyNameHttpInf.RESPONSEFORM %>" value="<%= format %>">
-   <input type="submit" value="Submit">
-</form>
-<hr/>
-
-
-<h4>AddManifest - <%= locDir %>add/<%= nodeID %>/<%= objectID %></h4>
-<form name="addVersionManifest" method="post" action="<%= locDir %>add/<%= nodeID %>/<%= objectID %>">
-   <input type="hidden" name="<%= KeyNameHttpInf.RESPONSEFORM %>" value="<%= format %>">
-   <textarea rows="10" cols="60" name="manifest">
-   </textarea>
-   <input type="submit" value="Submit">
-</form>
-<hr/>
-
-<h4>deleteVersion - <%= locDir %>content/<%= nodeID %>/<%= objectID %></h4>
-<form name="deleteVersion" method="delete" action="<%= locDir %>content/<%= nodeID %>/<%= objectID %>">
-  <input type="hidden" name="<%= KeyNameHttpInf.RESPONSEFORM %>" value="<%= format %>"><br>
-  <input type="submit" value="Submit">
-</form>
-
-<h4>deleteObject - <%= locDir %>content/<%= nodeID %>/<%= objectID %></h4>
-<form name="deleteObject" method="delete" action="<%= locDir %>content/<%= nodeID %>/<%= objectID %>">
-  <input type="hidden" name="<%= KeyNameHttpInf.RESPONSEFORM %>" value="<%= format %>"><br>
-  <input type="submit" value="Submit">
-</form>
-
-</body>
-</html>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.