DiscoveryConfig.java revision 4a2f0f0be43dfd4c1b490cbf3cc48b6ba6084b1c
/**
* 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: DiscoveryConfig.java,v 1.6 2009/02/28 00:59:42 mrudul_uchil Exp $
*
*/
/**
* This abstract class <code>DiscoveryConfig</code> represents the
* configuration of a Discovery client entity. It extends
* <code>TrustAuthorityConfig</code>.
*
* <p>This class can be extended to define the trust authority config
* which is Discovery client configuration.
*
* <p>Pluggable implementation of this abstract class can choose to store this
* configuration in desired configuration store. This pluggable implementation
* class can be configured in client's AMConfig.properties as value of
* "com.sun.identity.wss.discovery.config.plugin" property
* for Discovery client configuration.
*
* <p>This class also provides methods for registering and un-registering
* with the discovery service. All the static methods in this class are for
* the persistent operations.
* @supported.all.api
*/
public abstract class DiscoveryConfig extends TrustAuthorityConfig {
/** Creates a new instance of DiscoveryConfig */
public DiscoveryConfig() {}
/**
* Returns Authentication Web Service End point.
* @return Authentication Web Service End point
*/
public String getAuthServiceEndPoint() {
return authServiceEndpoint;
}
/**
* Sets Authentication Web Service End point.
* @param authServiceEndpoint Authentication Web Service End point
*
*/
}
/**
* Registers the Discovery client configuration with trusted authority.
*
* @param config the configuration of the Discovery client.
*
* @param serviceURI the <code>URI</code> of the web services provider.
*
* @exception ProviderException if any failure.
*/
}
/**
* Registers the Discovery client configuration with trusted authority.
*
* @param config the configuration of the Discovery client.
*
* @param serviceURI the <code>URI</code> of the web services provider.
*
* @param unregister if true unregisters the service offering with
* trusted authority before registration.
*
* @exception ProviderException if any failure.
*/
try {
if(unregister) {
}
(DiscoConstants.STATUS_OK)) {
return;
} else {
throw new ProviderException(
}
}
throw new ProviderException(
} catch (DiscoveryException de) {
"TA: is failed", de);
throw new ProviderException(
}
}
/**
* Unregisters the provider with trusted authority.
*
* @param serviceURI the service <code>URI</code> of the
* web services provider.
* @exception ProviderException if any failure.
*/
throws ProviderException {
try {
"unregisterProviderWithTA:: " +
"There are no resource offerings");
}
return;
}
} catch (DiscoveryException de) {
"TA: is failed", de);
throw new ProviderException(
}
}
// Register with discovery only if there are liberty security mechs.
}
}
if(libertyMech.isEmpty()) {
throw new ProviderException(
}
}
if(!directives.isEmpty()) {
}
}
return false;
}
}
return;
}
} else if(
}
}
}