diff --git a/config/alfresco/messages/webclient_de.properties b/config/alfresco/messages/webclient_de.properties
index 7887ac9273..916b2d0f74 100644
--- a/config/alfresco/messages/webclient_de.properties
+++ b/config/alfresco/messages/webclient_de.properties
@@ -2154,3 +2154,36 @@ msg_err_pattern_invalid_expiration_date_on_submit=Bitte w\u00e4hlen Sie ein Abla
# Team properties
team_login_warning=Die angeforderte Alfresco Explorer-Seite wird nicht unterst\u00fctzt. Greifen Sie nur nach Anweisung des Alfresco Supports auf diese Seite zu.
+
+#
+# ALF-11956 WCM Accessibility. XForms
+#
+
+# Date/Time picker
+time_picker_title=Zeitauswahl
+time_picker_button_title=Schaltfl\u00e4che f\u00fcr Zeitauswahl
+date_picker_title=Datumsauswahl
+date_picker_button_title=Schaltfl\u00e4che f\u00fcr Datumsauswahl
+date_time_picker_title=Datums-/Zeitauswahl
+date_time_picker_button_title=Schaltfl\u00e4che f\u00fcr Datums-/Zeitauswahl
+increase_week_label=Ausgew\u00e4hltes Datum um eine Woche nach vorne verschieben
+decrease_week_label=Ausgew\u00e4hltes Datum um eine Woche zur\u00fcck verschieben
+increase_month_label=Ausgew\u00e4hltes Datum um einen Monat nach vorne verschieben
+decrease_month_label=Ausgew\u00e4hltes Datum um einen Monat zur\u00fcck verschieben
+
+# VGroup and Repeat widgets
+add_item_title=Element hinzuf\u00fcgen
+move_up_title=Element nach oben verschieben
+move_down_title=Element nach unten verschieben
+remove_item_title=Element entfernen
+
+# Common
+sandbox_title_extension=Sandbox
+item_title=Element
+mandatory_parameter=Pflichtfeld
+state_expanded=Erweitert
+state_not_expanded=Nicht erweitert
+select_path_menu=Das aktuelle Verzeichnis (Eingabetaste dr\u00fccken, um einen anderen Ordner aus der Men\u00fcliste auszuw\u00e4hlen)
+wizard_command_buttons_description=Befehlsschaltfl\u00e4chen f\u00fcr den Assistenten. Mit diesen Schaltfl\u00e4chen k\u00f6nnen Sie zum n\u00e4chsten oder vorherigen Schritt gehen oder den Assistenten beenden bzw. abbrechen
+accessibility_validation_message=Einige Felder enthalten ung\u00fcltige Daten. Dr\u00fccken Sie die Tabulatortaste bzw. die Umschalt- und die Tabulatortaste, um zu den Feldern mit ung\u00fcltigen Daten zu gehen. Dr\u00fccken Sie die Tasten Alt\u00a0+\u00a0V (Internet Explorer) bzw. Alt\u00a0+ Umschalt\u00a0+\u00a0V (Firefox), um zum ersten Feld einer Reihe an Feldern mit fehlerhaften Daten zur\u00fcckzukehren.
+accessibility_validation_message_with_error_count=Feld(er) enth\u00e4lt/enthalten ung\u00fcltige Daten. Dr\u00fccken Sie die Tabulatortaste bzw. die Umschalt- und die Tabulatortaste, um zu den Feldern mit ung\u00fcltigen Daten zu gehen. Dr\u00fccken Sie die Tasten Alt\u00a0+\u00a0V (Internet Explorer) bzw. Alt\u00a0+ Umschalt\u00a0+\u00a0V (Firefox), um zum ersten Feld einer Reihe an Feldern mit fehlerhaften Daten zur\u00fcckzukehren.
\ No newline at end of file
diff --git a/config/alfresco/messages/webclient_es.properties b/config/alfresco/messages/webclient_es.properties
index db23fa132c..dd2d3cd931 100755
--- a/config/alfresco/messages/webclient_es.properties
+++ b/config/alfresco/messages/webclient_es.properties
@@ -2154,3 +2154,36 @@ msg_err_pattern_invalid_expiration_date_on_submit=Por favor seleccione una fecha
# Team properties
team_login_warning=La p\u00e1gina de Alfresco Explorer solicitada no es compatible. \u00danicamente se puede acceder a esta p\u00e1gina en la direcci\u00f3n de soporte de Alfresco.
+
+#
+# ALF-11956 WCM Accessibility. XForms
+#
+
+# Date/Time picker
+time_picker_title=Zeitauswahl
+time_picker_button_title=Schaltfl\u00e4che f\u00fcr Zeitauswahl
+date_picker_title=Datumsauswahl
+date_picker_button_title=Schaltfl\u00e4che f\u00fcr Datumsauswahl
+date_time_picker_title=Datums-/Zeitauswahl
+date_time_picker_button_title=Schaltfl\u00e4che f\u00fcr Datums-/Zeitauswahl
+increase_week_label=Ausgew\u00e4hltes Datum um eine Woche nach vorne verschieben
+decrease_week_label=Ausgew\u00e4hltes Datum um eine Woche zur\u00fcck verschieben
+increase_month_label=Ausgew\u00e4hltes Datum um einen Monat nach vorne verschieben
+decrease_month_label=Ausgew\u00e4hltes Datum um einen Monat zur\u00fcck verschieben
+
+# VGroup and Repeat widgets
+add_item_title=Element hinzuf\u00fcgen
+move_up_title=Element nach oben verschieben
+move_down_title=Element nach unten verschieben
+remove_item_title=Element entfernen
+
+# Common
+sandbox_title_extension=Sandbox
+item_title=Element
+mandatory_parameter=Pflichtfeld
+state_expanded=Erweitert
+state_not_expanded=Nicht erweitert
+select_path_menu=Das aktuelle Verzeichnis (Eingabetaste dr\u00fccken, um einen anderen Ordner aus der Men\u00fcliste auszuw\u00e4hlen)
+wizard_command_buttons_description=Befehlsschaltfl\u00e4chen f\u00fcr den Assistenten. Mit diesen Schaltfl\u00e4chen k\u00f6nnen Sie zum n\u00e4chsten oder vorherigen Schritt gehen oder den Assistenten beenden bzw. abbrechen
+accessibility_validation_message=Einige Felder enthalten ung\u00fcltige Daten. Dr\u00fccken Sie die Tabulatortaste bzw. die Umschalt- und die Tabulatortaste, um zu den Feldern mit ung\u00fcltigen Daten zu gehen. Dr\u00fccken Sie die Tasten Alt\u00a0+\u00a0V (Internet Explorer) bzw. Alt\u00a0+ Umschalt\u00a0+\u00a0V (Firefox), um zum ersten Feld einer Reihe an Feldern mit fehlerhaften Daten zur\u00fcckzukehren.
+accessibility_validation_message_with_error_count=Feld(er) enth\u00e4lt/enthalten ung\u00fcltige Daten. Dr\u00fccken Sie die Tabulatortaste bzw. die Umschalt- und die Tabulatortaste, um zu den Feldern mit ung\u00fcltigen Daten zu gehen. Dr\u00fccken Sie die Tasten Alt\u00a0+\u00a0V (Internet Explorer) bzw. Alt\u00a0+ Umschalt\u00a0+\u00a0V (Firefox), um zum ersten Feld einer Reihe an Feldern mit fehlerhaften Daten zur\u00fcckzukehren.
\ No newline at end of file
diff --git a/config/alfresco/messages/webclient_fr.properties b/config/alfresco/messages/webclient_fr.properties
index 2ba0009003..fd1c91bcb7 100755
--- a/config/alfresco/messages/webclient_fr.properties
+++ b/config/alfresco/messages/webclient_fr.properties
@@ -2154,3 +2154,36 @@ msg_err_pattern_invalid_expiration_date_on_submit=Veuillez s\u00e9lectionnez des
# Team properties
team_login_warning=La page Alfresco Explorer requise n'est pas prise en charge. Acc\u00e9dez \u00e0 cette page uniquement lorsque le service de support Alfresco vous y invite.
+
+#
+# ALF-11956 WCM Accessibility. XForms
+#
+
+# Date/Time picker
+time_picker_title=Zeitauswahl
+time_picker_button_title=Schaltfl\u00e4che f\u00fcr Zeitauswahl
+date_picker_title=Datumsauswahl
+date_picker_button_title=Schaltfl\u00e4che f\u00fcr Datumsauswahl
+date_time_picker_title=Datums-/Zeitauswahl
+date_time_picker_button_title=Schaltfl\u00e4che f\u00fcr Datums-/Zeitauswahl
+increase_week_label=Ausgew\u00e4hltes Datum um eine Woche nach vorne verschieben
+decrease_week_label=Ausgew\u00e4hltes Datum um eine Woche zur\u00fcck verschieben
+increase_month_label=Ausgew\u00e4hltes Datum um einen Monat nach vorne verschieben
+decrease_month_label=Ausgew\u00e4hltes Datum um einen Monat zur\u00fcck verschieben
+
+# VGroup and Repeat widgets
+add_item_title=Element hinzuf\u00fcgen
+move_up_title=Element nach oben verschieben
+move_down_title=Element nach unten verschieben
+remove_item_title=Element entfernen
+
+# Common
+sandbox_title_extension=Sandbox
+item_title=Element
+mandatory_parameter=Pflichtfeld
+state_expanded=Erweitert
+state_not_expanded=Nicht erweitert
+select_path_menu=Das aktuelle Verzeichnis (Eingabetaste dr\u00fccken, um einen anderen Ordner aus der Men\u00fcliste auszuw\u00e4hlen)
+wizard_command_buttons_description=Befehlsschaltfl\u00e4chen f\u00fcr den Assistenten. Mit diesen Schaltfl\u00e4chen k\u00f6nnen Sie zum n\u00e4chsten oder vorherigen Schritt gehen oder den Assistenten beenden bzw. abbrechen
+accessibility_validation_message=Einige Felder enthalten ung\u00fcltige Daten. Dr\u00fccken Sie die Tabulatortaste bzw. die Umschalt- und die Tabulatortaste, um zu den Feldern mit ung\u00fcltigen Daten zu gehen. Dr\u00fccken Sie die Tasten Alt\u00a0+\u00a0V (Internet Explorer) bzw. Alt\u00a0+ Umschalt\u00a0+\u00a0V (Firefox), um zum ersten Feld einer Reihe an Feldern mit fehlerhaften Daten zur\u00fcckzukehren.
+accessibility_validation_message_with_error_count=Feld(er) enth\u00e4lt/enthalten ung\u00fcltige Daten. Dr\u00fccken Sie die Tabulatortaste bzw. die Umschalt- und die Tabulatortaste, um zu den Feldern mit ung\u00fcltigen Daten zu gehen. Dr\u00fccken Sie die Tasten Alt\u00a0+\u00a0V (Internet Explorer) bzw. Alt\u00a0+ Umschalt\u00a0+\u00a0V (Firefox), um zum ersten Feld einer Reihe an Feldern mit fehlerhaften Daten zur\u00fcckzukehren.
\ No newline at end of file
diff --git a/config/alfresco/messages/webclient_it.properties b/config/alfresco/messages/webclient_it.properties
index f6be7a4f5c..1cdfada816 100755
--- a/config/alfresco/messages/webclient_it.properties
+++ b/config/alfresco/messages/webclient_it.properties
@@ -2154,3 +2154,36 @@ msg_err_pattern_invalid_expiration_date_on_submit=Per favore selezionare una dat
# Team properties
team_login_warning=La pagina Alfresco Explorer non \u00e8 supportata. Accedere a questa pagina solo seguendo le istruzioni del Supporto Alfresco.
+
+#
+# ALF-11956 WCM Accessibility. XForms
+#
+
+# Date/Time picker
+time_picker_title=Selezione ora
+time_picker_button_title=Pulsante selezione ora
+date_picker_title=Selezione data
+date_picker_button_title=Pulsante selezione data
+date_time_picker_title=Selezione data/ora
+date_time_picker_button_title=Pulsante selezione data/ora
+increase_week_label=Aumenta data selezionata di una settimana
+decrease_week_label=Riduci data selezionata di una settimana
+increase_month_label=Aumenta data selezionata di un mese
+decrease_month_label=Riduci data selezionata di un mese
+
+# VGroup and Repeat widgets
+add_item_title=Aggiungi elemento
+move_up_title=Sposta elemento in alto
+move_down_title=Sposta elemento in basso
+remove_item_title=Rimuovi elemento
+
+# Common
+sandbox_title_extension=Sandbox
+item_title=Elemento
+mandatory_parameter=Campo obbligatorio
+state_expanded=Espansa
+state_not_expanded=Non espansa
+select_path_menu=Directory attuale (premere Invio per selezionare una cartella diversa dall'elenco del menu)
+wizard_command_buttons_description=Pulsanti di comando della procedura guidata. Utilizzare questi pulsanti per spostarsi tra un passaggio e l'altro o per terminare/annullare la procedura guidata
+accessibility_validation_message=Alcuni campi contengono dati non validi. Utilizzare i tasti Tab e Maiusc + Tab per spostarsi tra i campi con dati non validi. Utilizzare i tasti Alt + V in IE o Alt + Maiusc + V in FireFox per tornare al primo campo di una sequenza di campi che contengono dati errati
+accessibility_validation_message_with_error_count=campo/i contenente/i dati non validi. Utilizzare i tasti Tab e Maiusc + Tab per spostarsi tra i campi con dati non validi. Utilizzare i tasti Alt + V in IE o Alt + Maiusc + V in FireFox per tornare al primo campo di una sequenza di campi che contengono dati errati
\ No newline at end of file
diff --git a/config/alfresco/messages/webclient_ja.properties b/config/alfresco/messages/webclient_ja.properties
index 57bd285ed0..a329cb480c 100755
--- a/config/alfresco/messages/webclient_ja.properties
+++ b/config/alfresco/messages/webclient_ja.properties
@@ -2154,3 +2154,36 @@ msg_err_pattern_invalid_expiration_date_on_submit=\u4e00\u89a7\u30c9\u30ad\u30e5
# Team properties
team_login_warning=\u30ea\u30af\u30a8\u30b9\u30c8\u3055\u308c\u305fAlfresco Explorer\u30da\u30fc\u30b8\u306f\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002 Alfresco\u30b5\u30dd\u30fc\u30c8\u306b\u6307\u793a\u3055\u308c\u305f\u5834\u5408\u306e\u307f\u3001\u3053\u306e\u30da\u30fc\u30b8\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066\u304f\u3060\u3055\u3044\u3002
+
+#
+# ALF-11956 WCM Accessibility. XForms
+#
+
+# Date/Time picker
+time_picker_title=\u6642\u523b\u306e\u9078\u629e
+time_picker_button_title=\u6642\u523b\u306e\u9078\u629e\u30dc\u30bf\u30f3
+date_picker_title=\u65e5\u4ed8\u306e\u9078\u629e
+date_picker_button_title=\u65e5\u4ed8\u306e\u9078\u629e\u30dc\u30bf\u30f3
+date_time_picker_title=\u65e5\u4ed8/\u6642\u523b\u306e\u9078\u629e
+date_time_picker_button_title=\u65e5\u4ed8/\u6642\u523b\u306e\u9078\u629e\u30dc\u30bf\u30f3
+increase_week_label=\u9078\u629e\u3057\u305f\u65e5\u4ed8\u3092\u9031\u5358\u4f4d\u3067\u5897\u5206
+decrease_week_label=\u9078\u629e\u3057\u305f\u65e5\u4ed8\u3092\u9031\u5358\u4f4d\u3067\u6e1b\u5206
+increase_month_label=\u9078\u629e\u3057\u305f\u65e5\u4ed8\u3092\u6708\u5358\u4f4d\u3067\u5897\u5206
+decrease_month_label=\u9078\u629e\u3057\u305f\u65e5\u4ed8\u3092\u6708\u5358\u4f4d\u3067\u6e1b\u5206
+
+# VGroup and Repeat widgets
+add_item_title=\u30a2\u30a4\u30c6\u30e0\u306e\u8ffd\u52a0
+move_up_title=\u30a2\u30a4\u30c6\u30e0\u3092\u4e0a\u306b\u79fb\u52d5
+move_down_title=\u30a2\u30a4\u30c6\u30e0\u3092\u4e0b\u306b\u79fb\u52d5
+remove_item_title=\u30a2\u30a4\u30c6\u30e0\u306e\u524a\u9664
+
+# Common
+sandbox_title_extension=\u30b5\u30f3\u30c9\u30dc\u30c3\u30af\u30b9
+item_title=\u30a2\u30a4\u30c6\u30e0
+mandatory_parameter=\u5fc5\u9808\u30d5\u30a3\u30fc\u30eb\u30c9
+state_expanded=\u5c55\u958b\u3055\u308c\u3066\u3044\u307e\u3059
+state_not_expanded=\u9589\u3058\u3066\u3044\u307e\u3059
+select_path_menu=\u73fe\u5728\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea (\u30e1\u30cb\u30e5\u30fc\u304b\u3089\u5225\u306e\u30d5\u30a9\u30eb\u30c0\u3092\u9078\u629e\u3059\u308b\u306b\u306f\u3001Enter\u30ad\u30fc\u3092\u62bc\u3057\u307e\u3059)
+wizard_command_buttons_description=\u30a6\u30a3\u30b6\u30fc\u30c9\u306e\u30b3\u30de\u30f3\u30c9\u30dc\u30bf\u30f3\u3002 \u3053\u308c\u3089\u306e\u30dc\u30bf\u30f3\u3092\u4f7f\u3063\u3066\u3001\u624b\u9806\u3092\u9032\u884c\u3057\u305f\u308a\u3001\u30a6\u30a3\u30b6\u30fc\u30c9\u3092\u7d42\u4e86\u3001\u30ad\u30e3\u30f3\u30bb\u30eb\u3057\u305f\u308a\u3057\u307e\u3059\u3002
+accessibility_validation_message=\u4e00\u90e8\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u306b\u7121\u52b9\u306a\u30c7\u30fc\u30bf\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002 \u7121\u52b9\u306a\u30c7\u30fc\u30bf\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u9593\u3092\u524d\u5f8c\u306b\u79fb\u52d5\u3059\u308b\u306b\u306f\u3001Tab\u30ad\u30fc\u3068Shift + Tab\u30ad\u30fc\u3092\u4f7f\u3044\u307e\u3059\u3002 \u9023\u7d9a\u3059\u308b\u7121\u52b9\u306a\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u5148\u982d\u306b\u79fb\u52d5\u3059\u308b\u306b\u306f\u3001Alt + V\u30ad\u30fc(IE\u306e\u5834\u5408)\u307e\u305f\u306fAlt + Shift + V\u30ad\u30fc( FireFox\u306e\u5834\u5408)\u3092\u4f7f\u3044\u307e\u3059\u3002
+accessibility_validation_message_with_error_count=\u500b\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u306b\u7121\u52b9\u306a\u30c7\u30fc\u30bf\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002 \u7121\u52b9\u306a\u30c7\u30fc\u30bf\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u9593\u3092\u524d\u5f8c\u306b\u79fb\u52d5\u3059\u308b\u306b\u306f\u3001Tab\u30ad\u30fc\u3068Shift + Tab\u30ad\u30fc\u3092\u4f7f\u3044\u307e\u3059\u3002 \u9023\u7d9a\u3059\u308b\u7121\u52b9\u306a\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u5148\u982d\u306b\u79fb\u52d5\u3059\u308b\u306b\u306f\u3001Alt + V\u30ad\u30fc(IE\u306e\u5834\u5408)\u307e\u305f\u306fAlt + Shift + V\u30ad\u30fc( FireFox\u306e\u5834\u5408)\u3092\u4f7f\u3044\u307e\u3059\u3002
\ No newline at end of file
diff --git a/config/alfresco/messages/webclient_nl.properties b/config/alfresco/messages/webclient_nl.properties
index 6a3949a3d4..8edb93f87e 100755
--- a/config/alfresco/messages/webclient_nl.properties
+++ b/config/alfresco/messages/webclient_nl.properties
@@ -2154,3 +2154,36 @@ msg_err_pattern_invalid_expiration_date_on_submit=Selecteer vervaldatum(s) die n
# Team properties
team_login_warning=De opgevraagde Alfresco Explorer-pagina wordt niet ondersteund. Open deze pagina alleen op aanwijzing van Alfresco Support.
+
+#
+# ALF-11956 WCM Accessibility. XForms
+#
+
+# Date/Time picker
+time_picker_title=Tijdkiezer
+time_picker_button_title=Tijdkiezerknop
+date_picker_title=Datumkiezer
+date_picker_button_title=Datumkiezerknop
+date_time_picker_title=Datum-/tijdkiezer
+date_time_picker_button_title=Datum-/tijdkiezerknop
+increase_week_label=Geselecteerde datum verhogen met een week
+decrease_week_label=Geselecteerde datum verlagen met een week
+increase_month_label=Geselecteerde datum verhogen met een maand
+decrease_month_label=Geselecteerde datum verlagen met een maand
+
+# VGroup and Repeat widgets
+add_item_title=Item toevoegen
+move_up_title=Item omhoog verplaatsen
+move_down_title=Item omlaag verplaatsen
+remove_item_title=Item verwijderen
+
+# Common
+sandbox_title_extension=Sandbox
+item_title=Item
+mandatory_parameter=Verplicht veld
+state_expanded=Uitgevouwen
+state_not_expanded=Niet uitgevouwen
+select_path_menu=De huidige map (druk op Enter om een andere map uit de menulijst te kiezen)
+wizard_command_buttons_description=Wizardopdrachtknoppen. Gebruik deze knoppen om door stappen te navigeren of om de wizard te be\u00ebindigen/annuleren
+accessibility_validation_message=Sommige velden bevatten ongeldige gegevens. Gebruik Tab en Shift + Tab om de velden met ongeldige gegevens te doorlopen. Gebruik Alt + V in IE of Alt + Shift + V in FireFox om terug te keren naar het eerste veld van een reeks velden met onjuiste gegevens
+accessibility_validation_message_with_error_count=veld(en) bevat(ten) ongeldige gegevens. Gebruik Tab en Shift + Tab om de velden met ongeldige gegevens te doorlopen. Gebruik Alt + V in IE of Alt + Shift + V in FireFox om terug te keren naar het eerste veld van een reeks velden met onjuiste gegevens
\ No newline at end of file
diff --git a/config/alfresco/subsystems/Authentication/kerberos/kerberos-filter-context.xml b/config/alfresco/subsystems/Authentication/kerberos/kerberos-filter-context.xml
index 8ea7c3e69a..dc4f85e0f0 100644
--- a/config/alfresco/subsystems/Authentication/kerberos/kerberos-filter-context.xml
+++ b/config/alfresco/subsystems/Authentication/kerberos/kerberos-filter-context.xml
@@ -45,6 +45,9 @@
+
+ ${kerberos.authentication.stripUsernameSuffix}
+
@@ -105,6 +108,9 @@
${kerberos.authentication.http.configEntryName}
+
+ ${kerberos.authentication.stripUsernameSuffix}
+
@@ -138,6 +144,9 @@
${kerberos.authentication.http.configEntryName}
+
+ ${kerberos.authentication.stripUsernameSuffix}
+
\ No newline at end of file
diff --git a/source/java/org/alfresco/web/bean/ajax/ContentUpdateBean.java b/source/java/org/alfresco/web/bean/ajax/ContentUpdateBean.java
index 0e4e0f5b2c..9a01b68564 100644
--- a/source/java/org/alfresco/web/bean/ajax/ContentUpdateBean.java
+++ b/source/java/org/alfresco/web/bean/ajax/ContentUpdateBean.java
@@ -35,7 +35,7 @@ import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.util.TempFileProvider;
import org.alfresco.web.app.servlet.ajax.InvokeCommand;
import org.alfresco.web.bean.repository.Repository;
-import org.alfresco.web.forms.XMLUtil;
+import org.alfresco.util.XMLUtil;
import org.apache.commons.fileupload.FileItem;
import org.apache.commons.fileupload.disk.DiskFileItemFactory;
import org.apache.commons.fileupload.servlet.ServletFileUpload;
diff --git a/source/java/org/alfresco/web/bean/ajax/FileUploadBean.java b/source/java/org/alfresco/web/bean/ajax/FileUploadBean.java
index 415c2b43f2..6b2109106b 100644
--- a/source/java/org/alfresco/web/bean/ajax/FileUploadBean.java
+++ b/source/java/org/alfresco/web/bean/ajax/FileUploadBean.java
@@ -48,7 +48,7 @@ import org.springframework.extensions.surf.util.URLDecoder;
import org.alfresco.web.app.servlet.BaseServlet;
import org.alfresco.web.app.servlet.ajax.InvokeCommand;
import org.alfresco.web.bean.repository.Repository;
-import org.alfresco.web.forms.XMLUtil;
+import org.alfresco.util.XMLUtil;
import org.apache.commons.fileupload.FileItem;
import org.apache.commons.fileupload.disk.DiskFileItemFactory;
import org.apache.commons.fileupload.servlet.ServletFileUpload;
diff --git a/source/java/org/alfresco/web/bean/content/CreateContentWizard.java b/source/java/org/alfresco/web/bean/content/CreateContentWizard.java
index a2c8ca6665..e847082776 100644
--- a/source/java/org/alfresco/web/bean/content/CreateContentWizard.java
+++ b/source/java/org/alfresco/web/bean/content/CreateContentWizard.java
@@ -50,7 +50,7 @@ import org.alfresco.web.forms.Form;
import org.alfresco.web.forms.FormNotFoundException;
import org.alfresco.web.forms.FormProcessor;
import org.alfresco.web.forms.FormsService;
-import org.alfresco.web.forms.XMLUtil;
+import org.alfresco.util.XMLUtil;
import org.alfresco.web.ui.common.Utils;
import org.apache.commons.io.FilenameUtils;
import org.apache.commons.logging.Log;
diff --git a/source/java/org/alfresco/web/bean/wcm/CreateFormWizard.java b/source/java/org/alfresco/web/bean/wcm/CreateFormWizard.java
index 7192a9e8c3..575a8ca708 100644
--- a/source/java/org/alfresco/web/bean/wcm/CreateFormWizard.java
+++ b/source/java/org/alfresco/web/bean/wcm/CreateFormWizard.java
@@ -64,7 +64,7 @@ import org.alfresco.web.forms.FormsService;
import org.alfresco.web.forms.RenderingEngine;
import org.alfresco.web.forms.RenderingEngineTemplate;
import org.alfresco.web.forms.RenderingEngineTemplateImpl;
-import org.alfresco.web.forms.XMLUtil;
+import org.alfresco.util.XMLUtil;
import org.alfresco.web.ui.common.Utils;
import org.alfresco.web.ui.common.component.UIListItem;
import org.alfresco.web.ui.wcm.WebResources;
diff --git a/source/java/org/alfresco/web/bean/wcm/CreateWebContentWizard.java b/source/java/org/alfresco/web/bean/wcm/CreateWebContentWizard.java
index 054a45f498..be27740c18 100644
--- a/source/java/org/alfresco/web/bean/wcm/CreateWebContentWizard.java
+++ b/source/java/org/alfresco/web/bean/wcm/CreateWebContentWizard.java
@@ -65,7 +65,7 @@ import org.alfresco.web.forms.FormNotFoundException;
import org.alfresco.web.forms.FormsService;
import org.alfresco.web.forms.RenderingEngineTemplate;
import org.alfresco.web.forms.Rendition;
-import org.alfresco.web.forms.XMLUtil;
+import org.alfresco.util.XMLUtil;
import org.alfresco.web.ui.common.Utils;
import org.alfresco.web.ui.common.component.UIListItem;
import org.alfresco.web.ui.wcm.component.UIUserSandboxes;
diff --git a/source/java/org/alfresco/web/bean/wcm/EditWebContentWizard.java b/source/java/org/alfresco/web/bean/wcm/EditWebContentWizard.java
index d309f96777..fbeef1a2ff 100644
--- a/source/java/org/alfresco/web/bean/wcm/EditWebContentWizard.java
+++ b/source/java/org/alfresco/web/bean/wcm/EditWebContentWizard.java
@@ -32,7 +32,7 @@ import org.alfresco.web.forms.Form;
import org.alfresco.web.forms.FormInstanceData;
import org.alfresco.web.forms.FormNotFoundException;
import org.alfresco.web.forms.Rendition;
-import org.alfresco.web.forms.XMLUtil;
+import org.alfresco.util.XMLUtil;
import org.alfresco.web.ui.common.Utils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
diff --git a/source/java/org/alfresco/web/bean/wcm/FilePickerBean.java b/source/java/org/alfresco/web/bean/wcm/FilePickerBean.java
index bf47c2998b..a4bf37eb24 100644
--- a/source/java/org/alfresco/web/bean/wcm/FilePickerBean.java
+++ b/source/java/org/alfresco/web/bean/wcm/FilePickerBean.java
@@ -64,7 +64,7 @@ import org.alfresco.web.app.servlet.ajax.InvokeCommand;
import org.alfresco.web.bean.FileUploadBean;
import org.alfresco.web.bean.repository.Node;
import org.alfresco.web.bean.repository.Repository;
-import org.alfresco.web.forms.XMLUtil;
+import org.alfresco.util.XMLUtil;
import org.apache.commons.fileupload.FileItem;
import org.apache.commons.fileupload.disk.DiskFileItemFactory;
import org.apache.commons.fileupload.servlet.ServletFileUpload;
diff --git a/source/java/org/alfresco/web/forms/FormImpl.java b/source/java/org/alfresco/web/forms/FormImpl.java
index 40cef48573..f186c3a022 100644
--- a/source/java/org/alfresco/web/forms/FormImpl.java
+++ b/source/java/org/alfresco/web/forms/FormImpl.java
@@ -44,6 +44,7 @@ import org.alfresco.service.cmr.workflow.WorkflowDefinition;
import org.alfresco.service.cmr.workflow.WorkflowService;
import org.alfresco.service.namespace.QName;
import org.alfresco.service.namespace.RegexQNamePattern;
+import org.alfresco.util.XMLUtil;
import org.alfresco.web.app.servlet.FacesHelper;
import org.alfresco.web.bean.repository.Repository;
import org.alfresco.web.bean.wcm.AVMUtil;
diff --git a/source/java/org/alfresco/web/forms/FormInstanceDataImpl.java b/source/java/org/alfresco/web/forms/FormInstanceDataImpl.java
index 73f6fb530b..4405f4b946 100644
--- a/source/java/org/alfresco/web/forms/FormInstanceDataImpl.java
+++ b/source/java/org/alfresco/web/forms/FormInstanceDataImpl.java
@@ -1,475 +1,476 @@
-/*
- * Copyright (C) 2005-2010 Alfresco Software Limited.
- *
- * This file is part of Alfresco
- *
- * Alfresco is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * Alfresco is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with Alfresco. If not, see .
- */
-package org.alfresco.web.forms;
-
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-
-import javax.faces.context.FacesContext;
-
-import org.alfresco.model.WCMAppModel;
-import org.alfresco.repo.avm.AVMNodeConverter;
-import org.alfresco.repo.domain.PropertyValue;
-import org.alfresco.service.ServiceRegistry;
-import org.alfresco.service.cmr.avm.AVMService;
-import org.alfresco.service.cmr.avm.locking.AVMLockingService;
-import org.alfresco.service.cmr.dictionary.DataTypeDefinition;
-import org.alfresco.service.cmr.repository.NodeRef;
-import org.alfresco.service.cmr.repository.StoreRef;
-import org.alfresco.util.Pair;
-import org.alfresco.wcm.util.WCMUtil;
-import org.alfresco.web.app.Application;
-import org.alfresco.web.app.servlet.FacesHelper;
-import org.alfresco.web.bean.repository.Repository;
-import org.alfresco.web.bean.wcm.AVMUtil;
-import org.alfresco.web.bean.wcm.WebProject;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.w3c.dom.Document;
-import org.xml.sax.SAXException;
-
-/**
- * Encapsulation of a rendition.
- *
- * @author Ariel Backenroth
- */
-/* package */ class FormInstanceDataImpl implements FormInstanceData
-{
- private static final long serialVersionUID = -7806221587661854013L;
-
- private static final Log logger = LogFactory.getLog(RenditionImpl.class);
-
- private final NodeRef nodeRef;
- private final WebProject webProject;
- private transient FormsService formsService;
-
- /* package */ FormInstanceDataImpl(final NodeRef nodeRef,
- final FormsService formsService)
- {
- this(nodeRef, formsService, null);
- }
-
- /* package */ FormInstanceDataImpl(final NodeRef nodeRef,
- final FormsService formsService,
- final WebProject webProject)
- {
- this.webProject = webProject;
-
- if (nodeRef == null)
- {
- throw new NullPointerException();
- }
- if (formsService == null)
- {
- throw new NullPointerException();
- }
- final AVMService avmService = this.getServiceRegistry().getAVMService();
-
- Pair avmVersionPath = AVMNodeConverter.ToAVMVersionPath(nodeRef);
-
- if (avmService.lookup(avmVersionPath.getFirst(), avmVersionPath.getSecond()) == null)
- {
- throw new IllegalArgumentException("Not found: " + avmVersionPath.getSecond());
- }
-
- if (!avmService.hasAspect(avmVersionPath.getFirst(), avmVersionPath.getSecond(),
- WCMAppModel.ASPECT_FORM_INSTANCE_DATA))
- {
- throw new IllegalArgumentException("node " + nodeRef +
- " does not have aspect " + WCMAppModel.ASPECT_FORM_INSTANCE_DATA);
- }
- this.nodeRef = nodeRef;
- this.formsService = formsService;
- }
-
- /* package */ FormInstanceDataImpl(final int version,
- final String avmPath,
- final FormsService formsService)
- {
- this(AVMNodeConverter.ToNodeRef(version, avmPath), formsService);
- }
-
- private FormsService getFormsService()
- {
- if (formsService == null)
- {
- formsService = (FormsService) FacesHelper.getManagedBean(FacesContext.getCurrentInstance(), "FormsService");
- }
- return formsService;
- }
-
- /** the name of this rendition */
- public String getName()
- {
-// final AVMService avmService = this.getServiceRegistry().getAVMService();
-// return avmService.getNodeProperty(AVMNodeConverter.ToAVMVersionPath(this.nodeRef).getFirst(),
-// AVMNodeConverter.ToAVMVersionPath(this.nodeRef).getSecond(),
-// ContentModel.PROP_NAME).getStringValue();
- return AVMNodeConverter.SplitBase(AVMNodeConverter.ToAVMVersionPath(this.nodeRef).getSecond())[1];
- }
-
- public String getWebappRelativePath()
- {
- return AVMUtil.getWebappRelativePath(this.getPath());
- }
-
- public String getSandboxRelativePath()
- {
- return AVMUtil.getSandboxRelativePath(this.getPath());
- }
-
- public String getPath()
- {
- return AVMNodeConverter.ToAVMVersionPath(this.nodeRef).getSecond();
- }
-
- public Document getDocument()
- throws IOException, SAXException
- {
- return XMLUtil.parse(AVMNodeConverter.ToAVMVersionPath(nodeRef).getFirst(),
- AVMNodeConverter.ToAVMVersionPath(nodeRef).getSecond(),
- this.getServiceRegistry().getAVMService());
- }
-
- public Form getForm()
- throws FormNotFoundException
- {
- final String parentFormName = this.getParentFormName();
- try
- {
- // TODO - forms should be identified by nodeRef rather than name (which can be non-unique)
- if (getNodeRef().getStoreRef().getProtocol().equals(StoreRef.PROTOCOL_AVM))
- {
- if (webProject != null)
- {
- return webProject.getForm(parentFormName);
- }
-
- return this.getFormsService().getWebForm(parentFormName);
- }
- else
- {
- return this.getFormsService().getForm(parentFormName);
- }
- }
- catch (FormNotFoundException fnfe)
- {
- if (webProject != null)
- {
- throw new FormNotFoundException(parentFormName, webProject, this);
- }
-
- throw new FormNotFoundException(parentFormName, this);
- }
- }
-
- /** the node ref containing the contents of this rendition */
- public NodeRef getNodeRef()
- {
- return this.nodeRef;
- }
-
- public String getUrl()
- {
- return AVMUtil.getPreviewURI(this.getPath());
- }
-
- public List regenerateRenditions()
- throws FormNotFoundException
- {
- if (logger.isDebugEnabled())
- {
- logger.debug("regenerating renditions of " + this);
- }
-
- AVMLockingService avmLockService = this.getServiceRegistry().getAVMLockingService();
- final AVMService avmService = this.getServiceRegistry().getAVMService();
- PropertyValue pv = avmService.getNodeProperty(
- AVMNodeConverter.ToAVMVersionPath(this.nodeRef).getFirst(),
- AVMNodeConverter.ToAVMVersionPath(this.nodeRef).getSecond(),
- WCMAppModel.PROP_ORIGINAL_PARENT_PATH);
-
- String originalParentAvmPath = (pv == null) ?
- AVMNodeConverter.SplitBase(this.getPath())[0] : pv.getStringValue();
-
- final HashSet allRets =
- new HashSet(this.getForm().getRenderingEngineTemplates());
- final List result = new LinkedList();
- // regenerate existing renditions
- String path = null;
-
- for (final Rendition r : this.getRenditions())
- {
- // Try to skip renditions without rendering engine template.
- if (r instanceof RenditionImpl)
- {
- RenditionImpl rImpl = (RenditionImpl)r;
- RenderingEngineTemplate ret = rImpl.getRenderingEngineTemplate();
- if ((ret != null) && (ret instanceof RenderingEngineTemplateImpl))
- {
- RenderingEngineTemplateImpl retImpl = (RenderingEngineTemplateImpl) ret;
- if (!retImpl.isExists())
- {
- continue;
- }
- }
-
- }
- final RenderingEngineTemplate ret = r.getRenderingEngineTemplate();
- if (ret == null || !allRets.contains(ret))
- {
- continue;
- }
-
- String lockOwner = null;
- try
- {
- if (logger.isDebugEnabled())
- {
- logger.debug("regenerating rendition " + r + " using template " + ret);
- }
-
- path = r.getPath();
- lockOwner = avmLockService.getLockOwner(AVMUtil.getStoreId(path), AVMUtil.getStoreRelativePath(path));
- if (lockOwner != null)
- {
- if (logger.isDebugEnabled())
- {
- logger.debug("Lock already exists for " + path);
- }
- }
-
- ret.render(this, r);
- allRets.remove(ret);
- result.add(new RegenerateResult(ret, path, r, lockOwner));
- }
- catch (Exception e)
- {
- result.add(new RegenerateResult(ret, path, e, lockOwner));
-
- // remove lock if there wasn't one before
- if (lockOwner == null)
- {
- avmLockService.removeLock(AVMUtil.getStoreId(path), AVMUtil.getStoreRelativePath(path));
-
- if (logger.isDebugEnabled())
- {
- logger.debug("Removed lock for " + path + " as it failed to generate");
- }
- }
- }
- }
-
- // get current username for lock checks
- String username = Application.getCurrentUser(FacesContext.getCurrentInstance()).getUserName();
-
- // render all renditions for newly added templates
- for (final RenderingEngineTemplate ret : allRets)
- {
- String lockOwner = null;
- String currentLockStore = null;
- boolean lockModified = false;
-
- try
- {
- path = ret.getOutputPathForRendition(this, originalParentAvmPath, getName().replaceAll("(.+)\\..*", "$1"));
-
- if (logger.isDebugEnabled())
- {
- logger.debug("regenerating rendition of " + this.getPath() +
- " at " + path + " using template " + ret);
- }
-
- String storeId = AVMUtil.getStoreId(path);
- String storePath = AVMUtil.getStoreRelativePath(path);
- String storeName = AVMUtil.getStoreName(path);
-
- Map lockData = avmLockService.getLockData(storeId, storePath);
- if (lockData != null)
- {
- lockOwner = avmLockService.getLockOwner(storeId, storePath);
- currentLockStore = lockData.get(WCMUtil.LOCK_KEY_STORE_NAME);
- }
-
- if (lockOwner != null)
- {
- if (logger.isDebugEnabled())
- {
- logger.debug("Lock already exists for " + path);
- }
-
- if (currentLockStore.equals(storeName) == false)
- {
- if (lockOwner.equals(username))
- {
- lockModified = true;
-
- // lock already exists on path, check it's owned by the current user
- if (logger.isDebugEnabled())
- {
- logger.debug("transferring lock from " + currentLockStore + " to " + storeName + " for path: " + path);
- }
-
- lockData.put(WCMUtil.LOCK_KEY_STORE_NAME, storeName);
- avmLockService.modifyLock(storeId, storePath, lockOwner, storeId, storePath, lockData);
- }
- }
- }
-
- result.add(new RegenerateResult(ret, path, ret.render(this, path), lockOwner));
- }
- catch (Exception e)
- {
- result.add(new RegenerateResult(ret, path, e, lockOwner));
-
- String storeId = AVMUtil.getStoreId(path);
- String storePath = AVMUtil.getStoreRelativePath(path);
- String storeName = AVMUtil.getStoreName(path);
-
- if (lockOwner == null)
- {
- // remove lock if there wasn't one before
- avmLockService.removeLock(storeId, storePath);
-
- if (logger.isDebugEnabled())
- {
- logger.debug("Removed lock for " + path + " as it failed to generate");
- }
- }
- else if (lockModified)
- {
- if (logger.isDebugEnabled())
- {
- logger.debug("transferring lock from " + storeName + " to " + currentLockStore + " for path: " + path);
- }
-
- Map lockData = avmLockService.getLockData(storeId, storePath);
- lockData.put(WCMUtil.LOCK_KEY_STORE_NAME, currentLockStore);
- avmLockService.modifyLock(storeId, storePath, lockOwner, storeId, storePath, lockData);
- }
- }
- }
- return result;
- }
-
- public List getRenditions()
- {
- return getRenditions(false);
- }
-
- public List getRenditions(boolean includeDeleted)
- {
- final AVMService avmService = this.getServiceRegistry().getAVMLockingAwareService();
- final PropertyValue pv =
- avmService.getNodeProperty(-1, this.getPath(), WCMAppModel.PROP_RENDITIONS);
- final Collection renditionPaths = (pv == null
- ? Collections.EMPTY_LIST
- : pv.getCollection(DataTypeDefinition.TEXT));
- final String storeName = AVMUtil.getStoreName(this.getPath());
- final List result = new ArrayList(renditionPaths.size());
- for (Serializable path : renditionPaths)
- {
- String avmRenditionPath = AVMUtil.buildAVMPath(storeName, (String)path);
- if (avmService.lookup(-1, avmRenditionPath, includeDeleted) == null)
- {
- if (logger.isDebugEnabled())
- {
- logger.debug("ignoring dangling rendition at: " + avmRenditionPath);
- }
- }
- else
- {
- final Rendition r = new RenditionImpl(-1,
- avmRenditionPath,
- this.getFormsService());
- try
- {
- if (!this.equals(r.getPrimaryFormInstanceData(includeDeleted)))
- {
- if (logger.isDebugEnabled())
- {
- logger.debug("rendition " + r +
- " points at form instance data " + r.getPrimaryFormInstanceData(includeDeleted) +
- " instead of " + this + ". Not including in renditions list.");
- }
- continue;
- }
- }
- catch (FileNotFoundException fnfe)
- {
- continue;
- }
- if (r.getRenderingEngineTemplate() != null)
- {
- result.add(r);
- }
- }
- }
- return result;
- }
-
- private ServiceRegistry getServiceRegistry()
- {
- final FacesContext fc = FacesContext.getCurrentInstance();
- return Repository.getServiceRegistry(fc);
- }
-
- public int hashCode()
- {
- return this.getPath().hashCode();
- }
-
- public String toString()
- {
- try
- {
- return (this.getClass().getName() + "{path : " + this.getPath() +
- ", form : " + this.getForm().getName() + "}");
- }
- catch (FormNotFoundException fnfe)
- {
- return (this.getClass().getName() + "{path : " + this.getPath() +
- ", form : " + this.getParentFormName() + " NOT_FOUND! }");
-
- }
- }
-
- public boolean equals(final Object other)
- {
- return (other instanceof FormInstanceDataImpl &&
- this.getNodeRef().equals(((FormInstanceDataImpl)other).getNodeRef()));
-
- }
-
- protected String getParentFormName()
- {
- final AVMService avmService = this.getServiceRegistry().getAVMService();
- return avmService.getNodeProperty(AVMNodeConverter.ToAVMVersionPath(this.nodeRef).getFirst(),
- AVMNodeConverter.ToAVMVersionPath(this.nodeRef).getSecond(),
- WCMAppModel.PROP_PARENT_FORM_NAME).getStringValue();
- }
-}
+/*
+ * Copyright (C) 2005-2010 Alfresco Software Limited.
+ *
+ * This file is part of Alfresco
+ *
+ * Alfresco is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Alfresco is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Alfresco. If not, see .
+ */
+package org.alfresco.web.forms;
+
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+
+import javax.faces.context.FacesContext;
+
+import org.alfresco.model.WCMAppModel;
+import org.alfresco.repo.avm.AVMNodeConverter;
+import org.alfresco.repo.domain.PropertyValue;
+import org.alfresco.service.ServiceRegistry;
+import org.alfresco.service.cmr.avm.AVMService;
+import org.alfresco.service.cmr.avm.locking.AVMLockingService;
+import org.alfresco.service.cmr.dictionary.DataTypeDefinition;
+import org.alfresco.service.cmr.repository.NodeRef;
+import org.alfresco.service.cmr.repository.StoreRef;
+import org.alfresco.util.Pair;
+import org.alfresco.util.XMLUtil;
+import org.alfresco.wcm.util.WCMUtil;
+import org.alfresco.web.app.Application;
+import org.alfresco.web.app.servlet.FacesHelper;
+import org.alfresco.web.bean.repository.Repository;
+import org.alfresco.web.bean.wcm.AVMUtil;
+import org.alfresco.web.bean.wcm.WebProject;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.w3c.dom.Document;
+import org.xml.sax.SAXException;
+
+/**
+ * Encapsulation of a rendition.
+ *
+ * @author Ariel Backenroth
+ */
+/* package */ class FormInstanceDataImpl implements FormInstanceData
+{
+ private static final long serialVersionUID = -7806221587661854013L;
+
+ private static final Log logger = LogFactory.getLog(RenditionImpl.class);
+
+ private final NodeRef nodeRef;
+ private final WebProject webProject;
+ private transient FormsService formsService;
+
+ /* package */ FormInstanceDataImpl(final NodeRef nodeRef,
+ final FormsService formsService)
+ {
+ this(nodeRef, formsService, null);
+ }
+
+ /* package */ FormInstanceDataImpl(final NodeRef nodeRef,
+ final FormsService formsService,
+ final WebProject webProject)
+ {
+ this.webProject = webProject;
+
+ if (nodeRef == null)
+ {
+ throw new NullPointerException();
+ }
+ if (formsService == null)
+ {
+ throw new NullPointerException();
+ }
+ final AVMService avmService = this.getServiceRegistry().getAVMService();
+
+ Pair avmVersionPath = AVMNodeConverter.ToAVMVersionPath(nodeRef);
+
+ if (avmService.lookup(avmVersionPath.getFirst(), avmVersionPath.getSecond()) == null)
+ {
+ throw new IllegalArgumentException("Not found: " + avmVersionPath.getSecond());
+ }
+
+ if (!avmService.hasAspect(avmVersionPath.getFirst(), avmVersionPath.getSecond(),
+ WCMAppModel.ASPECT_FORM_INSTANCE_DATA))
+ {
+ throw new IllegalArgumentException("node " + nodeRef +
+ " does not have aspect " + WCMAppModel.ASPECT_FORM_INSTANCE_DATA);
+ }
+ this.nodeRef = nodeRef;
+ this.formsService = formsService;
+ }
+
+ /* package */ FormInstanceDataImpl(final int version,
+ final String avmPath,
+ final FormsService formsService)
+ {
+ this(AVMNodeConverter.ToNodeRef(version, avmPath), formsService);
+ }
+
+ private FormsService getFormsService()
+ {
+ if (formsService == null)
+ {
+ formsService = (FormsService) FacesHelper.getManagedBean(FacesContext.getCurrentInstance(), "FormsService");
+ }
+ return formsService;
+ }
+
+ /** the name of this rendition */
+ public String getName()
+ {
+// final AVMService avmService = this.getServiceRegistry().getAVMService();
+// return avmService.getNodeProperty(AVMNodeConverter.ToAVMVersionPath(this.nodeRef).getFirst(),
+// AVMNodeConverter.ToAVMVersionPath(this.nodeRef).getSecond(),
+// ContentModel.PROP_NAME).getStringValue();
+ return AVMNodeConverter.SplitBase(AVMNodeConverter.ToAVMVersionPath(this.nodeRef).getSecond())[1];
+ }
+
+ public String getWebappRelativePath()
+ {
+ return AVMUtil.getWebappRelativePath(this.getPath());
+ }
+
+ public String getSandboxRelativePath()
+ {
+ return AVMUtil.getSandboxRelativePath(this.getPath());
+ }
+
+ public String getPath()
+ {
+ return AVMNodeConverter.ToAVMVersionPath(this.nodeRef).getSecond();
+ }
+
+ public Document getDocument()
+ throws IOException, SAXException
+ {
+ return XMLUtil.parse(AVMNodeConverter.ToAVMVersionPath(nodeRef).getFirst(),
+ AVMNodeConverter.ToAVMVersionPath(nodeRef).getSecond(),
+ this.getServiceRegistry().getAVMService());
+ }
+
+ public Form getForm()
+ throws FormNotFoundException
+ {
+ final String parentFormName = this.getParentFormName();
+ try
+ {
+ // TODO - forms should be identified by nodeRef rather than name (which can be non-unique)
+ if (getNodeRef().getStoreRef().getProtocol().equals(StoreRef.PROTOCOL_AVM))
+ {
+ if (webProject != null)
+ {
+ return webProject.getForm(parentFormName);
+ }
+
+ return this.getFormsService().getWebForm(parentFormName);
+ }
+ else
+ {
+ return this.getFormsService().getForm(parentFormName);
+ }
+ }
+ catch (FormNotFoundException fnfe)
+ {
+ if (webProject != null)
+ {
+ throw new FormNotFoundException(parentFormName, webProject, this);
+ }
+
+ throw new FormNotFoundException(parentFormName, this);
+ }
+ }
+
+ /** the node ref containing the contents of this rendition */
+ public NodeRef getNodeRef()
+ {
+ return this.nodeRef;
+ }
+
+ public String getUrl()
+ {
+ return AVMUtil.getPreviewURI(this.getPath());
+ }
+
+ public List regenerateRenditions()
+ throws FormNotFoundException
+ {
+ if (logger.isDebugEnabled())
+ {
+ logger.debug("regenerating renditions of " + this);
+ }
+
+ AVMLockingService avmLockService = this.getServiceRegistry().getAVMLockingService();
+ final AVMService avmService = this.getServiceRegistry().getAVMService();
+ PropertyValue pv = avmService.getNodeProperty(
+ AVMNodeConverter.ToAVMVersionPath(this.nodeRef).getFirst(),
+ AVMNodeConverter.ToAVMVersionPath(this.nodeRef).getSecond(),
+ WCMAppModel.PROP_ORIGINAL_PARENT_PATH);
+
+ String originalParentAvmPath = (pv == null) ?
+ AVMNodeConverter.SplitBase(this.getPath())[0] : pv.getStringValue();
+
+ final HashSet allRets =
+ new HashSet(this.getForm().getRenderingEngineTemplates());
+ final List result = new LinkedList();
+ // regenerate existing renditions
+ String path = null;
+
+ for (final Rendition r : this.getRenditions())
+ {
+ // Try to skip renditions without rendering engine template.
+ if (r instanceof RenditionImpl)
+ {
+ RenditionImpl rImpl = (RenditionImpl)r;
+ RenderingEngineTemplate ret = rImpl.getRenderingEngineTemplate();
+ if ((ret != null) && (ret instanceof RenderingEngineTemplateImpl))
+ {
+ RenderingEngineTemplateImpl retImpl = (RenderingEngineTemplateImpl) ret;
+ if (!retImpl.isExists())
+ {
+ continue;
+ }
+ }
+
+ }
+ final RenderingEngineTemplate ret = r.getRenderingEngineTemplate();
+ if (ret == null || !allRets.contains(ret))
+ {
+ continue;
+ }
+
+ String lockOwner = null;
+ try
+ {
+ if (logger.isDebugEnabled())
+ {
+ logger.debug("regenerating rendition " + r + " using template " + ret);
+ }
+
+ path = r.getPath();
+ lockOwner = avmLockService.getLockOwner(AVMUtil.getStoreId(path), AVMUtil.getStoreRelativePath(path));
+ if (lockOwner != null)
+ {
+ if (logger.isDebugEnabled())
+ {
+ logger.debug("Lock already exists for " + path);
+ }
+ }
+
+ ret.render(this, r);
+ allRets.remove(ret);
+ result.add(new RegenerateResult(ret, path, r, lockOwner));
+ }
+ catch (Exception e)
+ {
+ result.add(new RegenerateResult(ret, path, e, lockOwner));
+
+ // remove lock if there wasn't one before
+ if (lockOwner == null)
+ {
+ avmLockService.removeLock(AVMUtil.getStoreId(path), AVMUtil.getStoreRelativePath(path));
+
+ if (logger.isDebugEnabled())
+ {
+ logger.debug("Removed lock for " + path + " as it failed to generate");
+ }
+ }
+ }
+ }
+
+ // get current username for lock checks
+ String username = Application.getCurrentUser(FacesContext.getCurrentInstance()).getUserName();
+
+ // render all renditions for newly added templates
+ for (final RenderingEngineTemplate ret : allRets)
+ {
+ String lockOwner = null;
+ String currentLockStore = null;
+ boolean lockModified = false;
+
+ try
+ {
+ path = ret.getOutputPathForRendition(this, originalParentAvmPath, getName().replaceAll("(.+)\\..*", "$1"));
+
+ if (logger.isDebugEnabled())
+ {
+ logger.debug("regenerating rendition of " + this.getPath() +
+ " at " + path + " using template " + ret);
+ }
+
+ String storeId = AVMUtil.getStoreId(path);
+ String storePath = AVMUtil.getStoreRelativePath(path);
+ String storeName = AVMUtil.getStoreName(path);
+
+ Map lockData = avmLockService.getLockData(storeId, storePath);
+ if (lockData != null)
+ {
+ lockOwner = avmLockService.getLockOwner(storeId, storePath);
+ currentLockStore = lockData.get(WCMUtil.LOCK_KEY_STORE_NAME);
+ }
+
+ if (lockOwner != null)
+ {
+ if (logger.isDebugEnabled())
+ {
+ logger.debug("Lock already exists for " + path);
+ }
+
+ if (currentLockStore.equals(storeName) == false)
+ {
+ if (lockOwner.equals(username))
+ {
+ lockModified = true;
+
+ // lock already exists on path, check it's owned by the current user
+ if (logger.isDebugEnabled())
+ {
+ logger.debug("transferring lock from " + currentLockStore + " to " + storeName + " for path: " + path);
+ }
+
+ lockData.put(WCMUtil.LOCK_KEY_STORE_NAME, storeName);
+ avmLockService.modifyLock(storeId, storePath, lockOwner, storeId, storePath, lockData);
+ }
+ }
+ }
+
+ result.add(new RegenerateResult(ret, path, ret.render(this, path), lockOwner));
+ }
+ catch (Exception e)
+ {
+ result.add(new RegenerateResult(ret, path, e, lockOwner));
+
+ String storeId = AVMUtil.getStoreId(path);
+ String storePath = AVMUtil.getStoreRelativePath(path);
+ String storeName = AVMUtil.getStoreName(path);
+
+ if (lockOwner == null)
+ {
+ // remove lock if there wasn't one before
+ avmLockService.removeLock(storeId, storePath);
+
+ if (logger.isDebugEnabled())
+ {
+ logger.debug("Removed lock for " + path + " as it failed to generate");
+ }
+ }
+ else if (lockModified)
+ {
+ if (logger.isDebugEnabled())
+ {
+ logger.debug("transferring lock from " + storeName + " to " + currentLockStore + " for path: " + path);
+ }
+
+ Map lockData = avmLockService.getLockData(storeId, storePath);
+ lockData.put(WCMUtil.LOCK_KEY_STORE_NAME, currentLockStore);
+ avmLockService.modifyLock(storeId, storePath, lockOwner, storeId, storePath, lockData);
+ }
+ }
+ }
+ return result;
+ }
+
+ public List getRenditions()
+ {
+ return getRenditions(false);
+ }
+
+ public List getRenditions(boolean includeDeleted)
+ {
+ final AVMService avmService = this.getServiceRegistry().getAVMLockingAwareService();
+ final PropertyValue pv =
+ avmService.getNodeProperty(-1, this.getPath(), WCMAppModel.PROP_RENDITIONS);
+ final Collection renditionPaths = (pv == null
+ ? Collections.EMPTY_LIST
+ : pv.getCollection(DataTypeDefinition.TEXT));
+ final String storeName = AVMUtil.getStoreName(this.getPath());
+ final List result = new ArrayList(renditionPaths.size());
+ for (Serializable path : renditionPaths)
+ {
+ String avmRenditionPath = AVMUtil.buildAVMPath(storeName, (String)path);
+ if (avmService.lookup(-1, avmRenditionPath, includeDeleted) == null)
+ {
+ if (logger.isDebugEnabled())
+ {
+ logger.debug("ignoring dangling rendition at: " + avmRenditionPath);
+ }
+ }
+ else
+ {
+ final Rendition r = new RenditionImpl(-1,
+ avmRenditionPath,
+ this.getFormsService());
+ try
+ {
+ if (!this.equals(r.getPrimaryFormInstanceData(includeDeleted)))
+ {
+ if (logger.isDebugEnabled())
+ {
+ logger.debug("rendition " + r +
+ " points at form instance data " + r.getPrimaryFormInstanceData(includeDeleted) +
+ " instead of " + this + ". Not including in renditions list.");
+ }
+ continue;
+ }
+ }
+ catch (FileNotFoundException fnfe)
+ {
+ continue;
+ }
+ if (r.getRenderingEngineTemplate() != null)
+ {
+ result.add(r);
+ }
+ }
+ }
+ return result;
+ }
+
+ private ServiceRegistry getServiceRegistry()
+ {
+ final FacesContext fc = FacesContext.getCurrentInstance();
+ return Repository.getServiceRegistry(fc);
+ }
+
+ public int hashCode()
+ {
+ return this.getPath().hashCode();
+ }
+
+ public String toString()
+ {
+ try
+ {
+ return (this.getClass().getName() + "{path : " + this.getPath() +
+ ", form : " + this.getForm().getName() + "}");
+ }
+ catch (FormNotFoundException fnfe)
+ {
+ return (this.getClass().getName() + "{path : " + this.getPath() +
+ ", form : " + this.getParentFormName() + " NOT_FOUND! }");
+
+ }
+ }
+
+ public boolean equals(final Object other)
+ {
+ return (other instanceof FormInstanceDataImpl &&
+ this.getNodeRef().equals(((FormInstanceDataImpl)other).getNodeRef()));
+
+ }
+
+ protected String getParentFormName()
+ {
+ final AVMService avmService = this.getServiceRegistry().getAVMService();
+ return avmService.getNodeProperty(AVMNodeConverter.ToAVMVersionPath(this.nodeRef).getFirst(),
+ AVMNodeConverter.ToAVMVersionPath(this.nodeRef).getSecond(),
+ WCMAppModel.PROP_PARENT_FORM_NAME).getStringValue();
+ }
+}
diff --git a/source/java/org/alfresco/web/forms/FormsTest.java b/source/java/org/alfresco/web/forms/FormsTest.java
index bccfcb7edd..53f7eedd6e 100644
--- a/source/java/org/alfresco/web/forms/FormsTest.java
+++ b/source/java/org/alfresco/web/forms/FormsTest.java
@@ -32,6 +32,7 @@ import org.alfresco.service.cmr.repository.NodeService;
import org.alfresco.service.cmr.repository.StoreRef;
import org.alfresco.service.cmr.security.MutableAuthenticationService;
import org.alfresco.service.namespace.QName;
+import org.alfresco.util.XMLUtil;
import org.alfresco.util.BaseSpringTest;
import org.alfresco.util.TestWithUserUtils;
import org.apache.commons.lang.ArrayUtils;
diff --git a/source/java/org/alfresco/web/forms/RenderingEngineTemplateImpl.java b/source/java/org/alfresco/web/forms/RenderingEngineTemplateImpl.java
index fa95f516d1..c64efc506c 100644
--- a/source/java/org/alfresco/web/forms/RenderingEngineTemplateImpl.java
+++ b/source/java/org/alfresco/web/forms/RenderingEngineTemplateImpl.java
@@ -58,6 +58,7 @@ import org.alfresco.service.cmr.security.AuthenticationService;
import org.alfresco.service.namespace.DynamicNamespacePrefixResolver;
import org.alfresco.service.namespace.NamespaceService;
import org.alfresco.service.namespace.QName;
+import org.alfresco.util.XMLUtil;
import org.springframework.extensions.surf.util.URLDecoder;
import org.springframework.extensions.surf.util.URLEncoder;
import org.alfresco.web.app.Application;
diff --git a/source/java/org/alfresco/web/forms/XMLUtil.java b/source/java/org/alfresco/web/forms/XMLUtil.java
deleted file mode 100644
index 2280f1fc7e..0000000000
--- a/source/java/org/alfresco/web/forms/XMLUtil.java
+++ /dev/null
@@ -1,276 +0,0 @@
-/*
- * Copyright (C) 2005-2010 Alfresco Software Limited.
- *
- * This file is part of Alfresco
- *
- * Alfresco is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * Alfresco is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with Alfresco. If not, see . */
-package org.alfresco.web.forms;
-
-import java.io.*;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.transform.OutputKeys;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.stream.StreamResult;
-import org.alfresco.model.ContentModel;
-import org.alfresco.service.cmr.avm.AVMService;
-import org.alfresco.service.cmr.repository.ContentReader;
-import org.alfresco.service.cmr.repository.ContentService;
-import org.alfresco.service.cmr.repository.NodeRef;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.w3c.dom.*;
-import org.xml.sax.SAXException;
-
-/**
- * XML utility functions.
- *
- * @author Ariel Backenroth
- */
-public class XMLUtil
-{
- private static final Log LOGGER = LogFactory.getLog(XMLUtil.class);
-
- /** utility function for creating a document */
- public static Document newDocument()
- {
- return XMLUtil.getDocumentBuilder().newDocument();
- }
-
- /** utility function for serializing a node */
- public static void print(final Node n, final Writer output)
- {
- XMLUtil.print(n, output, true);
- }
-
- /** utility function for serializing a node */
- public static void print(final Node n, final Writer output, final boolean indent)
- {
- try
- {
- final TransformerFactory tf = TransformerFactory.newInstance();
- final Transformer t = tf.newTransformer();
- t.setOutputProperty(OutputKeys.INDENT, indent ? "yes" : "no");
- t.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
- t.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "no");
- t.setOutputProperty(OutputKeys.METHOD, "xml");
- if (LOGGER.isDebugEnabled())
- {
- LOGGER.debug("writing out a document for " +
- (n instanceof Document
- ? ((Document)n).getDocumentElement()
- : n).getNodeName() +
- " to " + (output instanceof StringWriter
- ? "string"
- : output));
- }
- t.transform(new DOMSource(n), new StreamResult(output));
- }
- catch (TransformerException te)
- {
- te.printStackTrace();
- assert false : te.getMessage();
- }
- }
-
- /** utility function for serializing a node */
- public static void print(final Node n, final File output)
- throws IOException
- {
- XMLUtil.print(n, new FileWriter(output));
- }
-
- /** utility function for serializing a node */
- public static String toString(final Node n)
- {
- return XMLUtil.toString(n, true);
- }
-
- /** utility function for serializing a node */
- public static String toString(final Node n, final boolean indent)
- {
- final StringWriter result = new StringWriter();
- XMLUtil.print(n, result, indent);
- return result.toString();
- }
-
- /** utility function for parsing xml */
- public static Document parse(final String source)
- throws SAXException,
- IOException
- {
- return XMLUtil.parse(new ByteArrayInputStream(source.getBytes("UTF-8")));
- }
-
- /** utility function for parsing xml */
- public static Document parse(final NodeRef nodeRef,
- final ContentService contentService)
- throws SAXException,
- IOException
- {
- final ContentReader contentReader =
- contentService.getReader(nodeRef, ContentModel.TYPE_CONTENT);
- final InputStream in = contentReader.getContentInputStream();
- return XMLUtil.parse(in);
- }
-
- /** utility function for parsing xml */
- public static Document parse(final int version,
- final String path,
- final AVMService avmService)
- throws SAXException,
- IOException
- {
- return XMLUtil.parse(avmService.getFileInputStream(version, path));
- }
-
- /** utility function for parsing xml */
- public static Document parse(final File source)
- throws SAXException,
- IOException
- {
- return XMLUtil.parse(new FileInputStream(source));
- }
-
- /** utility function for parsing xml */
- public static Document parse(final InputStream source)
- throws SAXException,
- IOException
- {
- try
- {
- final DocumentBuilder db = XMLUtil.getDocumentBuilder();
- return db.parse(source);
- }
- finally
- {
- source.close();
- }
- }
-
- /** provides a document builder that is namespace aware but not validating by default */
- public static DocumentBuilder getDocumentBuilder()
- {
- return XMLUtil.getDocumentBuilder(true, false);
- }
-
- /**
- * FOR DIAGNOSTIC PURPOSES ONLY - incomplete
- * Builds a path to the node relative to the to node provided.
- * @param from the node from which to build the xpath
- * @param to an ancestor of from which will be the root of the path
- * @return an xpath to to rooted at from.
- */
- public static String buildXPath(final Node from, final Element to)
- {
- String result = "";
- Node tmp = from;
- do
- {
- if (tmp instanceof Attr)
- {
- assert result.length() == 0;
- result = "@" + tmp.getNodeName();
- }
- else if (tmp instanceof Element)
- {
- Node tmp2 = tmp;
- int position = 1;
- while (tmp2.getPreviousSibling() != null)
- {
- if (tmp2.getNodeName().equals(tmp.getNodeName()))
- {
- position++;
- }
- tmp2 = tmp2.getPreviousSibling();
- }
- String part = tmp.getNodeName() + "[" + position + "]";
- result = "/" + part + result;
- }
- else if (tmp instanceof Text)
- {
- assert result.length() == 0;
- result = "/text()";
- }
- else
- {
- if (LOGGER.isDebugEnabled())
- {
- throw new IllegalArgumentException("unsupported node type " + tmp);
- }
- }
- tmp = tmp.getParentNode();
- }
- while (tmp != to.getParentNode() && tmp != null);
- return result;
- }
-
- public static DocumentBuilder getDocumentBuilder(final boolean namespaceAware,
- final boolean validating)
- {
- try
- {
- final DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
- dbf.setNamespaceAware(namespaceAware);
- dbf.setValidating(validating);
- return dbf.newDocumentBuilder();
- }
- catch (ParserConfigurationException pce)
- {
- LOGGER.error(pce);
- return null;
- }
- }
-
- /**
- * Provides a NodeList of multiple nodelists
- */
- public static NodeList combine(final NodeList... nls)
- {
-
- return new NodeList()
- {
- public Node item(final int index)
- {
- int offset = 0;
- for (int i = 0; i < nls.length; i++)
- {
- if (index - offset < nls[i].getLength())
- {
- return nls[i].item(index - offset);
- }
- else
- {
- offset += nls[i].getLength();
- }
- }
- return null;
- }
-
- public int getLength()
- {
- int result = 0;
- for (int i = 0; i < nls.length; i++)
- {
- result += nls[i].getLength();
- }
- return result;
- }
- };
- }
-}
diff --git a/source/java/org/alfresco/web/forms/XMLUtilTest.java b/source/java/org/alfresco/web/forms/XMLUtilTest.java
index 992dac79f5..0ca64ce63e 100644
--- a/source/java/org/alfresco/web/forms/XMLUtilTest.java
+++ b/source/java/org/alfresco/web/forms/XMLUtilTest.java
@@ -24,6 +24,8 @@ import java.util.Random;
import junit.framework.TestCase;
+import org.alfresco.util.XMLUtil;
+
/**
* Simple XMLUtil test
*/
diff --git a/source/java/org/alfresco/web/forms/XSLTRenderingEngine.java b/source/java/org/alfresco/web/forms/XSLTRenderingEngine.java
index 6f92a7b122..6def3ce236 100644
--- a/source/java/org/alfresco/web/forms/XSLTRenderingEngine.java
+++ b/source/java/org/alfresco/web/forms/XSLTRenderingEngine.java
@@ -20,6 +20,7 @@ package org.alfresco.web.forms;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
+import java.io.StringWriter;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
@@ -54,6 +55,8 @@ import org.w3c.dom.traversal.NodeFilter;
import org.w3c.dom.traversal.NodeIterator;
import org.xml.sax.SAXException;
+import org.alfresco.util.XMLUtil;
+
/**
* A rendering engine which uses xsl templates to render renditions of
* form instance data.
@@ -258,14 +261,12 @@ public class XSLTRenderingEngine
final Element docEl = xslTemplate.getDocumentElement();
final String XALAN_NS = Constants.S_BUILTIN_EXTENSIONS_URL;
final String XALAN_NS_PREFIX = "xalan";
- docEl.setAttribute("xmlns:" + XALAN_NS_PREFIX, XALAN_NS);
final Set excludePrefixes = new HashSet();
if (docEl.hasAttribute("exclude-result-prefixes"))
{
excludePrefixes.addAll(Arrays.asList(docEl.getAttribute("exclude-result-prefixes").split(" ")));
}
- excludePrefixes.add(XALAN_NS_PREFIX);
final List result = new LinkedList();
for (QName ns : methods.keySet())
@@ -384,7 +385,7 @@ public class XSLTRenderingEngine
Document xslTemplate = null;
try
{
- xslTemplate = XMLUtil.parse(ret.getInputStream());
+ xslTemplate = XMLUtil.secureParseXSL(ret.getInputStream());
}
catch (final SAXException sax)
{
diff --git a/source/java/org/alfresco/web/forms/xforms/Schema2XForms.java b/source/java/org/alfresco/web/forms/xforms/Schema2XForms.java
index 2c91367c40..8c3d81472a 100644
--- a/source/java/org/alfresco/web/forms/xforms/Schema2XForms.java
+++ b/source/java/org/alfresco/web/forms/xforms/Schema2XForms.java
@@ -42,7 +42,7 @@ import org.alfresco.service.namespace.NamespaceService;
import org.alfresco.util.EqualsHelper;
import org.alfresco.util.Pair;
import org.alfresco.web.app.Application;
-import org.alfresco.web.forms.XMLUtil;
+import org.alfresco.util.XMLUtil;
import org.apache.commons.jxpath.JXPathContext;
import org.apache.commons.jxpath.Pointer;
import org.apache.commons.lang.StringUtils;
diff --git a/source/java/org/alfresco/web/forms/xforms/Schema2XFormsTest.java b/source/java/org/alfresco/web/forms/xforms/Schema2XFormsTest.java
index bea4e69286..888ff3c03e 100644
--- a/source/java/org/alfresco/web/forms/xforms/Schema2XFormsTest.java
+++ b/source/java/org/alfresco/web/forms/xforms/Schema2XFormsTest.java
@@ -26,7 +26,7 @@ import java.util.ResourceBundle;
import junit.framework.AssertionFailedError;
import org.alfresco.service.namespace.NamespaceService;
import org.alfresco.util.BaseTest;
-import org.alfresco.web.forms.XMLUtil;
+import org.alfresco.util.XMLUtil;
import org.apache.commons.jxpath.JXPathContext;
import org.apache.commons.jxpath.Pointer;
import org.apache.commons.logging.Log;
diff --git a/source/java/org/alfresco/web/forms/xforms/SchemaUtil.java b/source/java/org/alfresco/web/forms/xforms/SchemaUtil.java
index 9d48fcc8a6..35e9c74110 100644
--- a/source/java/org/alfresco/web/forms/xforms/SchemaUtil.java
+++ b/source/java/org/alfresco/web/forms/xforms/SchemaUtil.java
@@ -26,7 +26,7 @@ import java.util.TreeMap;
import java.util.TreeSet;
import org.alfresco.util.EqualsHelper;
-import org.alfresco.web.forms.XMLUtil;
+import org.alfresco.util.XMLUtil;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.xerces.xs.XSAttributeUse;
diff --git a/source/java/org/alfresco/web/forms/xforms/XFormsBean.java b/source/java/org/alfresco/web/forms/xforms/XFormsBean.java
index de372f941c..7e32b9a56a 100644
--- a/source/java/org/alfresco/web/forms/xforms/XFormsBean.java
+++ b/source/java/org/alfresco/web/forms/xforms/XFormsBean.java
@@ -49,7 +49,7 @@ import org.alfresco.web.bean.wcm.AVMNode;
import org.alfresco.web.bean.wcm.AVMUtil;
import org.alfresco.web.forms.Form;
import org.alfresco.web.forms.FormProcessor;
-import org.alfresco.web.forms.XMLUtil;
+import org.alfresco.util.XMLUtil;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.xerces.xs.XSModel;
diff --git a/source/java/org/alfresco/web/forms/xforms/XFormsProcessor.java b/source/java/org/alfresco/web/forms/xforms/XFormsProcessor.java
index eaca28fc1a..3f2bffd79a 100644
--- a/source/java/org/alfresco/web/forms/xforms/XFormsProcessor.java
+++ b/source/java/org/alfresco/web/forms/xforms/XFormsProcessor.java
@@ -40,7 +40,7 @@ import org.alfresco.web.bean.wcm.AVMBrowseBean;
import org.alfresco.web.bean.wcm.AVMUtil;
import org.alfresco.web.forms.Form;
import org.alfresco.web.forms.FormProcessor;
-import org.alfresco.web.forms.XMLUtil;
+import org.alfresco.util.XMLUtil;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.chiba.xml.ns.NamespaceConstants;
diff --git a/source/web/WEB-INF/web.xml b/source/web/WEB-INF/web.xml
index 48d4759c37..8b5685ccb9 100644
--- a/source/web/WEB-INF/web.xml
+++ b/source/web/WEB-INF/web.xml
@@ -794,6 +794,51 @@
CONFIDENTIAL
+
+
+
+ SOLR
+ /s/api/solr/*
+
+
+
+ repoclient
+
+
+
+ CONFIDENTIAL
+
+
+
+
+
+ SOLR
+ /wcservice/api/solr/*
+
+
+
+ repoclient
+
+
+
+ CONFIDENTIAL
+
+
+
+
+
+ SOLR
+ /wcs/api/solr/*
+
+
+
+ repoclient
+
+
+
+ CONFIDENTIAL
+
+
CLIENT-CERT
diff --git a/source/web/jsp/content/edit-html-inline.jsp b/source/web/jsp/content/edit-html-inline.jsp
index 8a50745819..a76e05c630 100644
--- a/source/web/jsp/content/edit-html-inline.jsp
+++ b/source/web/jsp/content/edit-html-inline.jsp
@@ -89,9 +89,9 @@ function saveContent(id, content)
<%-- Inline editor --%>
-
+
+
|
diff --git a/source/web/yui/event.js b/source/web/yui/event.js
index 3d8e5dd7af..33407fc462 100644
--- a/source/web/yui/event.js
+++ b/source/web/yui/event.js
@@ -1056,13 +1056,60 @@ if (!YAHOO.util.Event) {
}
}
+ var n = 100;
if (recurse && el && el.childNodes) {
- for (i=0,len=el.childNodes.length; i 8 || YAHOO.env.ua.ie == 0) {
+ for (i=0,len=el.childNodes.length; i 0) {
+ var elListeners = this.getListeners(elements[0], sType);
+ if (elListeners) {
+ for (var i=0,len=elListeners.length; i 0) {
+ nextNodes.length = 0;
+ for (var i=0, len=nodes.length; i