ConditionTypeManager.java revision 6636284dd99df27fda992fb77fb6236657269ec9
/**
* 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: ConditionTypeManager.java,v 1.3 2008/06/25 05:43:43 qcheng Exp $
*
* Portions Copyrighted 2014 ForgeRock AS.
*/
/**
* The class <code>ConditionTypeManager</code> provides
* methods to get a list of configured <code>Condition
* </code> objects, and to obtain a factory object for it.
*
* @supported.all.api
* @deprecated since 12.0.0
*/
public class ConditionTypeManager {
private PolicyManager pm;
private ResourceBundle rb;
private static AMResourceBundleCache amCache =
/**
* Constructor with no argument, initializes
* required data.
* @exception SSOException if unable to retrieve locale from
* <code>SSOToken</code> obtained from
* <code>ServiceTypeManager</code>
*/
ConditionTypeManager() throws SSOException {
}
/**
* Constructor, initializes required data.
* @param pm <code>PolicyManager</code> to be used to get token from.
* If unable to retrieve locale from <code>PolicyManager</code>'s
* <code>SSOToken</code> defaults to default locale in <code>
* am.util.Locale</code>
*/
try {
} catch (SSOException ex) {
+"SSOToken", ex);
}
if (debug.messageEnabled()) {
}
}
/**
* Returns a <code>Set</code> of all valid condition type names defined
* by the policy service. Examples are <code>AuthLevelCondition</code>,
* <code>IPCondition</code>.
*
* @return a <code>Set</code> of all valid condition type names defined
* by the policy service.
* @exception SSOException if the <code>SSOToken</code> used to create
* the <code>PolicyManager</code> has become invalid
* @exception PolicyException for any other abnormal condition
*/
}
/**
* Returns a <code>Set</code> of valid condition type names configured for
* the organization. Examples are <code>AuthLevelCondition</code>,
* <code>IPCondition</code>.
*
* @return a <code>Set</code> of valid condition type names configured for
* the organization.
* @exception SSOException if the <code>SSOToken</code> used to create
* the <code>PolicyManager</code> has become invalid
* @exception PolicyException for any other abnormal condition
*/
}
}
return Collections.EMPTY_SET;
}
/**
* Returns the type of the <code>Condition</code> implementation.
*
* @param condition condition object for which this method will
* return its associated type
*
* @return type of the condition. Returns <code>null</code> if not present.
*/
return (conditionTypeName(condition));
}
/**
* Returns the I18N properties file name that should be
* used to localize display names for the given
* condition type.
*
* @param conditionType condition type name
*
* @return <code>String</code> representing 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 condition type name.
*
* @param conditionType condition type name
*
* @return <code>String</code> representing i18n key to obtain the display
* name
*/
return (ps.getI18NKey());
}
return (null);
}
/**
* Gets the display name for the condition type
* @param conditionType condition type
* @return display name for the condition type
*/
} else {
}
return displayName;
}
/**
* Returns an instance of the <code>Condition</code>
* given the condition type name.
*
* @param conditionType condition type name.
* @return an instance of the <code>Condition</code>
* given the condition type name.
* @throws NameNotFoundException if the <code>Condition</code> for the
* <code>conditionType</code> name is not found
* @throws PolicyException for any other abnormal condition
*/
throws NameNotFoundException, PolicyException {
}
// Construct the object
try {
} catch (Exception e) {
throw (new PolicyException(e));
}
return (condition);
}
/**
* Returns the type of the <code>Condition</code> implementation.
*
* @param condition condition object for which this method will
* return its associated type
*
* @return type of the condition. Returns <code>null</code> if not present.
*/
return (null);
}
iterator();
name = pluginName;
break;
}
}
return (name);
}
/**
* Gets the view bean URL given the Condition
*
* @param condition condition for which to get the view bean URL
*
* @return view bean URL defined for the condition plugin in the policy
* service <code>PluginSchema</code>.
*/
}
}