org.osgi.impl.bundle.obr.resource
Class RepositoryImpl

java.lang.Object
  extended by org.osgi.impl.bundle.obr.resource.RepositoryImpl
All Implemented Interfaces:
Repository

public class RepositoryImpl
extends Object
implements Repository

Implements the basic repository. A repository holds a set of resources.

Version:
$Revision: 44 $

Constructor Summary
RepositoryImpl(URL url)
          Each repository is identified by a single URL.
 
Method Summary
 long getLastModified()
           
 String getName()
          Return the name of this reposotory.
 int getRanking()
           
 Resource getResource(String id)
           
 Collection getResourceList()
           
 Resource[] getResources()
          Return the resources for this repository.
 URL getURL()
          Return the associated URL for the repository.
 boolean refresh()
          Refresh the repository from the URL.
 void setRanking(int ranking)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RepositoryImpl

public RepositoryImpl(URL url)
Each repository is identified by a single URL. A repository can hold referrals to other repositories. These referred repositories are included at the point of referall.

Parameters:
url -
Method Detail

refresh

public boolean refresh()
Refresh the repository from the URL.

Throws:
Exception

getURL

public URL getURL()
Description copied from interface: Repository
Return the associated URL for the repository.

Specified by:
getURL in interface Repository

getResourceList

public Collection getResourceList()
Returns:

getResources

public Resource[] getResources()
Description copied from interface: Repository
Return the resources for this repository.

Specified by:
getResources in interface Repository

getName

public String getName()
Description copied from interface: Repository
Return the name of this reposotory.

Specified by:
getName in interface Repository
Returns:
a non-null name

getResource

public Resource getResource(String id)

getLastModified

public long getLastModified()
Specified by:
getLastModified in interface Repository

getRanking

public int getRanking()

setRanking

public void setRanking(int ranking)


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