org.apache.sling.settings.impl
Class SlingSettingsServiceImpl

java.lang.Object
  extended by org.apache.sling.settings.impl.SlingSettingsServiceImpl
All Implemented Interfaces:
SlingSettingsService

public class SlingSettingsServiceImpl
extends java.lang.Object
implements SlingSettingsService

This is the basic implementation of the sling settings service.


Field Summary
 
Fields inherited from interface org.apache.sling.settings.SlingSettingsService
RUN_MODES_PROPERTY, SLING_HOME, SLING_HOME_URL
 
Constructor Summary
SlingSettingsServiceImpl(org.osgi.framework.BundleContext context)
          Create the service and search the Sling home urls and get/create a sling id.
 
Method Summary
 java.lang.String getAbsolutePathWithinSlingHome(java.lang.String relativePath)
          Utility method to generate an absolute path within Sling Home.
 java.util.Set<java.lang.String> getRunModes()
          Return the set of activate run modes.
 java.net.URL getSlingHome()
          Returns the value of the SlingSettingsService.SLING_HOME_URL property.
 java.lang.String getSlingHomePath()
          Returns the value of the SlingSettingsService.SLING_HOME property.
 java.lang.String getSlingId()
          The identifier of the running Sling instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SlingSettingsServiceImpl

public SlingSettingsServiceImpl(org.osgi.framework.BundleContext context)
Create the service and search the Sling home urls and get/create a sling id. Setup run modes

Parameters:
context - The bundle context
Method Detail

getAbsolutePathWithinSlingHome

public java.lang.String getAbsolutePathWithinSlingHome(java.lang.String relativePath)
Description copied from interface: SlingSettingsService
Utility method to generate an absolute path within Sling Home.

Specified by:
getAbsolutePathWithinSlingHome in interface SlingSettingsService
See Also:
SlingSettingsService.getAbsolutePathWithinSlingHome(String)

getSlingId

public java.lang.String getSlingId()
Description copied from interface: SlingSettingsService
The identifier of the running Sling instance.

Specified by:
getSlingId in interface SlingSettingsService
See Also:
SlingSettingsService.getSlingId()

getSlingHome

public java.net.URL getSlingHome()
Description copied from interface: SlingSettingsService
Returns the value of the SlingSettingsService.SLING_HOME_URL property.

Specified by:
getSlingHome in interface SlingSettingsService
See Also:
SlingSettingsService.getSlingHome()

getSlingHomePath

public java.lang.String getSlingHomePath()
Description copied from interface: SlingSettingsService
Returns the value of the SlingSettingsService.SLING_HOME property.

Specified by:
getSlingHomePath in interface SlingSettingsService
See Also:
SlingSettingsService.getSlingHomePath()

getRunModes

public java.util.Set<java.lang.String> getRunModes()
Description copied from interface: SlingSettingsService
Return the set of activate run modes. This set might be empty.

Specified by:
getRunModes in interface SlingSettingsService
Returns:
A non modifiable set of run modes.
See Also:
SlingSettingsService.getRunModes()


Copyright © 2007-2012 The Apache Software Foundation. All Rights Reserved.