List of usage examples for java.security Permissions Permissions
public Permissions()
From source file:org.jwebsocket.plugins.scripting.Settings.java
/** * Gets application security permissions. * * @param aAppName// ww w . j a v a 2 s . co m * @param aAppPath * @return */ public Permissions getAppPermissions(String aAppName, String aAppPath) { if (mCachedAppPermissions.containsKey(aAppName)) { return mCachedAppPermissions.get(aAppName); } Permissions lPerms = new Permissions(); Permission lPermission; // processing global permissions for (String lStrPerm : getGlobalSecurityPermissions()) { lPermission = Tools.stringToPermission(JWebSocketConfig.expandEnvVarsAndProps( lStrPerm.replace("${APP_HOME}", aAppPath).replace("${EXT}", mExtensionsDirectoryPath))); if (null != lPermission) { lPerms.add(lPermission); } } // processing app permissions if (getAppsSecurityPermissions().containsKey(aAppName)) { for (String lStrPerm : getAppsSecurityPermissions().get(aAppName)) { lPermission = Tools.stringToPermission(JWebSocketConfig.expandEnvVarsAndProps( lStrPerm.replace("${APP_HOME}", aAppPath).replace("${EXT}", mExtensionsDirectoryPath))); if (null != lPermission) { lPerms.add(lPermission); } } } mCachedAppPermissions.put(aAppName, lPerms); return lPerms; }