# HG changeset patch
# User cli
# Date 1251111605 -7200
# Node ID 6ae5e4f8329b46094f3328f622d8a2618d5c93cc
# Parent  91dc9acb03edac5de8f020e04fdbba411f8dc2e6
Add stubs for org.sonews.acl and add method "impliedCapability" for org.sonews.command.Command interface.

diff -r 91dc9acb03ed -r 6ae5e4f8329b org/sonews/acl/AccessControl.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/org/sonews/acl/AccessControl.java	Mon Aug 24 13:00:05 2009 +0200
@@ -0,0 +1,31 @@
+/*
+ *   SONEWS News Server
+ *   see AUTHORS for the list of contributors
+ *
+ *   This program is free software: you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation, either version 3 of the License, or
+ *   (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package org.sonews.acl;
+
+/**
+ *
+ * @author Christian Lins
+ * @since sonews/1.1
+ */
+public interface AccessControl
+{
+
+  boolean hasPermission(String user, char[] secret, String permission);
+
+}
diff -r 91dc9acb03ed -r 6ae5e4f8329b org/sonews/acl/AuthInfoCommand.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/org/sonews/acl/AuthInfoCommand.java	Mon Aug 24 13:00:05 2009 +0200
@@ -0,0 +1,29 @@
+/*
+ *   SONEWS News Server
+ *   see AUTHORS for the list of contributors
+ *
+ *   This program is free software: you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation, either version 3 of the License, or
+ *   (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package org.sonews.acl;
+
+/**
+ *
+ * @author Christian Lins
+ * @since sonews/1.1
+ */
+public class AuthInfoCommand
+{
+
+}
diff -r 91dc9acb03ed -r 6ae5e4f8329b org/sonews/daemon/command/ArticleCommand.java
--- a/org/sonews/daemon/command/ArticleCommand.java	Fri Aug 21 17:40:54 2009 +0200
+++ b/org/sonews/daemon/command/ArticleCommand.java	Mon Aug 24 13:00:05 2009 +0200
@@ -46,6 +46,12 @@
   }
 
   @Override
+  public String impliedCapability()
+  {
+    return null;
+  }
+
+  @Override
   public boolean isStateful()
   {
     return false;
diff -r 91dc9acb03ed -r 6ae5e4f8329b org/sonews/daemon/command/CapabilitiesCommand.java
--- a/org/sonews/daemon/command/CapabilitiesCommand.java	Fri Aug 21 17:40:54 2009 +0200
+++ b/org/sonews/daemon/command/CapabilitiesCommand.java	Mon Aug 24 13:00:05 2009 +0200
@@ -23,18 +23,18 @@
 
 /**
  * <pre>
- * The CAPABILITIES command allows a client to determine the
- * capabilities of the server at any given time.
+ *  The CAPABILITIES command allows a client to determine the
+ *  capabilities of the server at any given time.
  *
- * This command MAY be issued at any time; the server MUST NOT require
- * it to be issued in order to make use of any capability. The response
- * generated by this command MAY change during a session because of
- * other state information (which, in turn, may be changed by the
- * effects of other commands or by external events).  An NNTP client is
- * only able to get the current and correct information concerning
- * available capabilities at any point during a session by issuing a
- * CAPABILITIES command at that point of that session and processing the
- * response.
+ *  This command MAY be issued at any time; the server MUST NOT require
+ *  it to be issued in order to make use of any capability. The response
+ *  generated by this command MAY change during a session because of
+ *  other state information (which, in turn, may be changed by the
+ *  effects of other commands or by external events).  An NNTP client is
+ *  only able to get the current and correct information concerning
+ *  available capabilities at any point during a session by issuing a
+ *  CAPABILITIES command at that point of that session and processing the
+ *  response.
  * </pre>
  * @author Christian Lins
  * @since sonews/0.5.0
@@ -67,6 +67,12 @@
   }
 
   @Override
+  public String impliedCapability()
+  {
+    return null;
+  }
+  
+  @Override
   public boolean isStateful()
   {
     return false;
diff -r 91dc9acb03ed -r 6ae5e4f8329b org/sonews/daemon/command/Command.java
--- a/org/sonews/daemon/command/Command.java	Fri Aug 21 17:40:54 2009 +0200
+++ b/org/sonews/daemon/command/Command.java	Mon Aug 24 13:00:05 2009 +0200
@@ -30,8 +30,17 @@
 public interface Command
 {
 
+  /**
+   * @return true if this instance can be reused.
+   */
   boolean hasFinished();
 
+  /**
+   * Returns capability string that is implied by this command class.
+   * MAY return null if the command is required by the NNTP standard.
+   */
+  String impliedCapability();
+
   boolean isStateful();
 
   String[] getSupportedCommandStrings();
diff -r 91dc9acb03ed -r 6ae5e4f8329b org/sonews/daemon/command/GroupCommand.java
--- a/org/sonews/daemon/command/GroupCommand.java	Fri Aug 21 17:40:54 2009 +0200
+++ b/org/sonews/daemon/command/GroupCommand.java	Mon Aug 24 13:00:05 2009 +0200
@@ -61,6 +61,12 @@
   }
 
   @Override
+  public String impliedCapability()
+  {
+    return null;
+  }
+
+  @Override
   public boolean isStateful()
   {
     return true;
diff -r 91dc9acb03ed -r 6ae5e4f8329b org/sonews/daemon/command/HelpCommand.java
--- a/org/sonews/daemon/command/HelpCommand.java	Fri Aug 21 17:40:54 2009 +0200
+++ b/org/sonews/daemon/command/HelpCommand.java	Mon Aug 24 13:00:05 2009 +0200
@@ -40,6 +40,12 @@
   }
 
   @Override
+  public String impliedCapability()
+  {
+    return null;
+  }
+
+  @Override
   public boolean isStateful()
   {
     return true;
diff -r 91dc9acb03ed -r 6ae5e4f8329b org/sonews/daemon/command/ListCommand.java
--- a/org/sonews/daemon/command/ListCommand.java	Fri Aug 21 17:40:54 2009 +0200
+++ b/org/sonews/daemon/command/ListCommand.java	Mon Aug 24 13:00:05 2009 +0200
@@ -50,6 +50,12 @@
   }
 
   @Override
+  public String impliedCapability()
+  {
+    return null;
+  }
+
+  @Override
   public boolean isStateful()
   {
     return false;
diff -r 91dc9acb03ed -r 6ae5e4f8329b org/sonews/daemon/command/ListGroupCommand.java
--- a/org/sonews/daemon/command/ListGroupCommand.java	Fri Aug 21 17:40:54 2009 +0200
+++ b/org/sonews/daemon/command/ListGroupCommand.java	Mon Aug 24 13:00:05 2009 +0200
@@ -46,6 +46,12 @@
   }
 
   @Override
+  public String impliedCapability()
+  {
+    return null;
+  }
+
+  @Override
   public boolean isStateful()
   {
     return false;
diff -r 91dc9acb03ed -r 6ae5e4f8329b org/sonews/daemon/command/ModeReaderCommand.java
--- a/org/sonews/daemon/command/ModeReaderCommand.java	Fri Aug 21 17:40:54 2009 +0200
+++ b/org/sonews/daemon/command/ModeReaderCommand.java	Mon Aug 24 13:00:05 2009 +0200
@@ -44,6 +44,12 @@
   }
 
   @Override
+  public String impliedCapability()
+  {
+    return null;
+  }
+
+  @Override
   public boolean isStateful()
   {
     return false;
diff -r 91dc9acb03ed -r 6ae5e4f8329b org/sonews/daemon/command/NewGroupsCommand.java
--- a/org/sonews/daemon/command/NewGroupsCommand.java	Fri Aug 21 17:40:54 2009 +0200
+++ b/org/sonews/daemon/command/NewGroupsCommand.java	Mon Aug 24 13:00:05 2009 +0200
@@ -44,6 +44,12 @@
   }
 
   @Override
+  public String impliedCapability()
+  {
+    return null;
+  }
+
+  @Override
   public boolean isStateful()
   {
     return false;
diff -r 91dc9acb03ed -r 6ae5e4f8329b org/sonews/daemon/command/NextPrevCommand.java
--- a/org/sonews/daemon/command/NextPrevCommand.java	Fri Aug 21 17:40:54 2009 +0200
+++ b/org/sonews/daemon/command/NextPrevCommand.java	Mon Aug 24 13:00:05 2009 +0200
@@ -46,6 +46,12 @@
   }
 
   @Override
+  public String impliedCapability()
+  {
+    return null;
+  }
+
+  @Override
   public boolean isStateful()
   {
     return false;
diff -r 91dc9acb03ed -r 6ae5e4f8329b org/sonews/daemon/command/OverCommand.java
--- a/org/sonews/daemon/command/OverCommand.java	Fri Aug 21 17:40:54 2009 +0200
+++ b/org/sonews/daemon/command/OverCommand.java	Mon Aug 24 13:00:05 2009 +0200
@@ -124,6 +124,12 @@
   }
 
   @Override
+  public String impliedCapability()
+  {
+    return null;
+  }
+
+  @Override
   public boolean isStateful()
   {
     return false;
diff -r 91dc9acb03ed -r 6ae5e4f8329b org/sonews/daemon/command/PostCommand.java
--- a/org/sonews/daemon/command/PostCommand.java	Fri Aug 21 17:40:54 2009 +0200
+++ b/org/sonews/daemon/command/PostCommand.java	Mon Aug 24 13:00:05 2009 +0200
@@ -71,6 +71,12 @@
   }
 
   @Override
+  public String impliedCapability()
+  {
+    return null;
+  }
+
+  @Override
   public boolean isStateful()
   {
     return true;
diff -r 91dc9acb03ed -r 6ae5e4f8329b org/sonews/daemon/command/QuitCommand.java
--- a/org/sonews/daemon/command/QuitCommand.java	Fri Aug 21 17:40:54 2009 +0200
+++ b/org/sonews/daemon/command/QuitCommand.java	Mon Aug 24 13:00:05 2009 +0200
@@ -43,6 +43,12 @@
   }
 
   @Override
+  public String impliedCapability()
+  {
+    return null;
+  }
+
+  @Override
   public boolean isStateful()
   {
     return false;
diff -r 91dc9acb03ed -r 6ae5e4f8329b org/sonews/daemon/command/StatCommand.java
--- a/org/sonews/daemon/command/StatCommand.java	Fri Aug 21 17:40:54 2009 +0200
+++ b/org/sonews/daemon/command/StatCommand.java	Mon Aug 24 13:00:05 2009 +0200
@@ -44,6 +44,12 @@
   }
 
   @Override
+  public String impliedCapability()
+  {
+    return null;
+  }
+
+  @Override
   public boolean isStateful()
   {
     return false;
diff -r 91dc9acb03ed -r 6ae5e4f8329b org/sonews/daemon/command/UnsupportedCommand.java
--- a/org/sonews/daemon/command/UnsupportedCommand.java	Fri Aug 21 17:40:54 2009 +0200
+++ b/org/sonews/daemon/command/UnsupportedCommand.java	Mon Aug 24 13:00:05 2009 +0200
@@ -46,6 +46,12 @@
   }
 
   @Override
+  public String impliedCapability()
+  {
+    return null;
+  }
+
+  @Override
   public boolean isStateful()
   {
     return false;
diff -r 91dc9acb03ed -r 6ae5e4f8329b org/sonews/daemon/command/XDaemonCommand.java
--- a/org/sonews/daemon/command/XDaemonCommand.java	Fri Aug 21 17:40:54 2009 +0200
+++ b/org/sonews/daemon/command/XDaemonCommand.java	Mon Aug 24 13:00:05 2009 +0200
@@ -55,6 +55,12 @@
   }
 
   @Override
+  public String impliedCapability()
+  {
+    return null;
+  }
+
+  @Override
   public boolean isStateful()
   {
     return false;
diff -r 91dc9acb03ed -r 6ae5e4f8329b org/sonews/daemon/command/XPatCommand.java
--- a/org/sonews/daemon/command/XPatCommand.java	Fri Aug 21 17:40:54 2009 +0200
+++ b/org/sonews/daemon/command/XPatCommand.java	Mon Aug 24 13:00:05 2009 +0200
@@ -91,6 +91,12 @@
   }
 
   @Override
+  public String impliedCapability()
+  {
+    return null;
+  }
+
+  @Override
   public boolean isStateful()
   {
     return false;
diff -r 91dc9acb03ed -r 6ae5e4f8329b org/sonews/storage/StorageProvider.java
--- a/org/sonews/storage/StorageProvider.java	Fri Aug 21 17:40:54 2009 +0200
+++ b/org/sonews/storage/StorageProvider.java	Mon Aug 24 13:00:05 2009 +0200
@@ -19,7 +19,7 @@
 package org.sonews.storage;
 
 /**
- *
+ * Provides access to storage backend instances.
  * @author Christian Lins
  * @since sonews/1.0
  */