ResponseProviderTypeManager.java revision 0c9594d96d580b0cba488fa7d01802fbb49d8a3e
/**
* 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: ResponseProviderTypeManager.java,v 1.3 2008/06/25 05:43:45 qcheng Exp $
*
* Portions Copyrighted 2014 ForgeRock AS.
*/
/**
* The class <code>ResponseProviderTypeManager</code> provides
* methods to get a list of configured <code>ResponseProvider
* </code> objects, and to obtain a factory object for it.
*
* @supported.all.api
* @deprecated since 12.0.0
*/
public class ResponseProviderTypeManager {
private PolicyManager pm;
private ResourceBundle rb;
private static AMResourceBundleCache amCache =
/**
* Constructs a <code>ResponseProviderTypeManager</code> object
*/
ResponseProviderTypeManager() throws SSOException {
}
/**
* Constructs a <code>ResponseProviderTypeManager</code> object
* @param pm <code>PolicyManager</code> to initialize the
* <code>ResponseProviderTypeManager</code> with
*/
try {
} catch (SSOException ex) {
+"locale from SSOToken", ex);
}
if (debug.messageEnabled()) {
}
}
/**
* Returns a set of all valid <code>ResponseProvider</code> type names
* defined in the <code>PolicyConfig</code> service.
* Out of the box will have only
* <code>IDRepoResponseProvider</code>
*
* @return a set of all valid <code>ResponseProvider</code> type
* names defined in the <code>PolicyConfig</code> service.
* @throws SSOException if the <code>SSOToken</code> used to create
* the <code>PolicyManager</code> has become invalid
* @throws PolicyException for any other abnormal condition.
*/
}
/**
* Returns a set of valid <code>ResponseProvider</code> type names
* configured.
* Examples are <code>IDRepoResponseProvider</code> and any other
* configured providers.
*
* @return a set of all valid <code>ResponseProvider</code> type names
* defined in the <code>PolicyConfig</code> service.
* @throws SSOException if the <code>SSOToken</code> used to create
* the <code>PolicyManager</code> has become invalid
* @throws PolicyException for any other abnormal condition
*/
}
}
return Collections.EMPTY_SET;
}
/**
* Returns the type of the <code>ResponseProvider</code> object.
* For example <code>IDRepoResponseProvider</code> or any other
* configured providers.
*
* @param respProvider <code>ResponseProvider</code> object for which this
* method will return its associated type
* @return type of the responseprovider, e.g. <code>IDRepoResponseProvider
* </code> . Returns <code>null</code> if not present.
*/
return responseProviderTypeName(respProvider);
}
/**
* Returns <code>ResponseProvider</code> type name
* @param respProvider <code>ResponseProvider</code> for which
* to get the type name
* @return <code>ResponseProvider</code> type name for the given
* <code>ResponseProvider</code>
*/
public static String responseProviderTypeName(
{
if (respProvider == null) {
return (null);
}
iterator();
name = pluginName;
break;
}
}
return (name);
}
/**
* Returns the I18N properties file name that should be
* used to localize display names for the given
* responseprovider name.
*
* @param responseProviderTypeName response provider type name
*
* @return i18n properties file name
*/
protected String getI18NPropertiesFileName(
{
return ps.getI18NFileName();
}
return null;
}
/**
* Returns the I18N key to be used to localize the
* display name for the responseprovider name.
*
* @param responseProviderName Response provider type name.
*
* @return i18n key to obtain the display name.
*/
return (ps.getI18NKey());
}
return null;
}
/**
* Returns the display name for the response provider
* @param responseProviderTypeName responseprovider type name
* @return display name for the response provider
*/
} else {
}
return displayName;
}
/**
* Returns an instance of the <code>ResponseProvider</code>
* given the response provider type name.
*
* @param responseProviderTypeName response provider type name.
* @return an instance of the <code>ResponseProvider</code>
* given the response provider type name.
* @throws NameNotFoundException if the <code>ResponseProvider</code>
* not found
* @throws PolicyException for any other abnormal condition
*/
throws NameNotFoundException, PolicyException
{
}
// Construct the object
try {
newInstance();
} catch (Exception e) {
throw (new PolicyException(e));
}
return respProvider;
}
/**
* Returns the view bean URL given the <code>ResponseProvider</code>
*
* @param respProvider <code>ResponseProvider</code> for which
* to get the view bean URL
*
* @return view bean URL defined for the <code>ResponseProvider</code>
* plugin in the policy service <code>PluginSchema</code>.
*/
}
}