Class LogsClientSideElement
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.core.ui.StaticFileImportsClientSideElement
-
- org.ametys.core.ui.StaticClientSideElement
-
- org.ametys.runtime.plugins.admin.logs.LogsClientSideElement
-
- All Implemented Interfaces:
ClientSideElement
,LogEnabled
,PluginAware
,Configurable
,Serviceable
public class LogsClientSideElement extends StaticClientSideElement
Client side element for log actions
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.ametys.core.ui.ClientSideElement
ClientSideElement.Script, ClientSideElement.ScriptFile
-
-
Field Summary
-
Fields inherited from class org.ametys.core.ui.StaticFileImportsClientSideElement
_currentUserProvider, _dependencies, _featureName, _id, _pluginName, _rightManager, _rights, _rightsMode, _script
-
-
Constructor Summary
Constructors Constructor Description LogsClientSideElement()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,Object>
changeLogLevel(String level, String category)
Change the log level of the selected category to the selected levelMap<String,Object>
deleteLogs(List<String> files)
Delete the log filesMap<String,Object>
purgeLogs()
Delete the log entries that are at least 12 days oldvoid
service(ServiceManager serviceManager)
-
Methods inherited from class org.ametys.core.ui.StaticClientSideElement
_configureClass, _configureParameters, _configureScript, configureInitialParameters
-
Methods inherited from class org.ametys.core.ui.StaticFileImportsClientSideElement
_configureDependencies, _configureImports, _configureRights, _configureRightsMode, configure, getDependencies, getId, getPluginName, getRights, getScripts, getScripts, hasRight, setPluginInfo, toString
-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Constructor Detail
-
LogsClientSideElement
public LogsClientSideElement()
-
-
Method Detail
-
service
public void service(ServiceManager serviceManager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classStaticFileImportsClientSideElement
- Throws:
ServiceException
-
deleteLogs
public Map<String,Object> deleteLogs(List<String> files) throws ProcessingException, IOException
Delete the log files- Parameters:
files
- the files to delete- Returns:
- the result map with the successes and failures files.
- Throws:
IOException
- if an error occurred during deletionProcessingException
- if an error occurred during deletion
-
purgeLogs
public Map<String,Object> purgeLogs() throws ProcessingException
Delete the log entries that are at least 12 days old- Returns:
- the result
- Throws:
ProcessingException
- if an exception occurs while processing the deletion
-
-