Class PolicyFileModel
java.lang.Object
net.adoptopenjdk.icedteaweb.client.policyeditor.PolicyFileModel
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Map<PolicyIdentifier, Set<PolicyParser.PermissionEntry>> private Fileprivate MD5SumWatcherprivate KeystoreInfoprivate static final Loggerprivate PolicyParserprivate final Map<PolicyIdentifier, Map<PolicyEditorPermissions, Boolean>> Maps Codebases to Maps of Permissions and whether that Permission is set or not. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) voidaddCustomPermissions(PolicyIdentifier identifier, Collection<? extends PolicyParser.PermissionEntry> permissions) (package private) booleanaddIdentifier(PolicyIdentifier identifier) Add a new identifier.(package private) voidclearCustomIdentifier(PolicyIdentifier identifier) (package private) void(package private) void(package private) Map<PolicyIdentifier, Set<PolicyParser.PermissionEntry>> (package private) Map<PolicyIdentifier, Map<PolicyEditorPermissions, Boolean>> (package private) FilegetFile()(package private) SortedSet<PolicyIdentifier> (package private) KeystoreInfo(package private) PolicyParser(package private) booleangetPermission(PolicyIdentifier identifier, PolicyEditorPermissions permission) (package private) boolean(package private) voidOpen the file pointed to by the filePath field.(package private) voidremoveIdentifier(PolicyIdentifier identifier) (package private) voidSave the policy model into the file pointed to by the filePath field.(package private) boolean(package private) voidsetPermission(PolicyIdentifier identifier, PolicyEditorPermissions permission, boolean state)
-
Field Details
-
LOG
-
file
-
permissionsMap
Maps Codebases to Maps of Permissions and whether that Permission is set or not. The Codebase keys correspond to the Codebases in the list UI, and the Permission->Boolean maps correspond to the checkboxes associated with each Codebase. -
customPermissionsMap
-
keystoreInfo
-
fileWatcher
-
parser
-
-
Constructor Details
-
Method Details
-
setFile
-
getFile
File getFile() -
getParser
PolicyParser getParser() -
openAndParsePolicyFile
Open the file pointed to by the filePath field. This is either provided by the "-file" command line flag, or if none given, comes from DeploymentConfiguration. -
savePolicyFile
Save the policy model into the file pointed to by the filePath field.- Throws:
IOException
-
hasChanged
- Throws:
IOException
-
getIdentifiers
SortedSet<PolicyIdentifier> getIdentifiers() -
getKeystoreInfo
KeystoreInfo getKeystoreInfo() -
addIdentifier
Add a new identifier. No action is taken if the identifier has already been added.- Parameters:
identifier- for which a permissions mapping is required- Returns:
- true iff there was already an entry for this identifier
-
clearPermissions
void clearPermissions() -
removeIdentifier
-
setPermission
-
getPermission
-
getCopyOfPermissions
Map<PolicyIdentifier, Map<PolicyEditorPermissions, Boolean>> getCopyOfPermissions() -
clearCustomPermissions
void clearCustomPermissions() -
clearCustomIdentifier
-
addCustomPermissions
void addCustomPermissions(PolicyIdentifier identifier, Collection<? extends PolicyParser.PermissionEntry> permissions) -
getCopyOfCustomPermissions
Map<PolicyIdentifier, Set<PolicyParser.PermissionEntry>> getCopyOfCustomPermissions()
-