/**
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2005 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: RequestSet.java,v 1.2 2008/06/25 05:41:35 qcheng Exp $
*
*/
/*
* Portions Copyrighted 2011 ForgeRock AS
*/
/**
* This <code>RequestSet</code> class represents a RequestSet XML document.
* The RequestSet DTD is defined as the following:
* </p>
*
* <pre>
* <?xml version="1.0">
* < !-- This DTD is used by PLL -->
* < !DOCTYPE RequestSet [
* < !ELEMENT RequestSet(Request)+>
* < !ATTLIST RequestSet
* vers CDATA #REQUIRED
* svcid CDATA #REQUIRED
* reqid CDATA #REQUIRED>
* < !ELEMENT Request(#PCDATA)*>
* < !ATTLIST Request
* dtdid CDATA #IMPLIED
* sid CDATA #IMPLIED>
* ]>
* </pre>
*
* </p>
* Each RequestSet object contains a version, service ID, request set ID, and a
* collection of Request objects. The RequestSet views each Request object as a
* String. This makes it possible that the content of the Request object can be
* another XML document. The PLL provides a reference Request DTD. Please see
* class Request for details on the Request DTD. This class also provides a
* method to aggregate each Request object and returns a RequestSet XML document
* based on the RequestSet DTD mentioned above.
*
* @see com.iplanet.services.comm.share.Request
*/
public class RequestSet {
/**
* This constructor is used primarily at the client side to construct a
* RequestSet object for a given service. Individual request shall be added
* to this object by calling addRequest method. service.
*
* @param service
* The name of the service.
*/
requestSetVersion = "1.0";
}
/*
* This constructor is used by RequestSetParser to reconstruct a RequestSet
* object.
*/
RequestSet() {
}
/**
* This method is used primarily at the server side to reconstruct a
* RequestSet object based on the XML document received from client. The DTD
* of this XML document is described above.
*
* @param xml
* The RequestSet XML document String.
*/
// Parse the XML document and extract the XML objects out of the
// XML document
}
/**
* Gets the version of the RequestSet.
*
* @return The version of the request.
*/
return requestSetVersion;
}
/**
* Gets the service ID of the RequestSet.
*
* @return The service ID of the RequestSet.
*/
return serviceID;
}
/**
* Gets the RequestSet ID for this object.
*
* @return The RequestSet ID.
*/
return requestSetID;
}
/**
* Gets the Request objects contained in this object.
*
* @return A Vector of Request objects.
*/
return requestSet;
}
/**
* Adds a Request object to this object.
*
* @param request
* A reference to a Request object.
*/
}
/**
* Returns an XML RequestSet document in String format. The returned String
* is formatted based on the RequestSet DTD by aggregating each Request
* object in this object.
*
* @return An XML RequestSet document in String format.
*/
}
}
}
}
/*
* The following methods are used by the RequestSetParser to reconstruct a
* RequestSet object.
*/
}
}
requestSetID = id;
}
}