Overview | Package | Class | Tree | Deprecated | Index | Help
| Compoze Software, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## portlets.compoze.groupware.calendar
Class FreeBusy

    java.lang.Object
      portlets.compoze.groupware.calendar.FreeBusy

All Implemented Interfaces:
  java.io.Serializable

public class FreeBusy
extends java.lang.Object
implements java.io.Serializable

This class represents a free/busy entry for a particular user.

See Also:
  Serialized Form

Nested Class Summary
`static class` | `FreeBusy.Interval` This class represents an interval for display.
`static class` | `FreeBusy.TimeSlot` This class represents information about a single time slot.

Field Summary
`static java.lang.String` | `USER_SEPARATOR` This value represents the deliminter for separating users.

Constructor Summary
`FreeBusy(java.lang.String sUser, int iInterval)` Constructor.

Method Summary
`void` | `addTimeSlot(java.util.Date startTime, java.util.Date endTime, BusyStatus status)` Adds a time slot to the free/busy entry.
`static FreeBusy` | `getFreeBusy(FreeBusy[] freeBusy, java.lang.String sUser)` Gets the free/busy for the specified user.
`int` | `getInterval()` Gets the free/busy entry (in minutes).
`FreeBusy.TimeSlot` | `getTimeSlot(java.util.Calendar cal)` Gets the time slot for the specified start time.
`FreeBusy.TimeSlot[]` | `getTimeSlots()` Gets the time slots for this free/busy entry.
`java.lang.String` | `getUser()` Gets the user for this free/busy entry.
`java.lang.String` | `getUserImAddress()` Gets the IM address of the user for this free/busy entry.
`static java.lang.String` | `getUserList(java.lang.String[] users)` Gets a separated sequence of users from the specified user array using the delimiter.
`boolean` | `hasFreeBusy()` Checks if this entry has free/busy information.
`static FreeBusy[]` | `merge(FreeBusy[] freeBusy1, FreeBusy[] freeBusy2)` Merges the two free/busy arrays.
`static java.lang.String[]` | `parseUsers(java.lang.String sUsers)` Parses the users into an array of users.
`static java.lang.String[]` | `parseUsers(java.lang.String[] users, java.lang.String sUsers)` Parses the users into an array of users.
`static java.lang.String[]` | `parseUsers(java.lang.String[] users, java.lang.String sUsers, boolean bCommaSeparated)` Parses the users into an array of users.
`static java.lang.String[]` | `parseUsers(java.lang.String sUsers, boolean bCommaSeparated)` Parses the users into an array of users.
`static java.lang.String[]` | `removeUser(java.lang.String[] users, java.lang.String sUser)` Removes the user from the array of users.
`static java.lang.String[]` | `removeUsers(java.lang.String[] users, java.lang.String[] filterUsers)` Removes the users from the array of users.
`void` | `setUserImAddress(java.lang.String sUserImAddress)` Sets the IM address of the user for this free/busy entry.

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

Field Detail

### USER_SEPARATOR

    public static final java.lang.String USER_SEPARATOR

  This value represents the deliminter for separating users.

  See Also:
    Constant Field Values

Constructor Detail

### FreeBusy

    public FreeBusy(java.lang.String sUser,
                    int iInterval)

  Constructor.

Parameters:
  `sUser` - the user (may not be `null`)
  `iInterval` - the interval (in minutes)

Method Detail

### merge

    public static FreeBusy[] merge(FreeBusy[] freeBusy1,
                                   FreeBusy[] freeBusy2)

  Merges the two free/busy arrays.

  Parameters:
    `freeBusy1` - the first free/busy array (may not be `null`)
    `freeBusy2` - the second free/busy array (may not be `null`)
  Returns:
    the resulting free/busy array

### getUserList

    public static java.lang.String getUserList(java.lang.String[] users)

  Gets a separated sequence of users from the specified user array using the delimiter.

  Parameters:
    `users` - the user to build the list from (may not be `null`)
  Returns:
    a separated sequence of users
  See Also:
    `USER_SEPARATOR`

### parseUsers

    public static java.lang.String[] parseUsers(java.lang.String sUsers)

  Parses the users into an array of users.

  Parameters:
    `sUsers` - the users to parse
  Returns:
    an array of users or an empty array for none
  See Also:
    `USER_SEPARATOR`

### parseUsers

    public static java.lang.String[] parseUsers(java.lang.String sUsers,
                                                boolean bCommaSeparated)

  Parses the users into an array of users.

  Parameters:
    `sUsers` - the users to parse
    `bCommaSeparated` - the comma separator flag
  Returns:
    an array of users or an empty array for none
  See Also:
    `USER_SEPARATOR`

### parseUsers

    public static java.lang.String[] parseUsers(java.lang.String[] users,
                                                java.lang.String sUsers)

  Parses the users into an array of users.

  Parameters:
    `users` - the users array to add to
    `sUsers` - the users to parse
  Returns:
    an array of unique users or an empty array for none
  See Also:
    `USER_SEPARATOR`

### parseUsers

    public static java.lang.String[] parseUsers(java.lang.String[] users,
                                                java.lang.String sUsers,
                                                boolean bCommaSeparated)

  Parses the users into an array of users.

  Parameters:
    `users` - the users array to add to
    `sUsers` - the users to parse
    `bCommaSeparated` - the comma separator flag
  Returns:
    an array of unique users or an empty array for none
  See Also:
    `USER_SEPARATOR`

### removeUsers

    public static java.lang.String[] removeUsers(java.lang.String[] users,
                                                 java.lang.String[] filterUsers)

  Removes the users from the array of users.

  Parameters:
    `users` - the users array to remove from
  Returns:
    an array of users or an empty array for none

### removeUser

    public static java.lang.String[] removeUser(java.lang.String[] users,
                                                java.lang.String sUser)

  Removes the user from the array of users.

  Parameters:
    `users` - the users array to remove from
    `sUser` - the user to remove (may not be `null`)
  Returns:
    an array of users or an empty array for none

### getUser

    public java.lang.String getUser()

  Gets the user for this free/busy entry.

  Returns:
    the user for this free/busy entry

### getInterval

    public int getInterval()

  Gets the free/busy entry (in minutes).

  Returns:
    the free/busy entry (in minutes)

### hasFreeBusy

    public boolean hasFreeBusy()

  Checks if this entry has free/busy information.

  Returns:
    `true` if this entry has free/busy information; `false` otherwise

### getTimeSlots

    public FreeBusy.TimeSlot[] getTimeSlots()

  Gets the time slots for this free/busy entry.

  Returns:
    an array of time slots or an empty array for none

### getTimeSlot

    public FreeBusy.TimeSlot getTimeSlot(java.util.Calendar cal)

  Gets the time slot for the specified start time.

  Parameters:
    `cal` - the calendar set to the hour and minute to use for the start time
  Returns:
    the time slot or `null` if not found

### addTimeSlot

    public void addTimeSlot(java.util.Date startTime,
                            java.util.Date endTime,
                            BusyStatus status)

  Adds a time slot to the free/busy entry.

  Parameters:
    `startTime` - the start time of the time slot
    `endTime` - the end time of the time slot
    `status` - the busy status

### getFreeBusy

    public static FreeBusy getFreeBusy(FreeBusy[] freeBusy,
                                       java.lang.String sUser)

  Gets the free/busy for the specified user.

  Parameters:
    `freeBusy` - the free busy
    `sUser` - the user to get
  Returns:
    the free/busy for the specified user or `null` if not found

### getUserImAddress

    public java.lang.String getUserImAddress()

  Gets the IM address of the user for this free/busy entry.

  Returns:
    the IM address of the user for this free/busy entry

### setUserImAddress

    public void setUserImAddress(java.lang.String sUserImAddress)

  Sets the IM address of the user for this free/busy entry.

  Parameters:
    `sUserImAddress` - the IM address of the user for this free/busy entry to set

Overview | Package | Class | Tree | Deprecated | Index | Help
| Compoze Software, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright ©1999-2003 Compoze Software, Inc. All rights reserved.