Add utilities
[lgpl/argeo-commons.git] / 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("/"))