Last change
on this file since 5500 was
5500,
checked in by Twan Goosen, 10 years ago
|
refactored provider into an abstract provider with an abstract method for selecting the collections space. extended by concrete providers for the pulished collections and private collections. also renamed it to CollectionsProvider?
|
File size:
575 bytes
|
Line | |
---|
1 | package eu.clarin.cmdi.virtualcollectionregistry.gui.table; |
---|
2 | |
---|
3 | import eu.clarin.cmdi.virtualcollectionregistry.QueryOptions; |
---|
4 | import eu.clarin.cmdi.virtualcollectionregistry.gui.ApplicationSession; |
---|
5 | |
---|
6 | /** |
---|
7 | * |
---|
8 | * @author twagoo |
---|
9 | */ |
---|
10 | public class PrivateCollectionsProvider extends CollectionsProvider { |
---|
11 | |
---|
12 | @Override |
---|
13 | protected void addSpaceFilter(QueryOptions.Filter filter) { |
---|
14 | ApplicationSession session = ApplicationSession.get(); |
---|
15 | filter.add(QueryOptions.Property.VC_OWNER, |
---|
16 | QueryOptions.Relation.EQ, |
---|
17 | session.getUser()); |
---|
18 | } |
---|
19 | |
---|
20 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.