Getting scope from ScopeProvider

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/social-networking/social-data-indexer-se-plugin@128904 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Luca Frosini 2016-05-30 15:15:25 +00:00
parent 2412216e53
commit 2b7a5fff59
1 changed files with 3 additions and 7 deletions

View File

@ -29,6 +29,7 @@ import org.elasticsearch.common.unit.TimeValue;
import org.elasticsearch.index.query.BoolQueryBuilder;
import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.search.SearchHit;
import org.gcube.common.scope.api.ScopeProvider;
import org.gcube.portal.databook.server.DBCassandraAstyanaxImpl;
import org.gcube.portal.databook.server.DatabookStore;
import org.gcube.portal.databook.shared.Attachment;
@ -82,13 +83,8 @@ public class SocialDataIndexerPlugin extends Plugin<SocialDataIndexerPluginDecla
try{
String scope = null;
// retrieve the scope from inputs, if any
if(inputs.containsKey("scope"))
scope = (String) inputs.get("scope");
else
logger.error("Scope variable is not set. The context will be evaluated later...");
// TODO in the next release this will be changed.
String scope = ScopeProvider.instance.get();
// connection to cassandra
store = new DBCassandraAstyanaxImpl(scope);