Révision bf9c3717
Ajouté par Remy Menard il y a environ 11 ans
IoTa-DiscoveryWS/IoTa-DiscoveryWS/src/main/webapp/lookupService.jsp | ||
---|---|---|
<%@page import="fr.unicaen.iota.discovery.server.querycontrol.DSControler"%>
|
||
<%@page import="fr.unicaen.iota.xacml.policy.Module"%>
|
||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||
<%@page import="java.util.ArrayList"%>
|
||
<%@page import="java.util.List"%>
|
||
<%@page import="fr.unicaen.iota.discovery.server.hibernate.User"%>
|
||
<%@page import="fr.unicaen.iota.discovery.server.hibernate.Event"%>
|
||
<%@page import="fr.unicaen.iota.discovery.server.util.ProtocolException"%>
|
||
|
||
<html>
|
||
<head>
|
||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||
<link rel="stylesheet" type="text/css" href="style/style.css" />
|
||
<script type="text/javascript" src="script/check_form.js"> </script>
|
||
<title>Fr.Unicaen Discovery Services</title>
|
||
</head>
|
||
<body>
|
||
<jsp:include page="template/checkAccess.jsp" />
|
||
<%
|
||
session.setAttribute("state", "Discovery services / Lookup Service /");
|
||
%>
|
||
<jsp:include page="header.jsp"></jsp:include>
|
||
<form method="post" action="lookupService.jsp" id="lookupFormTag">
|
||
<div class="categorybar">
|
||
<div class="categoryTitle" id="categoryLookup">
|
||
<div><span>EPC: </span><input id="lookupForm" type="text" name="epc" value=""/><input type="image" src="./images/search.jpg"/></div>
|
||
</div>
|
||
</div>
|
||
</form>
|
||
<%
|
||
DSControler dSControler = new DSControler();
|
||
if (request.getParameter("epc") == null) {
|
||
return;
|
||
}
|
||
String epc = request.getParameter("epc");
|
||
String sessionId = (String) session.getAttribute("sessionID");
|
||
List<Event> events = new ArrayList<Event>();
|
||
String error = null;
|
||
try {
|
||
events = dSControler.eventLookup(sessionId, epc);
|
||
} catch (ProtocolException pe) {
|
||
error = pe.getMessage();
|
||
}
|
||
%>
|
||
<div class="resultTitle">Results for EPC <span><%=epc%></span>:</div>
|
||
<%
|
||
if (events.size() == 0) {
|
||
%>
|
||
<div class="resultitem">No results</div>
|
||
<%
|
||
if (error != null) {
|
||
%>
|
||
<div class="resultitemerror"><%=error%></div>
|
||
<%
|
||
}
|
||
return;
|
||
}
|
||
int i = 1;
|
||
for (Event event : events) {
|
||
%>
|
||
<div class="resultitem">
|
||
<%=i%> : <%=event.getPartner().getServiceAddress()%>
|
||
</div>
|
||
<div class="subresult"> <span>id:</span> <%=event.getId()%> </div>
|
||
<div class="subresult"> <span>type:</span> <%=event.getEventType()%></div>
|
||
<div class="subresult"> <span>class:</span> <%=event.getEPCClass()%> </div>
|
||
<div class="subresult"> <span>life cycle step:</span> <%=event.getBizStep()%></div>
|
||
<div class="subresult"> <span>event timestamp:</span> <%=event.getEventTimeStamp()%> </div>
|
||
<div class="subresult"> <span>source timestamp:</span> <%=event.getSourceTimeStamp()%></div>
|
||
<%
|
||
i++;
|
||
}
|
||
%>
|
||
</body>
|
||
</html>
|
||
<%@page import="fr.unicaen.iota.discovery.server.querycontrol.DSControler"%>
|
||
<%@page import="fr.unicaen.iota.xacml.policy.Module"%>
|
||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||
<%@page import="java.util.ArrayList"%>
|
||
<%@page import="java.util.List"%>
|
||
<%@page import="fr.unicaen.iota.discovery.server.hibernate.User"%>
|
||
<%@page import="fr.unicaen.iota.discovery.server.hibernate.Event"%>
|
||
<%@page import="fr.unicaen.iota.discovery.server.util.ProtocolException"%>
|
||
|
||
<html>
|
||
<head>
|
||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||
<link rel="stylesheet" type="text/css" href="style/style.css" />
|
||
<script type="text/javascript" src="script/check_form.js"> </script>
|
||
<title>Fr.Unicaen Discovery Services</title>
|
||
</head>
|
||
<body>
|
||
<jsp:include page="template/checkAccess.jsp" />
|
||
<%
|
||
session.setAttribute("state", "Discovery services / Lookup Service /");
|
||
%>
|
||
<jsp:include page="header.jsp"></jsp:include>
|
||
<form method="post" action="lookupService.jsp" id="lookupFormTag">
|
||
<div class="categorybar">
|
||
<div class="categoryTitle" id="categoryLookup">
|
||
<div><span>EPC: </span><input id="lookupForm" type="text" name="epc" value=""/><input type="image" src="./images/search.jpg"/></div>
|
||
</div>
|
||
</div>
|
||
</form>
|
||
<%
|
||
DSControler dSControler = new DSControler();
|
||
if (request.getParameter("epc") == null) {
|
||
return;
|
||
}
|
||
String epc = request.getParameter("epc");
|
||
String sessionId = (String) session.getAttribute("sessionID");
|
||
List<Event> events = new ArrayList<Event>();
|
||
String error = null;
|
||
try {
|
||
events = dSControler.eventLookup(sessionId, epc);
|
||
} catch (ProtocolException pe) {
|
||
error = pe.getMessage();
|
||
}
|
||
%>
|
||
<div class="resultTitle">Results for EPC <span><%=epc%></span>:</div>
|
||
<%
|
||
if (events.size() == 0) {
|
||
%>
|
||
<div class="resultitem">No results</div>
|
||
<%
|
||
if (error != null) {
|
||
%>
|
||
<div class="resultitemerror"><%=error%></div>
|
||
<%
|
||
}
|
||
return;
|
||
}
|
||
int i = 1;
|
||
for (Event event : events) {
|
||
%>
|
||
<div class="resultitem">
|
||
<%=i%> : <%=event.getPartner().getServiceAddress()%>
|
||
</div>
|
||
<div class="subresult"> <span>id:</span> <%=event.getId()%> </div>
|
||
<div class="subresult"> <span>type:</span> <%=event.getEventType()%></div>
|
||
<div class="subresult"> <span>class:</span> <%=event.getEPCClass()%> </div>
|
||
<div class="subresult"> <span>life cycle step:</span> <%=event.getBizStep()%></div>
|
||
<div class="subresult"> <span>event timestamp:</span> <%=event.getEventTimeStamp()%> </div>
|
||
<div class="subresult"> <span>source timestamp:</span> <%=event.getSourceTimeStamp()%></div>
|
||
<%
|
||
i++;
|
||
}
|
||
%>
|
||
</body>
|
||
</html>
|
Formats disponibles : Unified diff
Version 1.99
- a few bugs fixed!
- new testing application to capture events
- new options to the command line to configure the public/private keys
for TLS and for signature
- new method more accurate than "traceEPC": the events are sorted by
EPCIS
- New options added to the command line
- user can be identified by alias, if the DN of his certificate is
incompatible with the LDAP directory
- new shell script to configure the LDAP directory (same
functionnalities as IoTa-Installer)
- installs and configures LaMBDa
- finer certificate mangagement
- EpcILoN correctly subscribe with TLS to ETa
- new figure for LaMBDa
- shows data flows between PHI and YPSilon
- sets DS and DSeTa in different schemas