From: <jbo...@li...> - 2005-08-23 15:28:16
|
Author: szimano Date: 2005-08-23 11:28:08 -0400 (Tue, 23 Aug 2005) New Revision: 925 Modified: trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/FileDataSource.java Log: misspel :) Modified: 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-23 15:10:45 UTC (rev 924) +++ trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/FileDataSource.java 2005-08-23 15:28:08 UTC (rev 925) @@ -35,7 +35,7 @@ private String pathToMedia; - private String pathToAttachements; + private String pathToAttachments; private Properties fileDSProps; @@ -62,9 +62,9 @@ if (fileDSProps.getProperty("pathToMedia") != null) { pathToMedia = fileDSProps.getProperty("pathToMedia"); System.out.println("Path to media is: " + pathToMedia); - pathToAttachements = fileDSProps.getProperty("pathToAttachements"); + pathToAttachments = fileDSProps.getProperty("pathToAttachements"); System.out - .println("Path to attachements is: " + pathToAttachements); + .println("Path to attachements is: " + pathToAttachments); } else { System.err .println("Your properties file lacks of pathToMedia property. It will not run properly ! Please update " @@ -215,7 +215,7 @@ public Properties getAttProps(String pageName, String attName) { Properties attProps = new Properties(); - File propFile = new File(pathToAttachements + "/" + pageName + "-att/" + File propFile = new File(pathToAttachments + "/" + pageName + "-att/" + attName + "-dir/"); if (!propFile.exists()) { @@ -223,19 +223,19 @@ propFile.mkdirs(); } - propFile = new File(pathToAttachements + "/" + pageName + "-att/" - + attName + "-dir/attachement.properties"); + propFile = new File(pathToAttachments + "/" + pageName + "-att/" + + attName + "-dir/attachment.properties"); try { attProps.load(new FileInputStream(propFile)); } catch (IOException ioe) { System.err - .println("Cannot read attachement.properties for attachement: " - + pathToAttachements + .println("Cannot read attachment.properties for attachement: " + + pathToAttachments + "/" + pageName + "-att/" - + attName + "-dir/attachement.properties\n" + ioe); + + attName + "-dir/attachment.properties\n" + ioe); } return attProps; @@ -243,18 +243,18 @@ public void saveAttProps(Properties props, String pageName, String attName) { try { - props.store(new FileOutputStream(new File(pathToAttachements + "/" + props.store(new FileOutputStream(new File(pathToAttachments + "/" + pageName + "-att/" + attName - + "-dir/attachement.properties")), + + "-dir/attachment.properties")), "Saved by FileDataSource of JBoss Wiki"); } catch (Exception ioe) { System.err - .println("Cannot store attachement.properties for attachement: " - + pathToAttachements + .println("Cannot store attchement.properties for attachement: " + + pathToAttachments + "/" + pageName + "-att/" - + attName + "-dir/attachements.properties\n" + ioe); + + attName + "-dir/attachments.properties\n" + ioe); } } @@ -453,7 +453,7 @@ } String[] extension = attName.split("\\."); - String fileName = pathToAttachements + String fileName = pathToAttachments + "/" + pageName + "-att/" @@ -503,7 +503,7 @@ public Set<String> getAttachementsSet(WikiPage page) { Set<String> attSet = new HashSet<String>(); - File attDir = new File(pathToAttachements+"/"+page.getName()+"-att"); + File attDir = new File(pathToAttachments+"/"+page.getName()+"-att"); if (attDir.exists()) { File[] attachements = attDir.listFiles(); |