git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/Common/authorization-common-library@177198 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
d4c76f9e23
commit
e7280994da
2
pom.xml
2
pom.xml
|
@ -3,7 +3,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.gcube.common</groupId>
|
||||
<artifactId>common-authorization</artifactId>
|
||||
<version>2.1.4-SNAPSHOT</version>
|
||||
<version>2.1.5-SNAPSHOT</version>
|
||||
<name>authorization service common library</name>
|
||||
|
||||
<parent>
|
||||
|
|
|
@ -34,7 +34,7 @@ public class AuthorizationEndpointScanner {
|
|||
|
||||
if (endpoints==null || endpoints.getEndpoints().size()==0){
|
||||
log.trace("starting authorization endpoint retrieving");
|
||||
Map<Integer, AuthorizationEndpoint> endpointsMap = new HashMap<Integer, AuthorizationEndpoint>();
|
||||
Map<String, AuthorizationEndpoint> endpointsMap = new HashMap<String, AuthorizationEndpoint>();
|
||||
|
||||
try {
|
||||
|
||||
|
@ -60,7 +60,7 @@ public class AuthorizationEndpointScanner {
|
|||
defaultInfrastructure = endpoint.getInfrastructure();
|
||||
defaultInfraPriority = endpoint.getPriority();
|
||||
}
|
||||
endpointsMap.put(endpoint.getInfrastructure().hashCode(), endpoint);
|
||||
endpointsMap.put(endpoint.getInfrastructure(), endpoint);
|
||||
}
|
||||
|
||||
log.info("loaded endpoint {} ",endpoint.toString());
|
||||
|
|
|
@ -4,15 +4,16 @@ import java.util.Map;
|
|||
|
||||
public class EndpointsContainer {
|
||||
|
||||
private Map<Integer, AuthorizationEndpoint> endpoints;
|
||||
private Map<String, AuthorizationEndpoint> endpoints;
|
||||
private String defaultInfrastructure;
|
||||
protected EndpointsContainer(Map<Integer, AuthorizationEndpoint> endpoints,
|
||||
|
||||
protected EndpointsContainer(Map<String, AuthorizationEndpoint> endpoints,
|
||||
String defaultInfrastructure) {
|
||||
super();
|
||||
this.endpoints = endpoints;
|
||||
this.defaultInfrastructure = defaultInfrastructure;
|
||||
}
|
||||
public Map<Integer, AuthorizationEndpoint> getEndpoints() {
|
||||
public Map<String, AuthorizationEndpoint> getEndpoints() {
|
||||
return endpoints;
|
||||
}
|
||||
public String getDefaultInfrastructure() {
|
||||
|
|
|
@ -59,7 +59,7 @@ public class EndpointBinder {
|
|||
|
||||
@Test
|
||||
public void scan(){
|
||||
Map<Integer, AuthorizationEndpoint> endpoints = AuthorizationEndpointScanner.endpoints().getEndpoints();
|
||||
Map<String, AuthorizationEndpoint> endpoints = AuthorizationEndpointScanner.endpoints().getEndpoints();
|
||||
System.out.println(endpoints);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue