001: /***
002: * jwma Java WebMail
003: * Copyright (c) 2000-2003 jwma team
004: *
005: * jwma is free software; you can distribute and use this source
006: * under the terms of the BSD-style license received along with
007: * the distribution.
008: ***/package dtw.webmail.model;
009:
010: import java.util.List;
011:
012: /**
013: * An interface defining the contract for interaction with
014: * the JwmaStoreInfo model.
015: *
016: * <p>
017: * The JwmaStoreInfo allows a view programmer to obtain
018: * information regarding the mail store (such as the mode,
019: * the folder separator in use etc.).
020: *
021: * @author Dieter Wimberger
022: * @version 0.9.7 07/02/2003
023: */
024: public interface JwmaStoreInfo {
025:
026: /**
027: * Tests if the store can hold mixed mode folders.
028: *
029: * @return true if it can hold mixed mode folders,
030: * false otherwise.
031: */
032: public boolean isMixedMode();
033:
034: /**
035: * Returns the folder separator in use as <tt>char</tt>.
036: *
037: * @return the folder separator character.
038: */
039: public char getFolderSeparator();
040:
041: /**
042: * Returns a <tt>JwmaFolder[]</tt> containing all
043: * folders on the store of a given type.
044: * <p>
045: * If the store does not contain any folders of the given type,
046: * then this method returns an empty array. Otherwise it contains
047: * one <tt>JwmaFolder</tt> for each folder on the store of
048: * the given type.
049: *
050: * @return a <tt>JwmaFolder[]</tt> naming all folders of
051: * given type on the store. The array will be empty if
052: * there are no such folders.
053: *
054: * @see dtw.webmail.model.JwmaFolder
055: */
056: public JwmaFolder[] listFolders(int type);
057:
058: /**
059: * Returns a <tt>JwmaFolder[]</tt> containing all
060: * folders on the store of a given type.
061: * Note that this method will observe subscription if
062: * the passed in parameter is true.
063: * <p>
064: * If the store does not contain any folders of the given type,
065: * then this method returns an empty array. Otherwise it contains
066: * one <tt>JwmaFolder</tt> for each folder on the store of
067: * the given type.
068: *
069: * @param type the type of folder as <tt>int</tt>.
070: * @param subscribed true if observe subscription, false otherwise.
071: *
072: * @return a <tt>JwmaFolder[]</tt> naming all folders of
073: * given type on the store. The array will be empty if
074: * there are no such folders.
075: *
076: * @see dtw.webmail.model.JwmaFolder
077: */
078: public JwmaFolder[] listFolders(int type, boolean subscribed);
079:
080: /**
081: * Returns a <tt>JwmaFolder[]</tt> containing all folders
082: * of the store, that can hold folders, excluding this folder.
083: * <p>
084: * If the store does not contain any folders, then this method
085: * returns an empty array (which means something is wrong!;).
086: * Otherwise it contains one <tt>JwmaFolder</tt> for each
087: * folder on the store, excluding this folder.
088: *
089: * @return a <tt>JwmaFolder[]</tt> containing all folders
090: * in the store that can hold folders, excluding this one.
091: * The array will be empty if there are no such folders.
092: *
093: * @see dtw.webmail.model.JwmaFolder
094: */
095: public JwmaFolder[] listFolderMoveTargets();
096:
097: /**
098: * Returns a <tt>JwmaFolder[]</tt> containing all folders
099: * of the store, that can hold messages, excluding this folder.
100: * <p>
101: * If the store does not contain any folders, then this method
102: * returns an empty array (which means something is wrong!;).
103: * Otherwise it contains one <tt>JwmaFolder</tt> for each
104: * folder on the store, excluding this folder.
105: *
106: * @return a <tt>JwmaFolder[]</tt> containing all folders
107: * in the store that can hold messages, excluding this one.
108: * The array will be empty if there are no such folders.
109: *
110: * @see dtw.webmail.model.JwmaFolder
111: */
112: public JwmaFolder[] listMessageMoveTargets();
113:
114: }//interface JwmaStoreInfo
|