From: <jbo...@li...> - 2005-08-09 21:36:58
|
Author: szimano Date: 2005-08-09 17:18:14 -0400 (Tue, 09 Aug 2005) New Revision: 798 Added: trunk/forge/portal-extensions/forge-wiki/docs/.classpath trunk/forge/portal-extensions/forge-wiki/docs/.project trunk/forge/portal-extensions/forge-wiki/docs/ClassDiagram.png trunk/forge/portal-extensions/forge-wiki/docs/POSTSAVEdiagram.png trunk/forge/portal-extensions/forge-wiki/docs/UseCasediagram_1.png trunk/forge/portal-extensions/forge-wiki/docs/wiki_diagrams.zuml.bak.0 trunk/forge/portal-extensions/forge-wiki/docs/wiki_diagrams.zuml.bak.1 trunk/forge/portal-extensions/forge-wiki/docs/wiki_diagrams.zuml.bak.2 trunk/forge/portal-extensions/forge-wiki/docs/wiki_diagrams.zuml.bak.3 trunk/forge/portal-extensions/forge-wiki/docs/wiki_diagrams.zuml.bak.4 trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/Credentials.java trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/FileDataSource.java trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/HashMap.java trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/Media.java trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/MediaDataSource.java trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/MediaInternalization.java trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/My.uml2 trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/PluginDescriptor.java trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiContext.java trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiEngine.java trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiPage.java trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiPagesHolder.java trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiPlugin.java trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiPluginChain.java trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiProperties.java trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiType.java trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiTypeDescriptor.java trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/plugins/ trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/taglib/ trunk/forge/portal-extensions/forge-wiki/src/web/WEB-INF/jsp/Edit.jsp trunk/forge/portal-extensions/forge-wiki/src/web/WEB-INF/jsp/Wiki.jsp trunk/forge/portal-extensions/forge-wiki/src/web/WEB-INF/tld/wiki.tld Modified: trunk/forge/portal-extensions/forge-wiki/maven.xml trunk/forge/portal-extensions/forge-wiki/project.xml trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiPortlet.java Log: new wiki basics :-) Added: trunk/forge/portal-extensions/forge-wiki/docs/.classpath =================================================================== --- trunk/forge/portal-extensions/forge-wiki/docs/.classpath 2005-08-09 20:58:21 UTC (rev 797) +++ trunk/forge/portal-extensions/forge-wiki/docs/.classpath 2005-08-09 21:18:14 UTC (rev 798) @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="src" path=""/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> + <classpathentry kind="output" path=""/> +</classpath> Added: trunk/forge/portal-extensions/forge-wiki/docs/.project =================================================================== --- trunk/forge/portal-extensions/forge-wiki/docs/.project 2005-08-09 20:58:21 UTC (rev 797) +++ trunk/forge/portal-extensions/forge-wiki/docs/.project 2005-08-09 21:18:14 UTC (rev 798) @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>forge-wiki</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> Added: trunk/forge/portal-extensions/forge-wiki/docs/ClassDiagram.png =================================================================== (Binary files differ) Property changes on: trunk/forge/portal-extensions/forge-wiki/docs/ClassDiagram.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/forge/portal-extensions/forge-wiki/docs/POSTSAVEdiagram.png =================================================================== (Binary files differ) Property changes on: trunk/forge/portal-extensions/forge-wiki/docs/POSTSAVEdiagram.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/forge/portal-extensions/forge-wiki/docs/UseCasediagram_1.png =================================================================== (Binary files differ) Property changes on: trunk/forge/portal-extensions/forge-wiki/docs/UseCasediagram_1.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/forge/portal-extensions/forge-wiki/docs/wiki_diagrams.zuml.bak.0 =================================================================== (Binary files differ) Property changes on: trunk/forge/portal-extensions/forge-wiki/docs/wiki_diagrams.zuml.bak.0 ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/forge/portal-extensions/forge-wiki/docs/wiki_diagrams.zuml.bak.1 =================================================================== (Binary files differ) Property changes on: trunk/forge/portal-extensions/forge-wiki/docs/wiki_diagrams.zuml.bak.1 ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/forge/portal-extensions/forge-wiki/docs/wiki_diagrams.zuml.bak.2 =================================================================== (Binary files differ) Property changes on: trunk/forge/portal-extensions/forge-wiki/docs/wiki_diagrams.zuml.bak.2 ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/forge/portal-extensions/forge-wiki/docs/wiki_diagrams.zuml.bak.3 =================================================================== (Binary files differ) Property changes on: trunk/forge/portal-extensions/forge-wiki/docs/wiki_diagrams.zuml.bak.3 ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/forge/portal-extensions/forge-wiki/docs/wiki_diagrams.zuml.bak.4 =================================================================== (Binary files differ) Property changes on: trunk/forge/portal-extensions/forge-wiki/docs/wiki_diagrams.zuml.bak.4 ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: trunk/forge/portal-extensions/forge-wiki/maven.xml =================================================================== --- trunk/forge/portal-extensions/forge-wiki/maven.xml 2005-08-09 20:58:21 UTC (rev 797) +++ trunk/forge/portal-extensions/forge-wiki/maven.xml 2005-08-09 21:18:14 UTC (rev 798) @@ -10,10 +10,10 @@ </goal> <goal name="deploy"> -<!-- <ant:copy todir="${local.deploy.dir}" flatten="true"> + <ant:copy todir="${local.deploy.dir}" flatten="true"> <ant:fileset dir="."> <ant:filename name="target/*.war" /> </ant:fileset> - </ant:copy>--> + </ant:copy> </goal> </project> Modified: trunk/forge/portal-extensions/forge-wiki/project.xml =================================================================== --- trunk/forge/portal-extensions/forge-wiki/project.xml 2005-08-09 20:58:21 UTC (rev 797) +++ trunk/forge/portal-extensions/forge-wiki/project.xml 2005-08-09 21:18:14 UTC (rev 798) @@ -15,4 +15,18 @@ <url>http://mamut.net.pl</url> </organization> <description></description> + + <dependency> + <groupId>aslibs</groupId> + <artifactId>javax.servlet</artifactId> + <version>1.0</version> + <jar>javax.servlet.jar</jar> + </dependency> + + <dependency> + <groupId>aslibs</groupId> + <artifactId>javax.servlet.jsp</artifactId> + <version>1.0</version> + <jar>javax.servlet.jsp.jar</jar> + </dependency> </project> Added: trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/Credentials.java =================================================================== --- trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/Credentials.java 2005-08-09 20:58:21 UTC (rev 797) +++ trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/Credentials.java 2005-08-09 21:18:14 UTC (rev 798) @@ -0,0 +1,8 @@ + package org.jboss.wiki; + +/** + * <p></p> + * + */ +public class Credentials { + } Added: trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/FileDataSource.java =================================================================== --- trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/FileDataSource.java 2005-08-09 20:58:21 UTC (rev 797) +++ trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/FileDataSource.java 2005-08-09 21:18:14 UTC (rev 798) @@ -0,0 +1,54 @@ + package org.jboss.wiki; + +/** + * <p></p> + * + */ +public class FileDataSource implements MediaDataSource { + +/** + * <p>Represents ...</p> + * + */ + private String pathToMedia; + +public boolean preSave() { + // TODO Auto-generated method stub + return false; +} + +public boolean savePage(WikiPage page, String languageCode) { + // TODO Auto-generated method stub + return false; +} + +public boolean postSave() { + // TODO Auto-generated method stub + return false; +} + +public boolean preGet() { + // TODO Auto-generated method stub + return false; +} + +public boolean getPage(String pageName) { + // TODO Auto-generated method stub + return false; +} + +public boolean postGet() { + // TODO Auto-generated method stub + return false; +} + +public boolean getPage(String pageName, String languageCode) { + // TODO Auto-generated method stub + return false; +} + +public boolean save(Media media) { + // TODO Auto-generated method stub + return false; +} + } Added: trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/HashMap.java =================================================================== --- trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/HashMap.java 2005-08-09 20:58:21 UTC (rev 797) +++ trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/HashMap.java 2005-08-09 21:18:14 UTC (rev 798) @@ -0,0 +1,8 @@ + package org.jboss.wiki; + +/** + * <p></p> + * + */ +public class HashMap { + } Added: trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/Media.java =================================================================== --- trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/Media.java 2005-08-09 20:58:21 UTC (rev 797) +++ trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/Media.java 2005-08-09 21:18:14 UTC (rev 798) @@ -0,0 +1,5 @@ +package org.jboss.wiki; + +public class Media { + +} Added: trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/MediaDataSource.java =================================================================== --- trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/MediaDataSource.java 2005-08-09 20:58:21 UTC (rev 797) +++ trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/MediaDataSource.java 2005-08-09 21:18:14 UTC (rev 798) @@ -0,0 +1,72 @@ + package org.jboss.wiki; +/** + * <p></p> + * + */ +public interface MediaDataSource { +/** + * <p>Does ...</p> + * + * + * @return + */ + public boolean preSave(); +/** + * <p>Does ...</p> + * + * + * @return + * @param media + */ + public boolean save(Media media); +/** + * <p>Does ...</p> + * + * + * @param page + * @return + * @param languageCode + */ + public boolean savePage(WikiPage page, String languageCode); +/** + * <p>Does ...</p> + * + * MediaDataSource definition is in Flux. + * + * @return + */ + public boolean postSave(); +/** + * <p>Does ...</p> + * + * + * @return + */ + public boolean preGet(); +/** + * <p>Does ...</p> + * + * + * @return + * @param pageName + */ + public boolean getPage(String pageName); +/** + * <p>Does ...</p> + * + * + * @return + */ + public boolean postGet(); +/** + * <p>Does ...</p> + * + * + * @param pageName + * @return + * @param languageCode + */ + public boolean getPage(String pageName, String languageCode); +} + + Added: trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/MediaInternalization.java =================================================================== --- trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/MediaInternalization.java 2005-08-09 20:58:21 UTC (rev 797) +++ trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/MediaInternalization.java 2005-08-09 21:18:14 UTC (rev 798) @@ -0,0 +1,29 @@ + package org.jboss.wiki; + +import java.util.Set; + +/** + * <p></p> + * + */ +public interface MediaInternalization { +/** + * <p>Does ...</p> + * + * + * @return + * @param pageName + * @param languageCode + */ + public WikiPage getPage(String pageName, String languageCode); +/** + * <p>Does ...</p> + * + * + * @return + * @param pageName + */ + public Set getLanguageCodes(String pageName); +} + + Added: trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/My.uml2 =================================================================== --- trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/My.uml2 2005-08-09 20:58:21 UTC (rev 797) +++ trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/My.uml2 2005-08-09 21:18:14 UTC (rev 798) @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<uml:Model xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:uml="http://www.eclipse.org/uml2/1.0.0/UML" xmi:id="_9z2dYP1YEdmjPcf-8KGMfA"/> Added: trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/PluginDescriptor.java =================================================================== --- trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/PluginDescriptor.java 2005-08-09 20:58:21 UTC (rev 797) +++ trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/PluginDescriptor.java 2005-08-09 21:18:14 UTC (rev 798) @@ -0,0 +1,46 @@ + package org.jboss.wiki; + +/** + * <p></p> + * + */ +public class PluginDescriptor { + +/** + * <p>Does ...</p> + * + * + * @return + */ + public String getThemeJSP() { + // your code here + return null; + } + +/** + * <p>Does ...</p> + * + * + * @return + */ + public WikiPage getDefaultDataObject() { + // your code here + return null; + } + +/** + * <p>Does ...</p> + * + * + * @return + */ + public void refreshPlugins() { + // your code here + + } +/** + * <p></p> + * + */ + public WikiPlugin wikiPlugin; + } Added: trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiContext.java =================================================================== --- trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiContext.java 2005-08-09 20:58:21 UTC (rev 797) +++ trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiContext.java 2005-08-09 21:18:14 UTC (rev 798) @@ -0,0 +1,27 @@ + package org.jboss.wiki; + +import org.jboss.portal.core.model.User; + +/** + * <p></p> + * + */ +public class WikiContext { + +/** + * <p>Represents ...</p> + * + */ + private User user; + +/** + * <p>Represents ...</p> + * + */ + private WikiType requestedType; +/** + * <p></p> + * + */ + public WikiType wikiType; + } Added: trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiEngine.java =================================================================== --- trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiEngine.java 2005-08-09 20:58:21 UTC (rev 797) +++ trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiEngine.java 2005-08-09 21:18:14 UTC (rev 798) @@ -0,0 +1,209 @@ + package org.jboss.wiki; + +import java.util.Map; + +/** + * <p></p> + * + * getLink - gets a link to a given page + * getEditLink - same but link to edit that page + * save - saves page with given attributes + * getContent - retrieves the content from a wiki page and returns it in the type specified by 'type' + * Probably need to have some sort of WikiSession per request with an associated WikiContext, but maybe not--don't want to duplicate PortletSession + */ +public class WikiEngine { + +/** + * <p>Represents ...</p> + * + */ + private String urlBase; + +/** + * <p>Represents ...</p> + * + */ + private Map wikiTypes; + +/** + * <p>Represents ...</p> + * + */ + private Map wikiTypePlugins; +/** + * <p></p> + * + */ + private WikiPagesHolder pages; +/** + * <p></p> + * + */ + public WikiPage wikiPage; +/** + * <p></p> + * + * + * @poseidon-type WikiPage + */ + public java.util.Collection wikiPage_1 = new java.util.TreeSet(); + +/** + * <p>Does ...</p> + * + * + * @param pageName + * @return + * @param wikiContext + */ + public String get(String pageName, WikiContext wikiContext) { + // your code here + return null; + } + +/** + * <p>Does ...</p> + * + * + * @param pageName + * @param content + * @param wikiContext + * @return + */ + public boolean save(String pageName, String content, WikiContext wikiContext) { + // your code here + return false; + } + +/** + * <p>Does ...</p> + * + * + * @param pageName + * @param type + * @return + */ + public String getContent(String pageName, String type) { + // your code here + return null; + } + +/** + * <p>Does ...</p> + * + * + * @param pageName + * @return + * @param wikiContext + */ + public WikiPage getByName(String pageName, WikiContext wikiContext) { + // your code here + return null; + } + +/** + * <p>Does ...</p> + * + * + * @return + */ + public void init() { + readPlugins(); + } + +/** + * <p>Does ...</p> + * + * + * @return + */ + protected void loadWikiTypes() { + // your code here + //return null; + } + +/** + * <p>Does ...</p> + * + * + * @return + */ + protected void loadWikiTypePlugins() { + // your code here + //return null; + } + +/** + * <p>Does ...</p> + * + * + * @return + * @param pageName + * @param wikiContext + */ + public void lock(String pageName, WikiContext wikiContext) { + // your code here + //return null; + } + +/** + * <p>Does ...</p> + * + * + * @return + * @param pageName + * @param wikiContext + */ + public void unlock(String pageName, WikiContext wikiContext) { + // your code here + //return null; + } + +/** + * <p>Does ...</p> + * + * + * @return + * @param path + * @param wikiContext + */ + public void getByPath(String path, WikiContext wikiContext) { + // your code here + //return null; + } + +/** + * <p>Does ...</p> + * + * + * @return + * @param pageName + * @param wikiContext + */ + public void setProperty(String pageName, WikiContext wikiContext) { + // your code here + //return null; + } + +/** + * <p>Does ...</p> + * + * + * @return + * @param wikiType + * @param userCredentials + */ + public void getWikiContext(String wikiType, Credentials userCredentials) { + // your code here + //return null; + } + + public void readPlugins() { + + } +/** + * <p></p> + * + */ + public WikiPortlet wikiPortlet; + } Added: trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiPage.java =================================================================== --- trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiPage.java 2005-08-09 20:58:21 UTC (rev 797) +++ trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiPage.java 2005-08-09 21:18:14 UTC (rev 798) @@ -0,0 +1,210 @@ + package org.jboss.wiki; + +import java.io.Serializable; + +/** + * <p></p> + * + */ +public class WikiPage implements Serializable, WikiProperties { + +/** + * + */ + private static final long serialVersionUID = 1L; + +/** + * <p>Represents ...</p> + * + */ + private String name; + +/** + * <p>Represents ...</p> + * + * WikiPage + * This class is _abstract_ + * and has to be extended by the class + * that we're willing to show our + * content + * + * functions to be extended: + * WikiPage(...) - constructor + * getAttributes() - gets set of atributes + * to be send to the appropriate JSP page + * saveThisPage(data:Object) - saves + * next version of this page with new data + * getJSPPath() - gets apropriate JSP page + * to show plugin + * getDataProviderName - gets name of + * the plugin _must_ be the same as in the + * plugin name in plugin.xml + */ + private String lastAuthor; + +/** + * <p>Represents ...</p> + * + */ + private int lastVersion; + +/** + * <p>Represents ...</p> + * + */ + private java.util.Date editDate; + +/** + * <p>Represents ...</p> + * + */ + private MediaDataSource mediaDataSource; +/** + * <p></p> + * + */ + public WikiPagesHolder wikiPagesHolder; +/** + * <p></p> + * + */ + public WikiEngine wikiEngine; +/** + * <p></p> + * + */ + public WikiEngine wikiEngine_1; + +/** + * <p>Does ...</p> + * + * + * @return + * @param pageName + * @param data + * @param pageAuthor + * @param pageDate + */ + public static WikiPage createPage(String pageName, Object data, String pageAuthor, java.util.Date pageDate) { + // your code here + return null; + } + +/** + * <p>Does ...</p> + * + * + * @param pageName + * @param pageAuthor + * @param path + */ + public WikiPage(String pageName, Credentials pageAuthor, String path) { + // your code here + } + +/** + * <p>Does ...</p> + * + * + * @return + */ + public HashMap getAttributes() { + // your code here + return null; + } + +/** + * <p>Does ...</p> + * + */ + public void save() { + // your code here + } + +/** + * <p>Does ...</p> + * + * + * @return + */ + public String getPath() { + // your code here + return null; + } + +/** + * <p>Does ...</p> + * + * + * @return + * @param mds + */ + public boolean setMediaDataSource(MediaDataSource mds) { + // your code here + return false; + } + +/** + * <p>Does ...</p> + * + * + * @param version + * @return + */ + public boolean updateToVersion(int version) { + // your code here + return false; + } + +/** + * <p>Does ...</p> + * + * + * @return + * @param version + */ + public WikiPage getPageAtVersion(int version) { + // your code here + return null; + } + +/** + * <p>Does ...</p> + * + * + * @return + */ + public String getContent() { + // your code here + return null; + } + +/** + * <p>Does ...</p> + * + * + * @return + */ + public MediaDataSource getMediaDataSource() { + // your code here + return null; + } + +/** + * <p>Does ...</p> + * + * + * @return + * @param text + */ + public void setWikiText(int text) { + // your code here + //return null; + } + +/** + * <p></p> + * + */ + public MediaInternalization mediaInternalization; + } Added: trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiPagesHolder.java =================================================================== --- trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiPagesHolder.java 2005-08-09 20:58:21 UTC (rev 797) +++ trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiPagesHolder.java 2005-08-09 21:18:14 UTC (rev 798) @@ -0,0 +1,52 @@ + package org.jboss.wiki; + +/** + * <p></p> + * + * pages is HashMap<String, WikiPage> + * get easly to each page by its name. + * plus basic functions for pages handling + */ +public class WikiPagesHolder { + +/** + * <p>Represents ...</p> + * + * pages is HashMap<String, WikiPage> + * get easly to each page by its name. + * plus basic functions for pages handling + */ + public HashMap pages; + +/** + * <p></p> + * + */ + public WikiEngine wikiEngine; + +/** + * <p>Does ...</p> + * + * + * @param pageName + * @param user + * @return + */ + public WikiPage getPageByName(String pageName, Credentials user) { + // your code here + return null; + } + +/** + * <p>Does ...</p> + * + * + * @return + * @param pageName + */ + public String getHtmlText(String pageName) { + // your code here + return null; + } + + } Added: trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiPlugin.java =================================================================== --- trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiPlugin.java 2005-08-09 20:58:21 UTC (rev 797) +++ trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiPlugin.java 2005-08-09 21:18:14 UTC (rev 798) @@ -0,0 +1,34 @@ +package org.jboss.wiki; + +/** + * <p></p> + * + */ +public interface WikiPlugin { +/** + * <p></p> + * + */ + +/** + * <p>Does ...</p> + * + * + * @return + * @param content + */ + public WikiPage apply(WikiPage wikiPage); + +/** + * <p>Does ...</p> + * + * + * @return + */ + public void next(); +/** + * <p></p> + * + */ + + } Added: trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiPluginChain.java =================================================================== --- trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiPluginChain.java 2005-08-09 20:58:21 UTC (rev 797) +++ trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiPluginChain.java 2005-08-09 21:18:14 UTC (rev 798) @@ -0,0 +1,50 @@ + package org.jboss.wiki; + +import java.util.List; + +/** + * <p></p> + * + */ +public class WikiPluginChain { + +/** + * <p>Represents ...</p> + * + */ + private List pluginList; +/** + * <p></p> + * + */ + public WikiType wikiType; + +/** + * <p>Does ...</p> + * + * + * @return + * @param wikiPlugin + */ + public void addPlugin(WikiPlugin wikiPlugin) { + // your code here + //return null; + } + +/** + * <p>Does ...</p> + * + * + * @return + * @param pluginDescriptor + */ + public void init(PluginDescriptor pluginDescriptor) { + // your code here + //return null; + } +/** + * <p></p> + * + */ + public WikiPlugin wikiPlugin; + } Modified: trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiPortlet.java =================================================================== --- trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiPortlet.java 2005-08-09 20:58:21 UTC (rev 797) +++ trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiPortlet.java 2005-08-09 21:18:14 UTC (rev 798) @@ -18,6 +18,8 @@ final static String jspPath = "/WEB-INF/jsp/"; + private String page = "Wiki.jsp"; + public void init() { } @@ -36,6 +38,13 @@ else { System.out.println("BRAK PARAMETROW!!!"); } + + if ((rReq.getParameter("action") != null)&&(rReq.getParameter("action").equals("Edit"))) { + page = "Edit.jsp"; + } + else { + page = "Wiki.jsp"; + } } public void doView(JBossRenderRequest rReq, JBossRenderResponse rRes) throws PortletException, java.io.IOException { @@ -70,7 +79,7 @@ if(javax.portlet.WindowState.NORMAL.equals(rReq.getWindowState()) || javax.portlet.WindowState.MAXIMIZED.equals(rReq.getWindowState())) { rRes.setContentType("text/html"); - javax.portlet.PortletRequestDispatcher pRD = this.getPortletContext().getRequestDispatcher(jspPath+"test.jsp"); + javax.portlet.PortletRequestDispatcher pRD = this.getPortletContext().getRequestDispatcher(jspPath+page); pRD.include(rReq, rRes); return; } Added: trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiProperties.java =================================================================== --- trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiProperties.java 2005-08-09 20:58:21 UTC (rev 797) +++ trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiProperties.java 2005-08-09 21:18:14 UTC (rev 798) @@ -0,0 +1,35 @@ +package org.jboss.wiki; + + +/** + * <p></p> + * + */ +public interface WikiProperties { + +/** + * <p>Represents ...</p> + * + */ + boolean EDITABLE = false; + +/** + * <p>Represents ...</p> + * + */ + boolean PRIVATE = false; + +/** + * <p>Represents ...</p> + * + */ + boolean DELETABLE = false; + +/** + * <p>Represents ...</p> + * + */ + boolean EXISTS = false; +} + + Added: trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiType.java =================================================================== --- trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiType.java 2005-08-09 20:58:21 UTC (rev 797) +++ trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiType.java 2005-08-09 21:18:14 UTC (rev 798) @@ -0,0 +1,65 @@ + package org.jboss.wiki; + +import java.util.List; + +/** + * <p></p> + * + */ +public class WikiType { + +/** + * <p>Represents ...</p> + * + */ + private List pluginChain; +/** + * <p></p> + * + */ + public WikiTypeDescriptor wikiTypeDescriptor; +/** + * <p></p> + * + */ + public WikiPluginChain wikiPluginChain; +/** + * <p></p> + * + */ + public WikiContext wikiContext; + +/** + * <p>Does ...</p> + * + * + * @return + */ + public void getPluginChain() { + // your code here + //return null; + } + +/** + * <p>Does ...</p> + * + * + * @return + */ + public void initPluginChain() { + // your code here + //return null; + } + +/** + * <p>Does ...</p> + * + * + * @return + * @param content + */ + public String apply(String content) { + // your code here + return null; + } + } Added: trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiTypeDescriptor.java =================================================================== --- trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiTypeDescriptor.java 2005-08-09 20:58:21 UTC (rev 797) +++ trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiTypeDescriptor.java 2005-08-09 21:18:14 UTC (rev 798) @@ -0,0 +1,21 @@ + package org.jboss.wiki; + +import java.util.List; + +/** + * <p></p> + * + */ +public class WikiTypeDescriptor { + +/** + * <p>Represents ...</p> + * + */ + private List pluginNameList; +/** + * <p></p> + * + */ + public WikiType wikiType; + } Added: trunk/forge/portal-extensions/forge-wiki/src/web/WEB-INF/jsp/Edit.jsp =================================================================== --- trunk/forge/portal-extensions/forge-wiki/src/web/WEB-INF/jsp/Edit.jsp 2005-08-09 20:58:21 UTC (rev 797) +++ trunk/forge/portal-extensions/forge-wiki/src/web/WEB-INF/jsp/Edit.jsp 2005-08-09 21:18:14 UTC (rev 798) @@ -0,0 +1,85 @@ +<%@ page language="java" extends="org.jboss.portal.core.servlet.jsp.PortalJsp" %> +<%@ taglib uri="/WEB-INF/tld/portlet.tld" prefix="n" %> +<%@ taglib uri="/WEB-INF/tld/forge.tld" prefix="forge" %> +<!--<%@ taglib uri="/WEB-INF/tld/wiki.tld" prefix="wiki" %>--> +<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet" %> +<%@ page isELIgnored ="false" %> +<portlet:defineObjects/> + +<h2>JBoss Wiki: Main</h2> + +<hr /> + +<% + String actionURL = (String)request.getAttribute("actionURL"); +%> + +<form method="post" action="<%=actionURL%>"> +<textarea name="wikiContent" rows="40" cols="80" style="width:100%;"> +<H3>Welcome to JBoss Labs</H3> + +<P> +<B>JBoss Labs</B> is: +<UL> +<LI> a Professional Open Source community where Professional Open Source programmers around the world come to collaborate and create software for everyone +</LI> +<LI> the culmination of the efforts of developers (listed below as well as of all contributors to JEMS) to bring about a set of processes and infrastructure that enable the communication of ideas between the open source developers and their community. +</LI> +</UL> +<P> +<B>The Place To Be Is Our Wiki</B>: +<UL> +<LI> the place where we create and document the processes for Professional Open Source development. + +</LI> +<LI> main goal of Wiki is to provide an easy environment for POS communities to provide access to the products of their ideas. +</LI> +</UL> +<P> +JBoss is helping to nurture communication in open source communities with its JEMS offering a commitment to Professional Open Source developers around the world . +<P> +<IMG CLASS="inline" SRC="http://labs.jboss.com/file-access/default/members/default/images/LabsLayers.png" ALT="http://labs.jboss.com/file-access/default/members/default/images/LabsLayers.png" /> +<P> +JBoss Labs consists of: +<P> +<UL> +<LI> A set of <A CLASS="wikipage" HREF="Wiki.jsp?page=Processes">processes</A> that enable Professional Open Source software development. + +</LI> +<LI> An infrastructure, called <A CLASS="wikipage" HREF="Wiki.jsp?page=WhatIsJBossForge">JBoss Forge</A>, on which these processes manifest. +</LI> +<LI> A <A CLASS="wikipage" HREF="Wiki.jsp?page=JBossCommitters">community of developers</A> around the world contributing constantly. +</LI> +<LI> A <A CLASS="wikipage" HREF="Wiki.jsp?page=Projects">set of projects</A> which utilize the processes and infrustructure of JBoss Labs. + +</LI> +<LI> A Professional Open Source standard by which we measure quality and service offerings. +</LI> +<LI> And finally, a pathway for top-notch open source projects to enter the JEMS sofware suite--a symbol of Professional Open Source excellence and quality. +</LI> +</UL> +<P> +JBoss Labs' infrastructure is being developed by a community of developers from around the world. +<P> +Our developers are:<BR /> +<UL> +<LI><U>Damon Sicore</U><A HREF="Edit.jsp?page=Damon">?</A><BR /> + +</LI> +<LI><A CLASS="wikipage" HREF="Wiki.jsp?page=Rali">Rali Genova</A><BR /> +</LI> +<LI><A CLASS="wikipage" HREF="Wiki.jsp?page=Tomek">Tomek Szymański</A><BR /> +</LI> +<LI><A CLASS="wikipage" HREF="Wiki.jsp?page=Adam">Adam Warski</A><BR /> +</LI> +</UL> +<BR /> +and others... +<P> +This infrastructure is hosting several open source projects, and by the time you read this, there should be a few more. The current projects hosted on forge can be found on the <A CLASS="wikipage" HREF="Wiki.jsp?page=Projects">projects page</A>. + +</textarea> +<input type="submit" value="Save" name="editAction" /> +<input type="submit" value="Preview" name="editAction" /> +<input type="submit" value="Cancel" name="editAction" /> +</form> Added: trunk/forge/portal-extensions/forge-wiki/src/web/WEB-INF/jsp/Wiki.jsp =================================================================== --- trunk/forge/portal-extensions/forge-wiki/src/web/WEB-INF/jsp/Wiki.jsp 2005-08-09 20:58:21 UTC (rev 797) +++ trunk/forge/portal-extensions/forge-wiki/src/web/WEB-INF/jsp/Wiki.jsp 2005-08-09 21:18:14 UTC (rev 798) @@ -0,0 +1,94 @@ +<%@ page language="java" extends="org.jboss.portal.core.servlet.jsp.PortalJsp" %> +<%@ taglib uri="/WEB-INF/tld/portlet.tld" prefix="n" %> +<%@ taglib uri="/WEB-INF/tld/forge.tld" prefix="forge" %> +<!--<%@ taglib uri="/WEB-INF/tld/wiki.tld" prefix="wiki" %>--> +<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet" %> +<%@ page isELIgnored ="false" %> +<portlet:defineObjects/> + +<h2>JBoss Wiki: Main</h2> + +<h3>Page name</h3> +<div class="wikiTrail">Your trail:</div> +<hr /> + +<% + String actionURL = (String)request.getAttribute("actionURL"); +%> + +<table> +<tr> +<td class="wikiContent"> +<H3>Welcome to JBoss Labs</H3> + +<P> +<B>JBoss Labs</B> is: +<UL> +<LI> a Professional Open Source community where Professional Open Source programmers around the world come to collaborate and create software for everyone +</LI> +<LI> the culmination of the efforts of developers (listed below as well as of all contributors to JEMS) to bring about a set of processes and infrastructure that enable the communication of ideas between the open source developers and their community. +</LI> +</UL> +<P> +<B>The Place To Be Is Our Wiki</B>: +<UL> +<LI> the place where we create and document the processes for Professional Open Source development. + +</LI> +<LI> main goal of Wiki is to provide an easy environment for POS communities to provide access to the products of their ideas. +</LI> +</UL> +<P> +JBoss is helping to nurture communication in open source communities with its JEMS offering a commitment to Professional Open Source developers around the world . +<P> +<IMG CLASS="inline" SRC="http://labs.jboss.com/file-access/default/members/default/images/LabsLayers.png" ALT="http://labs.jboss.com/file-access/default/members/default/images/LabsLayers.png" /> +<P> +JBoss Labs consists of: +<P> +<UL> +<LI> A set of <A CLASS="wikipage" HREF="Wiki.jsp?page=Processes">processes</A> that enable Professional Open Source software development. + +</LI> +<LI> An infrastructure, called <A CLASS="wikipage" HREF="Wiki.jsp?page=WhatIsJBossForge">JBoss Forge</A>, on which these processes manifest. +</LI> +<LI> A <A CLASS="wikipage" HREF="Wiki.jsp?page=JBossCommitters">community of developers</A> around the world contributing constantly. +</LI> +<LI> A <A CLASS="wikipage" HREF="Wiki.jsp?page=Projects">set of projects</A> which utilize the processes and infrustructure of JBoss Labs. + +</LI> +<LI> A Professional Open Source standard by which we measure quality and service offerings. +</LI> +<LI> And finally, a pathway for top-notch open source projects to enter the JEMS sofware suite--a symbol of Professional Open Source excellence and quality. +</LI> +</UL> +<P> +JBoss Labs' infrastructure is being developed by a community of developers from around the world. +<P> +Our developers are:<BR /> +<UL> +<LI><U>Damon Sicore</U><A HREF="Edit.jsp?page=Damon">?</A><BR /> + +</LI> +<LI><A CLASS="wikipage" HREF="Wiki.jsp?page=Rali">Rali Genova</A><BR /> +</LI> +<LI><A CLASS="wikipage" HREF="Wiki.jsp?page=Tomek">Tomek Szymański</A><BR /> +</LI> +<LI><A CLASS="wikipage" HREF="Wiki.jsp?page=Adam">Adam Warski</A><BR /> +</LI> +</UL> +<BR /> +and others... +<P> +This infrastructure is hosting several open source projects, and by the time you read this, there should be a few more. The current projects hosted on forge can be found on the <A CLASS="wikipage" HREF="Wiki.jsp?page=Projects">projects page</A>. + + +<td> +</tr> +<tr> +<td class="wikiFooter"> +<hr /> +<a href="<%=actionURL%>&action=Edit">Edit this page</a> <a href="<%=actionURL%>">More info...</a> <a href="<%=actionURL%>">Attach file...</a> +</td> +</tr> +</table> + Added: trunk/forge/portal-extensions/forge-wiki/src/web/WEB-INF/tld/wiki.tld =================================================================== --- trunk/forge/portal-extensions/forge-wiki/src/web/WEB-INF/tld/wiki.tld 2005-08-09 20:58:21 UTC (rev 797) +++ trunk/forge/portal-extensions/forge-wiki/src/web/WEB-INF/tld/wiki.tld 2005-08-09 21:18:14 UTC (rev 798) @@ -0,0 +1,25 @@ +<taglib xmlns="http://java.sun.com/xml/ns/j2ee" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee web-jsptaglibrary_2_0.xsd" + version="2.0"> + <!-- + JBoss, the OpenSource J2EE webOS + Distributable under LGPL license. + See terms of license at gnu.org. + --> + <tlib-version>1.1</tlib-version> + <jsp-version>2.0</jsp-version> + <shortname>forge</shortname> + <info>Forge tags</info> + + <tag> + <name>wikiEditLink</name> + <tagclass>org.jboss.wiki.taglib.wikiEditLinkTag</tagclass> + <attribute> + <name>page</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute>s + </tag> + +</taglib> |