Révision 19b58bab
Ajouté par Remy Menard il y a plus de 11 ans
ALfA/ALfA/src/main/java/fr/unicaen/iota/application/operations/EpcisOperation.java | ||
---|---|---|
/*
|
||
* This program is a part of the IoTa Project.
|
||
* This program is a part of the IoTa project.
|
||
*
|
||
* Copyright © 2008-2012 Université de Caen Basse-Normandie, GREYC
|
||
* Copyright © 2008-2013 Université de Caen Basse-Normandie, GREYC
|
||
* Copyright © 2008-2012 Orange Labs
|
||
*
|
||
*
|
||
* This program is free software: you can redistribute it and/or modify
|
||
* it under the terms of the GNU General Public License as published by
|
||
* the Free Software Foundation, either version 3 of the License, or
|
||
... | ... | |
|
||
public class EpcisOperation {
|
||
|
||
private final String EPCIS_SERVICE_ADDRESS;
|
||
private final Identity IDENTITY;
|
||
private final ETaQueryControlClient etaClient;
|
||
private static final Log log = LogFactory.getLog(EpcisOperation.class);
|
||
|
||
public EpcisOperation(Identity identity, String epcis_service_address) {
|
||
IDENTITY = identity;
|
||
EPCIS_SERVICE_ADDRESS = epcis_service_address;
|
||
public EpcisOperation(Identity identity, String epcis_service_address, String pksFilename, String pksPassword, String trustPksFilename, String trustPksPassword) {
|
||
etaClient = new ETaQueryControlClient(identity, epcis_service_address, pksFilename, pksPassword, trustPksFilename, trustPksPassword);
|
||
}
|
||
|
||
public QueryParam createEPCISParameter(String name, String value) {
|
||
... | ... | |
public List<EPCISEventType> getFilteredEvent(Map<String, String> filters) throws RemoteException {
|
||
log.trace("getFilteredEvent");
|
||
try {
|
||
ETaQueryControlClient client = new ETaQueryControlClient(IDENTITY, EPCIS_SERVICE_ADDRESS);
|
||
QueryParams queryParams = new QueryParams();
|
||
for (Map.Entry<String, String> entry : filters.entrySet()) {
|
||
queryParams.getParam().add(createEPCISParameter(entry.getKey(), entry.getValue()));
|
||
... | ... | |
poll.setQueryName("SimpleEventQuery");
|
||
poll.setParams(queryParams);
|
||
|
||
QueryResults results = client.poll(poll);
|
||
QueryResults results = etaClient.poll(poll);
|
||
EventListType eventListType = results.getResultsBody().getEventList();
|
||
return getEvents(eventListType);
|
||
} catch (Exception ex) {
|
Formats disponibles : Unified diff
Version 1.9
- use TLS for secured links
- SigMa is now fully functionnal
- completed documention
- a lot of bugs fixed!
- signature creation from the canonical form of the event
- signature creation using ECDSA algorithm
- signature is correctly verified
- manage the extension identifying the owner of the event
- if no identity is provided, the identity of the certificate is used
- access to the web interface of policy management is made by
certificate
- if no identity is provided, the identity of the certificate is used
- create and use certificates for TLS
- configure Apache Tomcat for TLS
- show SigMa library (SigMa-Commons)