001/** 002 * Copyright 2015 Tampere University of Technology, Pori Department 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package service.tut.pori.contentstorage.reference; 017 018import core.tut.pori.http.Response; 019import core.tut.pori.http.annotations.HTTPMethodParameter; 020import core.tut.pori.http.annotations.HTTPService; 021import core.tut.pori.http.annotations.HTTPServiceMethod; 022import core.tut.pori.http.parameters.Limits; 023 024/** 025 * Generates example XML output 026 * 027 */ 028@HTTPService(name = service.tut.pori.contentstorage.reference.Definitions.SERVICE_COS_REFERENCE_EXAMPLE) 029public class ExampleService { 030 /** 031 * Generates example media list 032 * @param limits optional paging limits 033 * @return MediaList 034 * @see service.tut.pori.contentstorage.MediaList 035 */ 036 @HTTPServiceMethod(name = service.tut.pori.contentstorage.Definitions.ELEMENT_MEDIALIST) 037 public Response videoList( 038 @HTTPMethodParameter(name = Limits.PARAMETER_DEFAULT_NAME, required=false, defaultValue="0-0") Limits limits 039 ) 040 { 041 Example example = new Example(); 042 example.setMediaList(ContentStorageReferenceCore.generateMediaList(limits)); 043 return new Response(example); 044 } 045 046}