merged 1.1 branch into head
[mir.git] / source / mircoders / localizer / MirAdminInterfaceLocalizer.java
index 5dfaa15..0377c70 100755 (executable)
  */
 package mircoders.localizer;
 
-import mir.entity.adapter.EntityAdapter;
-import mir.generator.Generator;
-
 import java.util.List;
 import java.util.Map;
 
+import mir.entity.adapter.EntityAdapter;
+import mir.generator.Generator;
+
 /**
  * Interface to allow for localized changed to the workings of the admin system
  *
@@ -91,18 +91,29 @@ public interface MirAdminInterfaceLocalizer {
   public List getPreviewPages(EntityAdapter anArticle) throws MirLocalizerExc, MirLocalizerFailure;
 
   /**
-   * Get the {@link List} of {@link MirSimpleEntityOperation}s available for comments
+   * Get the {@link List} of {@link EntityOperation}s available for comments
    */
   public List simpleCommentOperations();
 
   /**
-   * Get the {@link List} of {@link MirSimpleEntityOperation}s available for articles
+   * Get the {@link List} of {@link EntityOperation}s available for articles
    */
   public List simpleArticleOperations();
 
-  public interface MirSimpleEntityOperation {
+  public interface EntityOperation {
+    /**
+     * Returns the name of the operation. Must be unique and immutable.
+     */
     public String getName();
+
+    /**
+     * Is the operation valid for the given {@link EntityAdapter}
+     */
     public boolean isAvailable(EntityAdapter anEntity) throws MirLocalizerExc, MirLocalizerFailure;
+
+    /**
+     * perform the operation on the given {@link EntityAdapter} as the given user
+     */ 
     public void perform(EntityAdapter aUser, EntityAdapter anEntity) throws MirLocalizerExc, MirLocalizerFailure;
   }
 }
\ No newline at end of file