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 String
CLASS_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 MappingEvaluationResponseType
evaluateMapping(MappingEvaluationRequestType request, Task task, OperationResult parentResult)
Execute arbitrary mapping.RepositoryQueryDiagResponse
executeRepositoryQuery(RepositoryQueryDiagRequest request, Task task, OperationResult parentResult)
Execute arbitrary implementation-specific query.String
exportDataModel(ResourceType resource, DataModelVisualizer.Target target, Task task, OperationResult parentResult)
String
exportDataModel(Collection<String> resourceOids, DataModelVisualizer.Target target, Task task, OperationResult parentResult)
Exports data model EXPERIMENTAL.LogFileContentType
getLogFileContent(Long fromPosition, Long maxSize, Task task, OperationResult parentResult)
Returns the contents of the log file.long
getLogFileSize(Task task, OperationResult parentResult)
String
getMemoryInformation(Task task, OperationResult parentResult)
ProvisioningDiag
getProvisioningDiag(Task task, OperationResult parentResult)
Provide provisioning run-time configuration and diagnostic information.RepositoryDiag
getRepositoryDiag(Task task, OperationResult parentResult)
Provide repository run-time configuration and diagnostic information.OperationResult
provisioningSelfTest(Task task)
Runs a short, non-destructive internal provisioning test.OperationResult
repositorySelfTest(Task task)
Runs a short, non-destructive repository self test.void
repositoryTestOrgClosureConsistency(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:ModelDiagnosticService
Provide repository run-time configuration and diagnostic information.- Specified by:
getRepositoryDiag
in interfaceModelDiagnosticService
-
repositorySelfTest
public OperationResult repositorySelfTest(Task task)
Description copied from interface:ModelDiagnosticService
Runs 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:
repositorySelfTest
in interfaceModelDiagnosticService
-
repositoryTestOrgClosureConsistency
public void repositoryTestOrgClosureConsistency(Task task, boolean repairIfNecessary, OperationResult parentResult) throws SchemaException, SecurityViolationException, ObjectNotFoundException, ExpressionEvaluationException, ConfigurationException, CommunicationException
Description copied from interface:ModelDiagnosticService
Checks 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:ModelDiagnosticService
Execute 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:ModelDiagnosticService
Execute arbitrary mapping. EXPERIMENTAL
-
provisioningSelfTest
public OperationResult provisioningSelfTest(Task task)
Description copied from interface:ModelDiagnosticService
Runs a short, non-destructive internal provisioning test. It tests provisioning framework and general setup. Use ModelService.testResource for testing individual resource configurations.- Specified by:
provisioningSelfTest
in interfaceModelDiagnosticService
-
getProvisioningDiag
public ProvisioningDiag getProvisioningDiag(Task task, OperationResult parentResult)
Description copied from interface:ModelDiagnosticService
Provide provisioning run-time configuration and diagnostic information.- Specified by:
getProvisioningDiag
in 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:ModelDiagnosticService
Exports 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:
exportDataModel
in interfaceModelDiagnosticService
- Throws:
SchemaException
ConfigurationException
ObjectNotFoundException
CommunicationException
SecurityViolationException
-
getLogFileContent
public LogFileContentType getLogFileContent(Long fromPosition, Long maxSize, Task task, OperationResult parentResult) throws SecurityViolationException, IOException, SchemaException, ObjectNotFoundException, ExpressionEvaluationException, CommunicationException, ConfigurationException
Description copied from interface:ModelDiagnosticService
Returns the contents of the log file.- Specified by:
getLogFileContent
in 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:
SecurityViolationException
IOException
SchemaException
ObjectNotFoundException
ExpressionEvaluationException
CommunicationException
ConfigurationException
-
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
-
-