ReferralTypeManager.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: ReferralTypeManager.java,v 1.3 2008/06/25 05:43:44 qcheng Exp $
*
* Portions Copyrighted 2014 ForgeRock AS.
*/
/**
* The class <code>ReferralTypeManager</code> provides
* methods to get a list of configured <code>Referral
* </code> objects
*
* @supported.all.api
* @deprecated since 12.0.0
*/
public class ReferralTypeManager {
private PolicyManager pm;
private ResourceBundle rb;
private static AMResourceBundleCache amCache =
/**
* Creates a <code>ReferralTypeManager</code> object
*/
protected ReferralTypeManager() throws SSOException {
lstr);
}
/**
* Creates a <code>ReferralTypeManager</code> object
* @param pm <code>PolicyManager</code> to initialize
* the <code>ReferralTypeManager</code> with
*/
try {
} catch (SSOException ex) {
"ConditionTypeManager:Unable to retreive locale from SSOToken",
ex);
}
if (debug.messageEnabled()) {
}
}
/**
* Returns a set of all valid referral type names defined by the policy
* service.
* Examples are <code>PeerOrgReferral</code>, <code>SubOrgReferral</code>
*
* @return a set of all valid referral type names defined by the policy
* 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 referral type names configured for the
* organization.
* Examples are <code>PeerOrgReferral</code>, <code>SubOrgReferral</code>
*
* @return a set of valid referral type names configured for the
* organization.
* @throws SSOException if the <code>SSOToken</code> used to create
* the <code>PolicyManager</code> has become invalid
* @throws PolicyException for any other abnormal condition
*/
if (policyConfig != null) {
}
if (selectedReferrals == null) {
}
return selectedReferrals;
}
/**
* Returns the type of the <code>Referral</code> implementation.
* For example, <code>PeerOrgReferral</code>, <code>SubOrgReferral</code>
*
* @param referral referral object for which this method will
* return its associated type
*
* @return type of the referral, e.g., <code>PeerOrgReferral</code>,
* <code>SubOrgReferral</code> Returns <code>null</code> if not present.
*/
return (referralTypeName(referral));
}
/**
* Returns the I18N properties file name that should be
* used to localize display names for the given
* referral type.
*
* @param referralType referral type name
*
* @return i18n properties file name
*/
// %%% Need to get the file name from plugin schema
return (null);
}
/**
* Returns the I18N key to be used to localize the
* display name for the referral type name.
*
* @param referralType referral type name
*
* @return i18n key to obtain the display name
*/
return (ps.getI18NKey());
}
return (null);
}
/**
* Gets the display name for the referral type
* @param referralType referral type
* @return display name for the referral type
*/
} else {
}
return displayName;
}
/**
* Returns an instance of the <code>Referral</code>
* given the referral type name.
*
* @param referralType type of referral.
* @return an instance of the <code>Referral</code> given the referral type
* name.
* @throws NameNotFoundException if the <code>Referral</code> for the
* <code>referralType</code> name is not found
* @throws PolicyException for any other abnormal condition
*/
throws NameNotFoundException, PolicyException {
"invalid_referral", null,
}
// Construct the object
try {
} catch (Exception e) {
throw (new PolicyException(e));
}
// Construct the Referral and return
return (answer);
}
/**
* Returns the type name for the <code>Referral</code>
* @param referral <code>Referral</code> for which to find the type
* @return the type name for the <code>Referral</code>
*/
return (null);
}
answer = pluginName;
break;
}
}
return (answer);
}
/**
* Gets the view bean URL given the Referral
*
* @param referral referral for which to get the view bean URL
*
* @return view bean URL defined for the referral plugin in the policy
* service <code>PluginSchema</code>
*/
return PolicyManager.getViewBeanURL(
}
}