Interface PolicyModel
-
- All Superinterfaces:
AMAdminConstants,AMModel
- All Known Subinterfaces:
IdentitySubjectModel
- All Known Implementing Classes:
IdentitySubjectModelImpl,PolicyModelImpl,TimePolicyModelImpl
public interface PolicyModel extends AMModel
-
-
Field Summary
Fields Modifier and Type Field Description static StringTF_NAME-
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
-
-
Method Summary
All Methods Instance Methods Abstract 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 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
-
-
-
-
Field Detail
-
TF_NAME
static final String TF_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
getCachedPolicy
CachedPolicy getCachedPolicy(String cacheID) throws AMConsoleException
Returns cached policy object.- Parameters:
cacheID- Cache ID.- Returns:
- cached policy object.
- Throws:
AMConsoleException- if policy object cannot be located.
-
cachePolicy
String cachePolicy(String policyName, String description, boolean isReferral, boolean isActive) throws AMConsoleException
Caches a policy. Returns the cache ID of the policy object.- 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
String cachePolicy(String realmName, String policyName) throws AMConsoleException
Caches an existing policy. Returns the cache ID of the policy object.- Parameters:
realmName- Name of realm.policyName- Name of policy.- Returns:
- cache ID of the policy object.
- Throws:
AMConsoleException- if policy cannot be cached.
-
getPolicyNames
Set getPolicyNames(String realmName, String filter) throws AMConsoleException
Returns policy names that are under a realm.- 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
void createPolicy(String realmName, Policy policy) throws AMConsoleException
Creates a policy.- Parameters:
realmName- Name of realm.policy- Policy object.- Throws:
AMConsoleException- if policy cannot be created.
-
replacePolicy
void replacePolicy(String realmName, Policy policy) throws AMConsoleException
Modifies a policy.- Parameters:
realmName- Name of realm.policy- Policy object.- Throws:
AMConsoleException- if policy cannot be created.
-
deletePolicies
void deletePolicies(String realmName, Set names) throws AMConsoleException
Deletes policies.- 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
boolean canCreateRule(Policy policy, String realmName)
Returns true if rule can be created in a policy.- Parameters:
policy- Policy object.realmName- Realm Name.- Returns:
- true if rule can be created in a policy.
-
getServiceTypeNames
Map getServiceTypeNames()
Returns all registered service type names. Map of service name to its localized name.- Returns:
- all registered service type names.
-
getActionSchemas
Set getActionSchemas(Policy policy, String realmName, String name, boolean withResourceName)
Returns action schemas of service type. name.- 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
String getActionSchemaLocalizedName(String name, ActionSchema actionSchema)
Returns localized name of action schema.- Parameters:
name- Name of Service Type.actionSchema- Action Schema.- Returns:
- localized name of action schema.
-
getChoiceValues
com.iplanet.jato.view.html.OptionList getChoiceValues(String name, ActionSchema actionSchema)
Returns a option list of possible choices.- Parameters:
name- Name of Service Type.actionSchema- Action Schema.- Returns:
- a option list of possible choices.
-
requiredResourceName
boolean requiredResourceName(Policy policy, String realmName, String name)
Returns true if service type requires resource name.- Parameters:
policy- Policy object.realmName- Realm Name.name- Name of Service Type.- Returns:
- true if service type requires resource name.
-
notRequiredResourceName
boolean notRequiredResourceName(Policy policy, String realmName, String name)
Returns true if service type does not require resource name.- Parameters:
policy- Policy object.realmName- Realm Name.name- Name of Service Type.- Returns:
- true if service typedoes not require resource name.
-
canCreateNewResource
boolean canCreateNewResource(String realmName, String svcTypeName)
Returns true of new resource can be created under a realm of a given service type.- 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
List getManagedResources(String realmName, String serviceTypeName)
Returns a list of managed resource names.- Parameters:
realmName- Name of realm.serviceTypeName- Name of service type.- Returns:
- a list of managed resource names.
-
getActiveReferralTypes
Map getActiveReferralTypes(String realmName)
Returns a map of active referral types for a realm to its display name.- Parameters:
realmName- Name of Realm.- Returns:
- a map of active referral types for a realm to its display name.
-
getReferralSyntax
Syntax getReferralSyntax(String realmName, String referralType)
Returns syntax for a referral.- Parameters:
realmName- Name of Realm.referralType- Name of referral type.- Returns:
- syntax for a referral.
-
createReferral
Referral createReferral(String realmName, String referralType, Set values) throws AMConsoleException
Returns a referral object.- 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
ValidValues getReferralPossibleValues(String realmName, String referralType, String filter)
Returns a set of possible values for a referral type.- 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
String getReferralViewBeanURL(String realmName, String referralTypeName)
Returns properties view bean URL of a referral.- Parameters:
realmName- Name of realm.referralTypeName- Name of Referral Type.- Returns:
- properties view bean URL of a referral.
-
getDisplayNameForReferralValues
Map getDisplayNameForReferralValues(String realmName, String referralTypeName, Set values)
Returns a map of values to localized label.- Parameters:
realmName- Name of realm.referralTypeName- Name of referral Type.values- Valid values.- Returns:
- a map of values to localized label.
-
getActiveSubjectTypes
QueryResults getActiveSubjectTypes(String realmName)
Returns a map of active subject types for a realm to its display name.- Parameters:
realmName- Name of Realm.- Returns:
- a map of active subject types for a realm to its display name.
-
getSubjectSyntax
Syntax getSubjectSyntax(String realmName, String subjectType)
Returns syntax for a subject.- Parameters:
realmName- Name of Realm.subjectType- Name of Subject type.- Returns:
- syntax for a subject.
-
createSubject
Subject createSubject(String realmName, String subjectType, Set values) throws AMConsoleException
Returns a subject object.- Parameters:
realmName- Name of Realm.subjectType- Name of subject type.values- Values of the subject.- Returns:
- subject obejct.
- Throws:
AMConsoleException- if subject cannot be created.
-
getSubjectPossibleValues
ValidValues getSubjectPossibleValues(String realmName, String subjectType, String filter) throws AMConsoleException
Returns a set of possible values for a subject type.- 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
String getSubjectTypeName(String realmName, Subject subject)
Returns subject type name of a subject.- Parameters:
realmName- Name of realm.subject- Subject instance.- Returns:
- subject type name of a subject.
-
getSubjectViewBeanURL
String getSubjectViewBeanURL(String realmName, Subject subject)
Returns properties view bean URL of a subject.- Parameters:
realmName- Name of realm.subject- Subject instance.- Returns:
- properties view bean URL of a subject.
-
getSubjectViewBeanURL
String getSubjectViewBeanURL(String realmName, String subjectTypeName)
Returns properties view bean URL of a subject.- Parameters:
realmName- Name of realm.subjectTypeName- Name of Subject Type.- Returns:
- properties view bean URL of a subject.
-
getDisplayNameForSubjectValues
Map getDisplayNameForSubjectValues(String realmName, String subjectTypeName, Set values)
Returns a map of values to localized label.- Parameters:
realmName- Name of realm.subjectTypeName- Name of Subject Type.values- Valid values.- Returns:
- a map of values to localized label.
-
getResponseProviderXML
String getResponseProviderXML(String realmName, String providerType, boolean bCreate, boolean readonly)
Returns property sheet XML for response provider.- 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
List getResponseProviderPropertyNames(String realmName, String providerType)
Returns property names of a response provider.- Parameters:
realmName- Name of Realm.providerType- Name of response provider name.- Returns:
- property names of a response provider.
-
createResponseProvider
ResponseProvider createResponseProvider(String realmName, String providerType, Map values) throws AMConsoleException
Returns a response provider object.- 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
Map getActiveResponseProviderTypes(String realmName)
Returns a map of active response provider types for a realm to its display name.- Parameters:
realmName- Name of Realm.- Returns:
- a map of active response provider types for a realm to its display name.
-
getResponseProviderTypeName
String getResponseProviderTypeName(String realmName, ResponseProvider provider)
Returns response provider type name of a response provider.- Parameters:
realmName- Name of realm.provider- response provider instance.- Returns:
- response provider type name of a response provider.
-
getResponseProviderViewBeanURL
String getResponseProviderViewBeanURL(String realmName, ResponseProvider provider)
Returns properties view bean URL of a response provider.- Parameters:
realmName- Name of realm.provider- response provider Object.- Returns:
- properties view bean URL of a response provider.
-
getResponseProviderViewBeanURL
String getResponseProviderViewBeanURL(String realmName, String typeName)
Returns properties view bean URL of a response provider.- Parameters:
realmName- Name of realm.typeName- Name of response provider Type.- Returns:
- properties view bean URL of a response provider.
-
getActiveConditionTypes
Map getActiveConditionTypes(String realmName)
Returns a map of active condition types for a realm to its display name.- Parameters:
realmName- Name of Realm.- Returns:
- a map of active condition types for a realm to its display name.
-
getConditionViewBeanURL
String getConditionViewBeanURL(String realmName, Condition condition)
Returns properties view bean URL of a condition.- Parameters:
realmName- Name of realm.condition- Condition Object.- Returns:
- properties view bean URL of a condition.
-
getConditionViewBeanURL
String getConditionViewBeanURL(String realmName, String conditionTypeName)
Returns properties view bean URL of a condition.- Parameters:
realmName- Name of realm.conditionTypeName- Name of Condition Type.- Returns:
- properties view bean URL of a condition.
-
createCondition
Condition createCondition(String realmName, String conditionType, Map values) throws AMConsoleException
Returns a condition object.- 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
String getConditionXML(String realmName, String conditionType, boolean readonly)
Returns property sheet XML for condition.- 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
List getConditionPropertyNames(String realmName, String conditionType)
Returns property names of a condition.- Parameters:
realmName- Name of Realm.conditionType- Name of condition name.- Returns:
- property names of a condition.
-
getConditionTypeName
String getConditionTypeName(String realmName, Condition condition)
Returns condition type name of a condition.- Parameters:
realmName- Name of realm.condition- Condition instance.- Returns:
- Condition type name of a condition.
-
canCreatePolicy
String canCreatePolicy(String realmName)
Returns a descriptive message if policy cannot be created under a realm.- Parameters:
realmName- Name of Realm.- Returns:
- a descriptive message if policy cannot be created under a realm.
-
getAuthenticationInstances
Set getAuthenticationInstances(String realmName) throws AMConsoleException
Returns set of authentication instances.- Parameters:
realmName- Name of Realm.- Returns:
- set of authentication instances.
- Throws:
AMConsoleException- if authentication instances cannot be obtained.
-
isPolicyActive
boolean isPolicyActive(String realmName, String policyName) throws AMConsoleException
Returns true if the policy is active, false otherwise.- Parameters:
realmName- Realm name.policyName- Policy name.- Returns:
- true if the policy is active, false otherwise.
- Throws:
AMConsoleException
-
getProtectedResourceNames
Set getProtectedResourceNames(String realmName, String policyName) throws AMConsoleException
Returns names of resources protected by the policy.- Parameters:
realmName- Realm name.policyName- Policy name.- Returns:
- Names of resources protected by the policy.
- Throws:
AMConsoleException
-
getAuthInstances
Set getAuthInstances(String realmName)
Returns authentication instances configured for the realm.- Parameters:
realmName- Name of realm.- Returns:
- authentication instances configured for the realm.
-
getAuthenticationLevel
String getAuthenticationLevel(String realmName, String name)
Returns authentication level of an authentication instance.- Parameters:
realmName- Name of realm.name- Authentication Instance name.- Returns:
- authentication level of an authentication instance.
-
getRealmNames
Set getRealmNames(String base, String filter) throws AMConsoleException
Returns realms that have names matching with a filter.- Specified by:
getRealmNamesin interfaceAMModel- 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.
-
-