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