com.adventnet.agent.tl1.security
Class SecurityLogHandler

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

public class SecurityLogHandler
extends java.lang.Object
implements SecurityVariables

This class is used to handle the security log informations. Creation of security event objects can be made using the methods provided in this class. Reading and writing into the persistence files can be done using this.


Fields inherited from interface com.adventnet.agent.tl1.security.SecurityVariables
aid, ALW_LOG_SECU, cap, chap, DLT_CID_SECU, DLT_CMD_SECU, DLT_RSC_SECU, DLT_SECU, DLT_USER_SECU, DURAL, ECMR, ECSP, ED_CID_SECU, ED_CMD_SECU, ED_RSC_SECU, ED_SECU, ED_USER_SECU, EIUA, ENT_CID_SECU, ENT_CMD_SECU, ENT_RSC_SECU, ENT_SECU, ENT_USER_SECU, ERSP, ESCC, EURA, EUSP, INH_LOG_SECU, IS, LSTOI, MXINV, OOS, PAGE, PCND, PCNN, POINT, rap, root, RTRV_ATTR_SECULOG, RTRV_AUDIT_SECULOG, SET_ATTR_SECULOG, TMOUT, UOUT
 
Constructor Summary
SecurityLogHandler(java.lang.String fileName, SecurityView secView)
          This constructor receives the file path where the security log events informations exists.
 
Method Summary
(package private)  void cancelEventStoring(java.lang.String event)
          Used to set the corresponding event flag false.
(package private)  SecurityLogRecords createSecurityEvents(java.lang.String eventEntry)
          Creates a security event object for the entry of event given to this as string.
(package private)  void createSecurityEvents(java.lang.String userId, java.lang.String channel, java.lang.String eventType, java.lang.String status)
          This method creates a security event object using the informations given.
(package private)  void enableEventStoring(java.lang.String event)
          Sets the corresponding event's flag true.
(package private)  java.lang.String[] getEventsStored()
          Returns the String[] of events ,that are usually stored in the log file.
(package private)  java.util.Vector getSecurityLogRecords(java.lang.String cid, java.lang.String rsc, java.lang.String uid, java.lang.String eventType)
          Returns the Vector of security log records which has all parameters to get filtered out.
 int getSecurityLogSize()
          used to get the security log size
(package private)  java.lang.String getWarningMessage()
          Return the warning message.
(package private)  boolean isAlreadyInhibited(java.lang.String event)
          Checks if the specified event is already in inhibited mode.
(package private)  boolean isEventStoreEnabled(java.lang.String event)
          Returns true if the passed event has got it's storage in log file enabled.
(package private)  boolean isValidEvent(java.lang.String event)
          Returns true if the event passed as argument here is a valid one.
 void setSecurityLogSize(int size)
          Sets the size of the buffer.
(package private)  void setWarningMessage(java.lang.String warning)
          Receive the warning message to be displayed when the session is initiated.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SecurityLogHandler

public SecurityLogHandler(java.lang.String fileName,
                          SecurityView secView)
This constructor receives the file path where the security log events informations exists. If any security events occur after the buffer size is reached then the very old details that present in the top of the buffer starts overwritten by new events.Using this SecurityView reference it will get the admin session and send autonomous.
Parameters:
fileName - - Name of the file where the logging is to be done
secView - - SecurityView reference
Method Detail

setSecurityLogSize

public void setSecurityLogSize(int size)
Sets the size of the buffer. This means how many events can exist in the buffer.
Parameters:
size - - capacity of the buffer

getSecurityLogSize

public int getSecurityLogSize()
used to get the security log size
Returns:
Returns the security log size

createSecurityEvents

void createSecurityEvents(java.lang.String userId,
                          java.lang.String channel,
                          java.lang.String eventType,
                          java.lang.String status)
This method creates a security event object using the informations given. Then these informations will be stored in a buffer and also all the buffer informations will be written in the perisistence file.
Parameters:
userId - - Name of the user (UID)
channel - - Channel Name (CID)
eventType - - Type/name of the event which caused for logging

createSecurityEvents

SecurityLogRecords createSecurityEvents(java.lang.String eventEntry)
Creates a security event object for the entry of event given to this as string.
Returns:
SecurityLogRecords object.

getSecurityLogRecords

java.util.Vector getSecurityLogRecords(java.lang.String cid,
                                       java.lang.String rsc,
                                       java.lang.String uid,
                                       java.lang.String eventType)
Returns the Vector of security log records which has all parameters to get filtered out. The parametrs are cid,rsc,uid.

setWarningMessage

void setWarningMessage(java.lang.String warning)
Receive the warning message to be displayed when the session is initiated. Typically it may consist of two lines.
Parameters:
warning - - the warning

getWarningMessage

java.lang.String getWarningMessage()
Return the warning message.

isValidEvent

boolean isValidEvent(java.lang.String event)
Returns true if the event passed as argument here is a valid one.

cancelEventStoring

void cancelEventStoring(java.lang.String event)
Used to set the corresponding event flag false. So that storing the corresponding event in the log file will not be entertained.

enableEventStoring

void enableEventStoring(java.lang.String event)
Sets the corresponding event's flag true. So that storing the event in the log file will be initiated.

isEventStoreEnabled

boolean isEventStoreEnabled(java.lang.String event)
Returns true if the passed event has got it's storage in log file enabled.

getEventsStored

java.lang.String[] getEventsStored()
Returns the String[] of events ,that are usually stored in the log file.

isAlreadyInhibited

boolean isAlreadyInhibited(java.lang.String event)
Checks if the specified event is already in inhibited mode.