Interface UnsignedAppletActionStorage
- All Known Implementing Classes:
UnsignedAppletActionStorageExtendedImpl, UnsignedAppletActionStorageImpl
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 Summary
Modifier and TypeMethodDescriptionvoidadd(UnsignedAppletActionEntry item) Will add new record.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.getMatchingItemByBases(String documentBase, String codeBase, Class<? extends RememberableDialog> id) ShortcutgetMatchingItem(documentBase, codeBase, null, null)getMatchingItemByCodeBase(String codeBase, Class<? extends RememberableDialog> id) ShortcutgetMatchingItem(null, codeBase, null, null)getMatchingItemByDocumentBase(String documentBase, Class<? extends RememberableDialog> id) ShortcutgetMatchingItem(documentBase, null, null, null)voidlock()Lock the storage, if necessary.voidunlock()Unlock the storage, if necessary.voidWill replace (current impl is matching by object's hashcode.
-
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.nullor empty values are dangerously ignored, user, be aware of it. eg: match onlycodeBasewill benullsomeCodeBasenullnullmatch onlydocumentBasewill be someDocBasenullnullnullmatch only applet not regarding code or document base will benullnullmainClass 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) ShortcutgetMatchingItem(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) ShortcutgetMatchingItem(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) ShortcutgetMatchingItem(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
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
newUnsignedAppletActionEntry(ExecuteUnsignedApplet#NEVER, newDate(), null, null, someMain, someArchives)eg
UnsignedAppletActionEntrywhich will allow all applets on page with same codebase will benewUnsignedAppletActionEntry(ExecuteUnsignedApplet#NEVER, newDate(), ".*", ".*", null, null);- Parameters:
item-
-
update
Will replace (current impl is matching by object's hashcode. This is not reloading the list (but still saving after), soStorageIoExceptioncan 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.
-