📄 urllist.java
字号:
/**
*
*/
package cn.bway.common.vo;
import java.util.ArrayList;
import java.util.Iterator;
import cn.bway.common.JavaException;
/**
* @author Kson
*
*/
public class UrlList {
private ArrayList alist;
public ArrayList getAlist() {
return alist;
}
public void setAlist(ArrayList alist) {
this.alist = alist;
}
public boolean checkUserList(String pathUrl){
boolean checkurl = false;
String Url = "";
ArrayList getlist = getAlist();
if (null != getlist){
Iterator ite = getlist.iterator();
while(ite.hasNext()){
UrlVO urlvo = (UrlVO)ite.next();
Url = urlvo.getUrl();
System.out.println(" @@@@@@@@@@@@@@@@@@ urlvo.getUrl(): "+Url);
if(pathUrl.equals(Url) || pathUrl == Url){
System.out.println("pass.....");
return true;
}else{
return false;
}
}
}
return checkurl;
}
//判断用户执行的actionUrl是不是合法路径
public boolean isSusscessAccess(String actionUrl) throws JavaException{
boolean isSusscess = false;
if (actionUrl == null) {
throw new JavaException("method.exception",null,new String[]{"isSusscessAccess(UserBean user,String actionUrl) of Class AppJavaUserPrivilegeManager","parameter actionUrl is null" });
}
System.out.println(" check url: "+actionUrl);
if(checkUserList(actionUrl)){
isSusscess = true;
}
return isSusscess;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -