dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #35130
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 18032: Made LocationManagerException unchecked. Added method to LocationManager.
------------------------------------------------------------
revno: 18032
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2015-01-16 18:56:23 +0100
message:
Made LocationManagerException unchecked. Added method to LocationManager.
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/external/location/LocationManager.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/external/location/LocationManagerException.java
dhis-2/dhis-support/dhis-support-external/src/main/java/org/hisp/dhis/external/location/DefaultLocationManager.java
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/external/location/LocationManager.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/external/location/LocationManager.java 2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/external/location/LocationManager.java 2015-01-16 17:56:23 +0000
@@ -158,6 +158,13 @@
*/
File getExternalDirectory()
throws LocationManagerException;
+
+ /**
+ * Gets the external configuration directory. A LocationManagerException is
+ * thrown if the external directory location is not set.
+ */
+ String getExternalDirectoryPath()
+ throws LocationManagerException;
/**
* Indicates whether the external configuration directory is set, valid,
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/external/location/LocationManagerException.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/external/location/LocationManagerException.java 2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/external/location/LocationManagerException.java 2015-01-16 17:56:23 +0000
@@ -33,7 +33,7 @@
* @version $Id$
*/
public class LocationManagerException
- extends Exception
+ extends RuntimeException
{
/**
* Determines if a de-serialized file is compatible with this class.
=== modified file 'dhis-2/dhis-support/dhis-support-external/src/main/java/org/hisp/dhis/external/location/DefaultLocationManager.java'
--- dhis-2/dhis-support/dhis-support-external/src/main/java/org/hisp/dhis/external/location/DefaultLocationManager.java 2014-10-16 06:17:19 +0000
+++ dhis-2/dhis-support/dhis-support-external/src/main/java/org/hisp/dhis/external/location/DefaultLocationManager.java 2015-01-16 17:56:23 +0000
@@ -273,6 +273,18 @@
}
@Override
+ public String getExternalDirectoryPath()
+ throws LocationManagerException
+ {
+ if ( externalDir == null )
+ {
+ throw new LocationManagerException( "External directory not set" );
+ }
+
+ return externalDir;
+ }
+
+ @Override
public boolean externalDirectorySet()
{
return externalDir != null;