Package com.nomagic.magicdraw.core
Class EnvironmentSpecificFileLocations
java.lang.Object
com.nomagic.magicdraw.core.EnvironmentSpecificFileLocations
- All Implemented Interfaces:
FileLocationRegister
@OpenApi
public final class EnvironmentSpecificFileLocations
extends Object
implements FileLocationRegister
This class is for saving environment specific file locations.
-
Method Summary
Modifier and TypeMethodDescriptiongetFileLocation
(String locationNameID) This method should be used to get file object by locationNameID.Get instance.void
setFileLocation
(String locationNameID, File file) Before saving file locations file is checked if it still exists.
-
Method Details
-
getInstance
Get instance.- Returns:
- EnvironmentSpecificFileLocations type object.
-
getFileLocation
Description copied from interface:FileLocationRegister
This method should be used to get file object by locationNameID.- Specified by:
getFileLocation
in interfaceFileLocationRegister
- Parameters:
locationNameID
- a unique id for storing/getting file locations.- Returns:
- File type object.
-
setFileLocation
Before saving file locations file is checked if it still exists. It is done because user may delete directory, rename it, move it... If file location does not exist anymore default(User document directory) location is used.- Specified by:
setFileLocation
in interfaceFileLocationRegister
- Parameters:
locationNameID
- a unique id for storing/getting file locations.file
- type object
-