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 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_MODE_INSTALL_OPTIONS, RUN_MODE_OPTIONS, RUN_MODES_PROPERTY, SLING_HOME, SLING_HOME_URL
 
Constructor Summary
SlingSettingsServiceImpl(org.osgi.framework.BundleContext context, org.apache.sling.launchpad.api.StartupHandler handler)
          Create the service and search the Sling home urls and get/create a sling id.
 
Method Summary
 String getAbsolutePathWithinSlingHome(String relativePath)
          Utility method to generate an absolute path within Sling Home.
 Set<String> getRunModes()
          Return the set of activate run modes.
 String getSlingDescription()
          Return the optional description of the instance.
 URL getSlingHome()
          Returns the value of the SlingSettingsService.SLING_HOME_URL property.
 String getSlingHomePath()
          Returns the value of the SlingSettingsService.SLING_HOME property.
 String getSlingId()
          The identifier of the running Sling instance.
 String getSlingName()
          Return the optional name of the instance.
 void update(Dictionary<String,Object> properties)
          Update the configuration of this service
 
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,
                                org.apache.sling.launchpad.api.StartupHandler handler)
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 String getAbsolutePathWithinSlingHome(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 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 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 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 Set<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()

getSlingName

public String getSlingName()
Description copied from interface: SlingSettingsService
Return the optional name of the instance.

Specified by:
getSlingName in interface SlingSettingsService
Returns:
The name of the instance or null.
See Also:
SlingSettingsService.getSlingName()

getSlingDescription

public String getSlingDescription()
Description copied from interface: SlingSettingsService
Return the optional description of the instance.

Specified by:
getSlingDescription in interface SlingSettingsService
Returns:
The description of the instance or null.
See Also:
SlingSettingsService.getSlingDescription()

update

public void update(Dictionary<String,Object> properties)
Update the configuration of this service



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