//# 0 errors, 180 messages
//#
/*
    //#PropertyDef.java:1:1: class: org.apache.roller.weblogger.config.runtime.PropertyDef
    //#PropertyDef.java:1:1: method: org.apache.roller.weblogger.config.runtime.PropertyDef.org.apache.roller.weblogger.config.runtime.PropertyDef__static_init
* Licensed to the Apache Software Foundation (ASF) under one or more
*  contributor license agreements.  The ASF licenses this file to You
* 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.  For additional information regarding
* copyright in this work, please see the NOTICE file in the top level
* directory of this distribution.
*/
/*
 * PropertyDef.java
 *
 * Created on June 4, 2005, 1:13 PM
 */

package org.apache.roller.weblogger.config.runtime;

/**
 * Represents the definition of a single runtime property.
 *
 * Each property definition may contain these elements
 *   - name (required)
 *   - key (required)
 *   - type (required)
 *   - default-value (required)
 *   - rows (optional)
 *   - cols (options)
 *
 * @author Allen Gilliland
 */
public class PropertyDef {
    
    private String name = null;
    private String key = null;
    private String type = null;
    private String defaultValue = null;
    private int rows = 5;
    private int cols = 25;
    
    
    /** Creates a new instance of PropertyDef */
    public PropertyDef() {}
    //#PropertyDef.java:50: method: void org.apache.roller.weblogger.config.runtime.PropertyDef.org.apache.roller.weblogger.config.runtime.PropertyDef()
    //#input(void org.apache.roller.weblogger.config.runtime.PropertyDef()): this
    //#output(void org.apache.roller.weblogger.config.runtime.PropertyDef()): this.cols
    //#output(void org.apache.roller.weblogger.config.runtime.PropertyDef()): this.defaultValue
    //#output(void org.apache.roller.weblogger.config.runtime.PropertyDef()): this.key
    //#output(void org.apache.roller.weblogger.config.runtime.PropertyDef()): this.name
    //#output(void org.apache.roller.weblogger.config.runtime.PropertyDef()): this.rows
    //#output(void org.apache.roller.weblogger.config.runtime.PropertyDef()): this.type
    //#post(void org.apache.roller.weblogger.config.runtime.PropertyDef()): this.cols == 25
    //#post(void org.apache.roller.weblogger.config.runtime.PropertyDef()): this.defaultValue == null
    //#post(void org.apache.roller.weblogger.config.runtime.PropertyDef()): this.key == null
    //#post(void org.apache.roller.weblogger.config.runtime.PropertyDef()): this.name == null
    //#post(void org.apache.roller.weblogger.config.runtime.PropertyDef()): this.type == null
    //#post(void org.apache.roller.weblogger.config.runtime.PropertyDef()): this.rows == 5
    //#PropertyDef.java:50: end of method: void org.apache.roller.weblogger.config.runtime.PropertyDef.org.apache.roller.weblogger.config.runtime.PropertyDef()

    public String toString() {
        return "["+name+","+key+","+type+","+defaultValue+","+rows+","+cols+"]";
    //#PropertyDef.java:53: method: String org.apache.roller.weblogger.config.runtime.PropertyDef.toString()
    //#input(String toString()): ","._tainted
    //#input(String toString()): "["._tainted
    //#input(String toString()): "]"._tainted
    //#input(String toString()): this
    //#input(String toString()): this.cols
    //#input(String toString()): this.defaultValue
    //#input(String toString()): this.defaultValue._tainted
    //#input(String toString()): this.key
    //#input(String toString()): this.key._tainted
    //#input(String toString()): this.name
    //#input(String toString()): this.name._tainted
    //#input(String toString()): this.rows
    //#input(String toString()): this.type
    //#input(String toString()): this.type._tainted
    //#output(String toString()): java.lang.StringBuilder:toString(...)._tainted
    //#output(String toString()): return_value
    //#new obj(String toString()): java.lang.StringBuilder:toString(...)
    //#pre[2] (String toString()): init'ed(this.cols)
    //#pre[3] (String toString()): init'ed(this.defaultValue)
    //#pre[6] (String toString()): init'ed(this.key)
    //#pre[8] (String toString()): init'ed(this.name)
    //#pre[11] (String toString()): init'ed(this.rows)
    //#pre[12] (String toString()): init'ed(this.type)
    //#post(String toString()): java.lang.StringBuilder:toString(...)._tainted == 0
    //#post(String toString()): return_value == &java.lang.StringBuilder:toString(...)
    //#PropertyDef.java:53: end of method: String org.apache.roller.weblogger.config.runtime.PropertyDef.toString()
    }
    
    public String getName() {
        return name;
    //#PropertyDef.java:57: method: String org.apache.roller.weblogger.config.runtime.PropertyDef.getName()
    //#input(String getName()): this
    //#input(String getName()): this.name
    //#output(String getName()): return_value
    //#pre[2] (String getName()): init'ed(this.name)
    //#post(String getName()): return_value == this.name
    //#post(String getName()): init'ed(return_value)
    //#PropertyDef.java:57: end of method: String org.apache.roller.weblogger.config.runtime.PropertyDef.getName()
    }

    public void setName(String name) {
        this.name = name;
    //#PropertyDef.java:61: method: void org.apache.roller.weblogger.config.runtime.PropertyDef.setName(String)
    //#input(void setName(String)): name
    //#input(void setName(String)): this
    //#output(void setName(String)): this.name
    //#post(void setName(String)): this.name == name
    //#post(void setName(String)): init'ed(this.name)
    }
    //#PropertyDef.java:62: end of method: void org.apache.roller.weblogger.config.runtime.PropertyDef.setName(String)

    public String getKey() {
        return key;
    //#PropertyDef.java:65: method: String org.apache.roller.weblogger.config.runtime.PropertyDef.getKey()
    //#input(String getKey()): this
    //#input(String getKey()): this.key
    //#output(String getKey()): return_value
    //#pre[2] (String getKey()): init'ed(this.key)
    //#post(String getKey()): return_value == this.key
    //#post(String getKey()): init'ed(return_value)
    //#PropertyDef.java:65: end of method: String org.apache.roller.weblogger.config.runtime.PropertyDef.getKey()
    }

    public void setKey(String key) {
        this.key = key;
    //#PropertyDef.java:69: method: void org.apache.roller.weblogger.config.runtime.PropertyDef.setKey(String)
    //#input(void setKey(String)): key
    //#input(void setKey(String)): this
    //#output(void setKey(String)): this.key
    //#post(void setKey(String)): this.key == key
    //#post(void setKey(String)): init'ed(this.key)
    }
    //#PropertyDef.java:70: end of method: void org.apache.roller.weblogger.config.runtime.PropertyDef.setKey(String)

    public String getType() {
        return type;
    //#PropertyDef.java:73: method: String org.apache.roller.weblogger.config.runtime.PropertyDef.getType()
    //#input(String getType()): this
    //#input(String getType()): this.type
    //#output(String getType()): return_value
    //#pre[2] (String getType()): init'ed(this.type)
    //#post(String getType()): return_value == this.type
    //#post(String getType()): init'ed(return_value)
    //#PropertyDef.java:73: end of method: String org.apache.roller.weblogger.config.runtime.PropertyDef.getType()
    }

    public void setType(String type) {
        this.type = type;
    //#PropertyDef.java:77: method: void org.apache.roller.weblogger.config.runtime.PropertyDef.setType(String)
    //#input(void setType(String)): this
    //#input(void setType(String)): type
    //#output(void setType(String)): this.type
    //#post(void setType(String)): this.type == type
    //#post(void setType(String)): init'ed(this.type)
    }
    //#PropertyDef.java:78: end of method: void org.apache.roller.weblogger.config.runtime.PropertyDef.setType(String)

    public String getDefaultValue() {
        return defaultValue;
    //#PropertyDef.java:81: method: String org.apache.roller.weblogger.config.runtime.PropertyDef.getDefaultValue()
    //#input(String getDefaultValue()): this
    //#input(String getDefaultValue()): this.defaultValue
    //#output(String getDefaultValue()): return_value
    //#pre[2] (String getDefaultValue()): init'ed(this.defaultValue)
    //#post(String getDefaultValue()): return_value == this.defaultValue
    //#post(String getDefaultValue()): init'ed(return_value)
    //#PropertyDef.java:81: end of method: String org.apache.roller.weblogger.config.runtime.PropertyDef.getDefaultValue()
    }

    public void setDefaultValue(String defaultvalue) {
        this.defaultValue = defaultvalue;
    //#PropertyDef.java:85: method: void org.apache.roller.weblogger.config.runtime.PropertyDef.setDefaultValue(String)
    //#input(void setDefaultValue(String)): defaultvalue
    //#input(void setDefaultValue(String)): this
    //#output(void setDefaultValue(String)): this.defaultValue
    //#post(void setDefaultValue(String)): this.defaultValue == defaultvalue
    //#post(void setDefaultValue(String)): init'ed(this.defaultValue)
    }
    //#PropertyDef.java:86: end of method: void org.apache.roller.weblogger.config.runtime.PropertyDef.setDefaultValue(String)

    public int getRows() {
        return rows;
    //#PropertyDef.java:89: method: int org.apache.roller.weblogger.config.runtime.PropertyDef.getRows()
    //#input(int getRows()): this
    //#input(int getRows()): this.rows
    //#output(int getRows()): return_value
    //#pre[2] (int getRows()): init'ed(this.rows)
    //#post(int getRows()): return_value == this.rows
    //#post(int getRows()): init'ed(return_value)
    //#PropertyDef.java:89: end of method: int org.apache.roller.weblogger.config.runtime.PropertyDef.getRows()
    }

    public void setRows(int rows) {
        this.rows = rows;
    //#PropertyDef.java:93: method: void org.apache.roller.weblogger.config.runtime.PropertyDef.setRows(int)
    //#input(void setRows(int)): rows
    //#input(void setRows(int)): this
    //#output(void setRows(int)): this.rows
    //#post(void setRows(int)): this.rows == rows
    //#post(void setRows(int)): init'ed(this.rows)
    }
    //#PropertyDef.java:94: end of method: void org.apache.roller.weblogger.config.runtime.PropertyDef.setRows(int)

    public void setRows(String rows) {
        //convert to int
        try {
            int r = Integer.parseInt(rows);
    //#PropertyDef.java:99: method: void org.apache.roller.weblogger.config.runtime.PropertyDef.setRows(String)
    //#input(void setRows(String)): rows
    //#input(void setRows(String)): this
    //#output(void setRows(String)): this.rows
    //#post(void setRows(String)): possibly_updated(this.rows)
            this.rows = r;
        } catch(Exception e) {
            // hmmm ... bogus value
        }
    }
    //#PropertyDef.java:104: end of method: void org.apache.roller.weblogger.config.runtime.PropertyDef.setRows(String)
    public int getCols() {
        return cols;
    //#PropertyDef.java:106: method: int org.apache.roller.weblogger.config.runtime.PropertyDef.getCols()
    //#input(int getCols()): this
    //#input(int getCols()): this.cols
    //#output(int getCols()): return_value
    //#pre[2] (int getCols()): init'ed(this.cols)
    //#post(int getCols()): return_value == this.cols
    //#post(int getCols()): init'ed(return_value)
    //#PropertyDef.java:106: end of method: int org.apache.roller.weblogger.config.runtime.PropertyDef.getCols()
    }

    public void setCols(int cols) {
        this.cols = cols;
    //#PropertyDef.java:110: method: void org.apache.roller.weblogger.config.runtime.PropertyDef.setCols(int)
    //#input(void setCols(int)): cols
    //#input(void setCols(int)): this
    //#output(void setCols(int)): this.cols
    //#post(void setCols(int)): this.cols == cols
    //#post(void setCols(int)): init'ed(this.cols)
    }
    //#PropertyDef.java:111: end of method: void org.apache.roller.weblogger.config.runtime.PropertyDef.setCols(int)
    
    public void setCols(String cols) {
        //convert to int
        try {
            int c = Integer.parseInt(cols);
    //#PropertyDef.java:116: method: void org.apache.roller.weblogger.config.runtime.PropertyDef.setCols(String)
    //#input(void setCols(String)): cols
    //#input(void setCols(String)): this
    //#output(void setCols(String)): this.cols
    //#post(void setCols(String)): possibly_updated(this.cols)
            this.cols = c;
        } catch(Exception e) {
            // hmmm ... bogus value
        }
    }
    //#PropertyDef.java:121: end of method: void org.apache.roller.weblogger.config.runtime.PropertyDef.setCols(String)
}
    //#output(org.apache.roller.weblogger.config.runtime.PropertyDef__static_init): __Descendant_Table[org/apache/roller/weblogger/config/runtime/PropertyDef]
    //#output(org.apache.roller.weblogger.config.runtime.PropertyDef__static_init): __Dispatch_Table.getCols()I
    //#output(org.apache.roller.weblogger.config.runtime.PropertyDef__static_init): __Dispatch_Table.getDefaultValue()Ljava/lang/String;
    //#output(org.apache.roller.weblogger.config.runtime.PropertyDef__static_init): __Dispatch_Table.getKey()Ljava/lang/String;
    //#output(org.apache.roller.weblogger.config.runtime.PropertyDef__static_init): __Dispatch_Table.getName()Ljava/lang/String;
    //#output(org.apache.roller.weblogger.config.runtime.PropertyDef__static_init): __Dispatch_Table.getRows()I
    //#output(org.apache.roller.weblogger.config.runtime.PropertyDef__static_init): __Dispatch_Table.getType()Ljava/lang/String;
    //#output(org.apache.roller.weblogger.config.runtime.PropertyDef__static_init): __Dispatch_Table.setCols(I)V
    //#output(org.apache.roller.weblogger.config.runtime.PropertyDef__static_init): __Dispatch_Table.setCols(Ljava/lang/String;)V
    //#output(org.apache.roller.weblogger.config.runtime.PropertyDef__static_init): __Dispatch_Table.setDefaultValue(Ljava/lang/String;)V
    //#output(org.apache.roller.weblogger.config.runtime.PropertyDef__static_init): __Dispatch_Table.setKey(Ljava/lang/String;)V
    //#output(org.apache.roller.weblogger.config.runtime.PropertyDef__static_init): __Dispatch_Table.setName(Ljava/lang/String;)V
    //#output(org.apache.roller.weblogger.config.runtime.PropertyDef__static_init): __Dispatch_Table.setRows(I)V
    //#output(org.apache.roller.weblogger.config.runtime.PropertyDef__static_init): __Dispatch_Table.setRows(Ljava/lang/String;)V
    //#output(org.apache.roller.weblogger.config.runtime.PropertyDef__static_init): __Dispatch_Table.setType(Ljava/lang/String;)V
    //#output(org.apache.roller.weblogger.config.runtime.PropertyDef__static_init): __Dispatch_Table.toString()Ljava/lang/String;
    //#post(org.apache.roller.weblogger.config.runtime.PropertyDef__static_init): __Descendant_Table[org/apache/roller/weblogger/config/runtime/PropertyDef] == &__Dispatch_Table
    //#post(org.apache.roller.weblogger.config.runtime.PropertyDef__static_init): __Dispatch_Table.getCols()I == &getCols
    //#post(org.apache.roller.weblogger.config.runtime.PropertyDef__static_init): __Dispatch_Table.getDefaultValue()Ljava/lang/String; == &getDefaultValue
    //#post(org.apache.roller.weblogger.config.runtime.PropertyDef__static_init): __Dispatch_Table.getKey()Ljava/lang/String; == &getKey
    //#post(org.apache.roller.weblogger.config.runtime.PropertyDef__static_init): __Dispatch_Table.getName()Ljava/lang/String; == &getName
    //#post(org.apache.roller.weblogger.config.runtime.PropertyDef__static_init): __Dispatch_Table.getRows()I == &getRows
    //#post(org.apache.roller.weblogger.config.runtime.PropertyDef__static_init): __Dispatch_Table.getType()Ljava/lang/String; == &getType
    //#post(org.apache.roller.weblogger.config.runtime.PropertyDef__static_init): __Dispatch_Table.setCols(I)V == &setCols
    //#post(org.apache.roller.weblogger.config.runtime.PropertyDef__static_init): __Dispatch_Table.setCols(Ljava/lang/String;)V == &setCols
    //#post(org.apache.roller.weblogger.config.runtime.PropertyDef__static_init): __Dispatch_Table.setDefaultValue(Ljava/lang/String;)V == &setDefaultValue
    //#post(org.apache.roller.weblogger.config.runtime.PropertyDef__static_init): __Dispatch_Table.setKey(Ljava/lang/String;)V == &setKey
    //#post(org.apache.roller.weblogger.config.runtime.PropertyDef__static_init): __Dispatch_Table.setName(Ljava/lang/String;)V == &setName
    //#post(org.apache.roller.weblogger.config.runtime.PropertyDef__static_init): __Dispatch_Table.setRows(I)V == &setRows
    //#post(org.apache.roller.weblogger.config.runtime.PropertyDef__static_init): __Dispatch_Table.setRows(Ljava/lang/String;)V == &setRows
    //#post(org.apache.roller.weblogger.config.runtime.PropertyDef__static_init): __Dispatch_Table.setType(Ljava/lang/String;)V == &setType
    //#post(org.apache.roller.weblogger.config.runtime.PropertyDef__static_init): __Dispatch_Table.toString()Ljava/lang/String; == &toString
    //#PropertyDef.java:: end of method: org.apache.roller.weblogger.config.runtime.PropertyDef.org.apache.roller.weblogger.config.runtime.PropertyDef__static_init
    //#PropertyDef.java:: end of class: org.apache.roller.weblogger.config.runtime.PropertyDef
