/**
* 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: SAML2MetaCache.java,v 1.4 2008/07/08 01:08:43 exu Exp $
*
*/
/*
* Portions Copyrighted [2010] [ForgeRock AS]
*/
/**
* The <code>SAML2MetaCache</code> provides metadata cache.
*/
class SAML2MetaCache
{
private SAML2MetaCache() {
}
/**
* Returns the standard metadata entity descriptor under the realm from
* cache.
* @param realm The realm under which the entity resides.
* @param entityId ID of the entity to be retrieved.
* @return <code>EntityDescriptorElement</code> for the entity or null
* if not found.
*/
{
if (debug.messageEnabled()) {
}
return descriptor;
}
/**
* Adds the standard metadata entity descriptor under the realm to cache.
* @param realm The realm under which the entity resides.
* @param entityId ID of the entity to be retrieved.
* @param descriptor <code>EntityDescriptorElement</code> for the entity.
*/
{
if (descriptor != null) {
if (debug.messageEnabled()) {
cacheKey);
}
} else {
if (debug.messageEnabled()) {
"SAML2MetaCache.putEntityDescriptor: delete cacheEey = " +
cacheKey);
}
}
}
/**
* Returns extended entity configuration under the realm from cache.
* @param realm The realm under which the entity resides.
* @param entityId ID of the entity to be retrieved.
* @return <code>EntityConfigElement</code> object for the entity or null
* if not found.
*/
{
if (debug.messageEnabled()) {
}
return config;
}
/**
* Adds extended entity configuration under the realm to cache.
* @param realm The realm under which the entity resides.
* @param entityId ID of the entity to be retrieved.
* @param config <code>EntityConfigElement</code> object for the entity.
*/
if (debug.messageEnabled()) {
cacheKey);
}
} else {
if (debug.messageEnabled()) {
"SAML2MetaCache.putEntityConfig: delete cacheKey = " +
cacheKey);
}
}
}
/**
* Clears cache completely.
*/
static void clear() {
if (debug.messageEnabled()) {
}
configCache.clear();
}
/**
* Build cache key for descriptorCache and configCache based on realm and
* entity ID.
* @param realm The realm under which the entity resides.
* @param entityID The entity ID or the name of circle of trust.
* @return The cache key.
*/
}
}