org.apache.ace.deployment.task
Class DeploymentTaskBase

java.lang.Object
  extended by org.apache.ace.deployment.task.DeploymentTaskBase
Direct Known Subclasses:
DeploymentCheckTask, DeploymentUpdateTask

public class DeploymentTaskBase
extends Object


Field Summary
protected  org.apache.ace.deployment.Deployment m_deployer
           
protected  org.apache.ace.discovery.Discovery m_discovery
           
protected  org.osgi.service.event.EventAdmin m_eventAdmin
           
protected  org.apache.ace.identification.Identification m_identification
           
protected  org.osgi.service.log.LogService m_log
           
 
Constructor Summary
DeploymentTaskBase()
           
 
Method Summary
 org.osgi.framework.Version getHighestLocalVersion()
          Returns the highest version that is available locally (already installed).
 org.osgi.framework.Version getHighestRemoteVersion(URL url)
          Returns the highest version that is available remotely.
 void installVersion(URL url, org.osgi.framework.Version highestRemoteVersion, org.osgi.framework.Version highestLocalVersion)
          Installs the version specified by the highestRemoteVersion.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_deployer

protected volatile org.apache.ace.deployment.Deployment m_deployer

m_identification

protected volatile org.apache.ace.identification.Identification m_identification

m_discovery

protected volatile org.apache.ace.discovery.Discovery m_discovery

m_log

protected volatile org.osgi.service.log.LogService m_log

m_eventAdmin

protected volatile org.osgi.service.event.EventAdmin m_eventAdmin
Constructor Detail

DeploymentTaskBase

public DeploymentTaskBase()
Method Detail

installVersion

public void installVersion(URL url,
                           org.osgi.framework.Version highestRemoteVersion,
                           org.osgi.framework.Version highestLocalVersion)
                    throws IOException,
                           Exception
Installs the version specified by the highestRemoteVersion.

Parameters:
url - Base URL for retrieving a specific version
highestRemoteVersion - The version to retrieve and install
highestLocalVersion - The current version or null in case of none.
Throws:
IOException
Exception

getHighestLocalVersion

public org.osgi.framework.Version getHighestLocalVersion()
Returns the highest version that is available locally (already installed).

Returns:
The highest installed version or null if no version is available locally.

getHighestRemoteVersion

public org.osgi.framework.Version getHighestRemoteVersion(URL url)
Returns the highest version that is available remotely.

Parameters:
url - The URL to be used to retrieve the versions available on the remote.
Returns:
The highest version available on the remote or null if no versions were available or the remote could not be reached.


Copyright © 2009-2011 The Apache Software Foundation. All Rights Reserved.