Class AbstractAuditModel
- java.lang.Object
-
- com.sun.identity.console.base.model.AMModelBase
-
- com.sun.identity.console.base.model.AMServiceProfileModelImpl
-
- com.sun.identity.console.audit.model.AbstractAuditModel
-
- All Implemented Interfaces:
AMAdminConstants,AMModel,AMServiceProfileModel
- Direct Known Subclasses:
GlobalAuditConfigModel,RealmAuditConfigModel
public abstract class AbstractAuditModel extends AMServiceProfileModelImpl
Abstract Audit configuration UI model.- Since:
- 13.0.0
-
-
Field Summary
Fields Modifier and Type Field Description protected ResourceBundlehandlerResourceBundle-
Fields inherited from class com.sun.identity.console.base.model.AMServiceProfileModelImpl
serviceName, xmlBuilder
-
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
-
-
Constructor Summary
Constructors Constructor Description AbstractAuditModel(jakarta.servlet.http.HttpServletRequest request, Map sessionAttributes)Create a newAbstractAuditModel.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidcreateEventHandler(String eventHandlerName, String eventHandlerType, Map<String,Set<String>> attributeValues)Create a new event handler with the given attributes.voiddeleteEventHandles(Set<String> names)Delete the event handlers specified.StringgetAddEventHandlerPropertyXML(String schemaId)Get the JATO XML configuration for generation the UI used to add event handlers.MapgetAttributeValues()Returns attributes values.StringgetEditEventHandlerPropertyXML(String realmName, String handlerName, String viewBeanClassName)Get the JATO XML configuration for generation the UI used to edit event handlers.Set<String>getEventHandlerAttributeNames(String eventHandlerType)Get the attribute names for the specified event handler type (schema ID).Map<?,?>getEventHandlerAttributeValues(String eventHandlerName)Get the attribute values for the specified event handler.List<SMSubConfig>getEventHandlerConfigurations()Get the configuration properties of all the audit event handlers.Map<String,Set<?>>getEventHandlerDefaultValues(String eventHandlerType)Get the default attribute values for the specified event handler type (schema ID).Set<String>getEventHandlerTypeNames()Get the type names (schema ID) for all the event handlers.StringgetLocalizedString(String key)Returns localized string.StringgetPropertySheetXML(String realmName, String viewBeanName, String viewBeanClassName)Returns the XML for property sheet view component.protected abstract ServiceConfiggetServiceConfig()The service config for the configuration represented by this model.protected abstract ServiceSchemagetServiceSchema()The service schema for the configuration represented by this model.protected voidinitialize(jakarta.servlet.http.HttpServletRequest req, String rbName)Initializes object.voidsetAttributeValues(Map map)Set attribute values.voidsetEventHandlerAttributeValues(String eventHandlerName, Map<?,?> values)Set the attribute values for the specified event handler.-
Methods inherited from class com.sun.identity.console.base.model.AMServiceProfileModelImpl
addMoreAttributeSchemasForModification, getAttributeValues, getDisplaySchemaTypes, getPageTitle, getPropertiesViewBean, getServiceSchemaManager
-
Methods inherited from class com.sun.identity.console.base.model.AMModelBase
encryptString, getAttributesToDisplay, getAuthenticatedOrgDN, getClientType, getConsoleAttributes, getConsoleDirectory, getErrorString, getGlobalPageSize, getGlobalSearchResultLimit, getGlobalSearchTimeOutLimit, getLocalizedServiceName, getLocalizedServiceName, getLocationDN, getLogoutURL, getPageSize, getRandomString, getRealmNames, 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, 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, getLocationDN, getPageSize, getRandomString, getRealmNames, getServicePropertiesViewBeanURL, getSpecialUsers, getStartDN, getStartDSDN, getSupportedAgentTypes, getSupportedEntityTypes, getUniversalID, getUserDisplayName, getUserDN, getUserLocale, getUserName, getUserSSOToken, ignoreUserProfile, isAmadminUser, isAMSDKEnabled, logEvent, setLocationDN
-
-
-
-
Field Detail
-
handlerResourceBundle
protected ResourceBundle handlerResourceBundle
-
-
Constructor Detail
-
AbstractAuditModel
public AbstractAuditModel(jakarta.servlet.http.HttpServletRequest request, Map sessionAttributes) throws AMConsoleExceptionCreate a newAbstractAuditModel.- Parameters:
request- TheHttpServletRequestsessionAttributes- The session attributes.- Throws:
AMConsoleException- If construction fails.
-
-
Method Detail
-
getServiceSchema
protected abstract ServiceSchema getServiceSchema() throws SMSException, SSOException
The service schema for the configuration represented by this model.- Returns:
- The service schema.
- Throws:
SMSException- If an SMS error occurred.SSOException- If an SSO error occurred.
-
getServiceConfig
protected abstract ServiceConfig getServiceConfig() throws SMSException, SSOException
The service config for the configuration represented by this model.- Returns:
- The service config.
- Throws:
SMSException- If an SMS error occurred.SSOException- If an SSO error occurred.
-
initialize
protected void initialize(jakarta.servlet.http.HttpServletRequest req, String rbName)Description copied from class:AMModelBaseInitializes object. It does the followings- check validity of SSO token
- get user information from user map and SSO token
- read console profile information from SSO token
- Overrides:
initializein classAMModelBase- Parameters:
req- HTTP Servlet RequestrbName- resource bundle name
-
getLocalizedString
public String getLocalizedString(String key)
Description copied from class:AMModelBaseReturns localized string.- Specified by:
getLocalizedStringin interfaceAMModel- Overrides:
getLocalizedStringin classAMModelBase- Parameters:
key- Key of resource string.- Returns:
- localized string.
-
getPropertySheetXML
public String getPropertySheetXML(String realmName, String viewBeanName, String viewBeanClassName) throws AMConsoleException
Description copied from class:AMServiceProfileModelImplReturns the XML for property sheet view component.- Specified by:
getPropertySheetXMLin interfaceAMServiceProfileModel- Overrides:
getPropertySheetXMLin classAMServiceProfileModelImpl- Parameters:
realmName- Name of Realm.viewBeanName- Class Name of View Bean.viewBeanClassName- Name of Service.- Returns:
- the XML for property sheet view component.
- Throws:
AMConsoleException- if XML cannot be created.
-
getEditEventHandlerPropertyXML
public String getEditEventHandlerPropertyXML(String realmName, String handlerName, String viewBeanClassName) throws AMConsoleException
Get the JATO XML configuration for generation the UI used to edit event handlers.- Parameters:
realmName- The current realm.handlerName- The audit event handler name.viewBeanClassName- The view bean class name.- Returns:
- The JATO XML configuration for generation the UI.
- Throws:
AMConsoleException- If an error occurs during the XML creation.
-
getAddEventHandlerPropertyXML
public String getAddEventHandlerPropertyXML(String schemaId) throws AMConsoleException
Get the JATO XML configuration for generation the UI used to add event handlers.- Parameters:
schemaId- The event handler schema ID.- Returns:
- The JATO XML configuration for generation the UI.
- Throws:
AMConsoleException- If an error occurs during the XML creation.
-
getEventHandlerConfigurations
public List<SMSubConfig> getEventHandlerConfigurations() throws AMConsoleException
Get the configuration properties of all the audit event handlers.- Returns:
- A list of config objects.
- Throws:
AMConsoleException
-
getEventHandlerTypeNames
public Set<String> getEventHandlerTypeNames() throws AMConsoleException
Get the type names (schema ID) for all the event handlers.- Returns:
- A set of event handler type names.
- Throws:
AMConsoleException
-
deleteEventHandles
public void deleteEventHandles(Set<String> names) throws AMConsoleException
Delete the event handlers specified.- Parameters:
names- Set of event handler names that are to be deleted.- Throws:
AMConsoleException- if sub configurations cannot be deleted.
-
setAttributeValues
public void setAttributeValues(Map map) throws AMConsoleException
Description copied from class:AMServiceProfileModelImplSet attribute values.- Specified by:
setAttributeValuesin interfaceAMServiceProfileModel- Overrides:
setAttributeValuesin classAMServiceProfileModelImpl- Parameters:
map- Map of attribute name to Set of attribute values.- Throws:
AMConsoleException- if values cannot be set.
-
getAttributeValues
public Map getAttributeValues()
Description copied from class:AMServiceProfileModelImplReturns attributes values.- Specified by:
getAttributeValuesin interfaceAMServiceProfileModel- Overrides:
getAttributeValuesin classAMServiceProfileModelImpl- Returns:
- attributes values.
-
getEventHandlerAttributeValues
public Map<?,?> getEventHandlerAttributeValues(String eventHandlerName) throws AMConsoleException
Get the attribute values for the specified event handler.- Parameters:
eventHandlerName- The name of the event handler.- Returns:
- A map of event handler attribute values.
- Throws:
AMConsoleException- If an error occurs whilst reading the attributes.
-
setEventHandlerAttributeValues
public void setEventHandlerAttributeValues(String eventHandlerName, Map<?,?> values) throws AMConsoleException
Set the attribute values for the specified event handler.- Parameters:
eventHandlerName- The name of the event handler.values- The attribute values.- Throws:
AMConsoleException- If an error occurs whilst writing the attributes.
-
getEventHandlerDefaultValues
public Map<String,Set<?>> getEventHandlerDefaultValues(String eventHandlerType) throws AMConsoleException
Get the default attribute values for the specified event handler type (schema ID).- Parameters:
eventHandlerType- The name of the event handler type.- Returns:
- A map of default event handler attribute values.
- Throws:
AMConsoleException- If an error occurs whilst reading the attributes.
-
getEventHandlerAttributeNames
public Set<String> getEventHandlerAttributeNames(String eventHandlerType) throws AMConsoleException
Get the attribute names for the specified event handler type (schema ID).- Parameters:
eventHandlerType- The name of the event handler type.- Returns:
- A set of attribute type names.
- Throws:
AMConsoleException- If an error occurs whilst reading the attributes.
-
createEventHandler
public void createEventHandler(String eventHandlerName, String eventHandlerType, Map<String,Set<String>> attributeValues) throws AMConsoleException
Create a new event handler with the given attributes.- Parameters:
eventHandlerName- The name of the new event handler.eventHandlerType- The name of the event handler type.attributeValues- The attribute values.- Throws:
AMConsoleException- If an error occurs whilst creating the event handler.
-
-