/**
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2006 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: DiscoSDKUtils.java,v 1.3 2008/08/06 17:28:08 exu Exp $
*
*/
/**
* Provides utility methods to discovery service.
*/
public class DiscoSDKUtils {
private static
private static
private static
/**
* <code>ResourceBundle</code> object for discovery service.
*/
"libDisco");
/**
* <code>Debug</code> object for discovery service.
*/
/**
* Key for offerings.
*/
/**
* Key for credentials.
*/
/**
* Key for credential objects.
*/
/**
* Key for <code>ResourceAccessStatement</code>.
*/
/**
* Key for <code>ResourceAccessStatement</code> with
* <code>SessionContext</code>.
*/
/**
* Key for <code>SessionContextStatement</code>.
*/
/**
* Key for <code>AuthenticationStatement</code>.
*/
static {
try {
} catch (Exception e) {
}
}
/**
* Constructor
* iPlanet-PRIVATE-DEFAULT-CONSTRUCTOR
*/
protected DiscoSDKUtils() {
}
/**
* Gets discovery service object factory.
* @return discovery service object factory.
*/
{
return discoFac;
}
/**
* Gets discovery service jaxb11 object factory.
* @return discovery service v1.1 object factory.
*/
{
return disco11Fac;
}
/**
* Gets Disco Entry object factory.
* @return object factory for <code>DiscoEntry</code>.
*/
{
return entryFac;
}
/**
* Gets marshaller.
* @return marshaller for discovery service.
*/
return jc.createMarshaller();
}
/**
* Gets unmarshaller.
* @return unmarshaller for discovery service.
*/
return jc.createUnmarshaller();
}
/**
* Parses Status element.
* @param elem Status element.
* @return Status object.
* @exception DiscoveryException if error occurs.
*/
throws DiscoveryException
{
}
}
}
}
{
}
} else {
}
} else {
}
if (num != 0) {
if (num == 1) {
} else {
if (debug.messageEnabled()) {
+ "one sub status.");
}
}
}
return status;
}
/**
* Parses Options element.
* @param child Options element.
* @return List of Option strings.
* @exception DiscoveryException if error occurs.
*/
throws DiscoveryException
{
if ((nameSpaceURI == null) ||
{
if (debug.messageEnabled()) {
+ "Element): invalid namespace for node " + nName);
}
throw new DiscoveryException(
}
} else {
if (debug.messageEnabled()) {
+ "Element): invalid node" + nName);
}
throw new DiscoveryException(
}
}
}
return options;
}
/**
* Obtains DOM Element from an xml String.
* @param xmlString String format of an element.
* @return DOM Element
* @exception DiscoveryException if error occurs.
*/
try {
return doc.getDocumentElement();
throw new DiscoveryException(ex);
}
}
}