Author: ppitonak(a)redhat.com
Date: 2010-07-12 04:10:50 -0400 (Mon, 12 Jul 2010)
New Revision: 17939
Modified:
root/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/Attribute.java
Log:
* added header to class Attribute
Modified:
root/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/Attribute.java
===================================================================
---
root/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/Attribute.java 2010-07-12
06:52:55 UTC (rev 17938)
+++
root/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/Attribute.java 2010-07-12
08:10:50 UTC (rev 17939)
@@ -1,3 +1,25 @@
+/*******************************************************************************
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ *******************************************************************************/
+
package org.richfaces.tests.metamer;
import java.util.List;
@@ -4,90 +26,74 @@
import javax.faces.model.SelectItem;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Representation an attribute of a JSF component.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
public class Attribute {
+
+ private Logger logger;
private String name;
private Object value;
private Class<?> type;
+ private String help;
private List<SelectItem> selectOptions;
- private String help;
- public Attribute(String name) {
- this.name = name;
+ public Attribute() {
+ logger = LoggerFactory.getLogger(getClass());
}
- /**
- * @return the name
- */
- public String getName() {
- return name;
- }
-
- /**
- * @param name the name to set
- */
- public void setName(String name) {
+ public Attribute(String name) {
+ logger = LoggerFactory.getLogger(getClass());
this.name = name;
}
- /**
- * @return the value
- */
public Object getValue() {
return value;
}
- /**
- * @param value the value to set
- */
public void setValue(Object value) {
this.value = value;
}
- /**
- * @return the type
- */
- public Class<?> getType() {
- return type;
+ public String getHelp() {
+ return help;
}
- /**
- * @param type the type to set
- */
- public void setType(Class<?> type) {
- this.type = type;
+ public void setHelp(String help) {
+ this.help = help;
}
- /**
- * @return the selectOptions
- */
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
public List<SelectItem> getSelectOptions() {
return selectOptions;
}
- /**
- * @param selectOptions the selectOptions to set
- */
public void setSelectOptions(List<SelectItem> selectOptions) {
this.selectOptions = selectOptions;
}
- /**
- * @return the help
- */
- public String getHelp() {
- return help;
+ public Class<?> getType() {
+ return type;
}
- /**
- * @param help the help to set
- */
- public void setHelp(String help) {
- this.help = help;
+ public void setType(Class<?> type) {
+ this.type = type;
}
-
+
public boolean isBoolean() {
return type == Boolean.class || type == boolean.class;
}
-
-
}