Class UnsignedAppletActionStorageImpl
- All Implemented Interfaces:
UnsignedAppletActionStorage
- Direct Known Subclasses:
UnsignedAppletActionStorageExtendedImpl
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final intprotected List<UnsignedAppletActionEntry> static final String -
Constructor Summary
Constructors -
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)getMatchingItems(String documentBase, String codeBase, List<String> archives) protected voidReads contents from file.protected voidtoString()voidWill replace (current impl is matching by object's hashcode.voidvoidWrites stored contents to file.voidWrite contents to the file, first acquiring a lock.Methods inherited from class net.adoptopenjdk.icedteaweb.lockingfile.LockingReaderWriter
doLocked, getBackingFile, isReadOnly, lock, unlockMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.adoptopenjdk.icedteaweb.client.parts.dialogs.security.appletextendedsecurity.UnsignedAppletActionStorage
lock, unlock
-
Field Details
-
items
-
versionPrefix
- See Also:
-
BACKUP_SUFFIX
- See Also:
-
currentVersion
public static final int currentVersion- See Also:
-
-
Constructor Details
-
UnsignedAppletActionStorageImpl
-
-
Method Details
-
writeContents
Description copied from class:LockingReaderWriterWrites stored contents to file. Assumes lock is held.- Overrides:
writeContentsin classLockingReaderWriter- Throws:
IOException
-
writeContentsLocked
Description copied from class:LockingReaderWriterWrite contents to the file, first acquiring a lock.- Overrides:
writeContentsLockedin classLockingReaderWriter- Throws:
IOException
-
readContents
Description copied from class:LockingReaderWriterReads contents from file. Assumes lock is held.- Overrides:
readContentsin classLockingReaderWriter- Throws:
IOException
-
readLine
- Specified by:
readLinein classLockingReaderWriter
-
writeContent
- Specified by:
writeContentin classLockingReaderWriter- Throws:
IOException
-
add
Description copied from interface:UnsignedAppletActionStorageWill 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);- Specified by:
addin interfaceUnsignedAppletActionStorage- Parameters:
item-
-
update
Description copied from interface:UnsignedAppletActionStorageWill 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- Specified by:
updatein interfaceUnsignedAppletActionStorage- Parameters:
item-
-
getMatchingItem
public UnsignedAppletActionEntry getMatchingItem(String documentBase, String codeBase, List<String> archives, Class<? extends RememberableDialog> id) Description copied from interface:UnsignedAppletActionStorageThis 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.- Specified by:
getMatchingItemin interfaceUnsignedAppletActionStorage- Parameters:
documentBase-codeBase-archives-id- of AppletSecurityAction's ExecuteAppletAction to be used for "strong" search- Returns:
- a matching unsigned applet action entry
-
getMatchingItems
-
toString
-
getMatchingItemByDocumentBase
public UnsignedAppletActionEntry getMatchingItemByDocumentBase(String documentBase, Class<? extends RememberableDialog> id) Description copied from interface:UnsignedAppletActionStorageShortcutgetMatchingItem(documentBase, null, null, null)- Specified by:
getMatchingItemByDocumentBasein interfaceUnsignedAppletActionStorage- Parameters:
documentBase-id- of AppletSecurityAction's ExecuteAppletAction to be used for "strong" search- Returns:
- a matching unsigned applet action entry
-
getMatchingItemByCodeBase
public UnsignedAppletActionEntry getMatchingItemByCodeBase(String codeBase, Class<? extends RememberableDialog> id) Description copied from interface:UnsignedAppletActionStorageShortcutgetMatchingItem(null, codeBase, null, null)- Specified by:
getMatchingItemByCodeBasein interfaceUnsignedAppletActionStorage- Parameters:
codeBase-id- of AppletSecurityAction's ExecuteAppletAction to be used for "strong" search- Returns:
- a matching unsigned applet action entry
-
getMatchingItemByBases
public UnsignedAppletActionEntry getMatchingItemByBases(String documentBase, String codeBase, Class<? extends RememberableDialog> id) Description copied from interface:UnsignedAppletActionStorageShortcutgetMatchingItem(documentBase, codeBase, null, null)- Specified by:
getMatchingItemByBasesin interfaceUnsignedAppletActionStorage- Parameters:
documentBase-codeBase-id- of AppletSecurityAction's ExecuteAppletAction to be used for "strong" search- Returns:
- a matching unsigned applet action entry
-