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.lockout
Class LockOutFlag

    java.lang.Object
      org.jivesoftware.openfire.lockout.LockOutFlag

All Implemented Interfaces:
  Externalizable, Serializable, Cacheable

    public class LockOutFlag

extends Object
implements Cacheable, Externalizable

A LockOutFlag represents the current disabled status set on a particular user account. It can have a start and end time (a period of time in which the disabled status is active).

Author:
  Daniel Henninger
See Also:
  Serialized Form

Constructor Summary
`LockOutFlag()` Constructor added for Externalizable.
`LockOutFlag(String username, Date startTime, Date endTime)` Creates a representation of a lock out flag, including which user it is attached to and an optional start and end time.

Method Summary
`int` | `getCachedSize()` Returns the approximate size of the Object in bytes.
`Date` | `getEndTime()` Retrieves the date/time at which the account this flag references will stop having a disabled status.
`Date` | `getStartTime()` Retrieves the date/time at which the account this flag references will begin having a disabled status.
`String` | `getUsername()` Retrieves the username that this lock out flag is attached to.
`void` | `readExternal(ObjectInput in)`
`void` | `setEndTime(Date endTime)` Sets the end time for when the account will be reenabled, or null if manual reenable required.
`void` | `setStartTime(Date startTime)` Sets the start time for when the account will be disabled, or null if immediate.
`void` | `writeExternal(ObjectOutput out)`

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

Constructor Detail

### LockOutFlag

    public LockOutFlag()

  Constructor added for Externalizable. Do not use this constructor.

### LockOutFlag

    public LockOutFlag(String username,
                       Date startTime,
                       Date endTime)

  Creates a representation of a lock out flag, including which user it is attached to and an optional start and end time.

  Parameters:
    `username` - User the flag is attached to.
    `startTime` - Optional start time for the disabled status to start.
    `endTime` - Optional end time for the disabled status to end.

Method Detail

### getUsername

    public String getUsername()

  Retrieves the username that this lock out flag is attached to.

  Returns:
    Username the flag is attached to.

### getStartTime

    public Date getStartTime()

  Retrieves the date/time at which the account this flag references will begin having a disabled status. This can be null if there is no start time set, meaning that the start time is immediate.

  Returns:
    The Date when the disabled status will start, or null for immediately.

### setStartTime

    public void setStartTime(Date startTime)

  Sets the start time for when the account will be disabled, or null if immediate.

  Parameters:
    `startTime` - Date when the disabled status will start, or null for immediately.

### getEndTime

    public Date getEndTime()

  Retrieves the date/time at which the account this flag references will stop having a disabled status. This can be null if the disabled status is to continue until manually disabled.

  Returns:
    The Date when the disabled status will end, or null for "forever".

### setEndTime

    public void setEndTime(Date endTime)

  Sets the end time for when the account will be reenabled, or null if manual reenable required.

  Parameters:
    `endTime` - Date when the disabled status will end, or null for forever.

### getCachedSize

    public int getCachedSize()

  Description copied from interface: `Cacheable`
  Returns the approximate size of the Object in bytes. The size should be considered to be a best estimate of how much memory the Object occupies and may be based on empirical trials or dynamic calculations.

  Specified by:
    `getCachedSize` in interface `Cacheable`
  Returns:
    the size of the Object in bytes.

### writeExternal

    public void writeExternal(ObjectOutput out)
                       throws IOException

  Specified by:
    `writeExternal` in interface `Externalizable`
  Throws:
    `IOException`

### readExternal

    public void readExternal(ObjectInput in)
                      throws IOException,
                             ClassNotFoundException

  Specified by:
    `readExternal` in interface `Externalizable`
  Throws:
    `IOException`
    `ClassNotFoundException`

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.