Extension.java revision a688bcbb4bcff5398fdd29b86f83450257dc0df4
/**
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2007 Sun Microsystems Inc. All Rights Reserved
*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the License). You may not use this file except in
* compliance with the License.
*
* You can obtain a copy of the License at
* See the License for the specific language governing
* permission and limitations under the License.
*
* When distributing Covered Code, include this CDDL
* Header Notice in each file and include the License file
* at opensso/legal/CDDLv1.0.txt.
* If applicable, add the following below the CDDL Header,
* with the fields enclosed by brackets [] replaced by
* your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*
* $Id: Extension.java,v 1.2 2008/06/25 05:46:46 qcheng Exp $
*
*/
/**
* The class <code>Extension</code> is used to create , parse
* <code>Extension</code> object.
*
* @supported.all.api
*/
public class Extension {
private int minorVersion = 0;
/**
* Constructor to create <code>Extension</code> object.
*
* @param children a list of XML <code>String</code> object.
* @throws FSMsgException on error.
*/
}
/**
* Constructor to create <code>Extension</code> object.
*
* @param element the <code>Extension</code> Element object.
* @throws FSMsgException on error.
*/
}
}
for(int i = 0; i < length; i++) {
}
}
}
}
/**
* Constructor to create <code>Extension</code> object. Each attribute
* value pair will be converted to a XML string. The converted XML string
* has only one element. The local name of the element will be the key of
* the map entry and the value of the element will be the value of the map
* entry. Both key and value of the map entry should be a
* <code>String</code> object.
*
* @param avpairs attribute value pairs.
* @throws FSMsgException on error.
*/
}
/**
* Returns a list of XML <code>String</code> objects.
*
* @return a list of XML <code>String</code> objects.
* @see #setChildren(List)
*/
public List getChildren() {
return children;
}
/**
* Sets a list of XML <code>String</code> object.
*
* @param children a list of XML <code>String</code> object.
* @see #getChildren()
*/
}
/*
* Gets attribute value pairs. Each attribute value pair is converted from
* a XML string. The XML string can have only one element. The element
* element can't have namespace and must have a simple content. The local
* name of the element will be the key of the map entry and the value of
* the element will be the value of the map entry. Both key and value of
* the map entry will be a <code>String</code> object. If a XML string
* can't be converted, it will not be added to the map.
*
* @return an attribute value pairs.
*/
public Map getAttributeMap() {
return null;
}
return avpairs;
}
continue;
}
}
return avpairs;
}
/**
* Converts attribute value pairs to a list of XML <code>String</code>
* objects. Each attribute value pair will be converted to a XML string.
* The converted XML string has only one element. The local name of the
* element will be the key of the map entry and the value of the element
* will be the value of the map entry. Both key and value of the map entry
* should be a <code>String</code> object.
*
* @param avpairs attribute value pairs.
* @throws FSMsgException on error.
*/
}
}
}
}
/**
* Returns the <code>MinorVersion</code>.
*
* @return the <code>MinorVersion</code>.
* @see #setMinorVersion(int)
*/
public int getMinorVersion() {
return minorVersion;
}
/**
* Sets the <code>MinorVersion</code>.
*
* @param minorVersion the <code>MinorVersion</code>.
* @see #getMinorVersion()
*/
public void setMinorVersion(int minorVersion) {
this.minorVersion = minorVersion;
}
/**
* Returns a String representation of the <Code>Extension</Code> element.
*
* @return a string containing the valid XML for this element
* @throws FSMsgException if there is an error converting this object to
* a string.
*/
return this.toXMLString(true, false);
}
/**
* Creates a String representation of the <Code>Extension</Code> element.
*
* @param includeNS : Determines whether or not the namespace qualifier
* is prepended to the Element when converted
* @param declareNS : Determines whether or not the namespace is declared
* within the Element.
* @return string containing the valid XML for this element.
* @throws FSMsgException if there is an error.
*/
throws FSMsgException {
if (includeNS) {
}
if (declareNS) {
} else {
}
}
}
}
}
/**
* Returns <code>Extension</code> object. The object is creating by
* parsing the <code>HttpServletRequest</code> object.
*
* @param request the <code>HttpServletRequest</code> object.
* @param prefix the string that is prepended to the key of query
* string.
* @param minorVersion the <code>MinorVersion</code>.
* @throws FSMsgException if there is an error creating
* <code>Extension</code> object.
*/
}
}
}
return null;
}
return extension;
}
/**
* Returns an URL Encoded String.
*
* @param prefix the string that will be prepended to the key of query
* string.
* @return a url encoded query string.
* @throws FSMsgException if there is an error.
*/
throws FSMsgException {
return "";
}
}
}
return queryString.toString();
}
}
}
}
+ "while parsing input xml string");
}
}
}
}
}