Author: adamw Date: 2005-08-19 11:48:45 -0400 (Fri, 19 Aug 2005) New Revision: 903 Modified: trunk/forge/portal-extensions/forge-common/src/java/org/jboss/forge/common/blog/BlogUpdater.java trunk/forge/portal-extensions/forge-common/src/java/org/jboss/forge/common/content/ContentManager.java trunk/forge/portal-extensions/forge-common/src/java/org/jboss/forge/common/content/FileBasedContentManager.java trunk/forge/portal-extensions/forge-common/src/java/org/jboss/forge/common/content/SvnContentManager.java trunk/forge/portal-extensions/forge-forums/project.xml trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/portal-forums-lib.jar trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/portal-forums.war Log: New forums & directories instead of catalogues Modified: trunk/forge/portal-extensions/forge-common/src/java/org/jboss/forge/common/blog/BlogUpdater.java =================================================================== --- trunk/forge/portal-extensions/forge-common/src/java/org/jboss/forge/common/blog/BlogUpdater.java 2005-08-18 19:48:21 UTC (rev 902) +++ trunk/forge/portal-extensions/forge-common/src/java/org/jboss/forge/common/blog/BlogUpdater.java 2005-08-19 15:48:45 UTC (rev 903) @@ -38,7 +38,7 @@ this.blogPath = blogPath; forgeHelper = new ForgeHelper(); - portals = cm.getCatalogues(""); + portals = cm.getDirectories(""); } /** @@ -74,12 +74,12 @@ */ private void updatePortal(String portalName) { // Getting ids of all projects in the given portal - String projectIds[] = cm.getCatalogues(portalName + "/" + String projectIds[] = cm.getDirectories(portalName + "/" + ProjectsHelper.MEMBERS_DIR); for (int i = 0; i < projectIds.length; i++) { // Getting blog entries that are held in the repository. - String[] repoEntries = cm.getResourceNames(portalName + "/" + String[] repoEntries = cm.getResources(portalName + "/" + ProjectsHelper.MEMBERS_DIR + "/" + projectIds[i] + "/" + ProjectsHelper.BLOG_DIR); Modified: trunk/forge/portal-extensions/forge-common/src/java/org/jboss/forge/common/content/ContentManager.java =================================================================== --- trunk/forge/portal-extensions/forge-common/src/java/org/jboss/forge/common/content/ContentManager.java 2005-08-18 19:48:21 UTC (rev 902) +++ trunk/forge/portal-extensions/forge-common/src/java/org/jboss/forge/common/content/ContentManager.java 2005-08-19 15:48:45 UTC (rev 903) @@ -57,20 +57,20 @@ throws IOException; /** - * Adds a new, empty catalogue to the content manager. + * Adds a new, empty directory to the content manager. * * @param parent - * Parent catalogue of the new catalogue. + * Parent directory of the new catalogue. * @param name - * Name of the resource to add. - * @throws IOException When the catalogue exists or there is + * Name of the directory to add. + * @throws IOException When the directory exists or there is * any other content-manager related error. */ - public abstract void addCatalogue(String parent, String name) + public abstract void addDirectory(String parent, String name) throws IOException; /** - * Deletes a given resource or catalogue from the content manager. + * Deletes a given resource or directory from the content manager. * * @param name * Name of the resource to delete. @@ -80,10 +80,11 @@ public abstract void delete(String name) throws IOException; /** - * Commits a resource (or catalogue) to the repository. + * Commits a resource (or directory) to the repository. All child + * resources and directories will also be commited. * * @param names - * Name of the resource/catalogue to commit. + * Name of the resource/directory to commit. * @throws IOException */ public void commit(String name) throws IOException { @@ -149,16 +150,16 @@ public abstract void update(); /** - * Gets names of all resources that can be found in the given catalogue. - * @param catalogue Catalogue from which to read resources. + * Gets names of all resources that can be found in the given directory. + * @param directory Directory from which to read resources. * @return An array of resource names. */ - public abstract String[] getResourceNames(String catalogue); + public abstract String[] getResources(String directory); /** - * Gets names of all sub-catalogues that can be found in the given catalogue. - * @param catalogue Catalogue from which to read sub-catalogues. + * Gets names of all sub-directories that can be found in the given catalogue. + * @param directory Directory from which to read sub-catalogues. * @return An array of catalogues names. */ - public abstract String[] getCatalogues(String catalogue); + public abstract String[] getDirectories(String directory); } Modified: trunk/forge/portal-extensions/forge-common/src/java/org/jboss/forge/common/content/FileBasedContentManager.java =================================================================== --- trunk/forge/portal-extensions/forge-common/src/java/org/jboss/forge/common/content/FileBasedContentManager.java 2005-08-18 19:48:21 UTC (rev 902) +++ trunk/forge/portal-extensions/forge-common/src/java/org/jboss/forge/common/content/FileBasedContentManager.java 2005-08-19 15:48:45 UTC (rev 903) @@ -113,11 +113,11 @@ } /* (non-Javadoc) - * @see org.jboss.forge.common.content.ContentManager#getResourceNames(java.lang.String) + * @see org.jboss.forge.common.content.ContentManager#getResources(java.lang.String) */ @Override - public String[] getResourceNames(String catalogue) { - String[] ret = new File(getSystemFilePath(catalogue)) + public String[] getResources(String directory) { + String[] ret = new File(getSystemFilePath(directory)) .list(new FilenameFilter() { public boolean accept(File dir, String name) { if (new File(dir.getAbsolutePath() + File.separator @@ -130,11 +130,11 @@ } /* (non-Javadoc) - * @see org.jboss.forge.common.content.ContentManager#getCatalogues(java.lang.String) + * @see org.jboss.forge.common.content.ContentManager#getDirectories(java.lang.String) */ @Override - public String[] getCatalogues(String catalogue) { - String[] ret = new File(getSystemFilePath(catalogue)) + public String[] getDirectories(String directory) { + String[] ret = new File(getSystemFilePath(directory)) .list(new FilenameFilter() { public boolean accept(File dir, String name) { if (name.startsWith(".")) Modified: trunk/forge/portal-extensions/forge-common/src/java/org/jboss/forge/common/content/SvnContentManager.java =================================================================== --- trunk/forge/portal-extensions/forge-common/src/java/org/jboss/forge/common/content/SvnContentManager.java 2005-08-18 19:48:21 UTC (rev 902) +++ trunk/forge/portal-extensions/forge-common/src/java/org/jboss/forge/common/content/SvnContentManager.java 2005-08-19 15:48:45 UTC (rev 903) @@ -165,10 +165,10 @@ } /* (non-Javadoc) - * @see org.jboss.forge.common.content.ContentManager#addCatalogue(java.lang.String, java.lang.String) + * @see org.jboss.forge.common.content.ContentManager#addDirectory(java.lang.String, java.lang.String) */ @Override - public void addCatalogue(String parent, String name) throws IOException { + public void addDirectory(String parent, String name) throws IOException { // Checking the name. if (!checkNewName(name)) throw new IOException("Invalid new catalogue name."); @@ -207,7 +207,7 @@ "rO@B5oPfff"); System.out.println("Adding cat"); - cm.addCatalogue("", "zzz"); + cm.addDirectory("", "zzz"); System.out.println("Adding res"); cm.addResource("zzz", "aaa"); cm.write("zzz/aaa", "bbb", false); Modified: trunk/forge/portal-extensions/forge-forums/project.xml =================================================================== --- trunk/forge/portal-extensions/forge-forums/project.xml 2005-08-18 19:48:21 UTC (rev 902) +++ trunk/forge/portal-extensions/forge-forums/project.xml 2005-08-19 15:48:45 UTC (rev 903) @@ -6,6 +6,7 @@ --> <project> <pomVersion>3</pomVersion> + <extend>../common.xml</extend> <id>jbossforums</id> <name>JBoss Forums with forge fixes</name> <currentVersion>1.0</currentVersion> Modified: trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/portal-forums-lib.jar =================================================================== (Binary files differ) Modified: trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/portal-forums.war =================================================================== (Binary files differ) |