public class ConfigFetch
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
ConfigFetch.Environment
This enum provides info if Neptus is running from jars or
by a development environment (e.g.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DS
This is the directory separator from
System .getProperty("file.separator"). |
static ConfigFetch |
INSTANCE
This is the static instance of the
ConfigFetch . |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getChecklistSchemaLocation() |
static java.lang.String |
getCompilationDate() |
static java.lang.String |
getConfFolder() |
static java.lang.String |
getConfigFile() |
static java.lang.String |
getConsoleSchemaLocation() |
static java.lang.String |
getConsolesFolder() |
static java.lang.String |
getCoordinateSystemSchemaLocation() |
static java.lang.String |
getCoordinateSystemsConfigLocation() |
static NeptusProperty.DistributionEnum |
getDistributionType()
Return the type of distribution used.
|
static java.util.List<java.awt.Image> |
getIconImagesForFrames() |
static java.lang.String |
getLoggingPropertiesLocation()
returns the central properties file for log4j Loggers.
|
static java.lang.String |
getLogsDownloadedFolder() |
static java.lang.String |
getLogsFolder() |
static java.lang.String |
getMapSchemaLocation() |
static java.lang.String |
getMapsFolder() |
static java.lang.String |
getMissionSchemaLocation() |
static java.lang.String |
getMissionsFolder() |
static java.lang.String |
getNeptusTmpDir() |
static java.lang.String |
getNeptusVersion() |
static ConfigFetch.Environment |
getRunEnvironment()
Return the information if Neptus is running from jars or development environment.
|
static java.lang.String |
getSaveAsCommentForXML()
The comment text to be put on XML or other files saved.
|
static java.lang.String |
getScmRev() |
static java.awt.Frame |
getSuperParentAsFrame()
This return the current parent (the console or MRA visible) as
Frame
(if not possible return a new Frame ). |
static java.awt.Component |
getSuperParentFrame()
This return the current parent (the console or MRA visible).
|
static java.lang.String |
getUserHomeFolder() |
static java.lang.String |
getVehicleSchemaLocation() |
static java.lang.String |
getVehiclesDefsFolder() |
static java.util.LinkedList<java.lang.String> |
getVehiclesList() |
static java.lang.String |
getVersionSimpleString() |
static boolean |
initialize() |
static boolean |
initialize(java.lang.String configFile) |
static boolean |
isOnLockedMode()
Return if is on lock mode.
|
static void |
main(java.lang.String[] args) |
static java.lang.String |
resolvePath(java.lang.String path)
Tries to resolve a relative path.
|
static java.lang.String |
resolvePathBasedOnConfigFile(java.lang.String filePath)
Resolves a path based on a parent or the original path if it's already absolute.
|
static java.lang.String |
resolvePathWithParent(java.lang.String parentPath,
java.lang.String filePath)
Resolves a path based on a parent or the original path if it's alredy absolute.
|
static boolean |
setDistributionType(NeptusProperty.DistributionEnum dist)
Sets the type of distribution used.
|
static void |
setOnLockedMode(boolean onLockedMode)
Sets if is on lock mode.
|
static void |
setSuperParentFrame(java.awt.Component superParentFrame)
This is to set the current parent (the console or MRA visible).
|
static void |
setSuperParentFrameForced(java.awt.Component superParentFrame)
This is to set the current parent (the console or MRA visible).
|
public static ConfigFetch INSTANCE
ConfigFetch
.
To be initialized call first ConfigFetch
initialize()
or ConfigFetch
initialize(String)
.public static final java.lang.String DS
System
.getProperty("file.separator").public static boolean initialize()
ConfigFetch()
public static boolean initialize(java.lang.String configFile)
ConfigFetch(String)
public static java.lang.String resolvePath(java.lang.String path)
init()
.</li> <li>Looks in one
level down from the path given by init()
.</li> <li>Looks in the path given by
init()
+ "../classes".</li> <li>Looks in the path given by init()
+
"../config".</li> <li>Looks in the path given by init()
+ "../files".</li>
<li>Looks in the path given by init()
+ "../images".</li> <li>Looks in two level down
from the path given by init()
.</li> </ul>path
- Relative path to resolve.public static java.lang.String resolvePathWithParent(java.lang.String parentPath, java.lang.String filePath)
parentPath
- filePath
- public static java.lang.String resolvePathBasedOnConfigFile(java.lang.String filePath)
getConfigFile()
filePath
- #resolvePathWithParent(String, String)}
public static java.lang.String getUserHomeFolder()
public static java.lang.String getConfigFile()
public static java.lang.String getConfFolder()
public static java.lang.String getMissionsFolder()
public static java.lang.String getConsolesFolder()
public static java.lang.String getLogsFolder()
public static java.lang.String getLogsDownloadedFolder()
public static java.lang.String getMapsFolder()
public static java.lang.String getVehiclesDefsFolder()
public static java.lang.String getLoggingPropertiesLocation()
public static java.lang.String getCoordinateSystemsConfigLocation()
public static java.util.LinkedList<java.lang.String> getVehiclesList()
public static java.lang.String getMissionSchemaLocation()
public static java.lang.String getVehicleSchemaLocation()
public static java.lang.String getMapSchemaLocation()
public static java.lang.String getCoordinateSystemSchemaLocation()
public static java.lang.String getChecklistSchemaLocation()
public static java.lang.String getConsoleSchemaLocation()
public static java.lang.String getVersionSimpleString()
public static java.lang.String getSaveAsCommentForXML()
public static java.awt.Component getSuperParentFrame()
public static java.awt.Frame getSuperParentAsFrame()
Frame
(if not possible return a new Frame
).
This should only be used if no other means to get a valid parent can be usedpublic static void setSuperParentFrame(java.awt.Component superParentFrame)
superParentFrame
- The superParentFrame to set.public static void setSuperParentFrameForced(java.awt.Component superParentFrame)
superParentFrame
- The superParentFrame to set.public static java.lang.String getNeptusVersion()
public static java.lang.String getCompilationDate()
public static java.lang.String getScmRev()
public static java.lang.String getNeptusTmpDir()
public static boolean isOnLockedMode()
getDistributionType()
instead.public static void setOnLockedMode(boolean onLockedMode)
getDistributionType()
instead.onLockedMode
- public static java.util.List<java.awt.Image> getIconImagesForFrames()
Image
s to be set to frames.public static ConfigFetch.Environment getRunEnvironment()
public static NeptusProperty.DistributionEnum getDistributionType()
NeptusProperty.DistributionEnum
public static boolean setDistributionType(NeptusProperty.DistributionEnum dist)
NeptusProperty.DistributionEnum
Only one set is possible.dist
- public static void main(java.lang.String[] args)
args
- Copyright © 2004-2020 FEUP-LSTS and Neptus developers. All Rights Reserved.