Reintroduced ScopeProvider to avoid problem in the next release
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/accounting/accounting-analytics-persistence-couchbase@124141 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
e1dffda5a1
commit
e0ce7c35b7
6
pom.xml
6
pom.xml
|
@ -36,6 +36,12 @@
|
|||
<version>[2.1.0-SNAPSHOT, 3.0.0-SNAPSHOT)</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.gcube.core</groupId>
|
||||
<artifactId>common-scope</artifactId>
|
||||
<version>[1.0.0-SNAPSHOT,2.0.0-SNAPSHOT)</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
|
|
|
@ -21,6 +21,7 @@ import org.gcube.accounting.analytics.persistence.AccountingPersistenceBackendQu
|
|||
import org.gcube.accounting.analytics.persistence.AccountingPersistenceBackendQueryConfiguration;
|
||||
import org.gcube.accounting.datamodel.BasicUsageRecord;
|
||||
import org.gcube.accounting.datamodel.UsageRecord;
|
||||
import org.gcube.common.scope.api.ScopeProvider;
|
||||
import org.gcube.documentstore.records.AggregatedRecord;
|
||||
import org.gcube.documentstore.records.Record;
|
||||
import org.gcube.documentstore.records.RecordUtility;
|
||||
|
@ -108,7 +109,8 @@ public class AccountingPersistenceQueryCouchBase extends AccountingPersistenceBa
|
|||
TemporalConstraint temporalConstraint, List<Filter> filters)
|
||||
throws Exception {
|
||||
|
||||
String currentScope = BasicUsageRecord.getScopeFromToken();
|
||||
//String currentScope = BasicUsageRecord.getScopeFromToken();
|
||||
String currentScope = ScopeProvider.instance.get();
|
||||
String recordType = recordClass.newInstance().getRecordType();
|
||||
|
||||
Expression expression = x(BasicUsageRecord.SCOPE).eq(s(currentScope));
|
||||
|
|
Reference in New Issue