Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Licensed to the Apache Software Foundation (ASF) under one
   * or more contributor license agreements.  See the NOTICE file
   * distributed with this work for additional information
   * regarding copyright ownership.  The ASF licenses this file
   * to you 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 org.apache.syncope.client.services.proxy;
 
 import java.net.URI;
 import java.util.List;
 
 public class ReportServiceProxy extends SpringServiceProxy implements ReportService {
 
     public ReportServiceProxy(final String baseUrlfinal RestTemplate restTemplate) {
         super(baseUrlrestTemplate);
     }
 
     @Override
     public Response create(final ReportTO reportTO) {
         ReportTO createdReportTO = getRestTemplate().postForObject( + "report/create"reportTOReportTO.class);
         URI location = URI.create( + "report/read/" + createdReportTO.getId() + ".json");
         return Response.created(location).header(.createdReportTO.getId()).build();
     }
 
     @Override
     public void update(final Long reportIdfinal ReportTO reportTO) {
         getRestTemplate().postForObject( + "report/update"reportTOReportTO.class);
     }
 
     @Override
     public int count() {
         return getRestTemplate().getForObject( + "report/count.json"Integer.class);
     }
 
     @Override
     public List<ReportTOlist() {
         return Arrays.asList(getRestTemplate().getForObject( + "report/list"ReportTO[].class));
     }
 
     @Override
     public List<ReportTOlist(final int pagefinal int size) {
         return Arrays.asList(getRestTemplate().getForObject( + "report/list/{page}/{size}"ReportTO[].class,
                 pagesize));
     }
 
     @Override
         return new ReportletConfClasses(
                 handlePossiblyEmptyStringCollection( + "report/reportletConfClasses.json"));
     }
 
     @Override
     public ReportTO read(final Long reportId) {
         return getRestTemplate().getForObject( + "report/read/{reportId}"ReportTO.classreportId);
     }
 
     @Override
     public ReportExecTO readExecution(final Long executionId) {
         return getRestTemplate().getForObject( + "report/execution/read/{executionId}"ReportExecTO.class,
                 executionId);
     }
 
     @Override
     public Response exportExecutionResult(final Long executionIdfinal ReportExecExportFormat fmt) {
         final String format = fmt == null
                 ? ""
                 : "?fmt=" + fmt.toString();
         return handleStream( + "report/execution/export/" + executionId + format);
     }
 
     @Override
     public ReportExecTO execute(final Long reportId) {
         return getRestTemplate().postForObject( + "report/execute/{reportId}"nullReportExecTO.class,
                 reportId);
     }
 
     @Override
     public void delete(final Long reportId) {
        getRestTemplate().getForObject( + "report/delete/{reportId}"ReportTO.classreportId);
    }
    @Override
    public void deleteExecution(final Long executionId) {
        getRestTemplate().getForObject( + "report/execution/delete/{executionId}"ReportExecTO.class,
                executionId);
    }
New to GrepCode? Check out our FAQ X