/**
 * PageEditMode.java
 *
 * This file was auto-generated from WSDL
 * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
 */

package samples.webcenter.services.wiki;

public class PageEditMode implements java.io.Serializable {
    private java.lang.String _value_;
    private static java.util.HashMap _table_ = new java.util.HashMap();

    // Constructor
    protected PageEditMode(java.lang.String value) {
        _value_ = value;
        _table_.put(_value_,this);
    }

    public static final java.lang.String _value1 = "editable by everyone";
    public static final java.lang.String _value2 = "restricted to logged in users";
    public static final java.lang.String _value3 = "restricted to members of the domain";
    public static final java.lang.String _value4 = "only admins are allowed to edit";
    public static final PageEditMode value1 = new PageEditMode(_value1);
    public static final PageEditMode value2 = new PageEditMode(_value2);
    public static final PageEditMode value3 = new PageEditMode(_value3);
    public static final PageEditMode value4 = new PageEditMode(_value4);
    public java.lang.String getValue() { return _value_;}
    public static PageEditMode fromValue(java.lang.String value)
          throws java.lang.IllegalArgumentException {
        PageEditMode enumeration = (PageEditMode)
            _table_.get(value);
        if (enumeration==null) throw new java.lang.IllegalArgumentException();
        return enumeration;
    }
    public static PageEditMode fromString(java.lang.String value)
          throws java.lang.IllegalArgumentException {
        return fromValue(value);
    }
    public boolean equals(java.lang.Object obj) {return (obj == this);}
    public int hashCode() { return toString().hashCode();}
    public java.lang.String toString() { return _value_;}
    public java.lang.Object readResolve() throws java.io.ObjectStreamException { return fromValue(_value_);}
    public static org.apache.axis.encoding.Serializer getSerializer(
           java.lang.String mechType, 
           java.lang.Class _javaType,  
           javax.xml.namespace.QName _xmlType) {
        return 
          new org.apache.axis.encoding.ser.EnumSerializer(
            _javaType, _xmlType);
    }
    public static org.apache.axis.encoding.Deserializer getDeserializer(
           java.lang.String mechType, 
           java.lang.Class _javaType,  
           javax.xml.namespace.QName _xmlType) {
        return 
          new org.apache.axis.encoding.ser.EnumDeserializer(
            _javaType, _xmlType);
    }
    // Type metadata
    private static org.apache.axis.description.TypeDesc typeDesc =
        new org.apache.axis.description.TypeDesc(PageEditMode.class);

    static {
        typeDesc.setXmlType(new javax.xml.namespace.QName("urn:WikiService", "PageEditMode"));
    }
    /**
     * Return type metadata object
     */
    public static org.apache.axis.description.TypeDesc getTypeDesc() {
        return typeDesc;
    }

}
