aQute.bnd.osgi.resource
Class PersistentResource

java.lang.Object
  extended by aQute.bnd.util.dto.DTO
      extended by aQute.bnd.osgi.resource.PersistentResource
All Implemented Interfaces:
Resource

public class PersistentResource
extends DTO
implements Resource

This class provides an efficient way to store a resource through JSON serialization. It stores the requirements and provides in a structure of Resource 1 -> * Namespace 1 -> * Req/Cap. It optimizes


Nested Class Summary
static class PersistentResource.Attr
           
static class PersistentResource.DataType
           
static class PersistentResource.Namespace
           
 class PersistentResource.RC
          Deprecated. 
static class PersistentResource.RCData
           
 
Field Summary
 PersistentResource.Namespace[] namespaces
           
 byte[] sha
           
 
Constructor Summary
PersistentResource()
           
PersistentResource(byte[] digest, List<Capability> caps, List<Requirement> reqs)
          Deprecated. 
PersistentResource(Resource resource)
           
 
Method Summary
 List<Capability> getCapabilities(String ns)
          Deprecated. 
static PersistentResource.RCData getData(Map<String,Object> attributes, Map<String,String> directives)
          Deprecated. 
 List<Requirement> getRequirements(String ns)
          Deprecated. 
 Resource getResource()
           
 String toString()
          Return a string representation of this DTO suitable for use when debugging.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.osgi.resource.Resource
equals, hashCode
 

Field Detail

namespaces

public PersistentResource.Namespace[] namespaces

sha

public byte[] sha
Constructor Detail

PersistentResource

public PersistentResource()

PersistentResource

public PersistentResource(Resource resource)

PersistentResource

@Deprecated
public PersistentResource(byte[] digest,
                                     List<Capability> caps,
                                     List<Requirement> reqs)
Deprecated. 

Method Detail

getResource

public Resource getResource()

toString

public String toString()
Description copied from class: DTO
Return a string representation of this DTO suitable for use when debugging.

The format of the string representation is not specified and subject to change.

Overrides:
toString in class DTO
Returns:
A string representation of this DTO suitable for use when debugging.

getCapabilities

@Deprecated
public List<Capability> getCapabilities(String ns)
Deprecated. 

Description copied from interface: Resource
Returns the capabilities declared by this resource.

Specified by:
getCapabilities in interface Resource
Parameters:
ns - The namespace of the declared capabilities to return or null to return the declared capabilities from all namespaces.
Returns:
An unmodifiable list containing the declared Capabilitys from the specified namespace. The returned list will be empty if this resource declares no capabilities in the specified namespace.

getRequirements

@Deprecated
public List<Requirement> getRequirements(String ns)
Deprecated. 

Description copied from interface: Resource
Returns the requirements declared by this bundle resource.

Specified by:
getRequirements in interface Resource
Parameters:
ns - The namespace of the declared requirements to return or null to return the declared requirements from all namespaces.
Returns:
An unmodifiable list containing the declared Requirement s from the specified namespace. The returned list will be empty if this resource declares no requirements in the specified namespace.

getData

@Deprecated
public static PersistentResource.RCData getData(Map<String,Object> attributes,
                                                           Map<String,String> directives)
Deprecated. 



Copyright © 2014 aQute SARL. All rights reserved.