Class ViewServiceAdmin
java.lang.Object
org.odpi.openmetadata.adminservices.registration.ViewServiceAdmin
- Direct Known Subclasses:
ActionAuthorAdmin
,AssetCatalogAdmin
,AutomatedCurationAdmin
,ClassificationManagerAdmin
,CollectionManagerAdmin
,DataDesignerAdmin
,DataDiscoveryAdmin
,DataOfficerAdmin
,DevopsPipelineAdmin
,GlossaryBrowserAdmin
,GlossaryManagerAdmin
,GovernanceOfficerAdmin
,MyProfileAdmin
,NotificationManagerAdmin
,PeopleOrganizerAdmin
,PrivacyOfficerAdmin
,ProjectManagerAdmin
,ReferenceDataAdmin
,RuntimeManagerAdmin
,SecurityOfficerAdmin
,TemplateManagerAdmin
,ValidMetadataAdmin
ViewServiceAdmin is the interface that a view service implements to receive its configuration.
The java class that implements this interface is created with a default constructor and then
the initialize method is called. It is configured in the ViewServiceDescription enumeration.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturn the cached service name.getSupportedTypesForSearchOption
(Map<String, Object> viewServiceOptions, String viewServiceName, AuditLog auditLog) Retrieve the option from the configuration that overrides default list of assets that a caller can search for.abstract void
initialize
(String serverName, ViewServiceConfig viewServiceConfig, AuditLog auditLog, String serverUserName, int maxPageSize) Initialize the view service.protected void
logBadConfigProperties
(String viewServiceFullName, String propertyName, String propertyValue, AuditLog auditLog, String methodName, Throwable error) Log that a property value is incorrect.protected void
logBadConfiguration
(String viewServiceFullName, String propertyName, String propertyValue, AuditLog auditLog, String methodName) Log that the configuration is not validvoid
setFullServiceName
(String fullServiceName) Set up the cached service name.abstract void
shutdown()
Shutdown the view service.protected void
throwUnexpectedInitializationException
(String actionDescription, String fullViewServiceName, Throwable error) Log that an unexpected exception was received during start up.
-
Field Details
-
supportedTypesForSearch
- See Also:
-
remoteServerName
- See Also:
-
remoteServerURL
- See Also:
-
-
Constructor Details
-
ViewServiceAdmin
public ViewServiceAdmin()
-
-
Method Details
-
initialize
public abstract void initialize(String serverName, ViewServiceConfig viewServiceConfig, AuditLog auditLog, String serverUserName, int maxPageSize) throws OMAGConfigurationErrorException Initialize the view service.- Parameters:
serverName
- name of the local serverviewServiceConfig
- specific configuration properties for this view service.auditLog
- audit log component for logging messages.serverUserName
- user id to use on OMRS calls where there is no end user.maxPageSize
- maximum page size. 0 means unlimited- Throws:
OMAGConfigurationErrorException
- invalid parameters in the configuration properties.
-
shutdown
public abstract void shutdown()Shutdown the view service. -
getFullServiceName
Return the cached service name.- Returns:
- string name
-
setFullServiceName
Set up the cached service name.- Parameters:
fullServiceName
- string name
-
getSupportedTypesForSearchOption
protected List<String> getSupportedTypesForSearchOption(Map<String, Object> viewServiceOptions, String viewServiceName, AuditLog auditLog) throws OMAGConfigurationErrorExceptionRetrieve the option from the configuration that overrides default list of assets that a caller can search for.- Parameters:
viewServiceOptions
- service configuration options- Returns:
- the list of supported asset types for search or null
- Throws:
OMAGConfigurationErrorException
- error in the view options
-
logBadConfiguration
protected void logBadConfiguration(String viewServiceFullName, String propertyName, String propertyValue, AuditLog auditLog, String methodName) throws OMAGConfigurationErrorException Log that the configuration is not valid- Parameters:
viewServiceFullName
- name of the calling view servicepropertyName
- name of the property in errorpropertyValue
- value of the property that is in errorauditLog
- log to write message tomethodName
- calling method- Throws:
OMAGConfigurationErrorException
- exception documenting the error
-
logBadConfigProperties
protected void logBadConfigProperties(String viewServiceFullName, String propertyName, String propertyValue, AuditLog auditLog, String methodName, Throwable error) throws OMAGConfigurationErrorException Log that a property value is incorrect.- Parameters:
viewServiceFullName
- name of the calling view servicepropertyName
- name of the property in errorpropertyValue
- value of the property that is in errorauditLog
- log to write message tomethodName
- calling methoderror
- resulting exception- Throws:
OMAGConfigurationErrorException
- exception documenting the error
-
throwUnexpectedInitializationException
protected void throwUnexpectedInitializationException(String actionDescription, String fullViewServiceName, Throwable error) throws OMAGConfigurationErrorException Log that an unexpected exception was received during start up.- Parameters:
actionDescription
- calling methodfullViewServiceName
- name of the view serviceerror
- exception that was caught- Throws:
OMAGConfigurationErrorException
- wrapped exception
-