Package org.ametys.plugins.core.ui.about
Class AboutInfoProvider
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.core.ui.about.AboutInfoProvider
- All Implemented Interfaces:
LogEnabled
,Component
,Contextualizable
,Serviceable
public class AboutInfoProvider
extends AbstractLogEnabled
implements Serviceable, Component, Contextualizable
Helper providing information (versions, licenses) on running application for "About Ametys" feature.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
contextualize
(Context context) Get the path of the application logogetApplicationName
(String lang) Gets the application nameGets the information for "About Ametys" featureGets the content of the license text.Gets the available versions of the application.void
service
(ServiceManager manager) Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
ROLE
The Avalon role
-
-
Constructor Details
-
AboutInfoProvider
public AboutInfoProvider()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
contextualize
- Specified by:
contextualize
in interfaceContextualizable
- Throws:
ContextException
-
getInfo
Gets the information for "About Ametys" feature- Parameters:
lang
- the lang- Returns:
- A map of information needed for "About Ametys" feature. Contains the application name, the versions of the application and the license text.
- Throws:
IOException
- if there are issue while reading the license file
-
getApplicationLogo
Get the path of the application logo- Returns:
- The path to the Ametys application logo.
-
getApplicationName
Gets the application name- Parameters:
lang
- The lang- Returns:
- The name of the application.
-
getVersions
Gets the available versions of the application.- Returns:
- The list of versions
-
getLicenseText
Gets the content of the license text.- Returns:
- The content of the license text.
- Throws:
IOException
- If the license file cannot be read
-