Search in sources :

Example 6 with ResourceListProvider

use of org.opencastproject.index.service.resources.list.api.ResourceListProvider in project opencast by opencast.

the class ListProvidersServiceImpl method getList.

@Override
public Map<String, String> getList(String listName, ResourceListQuery query, Organization organization, boolean inverseValueKey) throws ListProviderException {
    ResourceListProvider provider = providers.get(listName);
    if (provider == null)
        throw new ListProviderException("No resources list found with the name " + listName);
    Map<String, String> list = provider.getList(listName, query, organization);
    if (inverseValueKey) {
        list = invertMap(list);
    }
    return list;
}
Also used : ResourceListProvider(org.opencastproject.index.service.resources.list.api.ResourceListProvider) ListProviderException(org.opencastproject.index.service.exception.ListProviderException)

Aggregations

ResourceListProvider (org.opencastproject.index.service.resources.list.api.ResourceListProvider)6 Test (org.junit.Test)4 File (java.io.File)3 Capture (org.easymock.Capture)3 ListProvidersService (org.opencastproject.index.service.resources.list.api.ListProvidersService)3 ResourceListQuery (org.opencastproject.index.service.resources.list.api.ResourceListQuery)3 Organization (org.opencastproject.security.api.Organization)3 HashMap (java.util.HashMap)2 Map (java.util.Map)2 ListProviderException (org.opencastproject.index.service.exception.ListProviderException)2 ListProvidersServiceImpl (org.opencastproject.index.service.resources.list.impl.ListProvidersServiceImpl)2 ResourceListQueryImpl (org.opencastproject.index.service.resources.list.query.ResourceListQueryImpl)2 DefaultOrganization (org.opencastproject.security.api.DefaultOrganization)2 JaxbOrganization (org.opencastproject.security.api.JaxbOrganization)2 JValue (com.entwinemedia.fn.data.json.JValue)1 SimpleSerializer (com.entwinemedia.fn.data.json.SimpleSerializer)1 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 ArrayList (java.util.ArrayList)1 StreamingOutput (javax.ws.rs.core.StreamingOutput)1 ResourceListFilter (org.opencastproject.index.service.resources.list.api.ResourceListFilter)1