Class PolicyModelImpl
- java.lang.Object
-
- com.sun.identity.console.base.model.AMModelBase
-
- com.sun.identity.console.policy.model.PolicyModelImpl
-
- All Implemented Interfaces:
AMAdminConstants,AMModel,PolicyModel
- Direct Known Subclasses:
IdentitySubjectModelImpl,TimePolicyModelImpl
public class PolicyModelImpl extends AMModelBase implements PolicyModel
-
-
Field Summary
-
Fields inherited from class com.sun.identity.console.base.model.AMModelBase
debug, locale, locationDN
-
Fields inherited from interface com.sun.identity.console.base.model.AMAdminConstants
ADMIN_CONSOLE_SERVICE, ADMIN_DISPLAY_ATTRIBUTE, ADMIN_DISPLAY_READONLY_ATTRIBUTE, AGENT_REPOSITORY_LOCATION_ATTR, AGENTS_NODE_ID, AMSDK_DEBUG_FILENAME, ATTR_USER_OLD_PASSWORD, ATTR_USER_PASSWORD, ATTR_USER_RESOURCE_OFFERING, ATTR_USER_STATUS, AUTH_CONFIG_SERVICE, CDM_CONTENT_TYPE_PROPERTY_NAME, CHOICES, CONFIGURATION_NODE_ID, CONSOLE_DEBUG_FILENAME, CONSOLE_LOCATION_DN, CONSOLE_ORG_CUSTOM_JSP_DIRECTORY, CONSOLE_UM_ENABLED_ATTR, CONSOLE_USER_ATTRS_SEARCH_KEY, CONSOLE_USER_SEARCH_KEY, CONSOLE_USER_SEARCH_RETURN_KEY, CORE_AUTH_SERVICE, CURRENT_ORG, CURRENT_PROFILE, CURRENT_REALM, DEFAULT_RB, DEFAULT_SEARCH_TIMEOUT, DISCOVERY_SERVICE, DISCOVERY_SERVICE_NAME_BOOTSTRAP_RES_OFF, DISCOVERY_SERVICE_NAME_DYNAMIC_DISCO_ENTRIES, DISCOVERY_SERVICE_PROVIDER_RESOURCE_ID_MAPPER, DISCOVERY_SERVICE_PROVIDER_RESOURCE_ID_MAPPER_ID_MAPPER, DISCOVERY_SERVICE_PROVIDER_RESOURCE_ID_MAPPER_PROVIDER_ID, DISPLAY_ATTRIBUTE, DISPLAY_READONLY_ATTRIBUTE, DYN_LINK_COMPONENT_NAME, ENCRYPTED, FED_TAB_ID, G11N_SERIVCE_COMMON_NAME_FORMAT, G11N_SERVICE_NAME, IDREPO_SERVICE_NAME, IMAGES_PRIMARY_PRODUCT_NAME_PNG, OPERATION_ADD, OPERATION_EDIT, OPTIONAL_ATTRIBUTE, ORGANIZATION_NODE_ID, PASSWORD, PERMISSION_DELEGATE, PERMISSION_MODIFY, PERMISSION_READ, PG_SESSION_INIT_PAGETRAIL, PLATFORM_SERVICE, POLICY_SELECTED_RESPONSE_PROVIDER, POLICY_SERVICE, PREVIOUS_ORGANIZATION, PREVIOUS_REALM, PREVIOUS_TAB_ID, PW_RESET_SERVICE, REALM_NODE_ID, REQUIRED_ATTRIBUTE, REST_STS_SERVICE, ROLE_DISPLAY_OPTION_ATTRIBUTE_NAME, SAML_SERVICE, SAVE_VB_NAME, SERVICE_NAME, SESSION_SERVICE, SESSIONS_NODE_ID, SOAP_STS_SERVICE, SSO_TOKEN_LOCALE_ATTRIBUTE_NAME, SSO_TOKEN_ORGANIZATION_ATTRIBUTE_NAME, STRING_ACTIVE, STRING_FALSE, STRING_INACTIVE, SUBJECTS_NODE_ID, TAB_AGENT_PREFIX, TAB_AGENT_PREFIX_INT, URL_LOGIN, URL_LOGOUT, USER_SERVICE, USER_SERVICE_PREFERRED_LOCALE, VALUES
-
Fields inherited from interface com.sun.identity.console.base.model.AMModel
CONSOLE_PAGING_SIZE_ATTR, CONSOLE_SEARCH_RESULT_LIMIT_ATTR, CONSOLE_SEARCH_TIME_LIMIT_ATTR, DEFAULT_PAGE_SIZE, DEFAULT_SEARCH_RESULT_LIMIT, DEFAULT_SEARCH_TIME_LIMIT
-
Fields inherited from interface com.sun.identity.console.policy.model.PolicyModel
TF_NAME
-
-
Constructor Summary
Constructors Constructor Description PolicyModelImpl(jakarta.servlet.http.HttpServletRequest req, Map map)Creates a simple model using default resource bundle.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringcachePolicy(String realmName, String policyName)Caches an existing policy.StringcachePolicy(String policyName, String description, boolean isReferral, boolean isActive)Caches a policy.booleancanCreateNewResource(String realmName, String svcTypeName)Returns true of new resource can be created under a realm of a given service type.StringcanCreatePolicy(String realmName)Returns a descriptive message if policy cannot be created under a realm.booleancanCreateRule(Policy policy, String realmName)Returns true if rule can be created in a policy.ConditioncreateCondition(String realmName, String conditionType, Map values)Returns a condition object.voidcreatePolicy(String realmName, Policy policy)Creates a policy.ReferralcreateReferral(String realmName, String referralType, Set values)Returns a referral object.ResponseProvidercreateResponseProvider(String realmName, String providerType, Map values)Returns a response provider object.SubjectcreateSubject(String realmName, String subjectType, Set values)Returns a subject object.voiddeletePolicies(String realmName, Set names)Deletes policies.StringgetActionSchemaLocalizedName(String name, ActionSchema actionSchema)Returns localized name of action schema.SetgetActionSchemas(Policy policy, String realmName, String name, boolean withResourceName)Returns action schemas of service type.MapgetActiveConditionTypes(String realmName)Returns a map of active condition types for a realm to its display name.MapgetActiveReferralTypes(String realmName)Returns a map of active referral types for a realm to its display name.MapgetActiveResponseProviderTypes(String realmName)Returns a map of active response provider types for a realm to its display name.QueryResultsgetActiveSubjectTypes(String realmName)Returns a map of active subject types for a realm to its display name.SetgetAuthenticationInstances(String realmName)Returns set of authentication instances.StringgetAuthenticationLevel(String realmName, String name)Returns authentication level of an authentication instance.SetgetAuthInstances(String realmName)Returns authentication instances configured for the realm.CachedPolicygetCachedPolicy(String cacheID)Returns cached policy object.com.iplanet.jato.view.html.OptionListgetChoiceValues(String name, ActionSchema actionSchema)Returns a option list of possible choices.ListgetConditionPropertyNames(String realmName, String conditionType)Returns property names of a condition.StringgetConditionTypeName(String realmName, Condition condition)Returns condition type name of a condition.StringgetConditionViewBeanURL(String realmName, Condition condition)Returns properties view bean URL of a condition.StringgetConditionViewBeanURL(String realmName, String conditionTypeName)Returns properties view bean URL of a condition.StringgetConditionXML(String realmName, String conditionType, boolean readonly)Returns property sheet XML for condition.MapgetDisplayNameForReferralValues(String realmName, String referralTypeName, Set values)Returns a map of values to localized label.MapgetDisplayNameForSubjectValues(String realmName, String subjectTypeName, Set values)Returns a map of values to localized label.ListgetManagedResources(String realmName, String serviceTypeName)Returns a list of managed resource names.SetgetPolicyNames(String realmName, String filter)Returns policy names that are under a realm.SetgetProtectedResourceNames(String realmName, String policyName)Returns names of resources protected by the policy.SetgetRealmNames(String base, String filter)Returns realms that have names matching with a filter.ValidValuesgetReferralPossibleValues(String realmName, String referralType, String filter)Returns a set of possible values for a referral type.SyntaxgetReferralSyntax(String realmName, String referralType)Returns syntax for a referral.StringgetReferralViewBeanURL(String realmName, String referralTypeName)Returns properties view bean URL of a referral.ListgetResponseProviderPropertyNames(String realmName, String providerType)Returns property names of a response provider.StringgetResponseProviderTypeName(String realmName, ResponseProvider provider)Returns response provider type name of a response provider.StringgetResponseProviderViewBeanURL(String realmName, ResponseProvider provider)Returns properties view bean URL of a response provider.StringgetResponseProviderViewBeanURL(String realmName, String typeName)Returns properties view bean URL of a response provider.StringgetResponseProviderXML(String realmName, String providerType, boolean bCreate, boolean readonly)Returns property sheet XML for response provider.MapgetServiceTypeNames()Returns all registered service type names.ValidValuesgetSubjectPossibleValues(String realmName, String subjectType, String filter)Returns a set of possible values for a subject type.SyntaxgetSubjectSyntax(String realmName, String subjectType)Returns syntax for a subject.StringgetSubjectTypeName(String realmName, Subject subject)Returns subject type name of a subject.StringgetSubjectViewBeanURL(String realmName, Subject subject)Returns properties view bean URL of a subject.StringgetSubjectViewBeanURL(String realmName, String subjectTypeName)Returns properties view bean URL of a subject.booleanisPolicyActive(String realmName, String policyName)Returns true if the policy is active, false otherwise.booleannotRequiredResourceName(Policy policy, String realmName, String name)Returns true if service type does not require resource name.voidreplacePolicy(String realmName, Policy policy)Modifies a policy.booleanrequiredResourceName(Policy policy, String realmName, String name)Returns true if service type requires resource name.-
Methods inherited from class com.sun.identity.console.base.model.AMModelBase
encryptString, getAttributesToDisplay, getAuthenticatedOrgDN, getClientType, getConsoleAttributes, getConsoleDirectory, getErrorString, getGlobalPageSize, getGlobalSearchResultLimit, getGlobalSearchTimeOutLimit, getLocalizedServiceName, getLocalizedServiceName, getLocalizedString, getLocationDN, getLogoutURL, getPageSize, getRandomString, getResourceBundle, getSearchResultLimit, getSearchTimeOutLimit, getServerInstanceForLogMsg, getServicePropertiesViewBeanURL, getServiceResourceBundle, getServiceSchemaManager, getSpecialUsers, getStartDN, getStartDN, getStartDSDN, getSupportedAgentTypes, getSupportedEntityTypes, getUniversalID, getUserAdditionalSearchAttributes, getUserDisplayAttribute, getUserDisplayName, getUserDN, getUserInfo, getUserLocale, getUserName, getUserOrganization, getUserSearchAttribute, getUserSSOToken, ignoreUserProfile, initialize, isAmadminUser, isAMSDKEnabled, isDisplayed, logEvent, setLocationDN, validateUserStatusEntry
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.sun.identity.console.base.model.AMModel
getClientType, getConsoleDirectory, getErrorString, getLocalizedServiceName, getLocalizedString, getLocationDN, getPageSize, getRandomString, getServicePropertiesViewBeanURL, getSpecialUsers, getStartDN, getStartDSDN, getSupportedAgentTypes, getSupportedEntityTypes, getUniversalID, getUserDisplayName, getUserDN, getUserLocale, getUserName, getUserSSOToken, ignoreUserProfile, isAmadminUser, isAMSDKEnabled, logEvent, setLocationDN
-
-
-
-
Constructor Detail
-
PolicyModelImpl
public PolicyModelImpl(jakarta.servlet.http.HttpServletRequest req, Map map)Creates a simple model using default resource bundle.- Parameters:
req- HTTP Servlet Requestmap- of user information
-
-
Method Detail
-
getCachedPolicy
public CachedPolicy getCachedPolicy(String cacheID) throws AMConsoleException
Returns cached policy object.- Specified by:
getCachedPolicyin interfacePolicyModel- Parameters:
cacheID- Cache ID.- Returns:
- cached policy object.
- Throws:
AMConsoleException- if policy object cannot be located.
-
cachePolicy
public String cachePolicy(String policyName, String description, boolean isReferral, boolean isActive) throws AMConsoleException
Caches a policy. Returns the cache ID of the policy object.- Specified by:
cachePolicyin interfacePolicyModel- Parameters:
policyName- Name of policy.description- Description of policy.isReferral-trueif policy is referral typed.isActive-trueif policy is active.- Returns:
- cache ID of the policy object.
- Throws:
AMConsoleException- if policy cannot be cached.
-
cachePolicy
public String cachePolicy(String realmName, String policyName) throws AMConsoleException
Caches an existing policy. Returns the cache ID of the policy object.- Specified by:
cachePolicyin interfacePolicyModel- Parameters:
realmName- Name of realm.policyName- Name of policy.- Returns:
- cache ID of the policy object.
- Throws:
AMConsoleException- if policy cannot be cached.
-
getPolicyNames
public Set getPolicyNames(String realmName, String filter) throws AMConsoleException
Returns policy names that are under a realm.- Specified by:
getPolicyNamesin interfacePolicyModel- Parameters:
realmName- Name of realm.filter- Filter string.- Returns:
- policy names that are under a realm.
- Throws:
AMConsoleException- if policy names cannot be returned.
-
createPolicy
public void createPolicy(String realmName, Policy policy) throws AMConsoleException
Creates a policy.- Specified by:
createPolicyin interfacePolicyModel- Parameters:
realmName- Name of realm.policy- Policy object.- Throws:
AMConsoleException- if policy cannot be created.
-
replacePolicy
public void replacePolicy(String realmName, Policy policy) throws AMConsoleException
Modifies a policy.- Specified by:
replacePolicyin interfacePolicyModel- Parameters:
realmName- Name of realm.policy- Policy object.- Throws:
AMConsoleException- if policy cannot be created.
-
deletePolicies
public void deletePolicies(String realmName, Set names) throws AMConsoleException
Deletes policies.- Specified by:
deletePoliciesin interfacePolicyModel- Parameters:
realmName- Name of realm that contains these policies.names- Set of policy names to be deleted.- Throws:
AMConsoleException- if policies cannot be deleted.
-
canCreateRule
public boolean canCreateRule(Policy policy, String realmName)
Returns true if rule can be created in a policy.- Specified by:
canCreateRulein interfacePolicyModel- Parameters:
policy- Policy object.realmName- Realm Name.- Returns:
- true if rule can be created in a policy.
-
getServiceTypeNames
public Map getServiceTypeNames()
Returns all registered service type names. Map of service name to its localized name.- Specified by:
getServiceTypeNamesin interfacePolicyModel- Returns:
- all registered service type names.
-
getActionSchemas
public Set getActionSchemas(Policy policy, String realmName, String name, boolean withResourceName)
Returns action schemas of service type. name.- Specified by:
getActionSchemasin interfacePolicyModel- Parameters:
policy- Policy object.realmName- Realm Name.name- Name of Service Type.withResourceName-truefor action names for resource name.- Returns:
- action schemas of service type.
-
getActionSchemaLocalizedName
public String getActionSchemaLocalizedName(String name, ActionSchema actionSchema)
Returns localized name of action schema.- Specified by:
getActionSchemaLocalizedNamein interfacePolicyModel- Parameters:
name- Name of Service Type.actionSchema- Action Schema.- Returns:
- localized name of action schema.
-
getChoiceValues
public com.iplanet.jato.view.html.OptionList getChoiceValues(String name, ActionSchema actionSchema)
Returns a option list of possible choices.- Specified by:
getChoiceValuesin interfacePolicyModel- Parameters:
name- Name of Service Type.actionSchema- Action Schema.- Returns:
- a option list of possible choices.
-
requiredResourceName
public boolean requiredResourceName(Policy policy, String realmName, String name)
Returns true if service type requires resource name.- Specified by:
requiredResourceNamein interfacePolicyModel- Parameters:
policy- Policy object.realmName- Realm Name.name- Name of Service Type.- Returns:
- true if service type requires resource name.
-
notRequiredResourceName
public boolean notRequiredResourceName(Policy policy, String realmName, String name)
Returns true if service type does not require resource name.- Specified by:
notRequiredResourceNamein interfacePolicyModel- Parameters:
policy- Policy object.realmName- Realm Name.name- Name of Service Type.- Returns:
- true if service typedoes not require resource name.
-
canCreateNewResource
public boolean canCreateNewResource(String realmName, String svcTypeName)
Returns true of new resource can be created under a realm of a given service type.- Specified by:
canCreateNewResourcein interfacePolicyModel- Parameters:
realmName- Name of Realm.svcTypeName- Name of Service Type.- Returns:
- true of new resource can be created under a realm of a given service type.
-
getManagedResources
public List getManagedResources(String realmName, String serviceTypeName)
Returns a list of managed resource names.- Specified by:
getManagedResourcesin interfacePolicyModel- Parameters:
realmName- Name of realm.serviceTypeName- Name of service type.- Returns:
- a list of managed resource names.
-
getActiveReferralTypes
public Map getActiveReferralTypes(String realmName)
Returns a map of active referral types for a realm to its display name.- Specified by:
getActiveReferralTypesin interfacePolicyModel- Parameters:
realmName- Name of Realm.- Returns:
- a map of active referral types for a realm to its display name.
-
getReferralSyntax
public Syntax getReferralSyntax(String realmName, String referralType)
Returns syntax for a referral.- Specified by:
getReferralSyntaxin interfacePolicyModel- Parameters:
realmName- Name of Realm.referralType- Name of referral type.- Returns:
- syntax for a referral.
-
createReferral
public Referral createReferral(String realmName, String referralType, Set values) throws AMConsoleException
Returns a referral object.- Specified by:
createReferralin interfacePolicyModel- Parameters:
realmName- Name of Realm.referralType- Name of referral type.values- Values of the referral.- Returns:
- referral obejct.
- Throws:
AMConsoleException- if referral cannot be created.
-
getReferralPossibleValues
public ValidValues getReferralPossibleValues(String realmName, String referralType, String filter)
Returns a set of possible values for a referral type.- Specified by:
getReferralPossibleValuesin interfacePolicyModel- Parameters:
realmName- Name of Realm.referralType- Name of Referral Type.filter- wildcards for filtering the results.- Returns:
- a set of possible values for a referral type.
-
getReferralViewBeanURL
public String getReferralViewBeanURL(String realmName, String referralTypeName)
Returns properties view bean URL of a referral.- Specified by:
getReferralViewBeanURLin interfacePolicyModel- Parameters:
realmName- Name of realm.referralTypeName- Name of Referral Type.- Returns:
- properties view bean URL of a referral.
-
getDisplayNameForReferralValues
public Map getDisplayNameForReferralValues(String realmName, String referralTypeName, Set values)
Returns a map of values to localized label.- Specified by:
getDisplayNameForReferralValuesin interfacePolicyModel- Parameters:
realmName- Name of realm.referralTypeName- Name of referral Type.values- Valid values.- Returns:
- a map of values to localized label.
-
getActiveSubjectTypes
public QueryResults getActiveSubjectTypes(String realmName)
Returns a map of active subject types for a realm to its display name.- Specified by:
getActiveSubjectTypesin interfacePolicyModel- Parameters:
realmName- Name of Realm.- Returns:
- a map of active subject types for a realm to its display name.
-
getSubjectSyntax
public Syntax getSubjectSyntax(String realmName, String subjectType)
Returns syntax for a subject.- Specified by:
getSubjectSyntaxin interfacePolicyModel- Parameters:
realmName- Name of Realm.subjectType- Name of Subject type.- Returns:
- syntax for a subject.
-
createSubject
public Subject createSubject(String realmName, String subjectType, Set values) throws AMConsoleException
Returns a subject object.- Specified by:
createSubjectin interfacePolicyModel- Parameters:
realmName- Name of Realm.subjectType- Name of subject type.values- Values of the subject.- Returns:
- subject object.
- Throws:
AMConsoleException- if subject cannot be created.
-
getSubjectPossibleValues
public ValidValues getSubjectPossibleValues(String realmName, String subjectType, String filter) throws AMConsoleException
Returns a set of possible values for a subject type.- Specified by:
getSubjectPossibleValuesin interfacePolicyModel- Parameters:
realmName- Name of Realm.subjectType- Name of Subject Type.filter- wildcards for filtering the results.- Returns:
- a set of possible values for a subject type.
- Throws:
AMConsoleException- if values cannot be obtained.
-
getSubjectTypeName
public String getSubjectTypeName(String realmName, Subject subject)
Returns subject type name of a subject.- Specified by:
getSubjectTypeNamein interfacePolicyModel- Parameters:
realmName- Name of realm.subject- Subject instance.- Returns:
- subject type name of a subject.
-
getSubjectViewBeanURL
public String getSubjectViewBeanURL(String realmName, String subjectTypeName)
Returns properties view bean URL of a subject.- Specified by:
getSubjectViewBeanURLin interfacePolicyModel- Parameters:
realmName- Name of realm.subjectTypeName- Name of Subject Type.- Returns:
- properties view bean URL of a subject.
-
getSubjectViewBeanURL
public String getSubjectViewBeanURL(String realmName, Subject subject)
Returns properties view bean URL of a subject.- Specified by:
getSubjectViewBeanURLin interfacePolicyModel- Parameters:
realmName- Name of realm.subject- Subject instance.- Returns:
- properties view bean URL of a subject.
-
getDisplayNameForSubjectValues
public Map getDisplayNameForSubjectValues(String realmName, String subjectTypeName, Set values)
Returns a map of values to localized label.- Specified by:
getDisplayNameForSubjectValuesin interfacePolicyModel- Parameters:
realmName- Name of realm.subjectTypeName- Name of Subject Type.values- Valid values.- Returns:
- a map of values to localized label.
-
getResponseProviderXML
public String getResponseProviderXML(String realmName, String providerType, boolean bCreate, boolean readonly)
Returns property sheet XML for response provider.- Specified by:
getResponseProviderXMLin interfacePolicyModel- Parameters:
realmName- Name of Realm.providerType- Name of response provider name.bCreate- true for create view bean.readonly- true if administrator can only read permission.- Returns:
- property sheet XML for response provider.
-
getResponseProviderPropertyNames
public List getResponseProviderPropertyNames(String realmName, String providerType)
Returns property names of a response provider.- Specified by:
getResponseProviderPropertyNamesin interfacePolicyModel- Parameters:
realmName- Name of Realm.providerType- Name of response provider name.- Returns:
- property names of a response provider.
-
createResponseProvider
public ResponseProvider createResponseProvider(String realmName, String providerType, Map values) throws AMConsoleException
Returns a response provider object.- Specified by:
createResponseProviderin interfacePolicyModel- Parameters:
realmName- Name of Realm.providerType- Name of response provider type.values- Values of the response provider.- Returns:
- response provider object.
- Throws:
AMConsoleException- if response provider cannot be created.
-
getActiveResponseProviderTypes
public Map getActiveResponseProviderTypes(String realmName)
Returns a map of active response provider types for a realm to its display name.- Specified by:
getActiveResponseProviderTypesin interfacePolicyModel- Parameters:
realmName- Name of Realm.- Returns:
- a map of active response provider types for a realm to its display name.
-
getResponseProviderTypeName
public String getResponseProviderTypeName(String realmName, ResponseProvider provider)
Returns response provider type name of a response provider.- Specified by:
getResponseProviderTypeNamein interfacePolicyModel- Parameters:
realmName- Name of realm.provider- response provider instance.- Returns:
- response provider type name of a response provider.
-
getResponseProviderViewBeanURL
public String getResponseProviderViewBeanURL(String realmName, ResponseProvider provider)
Returns properties view bean URL of a response provider.- Specified by:
getResponseProviderViewBeanURLin interfacePolicyModel- Parameters:
realmName- Name of realm.provider- response provider Object.- Returns:
- properties view bean URL of a response provider.
-
getResponseProviderViewBeanURL
public String getResponseProviderViewBeanURL(String realmName, String typeName)
Returns properties view bean URL of a response provider.- Specified by:
getResponseProviderViewBeanURLin interfacePolicyModel- Parameters:
realmName- Name of realm.typeName- Name of response provider Type.- Returns:
- properties view bean URL of a response provider.
-
getActiveConditionTypes
public Map getActiveConditionTypes(String realmName)
Returns a map of active condition types for a realm to its display name.- Specified by:
getActiveConditionTypesin interfacePolicyModel- Parameters:
realmName- Name of Realm.- Returns:
- a map of active condition types for a realm to its display name.
-
getConditionViewBeanURL
public String getConditionViewBeanURL(String realmName, Condition condition)
Returns properties view bean URL of a condition.- Specified by:
getConditionViewBeanURLin interfacePolicyModel- Parameters:
realmName- Name of realm.condition- Condition Object.- Returns:
- properties view bean URL of a condition.
-
getConditionViewBeanURL
public String getConditionViewBeanURL(String realmName, String conditionTypeName)
Returns properties view bean URL of a condition.- Specified by:
getConditionViewBeanURLin interfacePolicyModel- Parameters:
realmName- Name of realm.conditionTypeName- Name of Condition Type.- Returns:
- properties view bean URL of a condition.
-
createCondition
public Condition createCondition(String realmName, String conditionType, Map values) throws AMConsoleException
Returns a condition object.- Specified by:
createConditionin interfacePolicyModel- Parameters:
realmName- Name of Realm.conditionType- Name of condition type.values- Values of the condition.- Returns:
- condition object.
- Throws:
AMConsoleException- if condition cannot be created.
-
getConditionXML
public String getConditionXML(String realmName, String conditionType, boolean readonly)
Returns property sheet XML for condition.- Specified by:
getConditionXMLin interfacePolicyModel- Parameters:
realmName- Name of Realm.conditionType- Name of condition name.readonly- true if the administrator has only read only permission.- Returns:
- property sheet XML for condition.
-
getConditionPropertyNames
public List getConditionPropertyNames(String realmName, String conditionType)
Returns property names of a condition.- Specified by:
getConditionPropertyNamesin interfacePolicyModel- Parameters:
realmName- Name of Realm.conditionType- Name of condition name.- Returns:
- property names of a condition.
-
getConditionTypeName
public String getConditionTypeName(String realmName, Condition condition)
Returns condition type name of a condition.- Specified by:
getConditionTypeNamein interfacePolicyModel- Parameters:
realmName- Name of realm.condition- Condition instance.- Returns:
- Condition type name of a condition.
-
canCreatePolicy
public String canCreatePolicy(String realmName)
Returns a descriptive message if policy cannot be created under a realm.- Specified by:
canCreatePolicyin interfacePolicyModel- Parameters:
realmName- Name of Realm.- Returns:
- a descriptive message if policy cannot be created under a realm.
-
getAuthenticationInstances
public Set getAuthenticationInstances(String realmName) throws AMConsoleException
Returns set of authentication instances.- Specified by:
getAuthenticationInstancesin interfacePolicyModel- Parameters:
realmName- Name of Realm.- Returns:
- set of authentication instances.
- Throws:
AMConsoleException- if authentication instances cannot be obtained.
-
isPolicyActive
public boolean isPolicyActive(String realmName, String policyName) throws AMConsoleException
Description copied from interface:PolicyModelReturns true if the policy is active, false otherwise.- Specified by:
isPolicyActivein interfacePolicyModel- Parameters:
realmName- Realm name.policyName- Policy name.- Returns:
- true if the policy is active, false otherwise.
- Throws:
AMConsoleException
-
getProtectedResourceNames
public Set getProtectedResourceNames(String realmName, String policyName) throws AMConsoleException
Description copied from interface:PolicyModelReturns names of resources protected by the policy.- Specified by:
getProtectedResourceNamesin interfacePolicyModel- Parameters:
realmName- Realm name.policyName- Policy name.- Returns:
- Names of resources protected by the policy.
- Throws:
AMConsoleException
-
getAuthInstances
public Set getAuthInstances(String realmName)
Returns authentication instances configured for the realm.- Specified by:
getAuthInstancesin interfacePolicyModel- Parameters:
realmName- Name of realm.- Returns:
- authentication instances configured for the realm.
-
getAuthenticationLevel
public String getAuthenticationLevel(String realmName, String name)
Returns authentication level of an authentication instance.- Specified by:
getAuthenticationLevelin interfacePolicyModel- Parameters:
realmName- Name of realm.name- Authentication Instance name.- Returns:
- authentication level of an authentication instance.
-
getRealmNames
public Set getRealmNames(String base, String filter) throws AMConsoleException
Returns realms that have names matching with a filter.- Specified by:
getRealmNamesin interfaceAMModel- Specified by:
getRealmNamesin interfacePolicyModel- Overrides:
getRealmNamesin classAMModelBase- Parameters:
base- Base realm name for this search. null indicates root suffix.filter- Filter string.- Returns:
- realms that have names matching with a filter.
- Throws:
AMConsoleException- if search fails.
-
-