Class ModelDiagController
- java.lang.Object
-
- com.evolveum.midpoint.model.impl.controller.ModelDiagController
-
- All Implemented Interfaces:
ModelDiagnosticService
@Component public class ModelDiagController extends Object implements ModelDiagnosticService
- Author:
- semancik
-
-
Field Summary
Fields Modifier and Type Field Description static StringCLASS_NAME_WITH_DOT-
Fields inherited from interface com.evolveum.midpoint.model.api.ModelDiagnosticService
EVALUATE_MAPPING, EXECUTE_REPOSITORY_QUERY, GET_LOG_FILE_CONTENT, GET_LOG_FILE_SIZE, GET_MEMORY_INFORMATION, PROVISIONING_SELF_TEST, REPOSITORY_SELF_TEST, REPOSITORY_TEST_ORG_CLOSURE_CONSISTENCY
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MappingEvaluationResponseTypeevaluateMapping(MappingEvaluationRequestType request, Task task, OperationResult parentResult)Execute arbitrary mapping.RepositoryQueryDiagResponseexecuteRepositoryQuery(RepositoryQueryDiagRequest request, Task task, OperationResult parentResult)Execute arbitrary implementation-specific query.StringexportDataModel(ResourceType resource, DataModelVisualizer.Target target, Task task, OperationResult parentResult)StringexportDataModel(Collection<String> resourceOids, DataModelVisualizer.Target target, Task task, OperationResult parentResult)Exports data model EXPERIMENTAL.LogFileContentTypegetLogFileContent(Long fromPosition, Long maxSize, Task task, OperationResult parentResult)Returns the contents of the log file.longgetLogFileSize(Task task, OperationResult parentResult)StringgetMemoryInformation(Task task, OperationResult parentResult)ProvisioningDiaggetProvisioningDiag(Task task, OperationResult parentResult)Provide provisioning run-time configuration and diagnostic information.RepositoryDiaggetRepositoryDiag(Task task, OperationResult parentResult)Provide repository run-time configuration and diagnostic information.OperationResultprovisioningSelfTest(Task task)Runs a short, non-destructive internal provisioning test.OperationResultrepositorySelfTest(Task task)Runs a short, non-destructive repository self test.voidrepositoryTestOrgClosureConsistency(Task task, boolean repairIfNecessary, OperationResult parentResult)Checks a org closure table for consistency, repairing any problems found.
-
-
-
Field Detail
-
CLASS_NAME_WITH_DOT
public static final String CLASS_NAME_WITH_DOT
-
-
Method Detail
-
getRepositoryDiag
public RepositoryDiag getRepositoryDiag(Task task, OperationResult parentResult)
Description copied from interface:ModelDiagnosticServiceProvide repository run-time configuration and diagnostic information.- Specified by:
getRepositoryDiagin interfaceModelDiagnosticService
-
repositorySelfTest
public OperationResult repositorySelfTest(Task task)
Description copied from interface:ModelDiagnosticServiceRuns a short, non-destructive repository self test. This methods should never throw a (checked) exception. All the results should be in the returned result structure (including fatal errors).- Specified by:
repositorySelfTestin interfaceModelDiagnosticService
-
repositoryTestOrgClosureConsistency
public void repositoryTestOrgClosureConsistency(Task task, boolean repairIfNecessary, OperationResult parentResult) throws SchemaException, SecurityViolationException, ObjectNotFoundException, ExpressionEvaluationException, ConfigurationException, CommunicationException
Description copied from interface:ModelDiagnosticServiceChecks a org closure table for consistency, repairing any problems found. This methods should never throw a (checked) exception. All the results should be in the returned result structure (including fatal errors). The current implementation expects closure to be of reasonable size - so it could be fetched into main memory as well as recomputed online (perhaps up to ~250K entries). In future, this method will be reimplemented. BEWARE, this method locks out the M_ORG_CLOSURE table, so org-related operations would wait until it completes. TODO this method is SQL service specific; it should be generalized/fixed somehow.
-
executeRepositoryQuery
public RepositoryQueryDiagResponse executeRepositoryQuery(RepositoryQueryDiagRequest request, Task task, OperationResult parentResult) throws SchemaException, SecurityViolationException, ObjectNotFoundException, ExpressionEvaluationException, ConfigurationException, CommunicationException
Description copied from interface:ModelDiagnosticServiceExecute arbitrary implementation-specific query. In current implementation this means hibernate query. EXPERIMENTAL.
-
evaluateMapping
public MappingEvaluationResponseType evaluateMapping(MappingEvaluationRequestType request, Task task, OperationResult parentResult) throws SchemaException, ExpressionEvaluationException, ObjectNotFoundException, CommunicationException, SecurityViolationException, ConfigurationException
Description copied from interface:ModelDiagnosticServiceExecute arbitrary mapping. EXPERIMENTAL
-
provisioningSelfTest
public OperationResult provisioningSelfTest(Task task)
Description copied from interface:ModelDiagnosticServiceRuns a short, non-destructive internal provisioning test. It tests provisioning framework and general setup. Use ModelService.testResource for testing individual resource configurations.- Specified by:
provisioningSelfTestin interfaceModelDiagnosticService
-
getProvisioningDiag
public ProvisioningDiag getProvisioningDiag(Task task, OperationResult parentResult)
Description copied from interface:ModelDiagnosticServiceProvide provisioning run-time configuration and diagnostic information.- Specified by:
getProvisioningDiagin interfaceModelDiagnosticService
-
exportDataModel
public String exportDataModel(Collection<String> resourceOids, DataModelVisualizer.Target target, Task task, OperationResult parentResult) throws SchemaException, ConfigurationException, ObjectNotFoundException, CommunicationException, SecurityViolationException, ExpressionEvaluationException
Description copied from interface:ModelDiagnosticServiceExports data model EXPERIMENTAL. (TODO find a better place)
-
exportDataModel
public String exportDataModel(ResourceType resource, DataModelVisualizer.Target target, Task task, OperationResult parentResult) throws SchemaException, ConfigurationException, ObjectNotFoundException, CommunicationException, SecurityViolationException
- Specified by:
exportDataModelin interfaceModelDiagnosticService- Throws:
SchemaExceptionConfigurationExceptionObjectNotFoundExceptionCommunicationExceptionSecurityViolationException
-
getLogFileContent
public LogFileContentType getLogFileContent(Long fromPosition, Long maxSize, Task task, OperationResult parentResult) throws SecurityViolationException, IOException, SchemaException, ObjectNotFoundException, ExpressionEvaluationException, CommunicationException, ConfigurationException
Description copied from interface:ModelDiagnosticServiceReturns the contents of the log file.- Specified by:
getLogFileContentin interfaceModelDiagnosticService- Parameters:
fromPosition- From absolute log file position (if non-negative); or counted from the end (if negative).maxSize- Max number of bytes to return.- Throws:
SecurityViolationExceptionIOExceptionSchemaExceptionObjectNotFoundExceptionExpressionEvaluationExceptionCommunicationExceptionConfigurationException
-
getLogFileSize
public long getLogFileSize(Task task, OperationResult parentResult) throws SchemaException, SecurityViolationException, ObjectNotFoundException, ExpressionEvaluationException, ConfigurationException, CommunicationException
-
getMemoryInformation
public String getMemoryInformation(Task task, OperationResult parentResult) throws CommunicationException, ObjectNotFoundException, SchemaException, SecurityViolationException, ConfigurationException, ExpressionEvaluationException, IOException
-
-