CachedRosterItem.java 1.23 KB
Newer Older
Matt Tucker's avatar
Matt Tucker committed
1 2 3 4 5
/**
 * $RCSfile$
 * $Revision$
 * $Date$
 *
Matt Tucker's avatar
Matt Tucker committed
6
 * Copyright (C) 2004 Jive Software. All rights reserved.
Matt Tucker's avatar
Matt Tucker committed
7
 *
Matt Tucker's avatar
Matt Tucker committed
8 9
 * This software is published under the terms of the GNU Public License (GPL),
 * a copy of which is included in this distribution.
Matt Tucker's avatar
Matt Tucker committed
10
 */
Matt Tucker's avatar
Matt Tucker committed
11

Matt Tucker's avatar
Matt Tucker committed
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
package org.jivesoftware.messenger.user;

import org.jivesoftware.util.Cacheable;

/**
 * <p>Represents a persistently stored roster item.</p>
 * <p/>
 * <p>The interface is primarily a marker interface to differentiate
 * the roster information passed around via XMPP XML roster packets,
 * and the persistently stored roster associated with a particular account.</p>
 *
 * @author Iain Shigeoka
 */
public interface CachedRosterItem extends RosterItem, Cacheable {
    /**
     * <p>Obtain the roster ID associated with this particular roster item.</p>
     * <p/>
     * <p>Databases can use the roster ID as the key in locating roster items.</p>
     *
     * @return The roster ID
     */
    public long getID();

    /**
     * <p>Update the cached item as a copy of the given item.</p>
     * <p/>
     * <p>A convenience for getting the item and setting each attribute.</p>
     *
     * @param item The item who's settings will be copied into the cached copy
     */
    void setAsCopyOf(RosterItem item);
}