org.apache.sling.installer.core.impl.config
Class ConfigRemoveTask

java.lang.Object
  extended by org.apache.sling.installer.api.tasks.InstallTask
      extended by org.apache.sling.installer.core.impl.AbstractInstallTask
          extended by org.apache.sling.installer.core.impl.config.ConfigRemoveTask
All Implemented Interfaces:
Comparable<InstallTask>

public class ConfigRemoveTask
extends AbstractInstallTask

Remove a Configuration


Field Summary
protected  String configPid
          Configuration PID
protected  String factoryPid
          Factory PID or null
protected static Set<String> ignoredProperties
          Configuration properties to ignore when comparing configs
 
Constructor Summary
ConfigRemoveTask(TaskResourceGroup r, org.osgi.util.tracker.ServiceTracker configAdminServiceTracker)
           
 
Method Summary
 void execute(InstallationContext ctx)
          This is the heart of the task - it performs the actual task.
protected  String getCompositePid()
           
protected  org.osgi.service.cm.Configuration getConfiguration(org.osgi.service.cm.ConfigurationAdmin ca, boolean createIfNeeded)
           
protected  org.osgi.service.cm.ConfigurationAdmin getConfigurationAdmin()
          Get the configuration admin - if available
protected  Dictionary<String,Object> getDictionary()
           
 String getSortKey()
          Tasks are sorted according to this key.
protected  boolean isSameData(Dictionary<String,Object> a, Dictionary<String,Object> b)
          True if a and b represent the same config data, ignoring "non-configuration" keys in the dictionaries
 
Methods inherited from class org.apache.sling.installer.core.impl.AbstractInstallTask
getLogger
 
Methods inherited from class org.apache.sling.installer.api.tasks.InstallTask
compareTo, equals, getResource, getResourceGroup, hashCode, setFinishedState, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ignoredProperties

protected static final Set<String> ignoredProperties
Configuration properties to ignore when comparing configs


configPid

protected final String configPid
Configuration PID


factoryPid

protected final String factoryPid
Factory PID or null

Constructor Detail

ConfigRemoveTask

public ConfigRemoveTask(TaskResourceGroup r,
                        org.osgi.util.tracker.ServiceTracker configAdminServiceTracker)
Method Detail

getSortKey

public String getSortKey()
Description copied from class: InstallTask
Tasks are sorted according to this key. Therefore this key must uniquely identify this task. A typical sort key contains the entity id of the resource in execution.

Specified by:
getSortKey in class InstallTask

execute

public void execute(InstallationContext ctx)
Description copied from class: InstallTask
This is the heart of the task - it performs the actual task.

Specified by:
execute in class InstallTask
Parameters:
ctx - The installation context.
See Also:
InstallTask.execute(org.apache.sling.installer.api.tasks.InstallationContext)

getConfigurationAdmin

protected org.osgi.service.cm.ConfigurationAdmin getConfigurationAdmin()
Get the configuration admin - if available


getCompositePid

protected String getCompositePid()

getDictionary

protected Dictionary<String,Object> getDictionary()

getConfiguration

protected org.osgi.service.cm.Configuration getConfiguration(org.osgi.service.cm.ConfigurationAdmin ca,
                                                             boolean createIfNeeded)
                                                      throws IOException,
                                                             org.osgi.framework.InvalidSyntaxException
Throws:
IOException
org.osgi.framework.InvalidSyntaxException

isSameData

protected boolean isSameData(Dictionary<String,Object> a,
                             Dictionary<String,Object> b)
True if a and b represent the same config data, ignoring "non-configuration" keys in the dictionaries



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