AR-380 - Export/Import of Forums/Discussions failed.

AR-395 - Provide abstract bean definition for DictionaryBootstrap
Fix build issue; JCR Import failed due to recent extension config changes
Fix issue in ISO9075 encoder; failed to encode colon properly meaning that Discussion Posts (with have colon seperated dates in their name) were not importing/exporting.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2299 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
David Caruana
2006-02-05 16:25:30 +00:00
parent 2c72626944
commit 70e55cebd5
17 changed files with 529 additions and 93 deletions

View File

@@ -64,7 +64,7 @@ public class ISO9075
{
return toEncode;
}
else if (XMLChar.isValidName(toEncode) && (toEncode.indexOf("_x") == -1))
else if (XMLChar.isValidName(toEncode) && (toEncode.indexOf("_x") == -1) && (toEncode.indexOf(':') == -1))
{
return toEncode;
}

View File

@@ -47,7 +47,7 @@ public class ISO9075Test extends TestCase
"_x0020__x0060__x00ac__x00a6__x0021__x0022__x00a3__x0024__x0025__x005e__x0026__x002a__x0028__x0029_-__x003d__x002b__x0009__x000a__x005c__x0000__x005b__x005d__x007b__x007d__x003b__x0027__x0023__x003a__x0040__x007e__x002c_._x002f__x003c__x003e__x003f__x005c__x007c_",
ISO9075.encode(" `<60><>!\"<EFBFBD>$%^&*()-_=+\t\n\\\u0000[]{};'#:@~,./<>?\\|"));
assertEquals("\u0123_x4567_\u8900_xabcd__xefff__xT65A_", ISO9075.encode("\u0123\u4567\u8900\uabcd\uefff_xT65A_"));
assertEquals("_x003a_", ISO9075.encode(":"));
}
public void testDeEncoding()

View File

@@ -62,6 +62,32 @@ public class NodeStoreInspector
return builder.toString();
}
/**
* Dumps the contents of a node
*
* @param nodeService
* @param nodeRef
* @return
*/
public static String dumpNode(NodeService nodeService, NodeRef nodeRef)
{
StringBuilder builder = new StringBuilder();
if (nodeService.exists(nodeRef) == true)
{
builder.append(outputNode(0, nodeService, nodeRef));
}
else
{
builder.
append("The node ").
append(nodeRef.toString()).
append(" does not exist.");
}
return builder.toString();
}
/**
* Output the node