Class SignerProperty

java.lang.Object
org.osgi.framework.SignerProperty

final class SignerProperty extends Object
Package private class used by permissions for filter matching on signer key during filter expression evaluation in the permission implies method.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final Bundle
     
    private final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    String constructor used by the filter matching algorithm to construct a SignerProperty from the attribute value in a filter expression.
    Used by the permission implies method to build the properties for a filter match.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Used by the filter matching algorithm.
    int
    Since the equals method does not obey the general equals contract, this method cannot generate hash codes which obey the equals contract.
    (package private) boolean
    Check if the bundle is signed.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • bundle

      private final Bundle bundle
    • pattern

      private final String pattern
  • Constructor Details

    • SignerProperty

      public SignerProperty(String pattern)
      String constructor used by the filter matching algorithm to construct a SignerProperty from the attribute value in a filter expression.
      Parameters:
      pattern - Attribute value in the filter expression.
    • SignerProperty

      SignerProperty(Bundle bundle)
      Used by the permission implies method to build the properties for a filter match.
      Parameters:
      bundle - The bundle whose signers are to be matched.
  • Method Details

    • equals

      public boolean equals(Object o)
      Used by the filter matching algorithm. This methods does NOT satisfy the normal equals contract. Since the class is only used in filter expression evaluations, it only needs to support comparing an instance created with a Bundle to an instance created with a pattern string from the filter expression.
      Overrides:
      equals in class Object
      Parameters:
      o - SignerProperty to compare against.
      Returns:
      true if the DN name chain matches the pattern.
    • hashCode

      public int hashCode()
      Since the equals method does not obey the general equals contract, this method cannot generate hash codes which obey the equals contract.
      Overrides:
      hashCode in class Object
    • isBundleSigned

      boolean isBundleSigned()
      Check if the bundle is signed.
      Returns:
      true if constructed with a bundle that is signed.