Add utilities
authorMathieu Baudier <mbaudier@argeo.org>
Sun, 18 Apr 2010 15:26:32 +0000 (15:26 +0000)
committerMathieu Baudier <mbaudier@argeo.org>
Sun, 18 Apr 2010 15:26:32 +0000 (15:26 +0000)
git-svn-id: https://svn.argeo.org/commons/trunk@3474 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc

server/runtime/org.argeo.server.jackrabbit/src/main/java/org/argeo/jcr/JcrUtils.java

index c0276ae023d8c9a2e4e9bd7711665680ef267fd8..8792a36de3aeb3e79d02f2376c68aaf9baee4660 100644 (file)
@@ -38,6 +38,12 @@ public class JcrUtils {
                        throw new ArgeoException("Query returned more than one node.");
                return node;
        }
+       
+       public static String removeForbiddenCharacters(String str){
+               return str.replace('[', '_').replace(']', '_')
+               .replace('/', '_').replace('*', '_');
+
+       }
 
        public static String parentPath(String path) {
                if (path.equals("/"))