private boolean checkPageParam()
{
String address = nmsConnection.getIpAddress();
if (StringUtils.isNotEmpty(address))
{
// ip校验
String regex =
"^([1-9]|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(([0-9]|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.){2}([1-9]|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])$";
Pattern p = Pattern.compile(regex);
Matcher m = p.matcher(address);
if (!m.find())
{
return false;
}
}
// 用户名的校验
String username = nmsConnection.getNmsUserName();
if (StringUtils.isNotEmpty(username))
{
String regex = "[0-9A-Za-z_]*";
Pattern p = Pattern.compile(regex);
Matcher m = p.matcher(username);
if (!m.find())
{
return false;
}
}
{
String address = nmsConnection.getIpAddress();
if (StringUtils.isNotEmpty(address))
{
// ip校验
String regex =
"^([1-9]|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(([0-9]|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.){2}([1-9]|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])$";
Pattern p = Pattern.compile(regex);
Matcher m = p.matcher(address);
if (!m.find())
{
return false;
}
}
// 用户名的校验
String username = nmsConnection.getNmsUserName();
if (StringUtils.isNotEmpty(username))
{
String regex = "[0-9A-Za-z_]*";
Pattern p = Pattern.compile(regex);
Matcher m = p.matcher(username);
if (!m.find())
{
return false;
}
}