X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=source%2Fmircoders%2Flocalizer%2FMirAdminInterfaceLocalizer.java;h=5dfaa153417f4817929986820d91256f112cc749;hb=63e0ee1fb8038eb6d8f0190cf38c3b3ab2727216;hp=25fc48823c9130c8c2f67dec6811a421ba61ea06;hpb=aa0e25363f8099782b07ad71a627da64ef65ba09;p=mir.git diff --git a/source/mircoders/localizer/MirAdminInterfaceLocalizer.java b/source/mircoders/localizer/MirAdminInterfaceLocalizer.java index 25fc4882..5dfaa153 100755 --- a/source/mircoders/localizer/MirAdminInterfaceLocalizer.java +++ b/source/mircoders/localizer/MirAdminInterfaceLocalizer.java @@ -29,16 +29,16 @@ */ 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; - /** + * Interface to allow for localized changed to the workings of the admin system * - *

Title: Interface to allow for localized changed to the workings of the admin system

* @author Zapata - * @version 1.0 */ public interface MirAdminInterfaceLocalizer { @@ -62,23 +62,43 @@ public interface MirAdminInterfaceLocalizer { */ public String makePasswordDigest(String aPassword); - /** + * Allows different "generators" (templates) to be used for certain pages * + * @param aPage The identifier of the page + * @param aUser the user (can be used to allow different users to see different pages + * @param aDefault The default generator * @return */ - public List simpleCommentOperations(); + public String getAdminPageGenerator(String aPage, Map aTemplateData, EntityAdapter aUser, String aDefault) throws MirLocalizerExc; /** + * Prepares an article preview * - * @param aName - * @return + * @param aPreviewPage there may be different preview pages for a single article. + * (i.e. the same article may lead to different pages) this parameter selects one + * of those versions. See also {@link #getPreviewPages}. + * @param anArticle the article to be previewed + * @param aContext the context to be supplied to the generator + * @return the generator to be used to generate the preview */ - public MirSimpleEntityOperation simpleCommentOperationForName(String aName); + public Generator prepareArticlePreview(String aPreviewPage, EntityAdapter anArticle, Map aContext) + throws MirLocalizerExc, MirLocalizerFailure; + /** + * Return the available preview variations of one article + */ + public List getPreviewPages(EntityAdapter anArticle) throws MirLocalizerExc, MirLocalizerFailure; + /** + * Get the {@link List} of {@link MirSimpleEntityOperation}s available for comments + */ + public List simpleCommentOperations(); + + /** + * Get the {@link List} of {@link MirSimpleEntityOperation}s available for articles + */ public List simpleArticleOperations(); - public MirSimpleEntityOperation simpleArticleOperationForName(String aName); public interface MirSimpleEntityOperation { public String getName();