/src/main/java/com/classicning/yan/model/Error.java
Java | 68 lines | 37 code | 15 blank | 16 comment | 0 complexity | 8afad8f4a945c374f4695ff62df41dc2 MD5 | raw file
Possible License(s): Apache-2.0
- /*
- *
- *
- */
- package com.classicning.yan.model;
- import com.classicning.yan.GlobalConfiguration;
- import org.simpleframework.xml.Root;
- import org.simpleframework.xml.Text;
- /**
- *
- * @author Sun Ning/SNDA
- * @since Dec 28, 2009
- *
- */
- @Root
- public class Error {
- public static Error PARAMETER_OMITTED(){
- return new Error(GlobalConfiguration.get("yan.message.notEnoughArgs"));
- }
- public static Error APIKEY_ERROR(){
- return new Error(GlobalConfiguration.get("yan.message.apikeyError"));
- }
- public static Error APIKEY_MISMATCH(){
- return new Error(GlobalConfiguration.get("yan.message.apikeyMismatch"));
- }
- public static Error INVALID_CAPTCHA(){
- return new Error(GlobalConfiguration.get("yan.message.expireOrInvalid"));
- }
- public static Error INVALID_HOST(){
- return new Error(GlobalConfiguration.get("yan.message.hostInvalid"));
- }
- @Text
- private String error;
- public Error(String msg){
- this.error = msg;
- }
- /**
- * @return the error
- */
- public String getError() {
- return error;
- }
- /**
- * @param error the error to set
- */
- public void setError(String error) {
- this.error = error;
- }
- @Override
- public String toString(){
- return error;
- }
- }