/**
 * Copyright 2017 Goldman Sachs.
 * 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 resources;

// TODO - add your @Path here
public class CompanyResource {

    // TODO - Add a @GET resource to get company data
    // Your service should return data for a given stock ticker

}

@@ -634,73 +634,850 @@
 s;%0D%0A
-%0D%0A// TODO - add your @Path here%0D%0Apublic class CompanyResource %7B%0D%0A
+import javax.ws.rs.*;%0D%0Aimport javax.ws.rs.GET;%0D%0Aimport javax.ws.rs.Path;%0D%0Aimport javax.ws.rs.core.MediaType;%0D%0Aimport javax.ws.rs.core.Response;%0D%0Aimport java.io.IOException;%0D%0Aimport pojo.Company;%0D%0A%0D%0A@Path(%22services%22)%0D%0Apublic class CompanyResource %7B%0D%0A    @GET%0D%0A    @Path(%22company%22)%0D%0A    @Produces(MediaType.APPLICATION_JSON)%0D%0A%0D%0A    public Response getCompanyResource(String stockTicker) throws IOException%0D%0A    %7B%0D%0A       %0D%0A        String fileName = %22companyInfo.json%22;%0D%0A        List%3CCompany%3E companies; //TODO instantiate using Company methods%0D%0A        companies = Company.readAllCompanies(fileName); %0D%0A        for(Company c: companies)%0D%0A        %7B%0D%0A            if(c.getSymbol().equals(stockTicker)) //change to correct method name%0D%0A            %7B%0D%0A                 return Response.ok().entity(c).build();%0D%0A            %7D%0D%0A        %7D%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A    %7D
 %0D%0A  

Update CompanyResource.java