Hubiquitus Android  0.3
Android client for hubiquitus protocol
MissingAttrException.java
Go to the documentation of this file.
00001 /*
00002  * Copyright (c) Novedia Group 2012.
00003  *
00004  *     This file is part of Hubiquitus.
00005  *
00006  *     Hubiquitus is free software: you can redistribute it and/or modify
00007  *     it under the terms of the GNU General Public License as published by
00008  *     the Free Software Foundation, either version 3 of the License, or
00009  *     (at your option) any later version.
00010  *
00011  *     Hubiquitus is distributed in the hope that it will be useful,
00012  *     but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  *     GNU General Public License for more details.
00015  *
00016  *     You should have received a copy of the GNU General Public License
00017  *     along with Hubiquitus.  If not, see <http://www.gnu.org/licenses/>.
00018  */
00019 
00020 
00021 package exceptions;
00022 
00029 public class MissingAttrException extends Exception {
00030          private static final long serialVersionUID = 1L;
00031          
00032          private String attrName = null;
00033          
00038          public MissingAttrException(String attrName) {
00039                   this.attrName = attrName;
00040          }
00041          
00042          public String getAttrName() {
00043                   return attrName;
00044          }
00045 
00046          public void setAttrName(String attrName) {
00047                   this.attrName = attrName;
00048          }
00049 
00050          public String getMessage() {
00051                   return "Attribute " + this.attrName + " is required but missing";
00052          }
00053          
00054          public String getLocalizedMessage() {
00055                   return getMessage();
00056          }
00057          
00058          public String toString() {
00059                   return "Attribute " + this.attrName + " is required but missing";
00060          }
00061 }
 All Classes Namespaces Files Functions Variables