Knopflerfish OSGi 5.2.0

org.knopflerfish.service.repositorymanager
Class BasicRequirement

java.lang.Object
  extended by org.knopflerfish.service.repositorymanager.BasicRequirement
All Implemented Interfaces:
Requirement

public class BasicRequirement
extends java.lang.Object
implements Requirement


Field Summary
static java.lang.String MIME_BUNDLE
          MIME type to be stored in the extra field of a ZipEntry object for an installable bundle file.
static java.lang.String MIME_BUNDLE_ALT
          Alternative MIME type to be stored in the extra field of a ZipEntry object for an installable bundle file.
 
Constructor Summary
BasicRequirement(java.lang.String ns)
           
BasicRequirement(java.lang.String ns, java.lang.String nsFilter)
           
 
Method Summary
 void addAttribute(java.lang.String key, java.lang.Object val)
           
 void addBundleContentFilter()
           
 void addBundleIdentityFilter()
           
 void addDirective(java.lang.String key, java.lang.String val)
           
 void addVersionRangeFilter(VersionRange versionRange)
           
 java.lang.String eq(java.lang.String l, java.lang.String r)
           
 java.util.Map<java.lang.String,java.lang.Object> getAttributes()
          Returns the attributes of this requirement.
 java.util.Map<java.lang.String,java.lang.String> getDirectives()
          Returns the directives of this requirement.
 java.lang.String getNamespace()
          Returns the namespace of this requirement.
 Resource getResource()
          Returns the resource declaring this requirement.
 java.lang.String multiOp(char op, java.lang.String... args)
           
 void multiOpFilter(char op, java.lang.String... andFilter)
           
 java.lang.String op(char op, java.lang.String l, java.lang.String r)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.osgi.resource.Requirement
equals, hashCode
 

Field Detail

MIME_BUNDLE

public static final java.lang.String MIME_BUNDLE
MIME type to be stored in the extra field of a ZipEntry object for an installable bundle file.

See Also:
ProvisioningService.MIME_BUNDLE, Constant Field Values

MIME_BUNDLE_ALT

public static final java.lang.String MIME_BUNDLE_ALT
Alternative MIME type to be stored in the extra field of a ZipEntry object for an installable bundle file.

See Also:
ProvisioningService.MIME_BUNDLE_ALT, Constant Field Values
Constructor Detail

BasicRequirement

public BasicRequirement(java.lang.String ns)

BasicRequirement

public BasicRequirement(java.lang.String ns,
                        java.lang.String nsFilter)
Method Detail

addAttribute

public void addAttribute(java.lang.String key,
                         java.lang.Object val)

addDirective

public void addDirective(java.lang.String key,
                         java.lang.String val)

getNamespace

public java.lang.String getNamespace()
Description copied from interface: Requirement
Returns the namespace of this requirement.

Specified by:
getNamespace in interface Requirement
Returns:
The namespace of this requirement.

getAttributes

public java.util.Map<java.lang.String,java.lang.Object> getAttributes()
Description copied from interface: Requirement
Returns the attributes of this requirement.

Requirement attributes have no specified semantics and are considered extra user defined information.

Specified by:
getAttributes in interface Requirement
Returns:
An unmodifiable map of attribute names to attribute values for this requirement, or an empty map if this requirement has no attributes.

getDirectives

public java.util.Map<java.lang.String,java.lang.String> getDirectives()
Description copied from interface: Requirement
Returns the directives of this requirement.

Specified by:
getDirectives in interface Requirement
Returns:
An unmodifiable map of directive names to directive values for this requirement, or an empty map if this requirement has no directives.

getResource

public Resource getResource()
Description copied from interface: Requirement
Returns the resource declaring this requirement.

Specified by:
getResource in interface Requirement
Returns:
The resource declaring this requirement. This can be null if this requirement is synthesized.

addBundleIdentityFilter

public void addBundleIdentityFilter()

addBundleContentFilter

public void addBundleContentFilter()

addVersionRangeFilter

public void addVersionRangeFilter(VersionRange versionRange)

multiOpFilter

public void multiOpFilter(char op,
                          java.lang.String... andFilter)

multiOp

public java.lang.String multiOp(char op,
                                java.lang.String... args)

op

public java.lang.String op(char op,
                           java.lang.String l,
                           java.lang.String r)

eq

public java.lang.String eq(java.lang.String l,
                           java.lang.String r)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Knopflerfish OSGi 5.2.0