src/org/sonews/storage/Channel.java
changeset 42 7f84f4de2893
parent 39 73b21e9f3958
     1.1 --- a/src/org/sonews/storage/Channel.java	Wed May 04 18:34:21 2011 +0200
     1.2 +++ b/src/org/sonews/storage/Channel.java	Mon Jun 06 20:12:21 2011 +0200
     1.3 @@ -15,7 +15,6 @@
     1.4   *   You should have received a copy of the GNU General Public License
     1.5   *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
     1.6   */
     1.7 -
     1.8  package org.sonews.storage;
     1.9  
    1.10  import java.util.ArrayList;
    1.11 @@ -30,8 +29,7 @@
    1.12   * @author Christian Lins
    1.13   * @since sonews/1.0
    1.14   */
    1.15 -public abstract class Channel
    1.16 -{
    1.17 +public abstract class Channel {
    1.18  
    1.19  	/**
    1.20  	 * If this flag is set the Group is no real newsgroup but a mailing list
    1.21 @@ -39,22 +37,19 @@
    1.22  	 * the mailing list gateway.
    1.23  	 */
    1.24  	public static final int MAILINGLIST = 0x1;
    1.25 -
    1.26  	/**
    1.27  	 * If this flag is set the Group is marked as readonly and the posting
    1.28  	 * is prohibited. This can be useful for groups that are synced only in
    1.29  	 * one direction.
    1.30  	 */
    1.31  	public static final int READONLY = 0x2;
    1.32 -
    1.33  	/**
    1.34  	 * If this flag is set the Group is marked as deleted and must not occur
    1.35  	 * in any output. The deletion is done lazily by a low priority daemon.
    1.36  	 */
    1.37  	public static final int DELETED = 0x80;
    1.38  
    1.39 -	public static List<Channel> getAll()
    1.40 -	{
    1.41 +	public static List<Channel> getAll() {
    1.42  		List<Channel> all = new ArrayList<Channel>();
    1.43  
    1.44  		/*List<Channel> agroups = AggregatedGroup.getAll();
    1.45 @@ -72,36 +67,35 @@
    1.46  	}
    1.47  
    1.48  	public static Channel getByName(String name)
    1.49 -		throws StorageBackendException
    1.50 -	{
    1.51 +			throws StorageBackendException {
    1.52  		return StorageManager.current().getGroup(name);
    1.53  	}
    1.54  
    1.55  	public abstract Article getArticle(long idx)
    1.56 -		throws StorageBackendException;
    1.57 +			throws StorageBackendException;
    1.58  
    1.59  	public abstract List<Pair<Long, ArticleHead>> getArticleHeads(
    1.60 -		final long first, final long last)
    1.61 -		throws StorageBackendException;
    1.62 +			final long first, final long last)
    1.63 +			throws StorageBackendException;
    1.64  
    1.65  	public abstract List<Long> getArticleNumbers()
    1.66 -		throws StorageBackendException;
    1.67 +			throws StorageBackendException;
    1.68  
    1.69  	public abstract long getFirstArticleNumber()
    1.70 -		throws StorageBackendException;
    1.71 +			throws StorageBackendException;
    1.72  
    1.73  	public abstract long getIndexOf(Article art)
    1.74 -		throws StorageBackendException;
    1.75 +			throws StorageBackendException;
    1.76  
    1.77  	public abstract long getInternalID();
    1.78  
    1.79  	public abstract long getLastArticleNumber()
    1.80 -		throws StorageBackendException;
    1.81 +			throws StorageBackendException;
    1.82  
    1.83  	public abstract String getName();
    1.84  
    1.85  	public abstract long getPostingsCount()
    1.86 -		throws StorageBackendException;
    1.87 +			throws StorageBackendException;
    1.88  
    1.89  	public abstract boolean isDeleted();
    1.90