Changed the way to read all contexts
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/private/luca.frosini/context-enumeration@167607 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
5ad8ce14d6
commit
993ce0c09b
|
@ -0,0 +1,6 @@
|
|||
eclipse.preferences.version=1
|
||||
encoding//src/main/java=UTF-8
|
||||
encoding//src/main/resources=UTF-8
|
||||
encoding//src/test/java=UTF-8
|
||||
encoding//src/test/resources=UTF-8
|
||||
encoding/<project>=UTF-8
|
|
@ -0,0 +1,5 @@
|
|||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
||||
org.eclipse.jdt.core.compiler.source=1.8
|
2
pom.xml
2
pom.xml
|
@ -54,7 +54,7 @@
|
|||
<dependency>
|
||||
<groupId>org.gcube.portlets.admin</groupId>
|
||||
<artifactId>rmp-common-library</artifactId>
|
||||
<version>[2.7.1-SNAPSHOT,)</version>
|
||||
<version>[2.7.2-SNAPSHOT, 3.0.0-SNAPSHOT)</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
package org.gcube.context;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.LinkedHashMap;
|
||||
|
||||
import org.gcube.common.scope.impl.ScopeBean;
|
||||
import org.gcube.resourcemanagement.support.server.managers.scope.ScopeManager;
|
||||
import org.gcube.resourcemanagement.support.server.managers.context.ContextManager;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
@ -19,10 +18,9 @@ public abstract class ContextElaborator {
|
|||
|
||||
}
|
||||
|
||||
public void all(File voFile) throws Exception{
|
||||
public void all() throws Exception{
|
||||
try {
|
||||
|
||||
LinkedHashMap<String, ScopeBean> map = ScopeManager.readScopes(voFile.getAbsolutePath());
|
||||
LinkedHashMap<String,ScopeBean> map = ContextManager.readContexts();
|
||||
for(String scope : map.keySet()) {
|
||||
try {
|
||||
String context = map.get(scope).toString();
|
||||
|
|
|
@ -12,12 +12,10 @@ public class TestContextList {
|
|||
File test = new File(src, "test");
|
||||
File resources = new File(test, "resources");
|
||||
|
||||
File voFile = new File(resources, "scopedata.xml");
|
||||
|
||||
File outputFile = new File(resources, "output.txt");
|
||||
|
||||
ContextList contextList = new ContextList(outputFile);
|
||||
contextList.all(voFile);
|
||||
contextList.all();
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue