001    /* Copyright 2007 kallasoft
002     *
003     * Licensed under the Apache License, Version 2.0 (the "License");
004     * you may not use this file except in compliance with the License.
005     * You may obtain a copy of the License at
006     *
007     *      http://www.apache.org/licenses/LICENSE-2.0
008     *
009     * Unless required by applicable law or agreed to in writing, software
010     * distributed under the License is distributed on an "AS IS" BASIS,
011     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
012     * See the License for the specific language governing permissions and
013     * limitations under the License.
014     */
015    package com.kallasoft.smugmug.api.json.v1_2_1.categories;
016    
017    import com.kallasoft.smugmug.api.util.APIUtils;
018    
019    /**
020     * This class is a convenience class extending the base
021     * {@link com.kallasoft.smugmug.api.json.v1_2_0.categories.Delete}
022     * implementation.
023     * 
024     * @author Riyad Kalla
025     * @version 1.2.1
026     * @see com.kallasoft.smugmug.api.json.v1_2_0.categories.Delete
027     */
028    public class Delete extends
029                    com.kallasoft.smugmug.api.json.v1_2_0.categories.Delete {
030            /**
031             * Construct a new method instance that can be executed.
032             */
033            public Delete() {
034                    this(METHOD_NAME, ARGUMENTS);
035            }
036    
037            /**
038             * Construct a new method instance that can be executed with the given
039             * arguments.
040             * 
041             * @param methodName
042             *            The name of the SmugMug JSON API method that this
043             *            <em>Method</em> represents.
044             * @param arguments
045             *            The names of the arguments that this method accepts.
046             */
047            public Delete(String methodName, String[] arguments) {
048                    super(methodName, arguments);
049            }
050    
051            @Override
052            public DeleteResponse execute(String url, String[] argumentValues) {
053                    return new DeleteResponse(executeImpl(url, argumentValues));
054            }
055    
056            @Override
057            public DeleteResponse execute(String url, String apiKey, String sessionID,
058                            Integer categoryID) {
059                    return execute(url, new String[] { apiKey, sessionID,
060                                    APIUtils.toString(categoryID) });
061            }
062    
063            /**
064             * This class is a convenience class extending the base
065             * {@link com.kallasoft.smugmug.api.json.v1_2_0.categories.Delete.DeleteResponse}
066             * implementation.
067             * 
068             * @author Riyad Kalla
069             * @version 1.2.1
070             * @see com.kallasoft.smugmug.api.json.v1_2_0.categories.Delete.DeleteResponse
071             */
072            public class DeleteResponse
073                            extends
074                            com.kallasoft.smugmug.api.json.v1_2_0.categories.Delete.DeleteResponse {
075                    public DeleteResponse(String responseText) {
076                            super(responseText);
077                    }
078            }
079    }