/**
* Copyright 2009 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.waveprotocol.wave.model.supplement;
/**
* Supplement-like interface relevant for a single wavelet in a conversation.
* Exposes the current state of a thread.
*
*/
interface WaveletThreadState {
/**
* Returns the state of the thread. Null means that the state is unspecified.
*
* @param threadId id of thread to check
* @return the thread state (i.e collapsed etc.)
*/
ThreadState getThreadState(String threadId);
/**
* Sets a thread's state (i.e collapsed etc.).
*
* @param threadId id of thread to change.
* @param val new state of the thread, null clears the state.
*/
void setThreadState(String threadId, ThreadState val);
/**
* Removes this state from the {@link WaveletThreadStateCollection}
*/
void remove();
/**
* @return a collection of string thread ids, for each thread that has an associated state.
*/
Iterable<String> getThreads();
}