001 /* 002 * Copyright (c) 2011, Cloudera, Inc. All Rights Reserved. 003 * 004 * Cloudera, Inc. licenses this file to you under the Apache License, 005 * Version 2.0 (the "License"). You may not use this file except in 006 * compliance with the License. You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * This software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 011 * CONDITIONS OF ANY KIND, either express or implied. See the License for 012 * the specific language governing permissions and limitations under the 013 * License. 014 */ 015 package com.cloudera.hoop; 016 017 import com.cloudera.lib.wsrs.EnumParam; 018 019 /** 020 * Class for POST operation parameter. 021 */ 022 public class PostOpParam extends EnumParam<PostOpParam.Values> { 023 024 /** 025 * Post operations. 026 */ 027 public static enum Values { 028 CREATE, MKDIRS 029 } 030 031 /** 032 * Parameter name. 033 */ 034 public static final String NAME = "op"; 035 036 /** 037 * Default parameter value. 038 */ 039 public static final String DEFAULT = "create"; 040 041 /** 042 * Constructor. 043 * 044 * @param str parameter value. 045 */ 046 public PostOpParam(String str) { 047 super(NAME, str, Values.class); 048 } 049 }