Interface UnsignedAppletActionStorage

All Known Implementing Classes:
UnsignedAppletActionStorageExtendedImpl, UnsignedAppletActionStorageImpl

public interface UnsignedAppletActionStorage
This is abstract access to white/blacklist created from some permanent storage.

It is declaring adding, updating and searching. Intentionally not removing as during plugin runtime no delegations should be done.

Implementations of this interface (unless dummy ones:) should ensure correct communication with permanent storage and be prepared for multiple instances read/write the same storage at time.

  • Method Details

    • getMatchingItem

      UnsignedAppletActionEntry getMatchingItem(String documentBase, String codeBase, List<String> archives, Class<? extends RememberableDialog> id)
      This methods iterates through records in net.sourceforge.jnlp.config.DeploymentConfiguration#getAppletTrustUserSettingsPath or net.sourceforge.jnlp.config.DeploymentConfiguration#getAppletTrustGlobalSettingsPath, and is matching regexes saved here against params. So parameters here are NOT regexes, but are matched against saved regexes.

      null or empty values are dangerously ignored, user, be aware of it. eg: match only codeBase will be null someCodeBase null null match only documentBase will be someDocBase null null null match only applet not regarding code or document base will be null null mainClass archives.

      Parameters:
      documentBase -
      codeBase -
      archives -
      id - of AppletSecurityAction's ExecuteAppletAction to be used for "strong" search
      Returns:
      a matching unsigned applet action entry
    • getMatchingItemByDocumentBase

      UnsignedAppletActionEntry getMatchingItemByDocumentBase(String documentBase, Class<? extends RememberableDialog> id)
      Shortcut getMatchingItem(documentBase, null, null, null)
      Parameters:
      documentBase -
      id - of AppletSecurityAction's ExecuteAppletAction to be used for "strong" search
      Returns:
      a matching unsigned applet action entry
    • getMatchingItemByCodeBase

      UnsignedAppletActionEntry getMatchingItemByCodeBase(String codeBase, Class<? extends RememberableDialog> id)
      Shortcut getMatchingItem(null, codeBase, null, null)
      Parameters:
      codeBase -
      id - of AppletSecurityAction's ExecuteAppletAction to be used for "strong" search
      Returns:
      a matching unsigned applet action entry
    • getMatchingItemByBases

      UnsignedAppletActionEntry getMatchingItemByBases(String documentBase, String codeBase, Class<? extends RememberableDialog> id)
      Shortcut getMatchingItem(documentBase, codeBase, null, null)
      Parameters:
      documentBase -
      codeBase -
      id - of AppletSecurityAction's ExecuteAppletAction to be used for "strong" search
      Returns:
      a matching unsigned applet action entry
    • add

      void add(UnsignedAppletActionEntry item)
      Will add new record. Note that regexes are stored for bases matching.

      eg UnsignedAppletActionEntry which will deny some applet no matter of page will be new UnsignedAppletActionEntry( ExecuteUnsignedApplet#NEVER, new Date(), null, null, someMain, someArchives)

      eg UnsignedAppletActionEntry which will allow all applets on page with same codebase will be new UnsignedAppletActionEntry( ExecuteUnsignedApplet#NEVER , new Date(), ".*", ".*", null, null);

      Parameters:
      item -
    • update

      void update(UnsignedAppletActionEntry item)
      Will replace (current impl is matching by object's hashcode. This is not reloading the list (but still saving after), so StorageIoException can be thrown if it was not loaded before.

      Imho this should be used only to actualise timestamps or change UnsignedAppletActionEntry

      Parameters:
      item -
    • lock

      void lock()
      Lock the storage, if necessary. If no ownership issues arise, can be a no-op.
    • unlock

      void unlock()
      Unlock the storage, if necessary. If no ownership issues arise, can be a no-op.