Package org.ametys.core.ui
Class ClientSideElement.ScriptFile
- java.lang.Object
-
- org.ametys.core.ui.ClientSideElement.ScriptFile
-
- Enclosing interface:
- ClientSideElement
public static class ClientSideElement.ScriptFile extends Object
This class represents a script file
-
-
Constructor Summary
Constructors Constructor Description ScriptFile(String path)
Default constructor.ScriptFile(String rtl, String path)
Create a new script file that is not language aware.ScriptFile(Map<String,String> langPaths, String defaultLang)
Create a new script file with a language specific configuration.ScriptFile(ClientSideElement.ScriptFile scriptFile)
Clone a script file
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getDefaultLang()
Get the default languageMap<String,String>
getLangPaths()
Get the path mapping by languageString
getPath()
Get the file pathString
getRtlMode()
Get the rtl modeboolean
isLangSpecific()
Retrieve the language modeString
toString()
-
-
-
Constructor Detail
-
ScriptFile
public ScriptFile(String path)
Default constructor. Create a new script only defined by its path.- Parameters:
path
- The script path
-
ScriptFile
public ScriptFile(String rtl, String path)
Create a new script file that is not language aware.- Parameters:
rtl
- The rtl mode. Can be null.path
- The file path.
-
ScriptFile
public ScriptFile(Map<String,String> langPaths, String defaultLang)
Create a new script file with a language specific configuration.- Parameters:
langPaths
- The list of languages with their paths.defaultLang
- The default language code. Can be null.
-
ScriptFile
public ScriptFile(ClientSideElement.ScriptFile scriptFile)
Clone a script file- Parameters:
scriptFile
- The script file to clone
-
-
Method Detail
-
getRtlMode
public String getRtlMode()
Get the rtl mode- Returns:
- the the rtl mode
-
isLangSpecific
public boolean isLangSpecific()
Retrieve the language mode- Returns:
- True if the script file is language specific
-
getLangPaths
public Map<String,String> getLangPaths()
Get the path mapping by language- Returns:
- the paths by languages
-
getDefaultLang
public String getDefaultLang()
Get the default language- Returns:
- the the default language
-
-