com.adventnet.agent.tl1.security
Class SecurityUtils

java.lang.Object
  |
  +--com.adventnet.agent.tl1.security.SecurityUtils

public class SecurityUtils
extends java.lang.Object

This class is used to evaluate the various parameters comming under security view. (E.g UID,UAP,CHAP,FAP...) This checks the length restrictions and syntax restrictions as per TR835.


Constructor Summary
SecurityUtils()
           
 
Method Summary
static boolean isAlphanumeric(java.lang.String checkStr)
          Checks whether the string is alphanumric or not.
static boolean isNumeric(java.lang.String value)
          Checks whether the string given is numeric.
static boolean isValidCID(java.util.Vector cids)
          Checks if the CID is valid.
static boolean isValidCommand(java.lang.String command)
          Checks if the command given is a alphanumeric one.
static boolean isValidDural(java.lang.String value)
          Checks whether the given string is valid DURAL or not Valid Dural : hh-mm-ss where hh <= 23 && mm <=59 && ss <= 59
static boolean isValidID(java.lang.String id)
          Checks if the identifiers are valid.
static boolean isValidPID(java.lang.String PID)
          Checks if the PID is in the right format.
static boolean isValidPrivilege(java.util.Vector privileges)
          Checks if the access privilege is valid.
static boolean isValidUID(java.lang.String UID)
          Checks if the UID doesn't cross the limit of 10 characters.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SecurityUtils

public SecurityUtils()
Method Detail

isValidUID

public static boolean isValidUID(java.lang.String UID)
                          throws TL1AgentException
Checks if the UID doesn't cross the limit of 10 characters. It should be alphanumeric.

isValidPID

public static boolean isValidPID(java.lang.String PID)
                          throws TL1AgentException
Checks if the PID is in the right format. It can have maximum of 10 characters. It should have atleast 2 non alphabets. It should have one special characters.

isValidCID

public static boolean isValidCID(java.util.Vector cids)
                          throws TL1AgentException
Checks if the CID is valid. It can have maximum of 25 user interface ports/channels. Each channels can have mxmimum of 10 caharacters length. For directories it should be 7 characters. Here empty entries should not be allowed like representing things like &&.

isValidPrivilege

public static boolean isValidPrivilege(java.util.Vector privileges)
                                throws TL1AgentException
Checks if the access privilege is valid. (This is common for all privilege checks. UAP,CHAP,CAP,FAP,RAP)

isValidID

public static boolean isValidID(java.lang.String id)
                         throws TL1AgentException
Checks if the identifiers are valid. In this case they may be cid,rsc.

isValidCommand

public static boolean isValidCommand(java.lang.String command)
                              throws TL1AgentException
Checks if the command given is a alphanumeric one.

isAlphanumeric

public static boolean isAlphanumeric(java.lang.String checkStr)
Checks whether the string is alphanumric or not. Returns false if it doesn't satisfy this.

isNumeric

public static boolean isNumeric(java.lang.String value)
Checks whether the string given is numeric.

isValidDural

public static boolean isValidDural(java.lang.String value)
                            throws TL1AgentException
Checks whether the given string is valid DURAL or not Valid Dural : hh-mm-ss where hh <= 23 && mm <=59 && ss <= 59