All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.frameworkset.util.annotations.wraper.RequestParamWraper Maven / Gradle / Ivy

Go to download

bboss is a j2ee framework include aop/ioc,mvc,persistent,taglib,rpc,event ,bean-xml serializable and so on.http://www.bbossgroups.com

There is a newer version: 6.2.7
Show newest version
/**
 *  Copyright 2008 biaoping.yin
 *
 *  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 org.frameworkset.util.annotations.wraper;

import com.frameworkset.util.SimpleStringUtil;
import org.frameworkset.util.annotations.AnnotationUtils;
import org.frameworkset.util.annotations.RequestParam;

import java.util.Locale;

/**
 * 

RequestParamWraper.java

*

Description:

*

bboss workgroup

*

Copyright (c) 2005-2013

* * @Date 2013年10月3日 * @author biaoping.yin * @version 1.0 */ public class RequestParamWraper extends BaseWraper{ /** * 参数名称,默认为"" * @return */ private String name; private boolean required; private String editor; /** * 数据格式 */ private String dataformat; /** * 日期格式 */ private String dateformat; /** * 解码字符集 * @return */ private String decodeCharset; /** * 参数原始字符集 * @return */ private String charset; private Locale locale; /** * 参数转换字符集 * @return */ private String convertcharset; public RequestParamWraper(RequestParam param,Class paramType) { super(paramType); /** * 参数名称,默认为"" * @return */ name = param.name(); required = param.required(); editor = param.editor(); /** * 数据格式 */ dataformat = param.dataformat(); /** * 日期格式 */ dateformat = param.dateformat(); if(SimpleStringUtil.isNotEmpty(param.locale() )) { try { locale = new Locale(param.locale()); } catch(Exception e) { } } if(paramType != null) convertValue(param.defaultvalue()); else{ defaultvalue = AnnotationUtils.converDefaultValue(param.defaultvalue()); } /** * 解码字符集 * @return */ decodeCharset = AnnotationUtils.converDefaultValue(param.decodeCharset()); /** * 参数原始字符集 * @return */ charset = AnnotationUtils.converDefaultValue(param.charset()); /** * 参数转换字符集 * @return */ convertcharset = AnnotationUtils.converDefaultValue(param.convertcharset()); } /** * 参数名称,默认为"" * @return */ public String name(){ return this.name; } public boolean required(){ return this.required; } public String editor(){ return this.editor; } /** * 数据格式 */ public String dataformat(){ return this.dataformat; } /** * 日期格式 */ public String dateformat(){ return this.dateformat; } /** * 解码字符集 * @return */ public String decodeCharset(){ return this.decodeCharset; } /** * 参数原始字符集 * @return */ public String charset(){ return this.charset; } /** * 参数转换字符集 * @return */ public String convertcharset(){ return this.convertcharset; } public Locale getLocale() { return locale; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy