20259: Add documentation for banner and tooltip features
[arvados.git] / sdk / java-v2 / src / main / java / org / arvados / client / api / client / CollectionsApiClient.java
1 /*
2  * Copyright (C) The Arvados Authors. All rights reserved.
3  *
4  * SPDX-License-Identifier: AGPL-3.0 OR Apache-2.0
5  *
6  */
7
8 package org.arvados.client.api.client;
9
10 import org.arvados.client.api.model.Collection;
11 import org.arvados.client.api.model.CollectionList;
12 import org.arvados.client.config.ConfigProvider;
13 import org.slf4j.Logger;
14
15 public class CollectionsApiClient extends BaseStandardApiClient<Collection, CollectionList> {
16
17     private static final String RESOURCE = "collections";
18     private final Logger log = org.slf4j.LoggerFactory.getLogger(CollectionsApiClient.class);
19
20     public CollectionsApiClient(ConfigProvider config) {
21         super(config);
22     }
23     
24     @Override
25     public Collection create(Collection type) {
26         Collection newCollection = super.create(type);
27         log.debug(String.format("New collection '%s' with UUID %s has been created", newCollection.getName(), newCollection.getUuid()));
28         return newCollection;
29     }
30
31     @Override
32     String getResource() {
33         return RESOURCE;
34     }
35
36     @Override
37     Class<Collection> getType() {
38         return Collection.class;
39     }
40
41     @Override
42     Class<CollectionList> getListType() {
43         return CollectionList.class;
44     }
45 }