public class LoggingServiceMapImpl extends Object implements MockService, LoggingService
Constructor and Description |
---|
LoggingServiceMapImpl() |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clear all cached service data.
|
LogInfo |
createLog(String key,
String logTypeKey,
LogInfo logInfo,
ContextInfo contextInfo)
Creates a new Log.
|
LogEntryInfo |
createLogEntry(String logKey,
String logEntryTypeKey,
LogEntryInfo logEntryInfo,
ContextInfo contextInfo)
Creates a new Log Entry.
|
StatusInfo |
deleteLog(String logKey,
ContextInfo contextInfo)
Deletes an existing Log and all it's related parts
|
StatusInfo |
deleteLogEntry(String logEntryId,
ContextInfo contextInfo)
Deletes an existing Log Entry.
|
LogInfo |
findCreateLog(String logKey,
String logTypeKey,
ContextInfo contextInfo)
Finds/creates a log with the specified key and type.
|
LogInfo |
getLog(String logKey,
ContextInfo contextInfo)
Retrieves a Log by a Log ID
|
List<LogEntryInfo> |
getLogEntriesByIds(List<String> logEntryIds,
ContextInfo contextInfo)
Retrieves a list of log entries by a list of Log Entry IDs
|
List<LogEntryInfo> |
getLogEntriesByLog(String logKey,
ContextInfo contextInfo)
Get log entries for a log
|
LogEntryInfo |
getLogEntry(String logEntryId,
ContextInfo contextInfo)
Retrieves a Log Entry by a Log Entry ID
|
List<String> |
getLogEntryIdsByType(String logEntryTypeKey,
ContextInfo contextInfo)
Retrieves a list of Log Entry Ids by log type.
|
List<String> |
getLogKeysByType(String logTypeKey,
ContextInfo contextInfo)
Retrieves a list of Log Ids by log type.
|
List<LogInfo> |
getLogsByKeys(List<String> logKeys,
ContextInfo contextInfo)
Retrieves a list of logs by a list of Log IDs
|
StatusInfo |
logEntry(String logKey,
String logEntryTypeKey,
String levelTypeKey,
String logEntry,
ContextInfo contextInfo)
Convenience method to log a new entry quickly.
|
List<LogEntryInfo> |
searchForLogEntries(QueryByCriteria criteria,
ContextInfo contextInfo)
Searches for log entries based on the criteria and returns a list of logs which match the search criteria.
|
List<String> |
searchForLogEntryIds(QueryByCriteria criteria,
ContextInfo contextInfo)
Searches for Log Entry Ids based on the criteria and returns a list of Log Entry entries which match the search criteria.
|
List<String> |
searchForLogKeys(QueryByCriteria criteria,
ContextInfo contextInfo)
Searches for Log Ids based on the criteria and returns a list of Log entries which match the search criteria.
|
List<LogInfo> |
searchForLogs(QueryByCriteria criteria,
ContextInfo contextInfo)
Searches for logs based on the criteria and returns a list of logs which match the search criteria.
|
LogInfo |
updateLog(String logKey,
LogInfo logInfo,
ContextInfo contextInfo)
Updates an existing Log.
|
LogEntryInfo |
updateLogEntry(String logEntryId,
LogEntryInfo logEntryInfo,
ContextInfo contextInfo)
Updates an existing Log Entry.
|
List<ValidationResultInfo> |
validateLog(String validationTypeKey,
String logTypeKey,
LogInfo logInfo,
ContextInfo contextInfo)
Validates a Log.
|
List<ValidationResultInfo> |
validateLogEntry(String validationTypeKey,
String logEntryTypeKey,
String logKey,
LogEntryInfo logEntryInfo,
ContextInfo contextInfo)
Validates a LogEntry.
|
public LoggingServiceMapImpl()
public void clear()
MockService
clear
in interface MockService
public LogInfo getLog(String logKey, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException
LoggingService
getLog
in interface LoggingService
logKey
- the Log IDcontextInfo
- Context information containing the principalId and locale information about the caller of service
operationDoesNotExistException
- logKey not foundInvalidParameterException
- invalid logKey or contextInfoMissingParameterException
- logKey or contextInfo is missing or nullOperationFailedException
- unable to complete requestPermissionDeniedException
- an authorization failure occurredpublic List<LogInfo> getLogsByKeys(List<String> logKeys, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException
LoggingService
getLogsByKeys
in interface LoggingService
logKeys
- a list of Log IDscontextInfo
- Context information containing the principalId and locale information about the caller of service
operationDoesNotExistException
- logKey not foundInvalidParameterException
- invalid logKey or contextInfoMissingParameterException
- logKey or contextInfo is missing or nullOperationFailedException
- unable to complete requestPermissionDeniedException
- an authorization failure occurredpublic List<String> getLogKeysByType(String logTypeKey, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException
LoggingService
getLogKeysByType
in interface LoggingService
logTypeKey
- the logTypeKey to search bycontextInfo
- Context information containing the principalId and locale information about the caller of service
operationDoesNotExistException
- logKey not foundInvalidParameterException
- invalid logKey or contextInfoMissingParameterException
- logKey or contextInfo is missing or nullOperationFailedException
- unable to complete requestPermissionDeniedException
- an authorization failure occurredpublic List<String> searchForLogKeys(QueryByCriteria criteria, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException
LoggingService
searchForLogKeys
in interface LoggingService
criteria
- the search criteriacontextInfo
- Context information containing the principalId and locale information about the caller of service
operationInvalidParameterException
- invalid criteria or contextInfoMissingParameterException
- logKey or contextInfo is missing or nullOperationFailedException
- unable to complete requestPermissionDeniedException
- an authorization failure occurredpublic List<LogInfo> searchForLogs(QueryByCriteria criteria, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException
LoggingService
searchForLogs
in interface LoggingService
criteria
- the search criteriacontextInfo
- Context information containing the principalId and locale information about the caller of service
operationInvalidParameterException
- invalid logKey or contextInfoMissingParameterException
- logKey or contextInfo is missing or nullOperationFailedException
- unable to complete requestPermissionDeniedException
- an authorization failure occurredpublic List<ValidationResultInfo> validateLog(String validationTypeKey, String logTypeKey, LogInfo logInfo, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException
LoggingService
validateLog
in interface LoggingService
validationTypeKey
- the entry for the validation TypelogTypeKey
- the entry for the log type key to be validatedlogInfo
- the log to be validatedcontextInfo
- Context information containing the principalId and locale information about the caller of service
operationDoesNotExistException
- validationTypeKey or logTypeKey is not foundInvalidParameterException
- logInfo or contextInfo is not validMissingParameterException
- validationTypeKey, logTypeKey, logInfo, or contextInfo is missing or nullOperationFailedException
- unable to complete requestPermissionDeniedException
- an authorization failure occurredpublic LogInfo createLog(String key, String logTypeKey, LogInfo logInfo, ContextInfo contextInfo) throws AlreadyExistsException, DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException
LoggingService
createLog
in interface LoggingService
key
- to the new loglogTypeKey
- the entry for the log type to be validatedlogInfo
- the log to be validatedcontextInfo
- Context information containing the principalId and locale information about the caller of service
operationDataValidationErrorException
- supplied data is invalidDoesNotExistException
- logTypeKey does not exist or is not supportedInvalidParameterException
- logInfo or contextInfo is not validMissingParameterException
- logTypeKey, logInfo, or contextInfo is missing or nullOperationFailedException
- unable to complete requestPermissionDeniedException
- an authorization failure occurredReadOnlyException
- an attempt at supplying information designated as read onlyAlreadyExistsException
public LogInfo findCreateLog(String logKey, String logTypeKey, ContextInfo contextInfo) throws DataValidationErrorException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException
LoggingService
findCreateLog
in interface LoggingService
logKey
- key to the loglogTypeKey
- type of logcontextInfo
- Context information containing the principalId and locale information about the caller of service
operationDataValidationErrorException
- supplied data is invalidInvalidParameterException
- logInfo or contextInfo is not validMissingParameterException
- logTypeKey, logInfo, or contextInfo is missing or nullOperationFailedException
- unable to complete requestPermissionDeniedException
- an authorization failure occurredReadOnlyException
- an attempt at supplying information designated as read onlypublic LogInfo updateLog(String logKey, LogInfo logInfo, ContextInfo contextInfo) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException, VersionMismatchException
LoggingService
updateLog
in interface LoggingService
logKey
- the entry for the Log to be updatedlogInfo
- the log to be validatedcontextInfo
- Context information containing the principalId and locale information about the caller of service
operationDataValidationErrorException
- supplied data is invalidDoesNotExistException
- logKey is not foundInvalidParameterException
- logKey, logInfo or contextInfo is not validMissingParameterException
- logKey, logInfo, or contextInfo is missing or nullOperationFailedException
- unable to complete requestPermissionDeniedException
- an authorization failure occurredReadOnlyException
- an attempt at supplying information designated as read onlyVersionMismatchException
- if someone else has updated this log record since you fetched the version you are
updating.public StatusInfo deleteLog(String logKey, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException
LoggingService
deleteLog
in interface LoggingService
logKey
- the entry for the log to be deletedcontextInfo
- Context information containing the principalId and locale information about the caller of service
operationDoesNotExistException
- logInfo is not foundInvalidParameterException
- logInfo or contextInfo is not validMissingParameterException
- logInfo or contextInfo is missing or nullOperationFailedException
- unable to complete requestPermissionDeniedException
- an authorization failure occurredpublic LogEntryInfo getLogEntry(String logEntryId, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException
LoggingService
getLogEntry
in interface LoggingService
logEntryId
- the Log Entry IDcontextInfo
- Context information containing the principalId and locale information about the caller of service
operationDoesNotExistException
- logEntryId not foundInvalidParameterException
- invalid logEntryId or contextInfoMissingParameterException
- logEntryId or contextInfo is missing or nullOperationFailedException
- unable to complete requestPermissionDeniedException
- an authorization failure occurredpublic List<LogEntryInfo> getLogEntriesByIds(List<String> logEntryIds, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException
LoggingService
getLogEntriesByIds
in interface LoggingService
logEntryIds
- a list of Log Entry IDscontextInfo
- Context information containing the principalId and locale information about the caller of service
operationDoesNotExistException
- logEntryId not foundInvalidParameterException
- invalid logEntryId or contextInfoMissingParameterException
- logEntryId or contextInfo is missing or nullOperationFailedException
- unable to complete requestPermissionDeniedException
- an authorization failure occurredpublic List<String> getLogEntryIdsByType(String logEntryTypeKey, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException
LoggingService
getLogEntryIdsByType
in interface LoggingService
logEntryTypeKey
- the logEntry Type Key to search bycontextInfo
- Context information containing the principalId and locale information about the caller of service
operationDoesNotExistException
- logEntryTypeKey not foundInvalidParameterException
- invalid logEntryTypeKey or contextInfoMissingParameterException
- logEntryTypeKey or contextInfo is missing or nullOperationFailedException
- unable to complete requestPermissionDeniedException
- an authorization failure occurredpublic List<String> searchForLogEntryIds(QueryByCriteria criteria, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException
LoggingService
searchForLogEntryIds
in interface LoggingService
criteria
- the search criteriacontextInfo
- Context information containing the principalId and locale information about the caller of service
operationInvalidParameterException
- invalid criteria or contextInfoMissingParameterException
- criteria or contextInfo is missing or nullOperationFailedException
- unable to complete requestPermissionDeniedException
- an authorization failure occurredpublic List<LogEntryInfo> searchForLogEntries(QueryByCriteria criteria, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException
LoggingService
searchForLogEntries
in interface LoggingService
criteria
- the search criteriacontextInfo
- Context information containing the principalId and locale information about the caller of service
operationInvalidParameterException
- invalid criteria or contextInfoMissingParameterException
- criteria or contextInfo is missing or nullOperationFailedException
- unable to complete requestPermissionDeniedException
- an authorization failure occurredpublic List<ValidationResultInfo> validateLogEntry(String validationTypeKey, String logEntryTypeKey, String logKey, LogEntryInfo logEntryInfo, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException
LoggingService
validateLogEntry
in interface LoggingService
validationTypeKey
- the entry for the validation TypelogEntryTypeKey
- the entry for the log entry type to be validatedlogKey
- id of log for whom this entry is being appliedlogEntryInfo
- the log to be validatedcontextInfo
- Context information containing the principalId and locale information about the caller of service
operationDoesNotExistException
- validationTypeKey or logEntryTypeKey is not foundInvalidParameterException
- logEntryInfo or contextInfo is not validMissingParameterException
- validationTypeKey, logEntryTypeKey, logEntryInfo, or contextInfo is missing or nullOperationFailedException
- unable to complete requestPermissionDeniedException
- an authorization failure occurredpublic LogEntryInfo createLogEntry(String logKey, String logEntryTypeKey, LogEntryInfo logEntryInfo, ContextInfo contextInfo) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException
LoggingService
createLogEntry
in interface LoggingService
logKey
- id of the log to whom this entry is attachedlogEntryTypeKey
- the entry for the log entry Type to assign to this entry objectlogEntryInfo
- the log to be createdcontextInfo
- Context information containing the principalId and locale information about the caller of service
operationDataValidationErrorException
- supplied data is invalidDoesNotExistException
- logEntryType does not exist or is not supportedInvalidParameterException
- logInfo or contextInfo is not validMissingParameterException
- logEntryType, logEntryInfo, or contextInfo is missing or nullOperationFailedException
- unable to complete requestPermissionDeniedException
- an authorization failure occurredReadOnlyException
- an attempt at supplying information designated as read onlypublic StatusInfo logEntry(String logKey, String logEntryTypeKey, String levelTypeKey, String logEntry, ContextInfo contextInfo) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException
LoggingService
logEntry
in interface LoggingService
logKey
- of the log to whom this entry is attachedlogEntryTypeKey
- the entry for the log entry Type to assign to this entry objectlevelTypeKey
- log level type keylogEntry
- the entry to be loggedcontextInfo
- Context information containing the principalId and locale information about the caller of service
operationDataValidationErrorException
- supplied data is invalidDoesNotExistException
- logEntryType does not exist or is not supportedInvalidParameterException
- logInfo or contextInfo is not validMissingParameterException
- logEntryType, logEntryInfo, or contextInfo is missing or nullOperationFailedException
- unable to complete requestPermissionDeniedException
- an authorization failure occurredReadOnlyException
- an attempt at supplying information designated as read onlypublic LogEntryInfo updateLogEntry(String logEntryId, LogEntryInfo logEntryInfo, ContextInfo contextInfo) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException, VersionMismatchException
LoggingService
updateLogEntry
in interface LoggingService
logEntryId
- the entry for the LogEntry to be updatedlogEntryInfo
- the log to be validatedcontextInfo
- Context information containing the principalId and locale information about the caller of service
operationDataValidationErrorException
- supplied data is invalidDoesNotExistException
- logKey is not foundInvalidParameterException
- logKey, logEntryInfo or contextInfo is not validMissingParameterException
- logKey, logEntryInfo, or contextInfo is missing or nullOperationFailedException
- unable to complete requestPermissionDeniedException
- an authorization failure occurredReadOnlyException
- an attempt at supplying information designated as read onlyVersionMismatchException
- if someone else has updated this log record since you fetched the version you are
updating.public StatusInfo deleteLogEntry(String logEntryId, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException
LoggingService
deleteLogEntry
in interface LoggingService
logEntryId
- the entry for the log entry record to be deletedcontextInfo
- Context information containing the principalId and locale information about the caller of service
operationDoesNotExistException
- logEntryId is not foundInvalidParameterException
- logEntryId or contextInfo is not validMissingParameterException
- logEntryId or contextInfo is missing or nullOperationFailedException
- unable to complete requestPermissionDeniedException
- an authorization failure occurredpublic List<LogEntryInfo> getLogEntriesByLog(String logKey, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException
LoggingService
getLogEntriesByLog
in interface LoggingService
logKey
- the entry for the logcontextInfo
- Context information containing the principalId and locale information about the caller of service
operationDoesNotExistException
- logKey is not foundInvalidParameterException
- logKey or contextInfo is not validMissingParameterException
- logKey or contextInfo is missing or nullOperationFailedException
- unable to complete requestPermissionDeniedException
- an authorization failure occurredCopyright © 2004-2014 The Kuali Foundation. All Rights Reserved.