diff --git a/src/main/java/application/rest/CollectionsAccess.java b/src/main/java/application/rest/CollectionsAccess.java index 9cecaf1..6456737 100644 --- a/src/main/java/application/rest/CollectionsAccess.java +++ b/src/main/java/application/rest/CollectionsAccess.java @@ -1,11 +1,23 @@ +/* + * Copyright (c) 2019 IBM Corporation and others + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package application.rest; -import java.io.BufferedReader; -import java.io.ByteArrayInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.List; import java.util.Map; @@ -24,27 +36,9 @@ import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; -import org.apache.commons.codec.binary.Base64; -import org.apache.http.HttpResponse; -import org.apache.http.auth.AuthScope; -import org.apache.http.auth.UsernamePasswordCredentials; -import org.apache.http.client.CredentialsProvider; -import org.apache.http.client.HttpClient; -import org.apache.http.client.methods.HttpGet; -import org.apache.http.impl.client.BasicCredentialsProvider; -import org.apache.http.impl.client.HttpClientBuilder; -import org.apache.http.impl.client.HttpClients; -import org.eclipse.egit.github.core.Repository; -import org.eclipse.egit.github.core.RepositoryContents; -import org.eclipse.egit.github.core.client.GitHubClient; -import org.eclipse.egit.github.core.service.ContentsService; -import org.eclipse.egit.github.core.service.RepositoryService; -import org.yaml.snakeyaml.Yaml; - import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonParser; -import com.google.gson.internal.LinkedTreeMap; import com.ibm.json.java.JSONArray; import com.ibm.json.java.JSONObject; @@ -53,7 +47,6 @@ import io.kubernetes.client.ApiException; import kabasec.PATHelper; -//@RolesAllowed("test-roles@kabanero-io") @RolesAllowed("admin") @Path("/v1") public class CollectionsAccess {