incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jus...@apache.org
Subject svn commit: r1134512 - in /sling/trunk/bundles/extensions/settings: pom.xml src/main/java/org/apache/sling/settings/SlingSettingsService.java src/main/java/org/apache/sling/settings/impl/SlingSettingsServiceImpl.java
Date Sat, 11 Jun 2011 03:14:16 GMT
Author: justin
Date: Sat Jun 11 03:14:16 2011
New Revision: 1134512

URL: http://svn.apache.org/viewvc?rev=1134512&view=rev
Log:
SLING-2089 - adding getAbsolutePathWithinSlingHome() method

Modified:
    sling/trunk/bundles/extensions/settings/pom.xml
    sling/trunk/bundles/extensions/settings/src/main/java/org/apache/sling/settings/SlingSettingsService.java
    sling/trunk/bundles/extensions/settings/src/main/java/org/apache/sling/settings/impl/SlingSettingsServiceImpl.java

Modified: sling/trunk/bundles/extensions/settings/pom.xml
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/settings/pom.xml?rev=1134512&r1=1134511&r2=1134512&view=diff
==============================================================================
--- sling/trunk/bundles/extensions/settings/pom.xml (original)
+++ sling/trunk/bundles/extensions/settings/pom.xml Sat Jun 11 03:14:16 2011
@@ -65,7 +65,7 @@
                             http://sling.apache.org/site/sling-settings-orgapacheslingsettings.html
                         </Bundle-DocURL>
                         <Export-Package>
-                            org.apache.sling.settings;version=1.0.0
+                            org.apache.sling.settings;version=1.1.0
                         </Export-Package>
                         <Private-Package>
                             org.apache.sling.settings.impl

Modified: sling/trunk/bundles/extensions/settings/src/main/java/org/apache/sling/settings/SlingSettingsService.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/settings/src/main/java/org/apache/sling/settings/SlingSettingsService.java?rev=1134512&r1=1134511&r2=1134512&view=diff
==============================================================================
--- sling/trunk/bundles/extensions/settings/src/main/java/org/apache/sling/settings/SlingSettingsService.java
(original)
+++ sling/trunk/bundles/extensions/settings/src/main/java/org/apache/sling/settings/SlingSettingsService.java
Sat Jun 11 03:14:16 2011
@@ -67,6 +67,13 @@ public interface SlingSettingsService {
      */
     String RUN_MODES_PROPERTY = "sling.run.modes";
 
+    /**
+     * Utility method to generate an absolute path
+     * within Sling Home.
+     *
+     * @since 1.1.0
+     */
+    String getAbsolutePathWithinSlingHome(String relativePath);
 
     /**
      * The identifier of the running Sling instance.

Modified: sling/trunk/bundles/extensions/settings/src/main/java/org/apache/sling/settings/impl/SlingSettingsServiceImpl.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/settings/src/main/java/org/apache/sling/settings/impl/SlingSettingsServiceImpl.java?rev=1134512&r1=1134511&r2=1134512&view=diff
==============================================================================
--- sling/trunk/bundles/extensions/settings/src/main/java/org/apache/sling/settings/impl/SlingSettingsServiceImpl.java
(original)
+++ sling/trunk/bundles/extensions/settings/src/main/java/org/apache/sling/settings/impl/SlingSettingsServiceImpl.java
Sat Jun 11 03:14:16 2011
@@ -23,6 +23,8 @@ import java.io.FileInputStream;
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.net.MalformedURLException;
+import java.net.URI;
+import java.net.URISyntaxException;
 import java.net.URL;
 import java.util.Collections;
 import java.util.HashSet;
@@ -62,7 +64,6 @@ public class SlingSettingsServiceImpl
 
     /** Flag indicating a delayed start of this service. */
     private boolean delayedStart = false;
-
     /**
      * Create the service and search the Sling home urls and
      * get/create a sling id.
@@ -216,6 +217,14 @@ public class SlingSettingsServiceImpl
         return null;
     }
 
+
+    /**
+     * @see org.apache.sling.settings.SlingSettingsService#getAbsolutePathWithinSlingHome()
+     */
+    public String getAbsolutePathWithinSlingHome(String relativePath) {
+        return new File(slingHome, relativePath).getAbsolutePath();
+    }
+
     /**
      * @see org.apache.sling.settings.SlingSettingsService#getSlingId()
      */



Mime
View raw message