1 19 20 package com.sslexplorer.applications; 21 22 import java.util.Calendar ; 23 import java.util.Iterator ; 24 import java.util.Map ; 25 26 import com.sslexplorer.policyframework.AbstractResource; 27 28 33 public class DefaultApplicationShortcut extends AbstractResource implements ApplicationShortcut { 34 35 37 private Map <String ,String > parameters; 38 private String application; 39 40 51 public DefaultApplicationShortcut(int realmID, int resourceId, String resourceName, String resourceDescription, Calendar dateCreated, 52 Calendar dateAmended, String application, Map <String ,String > parameters) { 53 super(realmID, ApplicationsPlugin.APPLICATION_SHORTCUT_RESOURCE_TYPE, resourceId, resourceName, resourceDescription, dateCreated, 54 dateAmended); 55 this.application = application; 56 this.parameters = parameters; 57 } 58 59 62 public Map <String ,String > getParameters() { 63 return parameters; 64 } 65 66 69 public String getApplication() { 70 return application; 71 } 72 73 74 public boolean paramsRequirePassword() { 75 Iterator iter = parameters.entrySet().iterator(); 76 while (iter.hasNext()) { 77 Map.Entry entry = (Map.Entry ) iter.next(); 78 if (((String )entry.getValue()).contains("${session:password}")){ 79 return true; 80 } 81 } 82 return false; 83 } 84 85 } 86 | Popular Tags |