Overview | Package | Class | Tree | Deprecated | Index | Help
| Openfire 3.7.1 Javadoc
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jivesoftware.openfire.security
Class DefaultSecurityAuditProvider

    java.lang.Object
      org.jivesoftware.openfire.security.DefaultSecurityAuditProvider

All Implemented Interfaces:
  SecurityAuditProvider

    public class DefaultSecurityAuditProvider

extends Object
implements SecurityAuditProvider

The default security audit provider stores the logs in a ofSecurityAuditLog table.

Author:
  Daniel Henninger

Constructor Summary
`DefaultSecurityAuditProvider()` Constructs a new DefaultSecurityAuditProvider

Method Summary
`boolean` | `blockGroupEvents()` The default provider logs group events.
`boolean` | `blockUserEvents()` The default provider logs user events.
`String` | `getAuditURL()` The default provider uses Openfire's own audit log viewer.
`SecurityAuditEvent` | `getEvent(Integer msgID)` The default provider retrieves events from a ofSecurityAuditLog table in the database.
`Integer` | `getEventCount()` The default provider counts the number of entries in the ofSecurityAuditLog table.
`List<SecurityAuditEvent>` | `getEvents(String username, Integer skipEvents, Integer numEvents, Date startTime, Date endTime)` The default provider retrieves events from a ofSecurityAuditLog table in the database.
`boolean` | `isWriteOnly()` The default provider writes logs into a local Openfire database.
`void` | `logEvent(String username, String summary, String details)` The default provider logs events into a ofSecurityAuditLog table in the database.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DefaultSecurityAuditProvider

    public DefaultSecurityAuditProvider()

  Constructs a new DefaultSecurityAuditProvider

Method Detail

### logEvent

    public void logEvent(String username,
                         String summary,
                         String details)

  The default provider logs events into a ofSecurityAuditLog table in the database.

  Specified by:
    `logEvent` in interface `SecurityAuditProvider`
  Parameters:
    `username` - Username of user who performed the security event.
    `summary` - Short description of the event, similar to a subject.
    `details` - Detailed description of the event, can be null if not desired.
  See Also:
    `SecurityAuditProvider.logEvent(String, String, String)`

### getEvents

    public List<SecurityAuditEvent> getEvents(String username,
                                              Integer skipEvents,
                                              Integer numEvents,
                                              Date startTime,
                                              Date endTime)

  The default provider retrieves events from a ofSecurityAuditLog table in the database.

  Specified by:
    `getEvents` in interface `SecurityAuditProvider`
  Parameters:
    `username` - Username of user to look up. Can be null for no username filtering.
    `skipEvents` - Number of events to skip past (typically for paging). Can be null for first page.
    `numEvents` - Number of events to retrieve. Can be null for "all" events.
    `startTime` - Oldest date of range of events to retrieve. Can be null for forever.
    `endTime` - Most recent date of range of events to retrieve. Can be null for "now".
  Returns:
    Array of security events.
  See Also:
    `SecurityAuditProvider.getEvents(String, Integer, Integer, java.util.Date, java.util.Date)`

### getEvent

    public SecurityAuditEvent getEvent(Integer msgID)
                                throws EventNotFoundException

  The default provider retrieves events from a ofSecurityAuditLog table in the database.

  Specified by:
    `getEvent` in interface `SecurityAuditProvider`
  Parameters:
    `msgID` - ID number of event to retrieve.
  Returns:
    SecurityAuditEvent object with information from retrieved event.
  Throws:
    `EventNotFoundException` - if event was not found.
  See Also:
    `SecurityAuditProvider.getEvent(Integer)`

### getEventCount

    public Integer getEventCount()

  The default provider counts the number of entries in the ofSecurityAuditLog table.

  Specified by:
    `getEventCount` in interface `SecurityAuditProvider`
  Returns:
    Number of events that have been recorded.
  See Also:
    `SecurityAuditProvider.getEventCount()`

### isWriteOnly

    public boolean isWriteOnly()

  The default provider writes logs into a local Openfire database.

  Specified by:
    `isWriteOnly` in interface `SecurityAuditProvider`
  Returns:
    True or false if the logs can be read remotely.
  See Also:
    `SecurityAuditProvider.isWriteOnly()`

### getAuditURL

    public String getAuditURL()

  The default provider uses Openfire's own audit log viewer.

  Specified by:
    `getAuditURL` in interface `SecurityAuditProvider`
  Returns:
    String represented URL that can be visited to view the audit logs.
  See Also:
    `SecurityAuditProvider.getAuditURL()`

### blockUserEvents

    public boolean blockUserEvents()

  The default provider logs user events.

  Specified by:
    `blockUserEvents` in interface `SecurityAuditProvider`
  Returns:
    True if we should block user related security audit events from being handled.
  See Also:
    `SecurityAuditProvider.blockUserEvents()`

### blockGroupEvents

    public boolean blockGroupEvents()

  The default provider logs group events.

  Specified by:
    `blockGroupEvents` in interface `SecurityAuditProvider`
  Returns:
    True if we should block group related security audit events from being handled.
  See Also:
    `SecurityAuditProvider.blockGroupEvents()`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Openfire 3.7.1 Javadoc
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2008 Jive Software.