├── xwiki-enterprise-test ├── xwiki-enterprise-test-misc │ └── src │ │ └── test │ │ ├── resources │ │ └── entities │ │ │ ├── VERSION │ │ │ ├── xhtml.soc │ │ │ └── xhtml11.cat │ │ └── it │ │ └── org │ │ └── xwiki │ │ └── test │ │ └── misc │ │ ├── AllTests.java │ │ └── SuggestTest.java ├── xwiki-enterprise-test-ui │ └── src │ │ └── test │ │ ├── resources │ │ ├── SmallAttachment.txt │ │ ├── SmallAttachment2.txt │ │ ├── image.gif │ │ └── appwithinminutes │ │ │ ├── Enygma2002.png │ │ │ └── tmortagne.png │ │ └── it │ │ └── org │ │ └── xwiki │ │ └── test │ │ └── ui │ │ ├── RegisterWithoutLiveValidationTest.java │ │ ├── appwithinminutes │ │ ├── AbstractClassEditorTest.java │ │ └── ApplicationsPanelEntryTest.java │ │ ├── AllTests.java │ │ ├── ViewTest.java │ │ ├── BacklinksTest.java │ │ └── administration │ │ ├── RegisterFromAdministrationTest.java │ │ └── WYSIWYGEditorConfigTest.java ├── xwiki-enterprise-test-pageobjects │ └── src │ │ └── main │ │ ├── resources │ │ ├── SmallAttachment.txt │ │ ├── SmallAttachment2.txt │ │ └── image.gif │ │ └── java │ │ └── org │ │ └── xwiki │ │ └── test │ │ └── po │ │ └── xe │ │ └── HomePage.java ├── xwiki-enterprise-test-storage │ └── src │ │ └── test │ │ ├── resources │ │ └── Test.Attachment2.xar │ │ └── it │ │ └── org │ │ └── xwiki │ │ └── test │ │ └── storage │ │ ├── profiles │ │ ├── Profile.java │ │ ├── DefaultProfile.java │ │ └── FilesystemAttachmentStorageProfile.java │ │ └── AllTests.java ├── xwiki-enterprise-test-selenium │ ├── README │ ├── src │ │ └── test │ │ │ └── it │ │ │ └── org │ │ │ └── xwiki │ │ │ └── test │ │ │ └── selenium │ │ │ ├── UrlMiscTest.java │ │ │ ├── CacheTest.java │ │ │ ├── AllTests.java │ │ │ ├── ValidationTest.java │ │ │ ├── VelocityMacrosTest.java │ │ │ └── PanelsTest.java │ └── pom.xml ├── xwiki-enterprise-test-webstandards │ └── src │ │ └── test │ │ └── it │ │ └── org │ │ └── xwiki │ │ └── test │ │ └── webstandards │ │ ├── framework │ │ ├── Target.java │ │ ├── URLPathTarget.java │ │ └── DocumentReferenceTarget.java │ │ ├── CustomDutchWebGuidelinesValidationTest.java │ │ └── AllTests.java ├── xwiki-enterprise-test-jmeter │ └── src │ │ └── test │ │ ├── it │ │ └── org │ │ │ └── xwiki │ │ │ └── test │ │ │ └── jmeter │ │ │ └── AllTests.java │ │ └── resources │ │ └── jmeterbin │ │ └── httpclient.parameters ├── xwiki-enterprise-test-escaping │ └── src │ │ └── test │ │ └── it │ │ └── org │ │ └── xwiki │ │ └── test │ │ └── escaping │ │ ├── framework │ │ ├── URLContent.java │ │ ├── AbstractAutomaticTest.java │ │ └── SingleXWikiExecutor.java │ │ ├── suite │ │ ├── FileTest.java │ │ └── FileTestRunner.java │ │ └── AllTests.java ├── xwiki-enterprise-test-wysiwyg │ ├── src │ │ └── test │ │ │ └── it │ │ │ └── org │ │ │ └── xwiki │ │ │ └── test │ │ │ └── wysiwyg │ │ │ ├── EmbedTest.java │ │ │ ├── AllTests.java │ │ │ └── ImportTest.java │ └── pom.xml └── xwiki-enterprise-test-webdav │ └── pom.xml ├── xwiki-enterprise-installers ├── xwiki-enterprise-installer-debian │ ├── README │ ├── xwiki-enterprise-installer-debian-tomcat │ │ ├── xwiki-enterprise-installer-debian-tomcat7-pgsql │ │ │ ├── src │ │ │ │ └── deb │ │ │ │ │ └── control │ │ │ │ │ ├── postinst │ │ │ │ │ ├── config │ │ │ │ │ ├── control │ │ │ │ │ └── postrm │ │ │ └── pom.xml │ │ ├── xwiki-enterprise-installer-debian-tomcat8-mysql │ │ │ ├── src │ │ │ │ └── deb │ │ │ │ │ └── control │ │ │ │ │ ├── postinst │ │ │ │ │ ├── config │ │ │ │ │ ├── postrm │ │ │ │ │ └── control │ │ │ └── pom.xml │ │ ├── xwiki-enterprise-installer-debian-tomcat8-pgsql │ │ │ ├── src │ │ │ │ └── deb │ │ │ │ │ └── control │ │ │ │ │ ├── postinst │ │ │ │ │ ├── config │ │ │ │ │ ├── postrm │ │ │ │ │ └── control │ │ │ └── pom.xml │ │ ├── xwiki-enterprise-installer-debian-tomcat7-mysql │ │ │ ├── src │ │ │ │ └── deb │ │ │ │ │ └── control │ │ │ │ │ ├── config │ │ │ │ │ ├── control │ │ │ │ │ ├── postrm │ │ │ │ │ └── postinst │ │ │ └── pom.xml │ │ ├── xwiki-enterprise-installer-debian-tomcat7-common │ │ │ ├── src │ │ │ │ └── deb │ │ │ │ │ ├── control │ │ │ │ │ ├── postrm │ │ │ │ │ ├── postinst │ │ │ │ │ └── control │ │ │ │ │ └── resources │ │ │ │ │ └── etc │ │ │ │ │ └── xwiki │ │ │ │ │ └── xwiki-tomcat7.xml │ │ │ └── pom.xml │ │ ├── xwiki-enterprise-installer-debian-tomcat8-common │ │ │ ├── src │ │ │ │ └── deb │ │ │ │ │ ├── control │ │ │ │ │ ├── postrm │ │ │ │ │ ├── postinst │ │ │ │ │ └── control │ │ │ │ │ └── resources │ │ │ │ │ └── etc │ │ │ │ │ └── xwiki │ │ │ │ │ └── xwiki-tomcat8.xml │ │ │ └── pom.xml │ │ └── pom.xml │ ├── xwiki-enterprise-installer-debian-mysql-common │ │ └── src │ │ │ └── deb │ │ │ └── control │ │ │ ├── config │ │ │ ├── postrm │ │ │ ├── control │ │ │ └── postinst │ ├── xwiki-enterprise-installer-debian-pgsql-common │ │ └── src │ │ │ └── deb │ │ │ └── control │ │ │ ├── config │ │ │ ├── postrm │ │ │ ├── control │ │ │ └── postinst │ ├── xwiki-enterprise-installer-debian-common │ │ └── src │ │ │ └── deb │ │ │ └── control │ │ │ ├── postrm │ │ │ ├── control │ │ │ └── postinst │ └── pom.xml ├── xwiki-enterprise-installer-windows │ └── src │ │ └── main │ │ └── resources │ │ ├── xe.ico │ │ └── launch4j.xml ├── xwiki-enterprise-installer-generic │ └── src │ │ └── main │ │ └── resources │ │ ├── images │ │ ├── core.png │ │ ├── xe.ico │ │ ├── xe.png │ │ ├── xwiki.png │ │ ├── border1.png │ │ ├── border2.png │ │ ├── border3.png │ │ ├── border4.png │ │ ├── border5.png │ │ ├── border6.png │ │ ├── border7.png │ │ └── border8.png │ │ ├── LICENCE.txt │ │ ├── customIcons.xml │ │ ├── packsLang.xml │ │ ├── README.html │ │ ├── registrySpec.xml │ │ └── shortcutSpec_windows.xml └── pom.xml ├── .gitattributes ├── xwiki-enterprise-distribution ├── xwiki-enterprise-glassfish │ └── xwiki-enterprise-glassfish-derby │ │ └── src │ │ ├── main │ │ └── resources │ │ │ └── sun-web.xml │ │ └── assemble │ │ ├── xwiki-war.xml │ │ └── application.xml ├── pom.xml ├── xwiki-enterprise-jetty │ ├── xwiki-enterprise-jetty-mysql │ │ └── pom.xml │ ├── xwiki-enterprise-jetty-pgsql │ │ └── pom.xml │ ├── xwiki-enterprise-jetty-derby │ │ └── pom.xml │ └── xwiki-enterprise-jetty-hsqldb │ │ └── pom.xml └── xwiki-enterprise-ui-wiki-all │ └── pom.xml ├── .gitignore ├── xwiki-enterprise-data ├── xwiki-enterprise-data-derby │ ├── src │ │ └── assemble │ │ │ └── data.xml │ └── pom.xml └── xwiki-enterprise-data-hsqldb │ └── src │ └── assemble │ └── data.xml ├── README.md ├── xwiki-enterprise-ui ├── xwiki-enterprise-ui-admin-user │ ├── pom.xml │ └── src │ │ └── main │ │ └── resources │ │ └── XWiki │ │ └── XWikiAllGroup.xml ├── pom.xml └── xwiki-enterprise-ui-tour │ ├── pom.xml │ └── src │ └── main │ └── resources │ └── Tour │ └── HomepageTour │ └── Translations.zh.xml └── xwiki-enterprise-web-legacydependencies └── pom.xml /xwiki-enterprise-test/xwiki-enterprise-test-misc/src/test/resources/entities/VERSION: -------------------------------------------------------------------------------- 1 | 1.1 2 | -------------------------------------------------------------------------------- /xwiki-enterprise-test/xwiki-enterprise-test-ui/src/test/resources/SmallAttachment.txt: -------------------------------------------------------------------------------- 1 | This is a small attachment. -------------------------------------------------------------------------------- /xwiki-enterprise-test/xwiki-enterprise-test-ui/src/test/resources/SmallAttachment2.txt: -------------------------------------------------------------------------------- 1 | This is another small attachment. -------------------------------------------------------------------------------- /xwiki-enterprise-test/xwiki-enterprise-test-pageobjects/src/main/resources/SmallAttachment.txt: -------------------------------------------------------------------------------- 1 | This is a small attachment. 2 | -------------------------------------------------------------------------------- /xwiki-enterprise-test/xwiki-enterprise-test-pageobjects/src/main/resources/SmallAttachment2.txt: -------------------------------------------------------------------------------- 1 | This is another small attachment. 2 | -------------------------------------------------------------------------------- /xwiki-enterprise-installers/xwiki-enterprise-installer-debian/README: -------------------------------------------------------------------------------- 1 | Debian/Ubuntu Package(s) of XWiki Enterprise built using Apache Maven. -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | *.java text ident diff=java 3 | *.xml text ident diff=html 4 | *.vm text ident 5 | *.js text ident 6 | *.css text ident 7 | *.sh eol=lf ident 8 | *.bat eol=crlf ident 9 | -------------------------------------------------------------------------------- /xwiki-enterprise-installers/xwiki-enterprise-installer-debian/xwiki-enterprise-installer-debian-tomcat/xwiki-enterprise-installer-debian-tomcat7-pgsql/src/deb/control/postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | #set -x 5 | -------------------------------------------------------------------------------- /xwiki-enterprise-installers/xwiki-enterprise-installer-debian/xwiki-enterprise-installer-debian-tomcat/xwiki-enterprise-installer-debian-tomcat8-mysql/src/deb/control/postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | #set -x 5 | -------------------------------------------------------------------------------- /xwiki-enterprise-installers/xwiki-enterprise-installer-debian/xwiki-enterprise-installer-debian-tomcat/xwiki-enterprise-installer-debian-tomcat8-pgsql/src/deb/control/postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | #set -x 5 | -------------------------------------------------------------------------------- /xwiki-enterprise-test/xwiki-enterprise-test-ui/src/test/resources/image.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xwiki-attic/xwiki-enterprise/HEAD/xwiki-enterprise-test/xwiki-enterprise-test-ui/src/test/resources/image.gif -------------------------------------------------------------------------------- /xwiki-enterprise-test/xwiki-enterprise-test-pageobjects/src/main/resources/image.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xwiki-attic/xwiki-enterprise/HEAD/xwiki-enterprise-test/xwiki-enterprise-test-pageobjects/src/main/resources/image.gif -------------------------------------------------------------------------------- /xwiki-enterprise-installers/xwiki-enterprise-installer-windows/src/main/resources/xe.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xwiki-attic/xwiki-enterprise/HEAD/xwiki-enterprise-installers/xwiki-enterprise-installer-windows/src/main/resources/xe.ico -------------------------------------------------------------------------------- /xwiki-enterprise-test/xwiki-enterprise-test-storage/src/test/resources/Test.Attachment2.xar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xwiki-attic/xwiki-enterprise/HEAD/xwiki-enterprise-test/xwiki-enterprise-test-storage/src/test/resources/Test.Attachment2.xar -------------------------------------------------------------------------------- /xwiki-enterprise-installers/xwiki-enterprise-installer-debian/xwiki-enterprise-installer-debian-tomcat/xwiki-enterprise-installer-debian-tomcat7-mysql/src/deb/control/config: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | #set -x 5 | 6 | . /usr/share/debconf/confmodule 7 | -------------------------------------------------------------------------------- /xwiki-enterprise-installers/xwiki-enterprise-installer-debian/xwiki-enterprise-installer-debian-tomcat/xwiki-enterprise-installer-debian-tomcat7-pgsql/src/deb/control/config: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | #set -x 5 | 6 | . /usr/share/debconf/confmodule 7 | -------------------------------------------------------------------------------- /xwiki-enterprise-installers/xwiki-enterprise-installer-debian/xwiki-enterprise-installer-debian-tomcat/xwiki-enterprise-installer-debian-tomcat8-mysql/src/deb/control/config: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | #set -x 5 | 6 | . /usr/share/debconf/confmodule 7 | -------------------------------------------------------------------------------- /xwiki-enterprise-installers/xwiki-enterprise-installer-debian/xwiki-enterprise-installer-debian-tomcat/xwiki-enterprise-installer-debian-tomcat8-pgsql/src/deb/control/config: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | #set -x 5 | 6 | . /usr/share/debconf/confmodule 7 | -------------------------------------------------------------------------------- /xwiki-enterprise-installers/xwiki-enterprise-installer-generic/src/main/resources/images/core.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xwiki-attic/xwiki-enterprise/HEAD/xwiki-enterprise-installers/xwiki-enterprise-installer-generic/src/main/resources/images/core.png -------------------------------------------------------------------------------- /xwiki-enterprise-installers/xwiki-enterprise-installer-generic/src/main/resources/images/xe.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xwiki-attic/xwiki-enterprise/HEAD/xwiki-enterprise-installers/xwiki-enterprise-installer-generic/src/main/resources/images/xe.ico -------------------------------------------------------------------------------- /xwiki-enterprise-installers/xwiki-enterprise-installer-generic/src/main/resources/images/xe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xwiki-attic/xwiki-enterprise/HEAD/xwiki-enterprise-installers/xwiki-enterprise-installer-generic/src/main/resources/images/xe.png -------------------------------------------------------------------------------- /xwiki-enterprise-test/xwiki-enterprise-test-ui/src/test/resources/appwithinminutes/Enygma2002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xwiki-attic/xwiki-enterprise/HEAD/xwiki-enterprise-test/xwiki-enterprise-test-ui/src/test/resources/appwithinminutes/Enygma2002.png -------------------------------------------------------------------------------- /xwiki-enterprise-test/xwiki-enterprise-test-ui/src/test/resources/appwithinminutes/tmortagne.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xwiki-attic/xwiki-enterprise/HEAD/xwiki-enterprise-test/xwiki-enterprise-test-ui/src/test/resources/appwithinminutes/tmortagne.png -------------------------------------------------------------------------------- /xwiki-enterprise-installers/xwiki-enterprise-installer-generic/src/main/resources/images/xwiki.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xwiki-attic/xwiki-enterprise/HEAD/xwiki-enterprise-installers/xwiki-enterprise-installer-generic/src/main/resources/images/xwiki.png -------------------------------------------------------------------------------- /xwiki-enterprise-installers/xwiki-enterprise-installer-generic/src/main/resources/images/border1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xwiki-attic/xwiki-enterprise/HEAD/xwiki-enterprise-installers/xwiki-enterprise-installer-generic/src/main/resources/images/border1.png -------------------------------------------------------------------------------- /xwiki-enterprise-installers/xwiki-enterprise-installer-generic/src/main/resources/images/border2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xwiki-attic/xwiki-enterprise/HEAD/xwiki-enterprise-installers/xwiki-enterprise-installer-generic/src/main/resources/images/border2.png -------------------------------------------------------------------------------- /xwiki-enterprise-installers/xwiki-enterprise-installer-generic/src/main/resources/images/border3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xwiki-attic/xwiki-enterprise/HEAD/xwiki-enterprise-installers/xwiki-enterprise-installer-generic/src/main/resources/images/border3.png -------------------------------------------------------------------------------- /xwiki-enterprise-installers/xwiki-enterprise-installer-generic/src/main/resources/images/border4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xwiki-attic/xwiki-enterprise/HEAD/xwiki-enterprise-installers/xwiki-enterprise-installer-generic/src/main/resources/images/border4.png -------------------------------------------------------------------------------- /xwiki-enterprise-installers/xwiki-enterprise-installer-generic/src/main/resources/images/border5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xwiki-attic/xwiki-enterprise/HEAD/xwiki-enterprise-installers/xwiki-enterprise-installer-generic/src/main/resources/images/border5.png -------------------------------------------------------------------------------- /xwiki-enterprise-installers/xwiki-enterprise-installer-generic/src/main/resources/images/border6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xwiki-attic/xwiki-enterprise/HEAD/xwiki-enterprise-installers/xwiki-enterprise-installer-generic/src/main/resources/images/border6.png -------------------------------------------------------------------------------- /xwiki-enterprise-installers/xwiki-enterprise-installer-generic/src/main/resources/images/border7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xwiki-attic/xwiki-enterprise/HEAD/xwiki-enterprise-installers/xwiki-enterprise-installer-generic/src/main/resources/images/border7.png -------------------------------------------------------------------------------- /xwiki-enterprise-installers/xwiki-enterprise-installer-generic/src/main/resources/images/border8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xwiki-attic/xwiki-enterprise/HEAD/xwiki-enterprise-installers/xwiki-enterprise-installer-generic/src/main/resources/images/border8.png -------------------------------------------------------------------------------- /xwiki-enterprise-installers/xwiki-enterprise-installer-debian/xwiki-enterprise-installer-debian-mysql-common/src/deb/control/config: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | #set -x 5 | 6 | . /usr/share/debconf/confmodule 7 | . /usr/share/dbconfig-common/dpkg/config.mysql 8 | 9 | dbc_go xwiki $@ 10 | -------------------------------------------------------------------------------- /xwiki-enterprise-installers/xwiki-enterprise-installer-debian/xwiki-enterprise-installer-debian-pgsql-common/src/deb/control/config: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | #set -x 5 | 6 | . /usr/share/debconf/confmodule 7 | . /usr/share/dbconfig-common/dpkg/config.pgsql 8 | 9 | dbc_go xwiki $@ 10 | -------------------------------------------------------------------------------- /xwiki-enterprise-installers/xwiki-enterprise-installer-debian/xwiki-enterprise-installer-debian-tomcat/xwiki-enterprise-installer-debian-tomcat8-mysql/src/deb/control/postrm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | #set -x 5 | 6 | if [ "$1" = "purge" ] && [ -e /usr/share/debconf/confmodule ]; then 7 | . /usr/share/debconf/confmodule 8 | db_purge 9 | fi 10 | -------------------------------------------------------------------------------- /xwiki-enterprise-installers/xwiki-enterprise-installer-debian/xwiki-enterprise-installer-debian-tomcat/xwiki-enterprise-installer-debian-tomcat8-pgsql/src/deb/control/postrm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | #set -x 5 | 6 | if [ "$1" = "purge" ] && [ -e /usr/share/debconf/confmodule ]; then 7 | . /usr/share/debconf/confmodule 8 | db_purge 9 | fi 10 | -------------------------------------------------------------------------------- /xwiki-enterprise-distribution/xwiki-enterprise-glassfish/xwiki-enterprise-glassfish-derby/src/main/resources/sun-web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | /xwiki 5 | 6 | 7 | -------------------------------------------------------------------------------- /xwiki-enterprise-test/xwiki-enterprise-test-selenium/README: -------------------------------------------------------------------------------- 1 | This module is being phased out using this strategy: 2 | 3 | * New UI tests should be written using Selenium2 and go in ui-tests/ 4 | * Slowly migrate existing functional tests in this module to ui-tests/ over time 5 | * Use the PageObject pattern in new tests in ui-tests/ (http://code.google.com/p/selenium/wiki/PageObjects) 6 | 7 | For more details see http://markmail.org/message/akvm7pzwddhctmqy 8 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Build 2 | target 3 | target-eclipse 4 | 5 | # IDEA 6 | *.iml 7 | *.ipr 8 | *.iws 9 | .idea 10 | atlassian-ide-plugin.xml 11 | 12 | # Eclipse 13 | .classpath 14 | .project 15 | .settings 16 | .checkstyle 17 | .fbprefs 18 | bin 19 | # Automatically generated by WTP 20 | **/src/main/java/META-INF/ 21 | **/src/test/java/META-INF/ 22 | **/src/META-INF/ 23 | #PyDev 24 | .pydevproject 25 | 26 | # NetBeans 27 | nbproject 28 | 29 | # Other 30 | *.log.* 31 | *.log 32 | .sonar-ide.properties 33 | .clover 34 | *~ 35 | -------------------------------------------------------------------------------- /xwiki-enterprise-installers/xwiki-enterprise-installer-debian/xwiki-enterprise-installer-debian-common/src/deb/control/postrm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | #set -x 5 | 6 | case "$1" in 7 | purge) 8 | # Purge XWiki configuration 9 | rm -f /etc/xwiki/xwiki.cfg /etc/xwiki/xwiki.properties /etc/xwiki/web.xml 10 | ucf --purge /etc/xwiki/xwiki.cfg || true 11 | ucf --purge /etc/xwiki/xwiki.properties || true 12 | ucf --purge /etc/xwiki/web.xml || true 13 | ;; 14 | esac 15 | 16 | exit 0 17 | -------------------------------------------------------------------------------- /xwiki-enterprise-installers/xwiki-enterprise-installer-debian/xwiki-enterprise-installer-debian-tomcat/xwiki-enterprise-installer-debian-tomcat7-mysql/src/deb/control/control: -------------------------------------------------------------------------------- 1 | Package: xwiki-enterprise-tomcat7-mysql 2 | Version: [[version]] 3 | Section: java 4 | Priority: optional 5 | Architecture: all 6 | Depends: xwiki-enterprise-tomcat7-common (= [[version]]), xwiki-enterprise-mysql-common (= [[version]]) 7 | Maintainer: [[debian.maintainer]] 8 | License: [[debian.license]] 9 | Description: [[debian.description]] 10 | Bugs: [[debian.bugs]] 11 | Homepage: [[debian.homepage]] -------------------------------------------------------------------------------- /xwiki-enterprise-installers/xwiki-enterprise-installer-debian/xwiki-enterprise-installer-debian-tomcat/xwiki-enterprise-installer-debian-tomcat7-pgsql/src/deb/control/control: -------------------------------------------------------------------------------- 1 | Package: xwiki-enterprise-tomcat7-pgsql 2 | Version: [[version]] 3 | Section: java 4 | Priority: optional 5 | Architecture: all 6 | Depends: xwiki-enterprise-tomcat7-common (= [[version]]), xwiki-enterprise-pgsql-common (= [[version]]) 7 | Maintainer: [[debian.maintainer]] 8 | License: [[debian.license]] 9 | Description: [[debian.description]] 10 | Bugs: [[debian.bugs]] 11 | Homepage: [[debian.homepage]] -------------------------------------------------------------------------------- /xwiki-enterprise-installers/xwiki-enterprise-installer-debian/xwiki-enterprise-installer-debian-tomcat/xwiki-enterprise-installer-debian-tomcat8-mysql/src/deb/control/control: -------------------------------------------------------------------------------- 1 | Package: xwiki-enterprise-tomcat8-mysql 2 | Version: [[version]] 3 | Section: java 4 | Priority: optional 5 | Architecture: all 6 | Depends: xwiki-enterprise-mysql-common (= [[version]]), xwiki-enterprise-tomcat8-common (= [[version]]) 7 | Maintainer: [[debian.maintainer]] 8 | License: [[debian.license]] 9 | Description: [[debian.description]] 10 | Bugs: [[debian.bugs]] 11 | Homepage: [[debian.homepage]] -------------------------------------------------------------------------------- /xwiki-enterprise-installers/xwiki-enterprise-installer-debian/xwiki-enterprise-installer-debian-tomcat/xwiki-enterprise-installer-debian-tomcat8-pgsql/src/deb/control/control: -------------------------------------------------------------------------------- 1 | Package: xwiki-enterprise-tomcat8-pgsql 2 | Version: [[version]] 3 | Section: java 4 | Priority: optional 5 | Architecture: all 6 | Depends: xwiki-enterprise-pgsql-common (= [[version]]), xwiki-enterprise-tomcat8-common (= [[version]]) 7 | Maintainer: [[debian.maintainer]] 8 | License: [[debian.license]] 9 | Description: [[debian.description]] 10 | Bugs: [[debian.bugs]] 11 | Homepage: [[debian.homepage]] -------------------------------------------------------------------------------- /xwiki-enterprise-installers/xwiki-enterprise-installer-debian/xwiki-enterprise-installer-debian-tomcat/xwiki-enterprise-installer-debian-tomcat7-mysql/src/deb/control/postrm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | #set -x 5 | 6 | if [ "$1" = "purge" ] && [ -f /usr/share/debconf/confmodule ]; then 7 | . /usr/share/debconf/confmodule 8 | db_purge 9 | fi 10 | 11 | ######################### 12 | # Restart Tomcat 13 | ######################### 14 | 15 | invoke-rc.d --quiet tomcat7 restart || { 16 | RESULT=$? 17 | # Ignore if tomcat7 init script does not exist (yet) 18 | if [ $RESULT != 100 ]; then 19 | exit $RESULT 20 | fi 21 | } 22 | -------------------------------------------------------------------------------- /xwiki-enterprise-installers/xwiki-enterprise-installer-debian/xwiki-enterprise-installer-debian-tomcat/xwiki-enterprise-installer-debian-tomcat7-pgsql/src/deb/control/postrm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | #set -x 5 | 6 | if [ "$1" = "purge" ] && [ -f /usr/share/debconf/confmodule ]; then 7 | . /usr/share/debconf/confmodule 8 | db_purge 9 | fi 10 | 11 | ######################### 12 | # Restart Tomcat 13 | ######################### 14 | 15 | invoke-rc.d --quiet tomcat7 restart || { 16 | RESULT=$? 17 | # Ignore if tomcat7 init script does not exist (yet) 18 | if [ $RESULT != 100 ]; then 19 | exit $RESULT 20 | fi 21 | } 22 | -------------------------------------------------------------------------------- /xwiki-enterprise-installers/xwiki-enterprise-installer-debian/xwiki-enterprise-installer-debian-tomcat/xwiki-enterprise-installer-debian-tomcat7-common/src/deb/control/postrm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | #set -x 5 | 6 | if [ "$1" = "purge" ] && [ -f /usr/share/debconf/confmodule ]; then 7 | . /usr/share/debconf/confmodule 8 | db_purge 9 | fi 10 | 11 | ######################### 12 | # Restart Tomcat 13 | ######################### 14 | 15 | invoke-rc.d --quiet tomcat7 restart || { 16 | RESULT=$? 17 | # Ignore if tomcat7 init script does not exist (yet) 18 | if [ $RESULT != 100 ]; then 19 | exit $RESULT 20 | fi 21 | } 22 | -------------------------------------------------------------------------------- /xwiki-enterprise-installers/xwiki-enterprise-installer-debian/xwiki-enterprise-installer-debian-tomcat/xwiki-enterprise-installer-debian-tomcat8-common/src/deb/control/postrm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | #set -x 5 | 6 | if [ "$1" = "purge" ] && [ -f /usr/share/debconf/confmodule ]; then 7 | . /usr/share/debconf/confmodule 8 | db_purge 9 | fi 10 | 11 | ######################### 12 | # Restart Tomcat 13 | ######################### 14 | 15 | invoke-rc.d --quiet tomcat8 restart || { 16 | RESULT=$? 17 | # Ignore if tomcat7 init script does not exist (yet) 18 | if [ $RESULT != 100 ]; then 19 | exit $RESULT 20 | fi 21 | } 22 | -------------------------------------------------------------------------------- /xwiki-enterprise-installers/xwiki-enterprise-installer-debian/xwiki-enterprise-installer-debian-common/src/deb/control/control: -------------------------------------------------------------------------------- 1 | Package: xwiki-enterprise-common 2 | Version: [[version]] 3 | Section: java 4 | Priority: optional 5 | Provides: xwiki, xwiki-enterprise 6 | Suggests: xwiki-enterprise-tomcat7-mysql | xwiki-enterprise-tomcat7-pgsql 7 | Architecture: all 8 | Depends: ucf (>= 0.30), dbconfig-common (>= 1.8.0), ttf-dejavu, java8-runtime-headless | java8-runtime | openjdk-8-jre-headless 9 | Maintainer: [[debian.maintainer]] 10 | License: [[debian.license]] 11 | Description: [[debian.description]] 12 | Bugs: [[debian.bugs]] 13 | Homepage: [[debian.homepage]] 14 | -------------------------------------------------------------------------------- /xwiki-enterprise-installers/xwiki-enterprise-installer-debian/xwiki-enterprise-installer-debian-common/src/deb/control/postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | #set -x 5 | 6 | ######################### 7 | # var 8 | ######################### 9 | 10 | if [ ! -d /var/lib/xwiki ]; then 11 | mkdir /var/lib/xwiki 12 | fi 13 | if [ ! -d /var/lib/xwiki/data ]; then 14 | mkdir /var/lib/xwiki/data 15 | fi 16 | 17 | # Update configuration files 18 | ucf --three-way --debconf-ok /usr/share/xwiki/default/xwiki.cfg /etc/xwiki/xwiki.cfg 19 | ucf --three-way --debconf-ok /usr/share/xwiki/default/xwiki.properties /etc/xwiki/xwiki.properties 20 | ucf --three-way --debconf-ok /usr/share/xwiki/default/web.xml /etc/xwiki/web.xml 21 | -------------------------------------------------------------------------------- /xwiki-enterprise-test/xwiki-enterprise-test-misc/src/test/resources/entities/xhtml.soc: -------------------------------------------------------------------------------- 1 | OVERRIDE YES 2 | -- Oasis entity catalog for Extensible HTML 1.0 -- 3 | 4 | PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "xhtml1-strict.dtd" 5 | PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "xhtml1-transitional.dtd" 6 | PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "xhtml1-frameset.dtd" 7 | 8 | -- ISO latin 1 entity set for Extensible HTML (XML 1.0 format) -- 9 | 10 | PUBLIC "-//W3C//ENTITIES Latin 1 for XHTML//EN" "xhtml-lat1.ent" 11 | PUBLIC "-//W3C//ENTITIES Symbols for XHTML//EN" "xhtml-symbol.ent" 12 | PUBLIC "-//W3C//ENTITIES Special for XHTML//EN" "xhtml-special.ent" 13 | 14 | SGMLDECL "xhtml1.dcl" 15 | -------------------------------------------------------------------------------- /xwiki-enterprise-installers/xwiki-enterprise-installer-debian/xwiki-enterprise-installer-debian-pgsql-common/src/deb/control/postrm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | #set -x 5 | 6 | if [ -f /usr/share/debconf/confmodule ]; then 7 | . /usr/share/debconf/confmodule 8 | 9 | if [ -f /usr/share/dbconfig-common/dpkg/postrm.pgsql ]; then 10 | . /usr/share/dbconfig-common/dpkg/postrm.pgsql 11 | dbc_go xwiki $@ 12 | fi 13 | 14 | if [ "$1" = "purge" ]; then 15 | db_purge 16 | fi 17 | fi 18 | 19 | case "$1" in 20 | purge) 21 | # Purge hibernate configuration 22 | rm -f /etc/xwiki/hibernate.cfg.xml 23 | ucf --purge /etc/xwiki/hibernate.cfg.xml || true 24 | ;; 25 | esac 26 | 27 | exit 0 28 | -------------------------------------------------------------------------------- /xwiki-enterprise-installers/xwiki-enterprise-installer-debian/xwiki-enterprise-installer-debian-mysql-common/src/deb/control/postrm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | #set -x 5 | 6 | if [ -f /usr/share/debconf/confmodule ]; then 7 | . /usr/share/debconf/confmodule 8 | 9 | if [ -f /usr/share/dbconfig-common/dpkg/postrm.mysql ]; then 10 | . /usr/share/dbconfig-common/dpkg/postrm.mysql 11 | dbc_go xwiki $@ 12 | fi 13 | 14 | if [ "$1" = "purge" ]; then 15 | db_purge 16 | fi 17 | fi 18 | 19 | case "$1" in 20 | purge) 21 | # Purge hibernate configuration 22 | rm -f /etc/xwiki/hibernate.cfg.xml 23 | ucf --purge /etc/xwiki/hibernate.cfg.xml || true 24 | ;; 25 | esac 26 | 27 | exit 0 28 | -------------------------------------------------------------------------------- /xwiki-enterprise-installers/xwiki-enterprise-installer-debian/xwiki-enterprise-installer-debian-tomcat/xwiki-enterprise-installer-debian-tomcat7-mysql/src/deb/control/postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | #set -x 5 | 6 | ######################### 7 | # Rights 8 | ######################### 9 | 10 | ## Make sure tomcat is able to write in the data folder 11 | chown tomcat7.tomcat7 /var/lib/xwiki/data 12 | 13 | ######################### 14 | # Configuration 15 | ######################### 16 | 17 | . /usr/share/debconf/confmodule 18 | 19 | ######################### 20 | # Restart Tomcat 21 | ######################### 22 | 23 | invoke-rc.d --quiet tomcat7 restart || { 24 | RESULT=$? 25 | # Ignore if tomcat7 init script does not exist (yet) 26 | if [ $RESULT != 100 ]; then 27 | exit $RESULT 28 | fi 29 | } 30 | -------------------------------------------------------------------------------- /xwiki-enterprise-installers/xwiki-enterprise-installer-debian/xwiki-enterprise-installer-debian-tomcat/xwiki-enterprise-installer-debian-tomcat7-common/src/deb/control/postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | #set -x 5 | 6 | ######################### 7 | # Rights 8 | ######################### 9 | 10 | ## Make sure tomcat is able to write in the data folder 11 | chown tomcat7.tomcat7 /var/lib/xwiki/data 12 | 13 | ######################### 14 | # Configuration 15 | ######################### 16 | 17 | . /usr/share/debconf/confmodule 18 | 19 | ######################### 20 | # Restart Tomcat 21 | ######################### 22 | 23 | invoke-rc.d --quiet tomcat7 restart || { 24 | RESULT=$? 25 | # Ignore if tomcat7 init script does not exist (yet) 26 | if [ $RESULT != 100 ]; then 27 | exit $RESULT 28 | fi 29 | } 30 | -------------------------------------------------------------------------------- /xwiki-enterprise-installers/xwiki-enterprise-installer-debian/xwiki-enterprise-installer-debian-tomcat/xwiki-enterprise-installer-debian-tomcat8-common/src/deb/control/postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | #set -x 5 | 6 | ######################### 7 | # Rights 8 | ######################### 9 | 10 | ## Make sure tomcat is able to write in the data folder 11 | chown tomcat8.tomcat8 /var/lib/xwiki/data 12 | 13 | ######################### 14 | # Configuration 15 | ######################### 16 | 17 | . /usr/share/debconf/confmodule 18 | 19 | ######################### 20 | # Restart Tomcat 21 | ######################### 22 | 23 | invoke-rc.d --quiet tomcat8 restart || { 24 | RESULT=$? 25 | # Ignore if tomcat7 init script does not exist (yet) 26 | if [ $RESULT != 100 ]; then 27 | exit $RESULT 28 | fi 29 | } 30 | -------------------------------------------------------------------------------- /xwiki-enterprise-installers/xwiki-enterprise-installer-debian/xwiki-enterprise-installer-debian-pgsql-common/src/deb/control/control: -------------------------------------------------------------------------------- 1 | Package: xwiki-enterprise-pgsql-common 2 | Version: [[version]] 3 | Section: java 4 | Priority: optional 5 | Architecture: all 6 | Depends: xwiki-enterprise-common (= [[version]]), postgresql, libpg-java, dbconfig-common 7 | Provides: xwiki-enterprise-database 8 | Suggests: xwiki-enterprise-tomcat5-pgsql | xwiki-enterprise-tomcat6-pgsql | xwiki-enterprise-tomcat7-pgsql 9 | Replaces: xwiki-enterprise-tomcat-pgsql (<< 3.5), xwiki-enterprise-database 10 | Breaks: xwiki-enterprise-tomcat-pgsql (<< 3.5) 11 | Conflicts: xwiki-enterprise-database 12 | Maintainer: [[debian.maintainer]] 13 | License: [[debian.license]] 14 | Description: [[debian.description]] 15 | Bugs: [[debian.bugs]] 16 | Homepage: [[debian.homepage]] -------------------------------------------------------------------------------- /xwiki-enterprise-installers/xwiki-enterprise-installer-debian/xwiki-enterprise-installer-debian-mysql-common/src/deb/control/control: -------------------------------------------------------------------------------- 1 | Package: xwiki-enterprise-mysql-common 2 | Version: [[version]] 3 | Section: java 4 | Priority: optional 5 | Architecture: all 6 | Depends: xwiki-enterprise-common (= [[version]]), mysql-server | default-mysql-server | mariadb-server, libmysql-java (>= 5.1.4), dbconfig-common 7 | Provides: xwiki-enterprise-database 8 | Suggests: xwiki-enterprise-tomcat5-mysql | xwiki-enterprise-tomcat6-mysql | xwiki-enterprise-tomcat7-mysql 9 | Replaces: xwiki-enterprise-tomcat-mysql (<< 3.5), xwiki-enterprise-database 10 | Breaks: xwiki-enterprise-tomcat-mysql (<< 3.5) 11 | Conflicts: xwiki-enterprise-database 12 | Maintainer: [[debian.maintainer]] 13 | License: [[debian.license]] 14 | Description: [[debian.description]] 15 | Bugs: [[debian.bugs]] 16 | Homepage: [[debian.homepage]] -------------------------------------------------------------------------------- /xwiki-enterprise-installers/xwiki-enterprise-installer-debian/xwiki-enterprise-installer-debian-tomcat/xwiki-enterprise-installer-debian-tomcat7-common/src/deb/control/control: -------------------------------------------------------------------------------- 1 | Package: xwiki-enterprise-tomcat7-common 2 | Version: [[version]] 3 | Section: java 4 | Priority: optional 5 | Architecture: all 6 | Depends: xwiki-enterprise-common (= [[version]]), tomcat7 7 | Provides: xwiki-enterprise-tomcat-common 8 | Suggests: xwiki-enterprise-tomcat7-mysql | xwiki-enterprise-tomcat7-pgsql 9 | Replaces: xwiki-enterprise-tomcat-mysql (<< 3.5), xwiki-enterprise-tomcat-pgsql (<< 3.5), xwiki-enterprise-tomcat-common 10 | Breaks: xwiki-enterprise-tomcat-mysql (<< 3.5), xwiki-enterprise-tomcat-pgsql (<< 3.5), xwiki-enterprise-tomcat-common 11 | Maintainer: [[debian.maintainer]] 12 | License: [[debian.license]] 13 | Description: [[debian.description]] 14 | Bugs: [[debian.bugs]] 15 | Homepage: [[debian.homepage]] -------------------------------------------------------------------------------- /xwiki-enterprise-installers/xwiki-enterprise-installer-debian/xwiki-enterprise-installer-debian-tomcat/xwiki-enterprise-installer-debian-tomcat8-common/src/deb/control/control: -------------------------------------------------------------------------------- 1 | Package: xwiki-enterprise-tomcat8-common 2 | Version: [[version]] 3 | Section: java 4 | Priority: optional 5 | Architecture: all 6 | Depends: xwiki-enterprise-common (= [[version]]), tomcat8 7 | Provides: xwiki-enterprise-tomcat-common 8 | Suggests: xwiki-enterprise-tomcat8-mysql | xwiki-enterprise-tomcat8-pgsql 9 | Replaces: xwiki-enterprise-tomcat-mysql (<< 3.5), xwiki-enterprise-tomcat-pgsql (<< 3.5), xwiki-enterprise-tomcat-common 10 | Breaks: xwiki-enterprise-tomcat-mysql (<< 3.5), xwiki-enterprise-tomcat-pgsql (<< 3.5), xwiki-enterprise-tomcat-common 11 | Maintainer: [[debian.maintainer]] 12 | License: [[debian.license]] 13 | Description: [[debian.description]] 14 | Bugs: [[debian.bugs]] 15 | Homepage: [[debian.homepage]] -------------------------------------------------------------------------------- /xwiki-enterprise-installers/xwiki-enterprise-installer-generic/src/main/resources/LICENCE.txt: -------------------------------------------------------------------------------- 1 | See the NOTICE file distributed with this work for additional 2 | information regarding copyright ownership. 3 | 4 | This is free software; you can redistribute it and/or modify it 5 | under the terms of the GNU Lesser General Public License as 6 | published by the Free Software Foundation; either version 2.1 of 7 | the License, or (at your option) any later version. 8 | 9 | This software is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this software; if not, write to the Free 16 | Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 17 | 02110-1301 USA, or see the FSF site: http://www.fsf.org. -------------------------------------------------------------------------------- /xwiki-enterprise-test/xwiki-enterprise-test-webstandards/src/test/it/org/xwiki/test/webstandards/framework/Target.java: -------------------------------------------------------------------------------- 1 | /* 2 | * See the NOTICE file distributed with this work for additional 3 | * information regarding copyright ownership. 4 | * 5 | * This is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU Lesser General Public License as 7 | * published by the Free Software Foundation; either version 2.1 of 8 | * the License, or (at your option) any later version. 9 | * 10 | * This software is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this software; if not, write to the Free 17 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 18 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 19 | */ 20 | package org.xwiki.test.webstandards.framework; 21 | 22 | public interface Target 23 | { 24 | String getName(); 25 | } 26 | -------------------------------------------------------------------------------- /xwiki-enterprise-installers/xwiki-enterprise-installer-generic/src/main/resources/customIcons.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 24 | 25 | 29 | -------------------------------------------------------------------------------- /xwiki-enterprise-installers/xwiki-enterprise-installer-generic/src/main/resources/packsLang.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 24 | 25 | 29 | -------------------------------------------------------------------------------- /xwiki-enterprise-test/xwiki-enterprise-test-jmeter/src/test/it/org/xwiki/test/jmeter/AllTests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * See the NOTICE file distributed with this work for additional 3 | * information regarding copyright ownership. 4 | * 5 | * This is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU Lesser General Public License as 7 | * published by the Free Software Foundation; either version 2.1 of 8 | * the License, or (at your option) any later version. 9 | * 10 | * This software is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this software; if not, write to the Free 17 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 18 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 19 | */ 20 | package org.xwiki.test.jmeter; 21 | 22 | import org.junit.runner.RunWith; 23 | import org.xwiki.test.integration.XWikiExecutorSuite; 24 | 25 | /** 26 | * Runs all functional tests found in the classpath and start/stop XWiki before/after the tests (only once). 27 | * 28 | * @version $Id: f22f19f5dc671d0621c8e64dd2bd4dc9a093b847 $ 29 | */ 30 | @RunWith(XWikiExecutorSuite.class) 31 | public class AllTests 32 | { 33 | } 34 | -------------------------------------------------------------------------------- /xwiki-enterprise-test/xwiki-enterprise-test-storage/src/test/it/org/xwiki/test/storage/profiles/Profile.java: -------------------------------------------------------------------------------- 1 | /* 2 | * See the NOTICE file distributed with this work for additional 3 | * information regarding copyright ownership. 4 | * 5 | * This is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU Lesser General Public License as 7 | * published by the Free Software Foundation; either version 2.1 of 8 | * the License, or (at your option) any later version. 9 | * 10 | * This software is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this software; if not, write to the Free 17 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 18 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 19 | */ 20 | package org.xwiki.test.storage.profiles; 21 | 22 | import org.xwiki.test.integration.XWikiExecutor; 23 | 24 | /** 25 | * Configuration profile. 26 | * 27 | * @version $Id: f39b8803f05965e95d978736f374e1766503aee9 $ 28 | * @since 3.0RC1 29 | */ 30 | public interface Profile 31 | { 32 | /** Apply the configuration profile. */ 33 | public void apply(final XWikiExecutor executor) throws Exception; 34 | } 35 | -------------------------------------------------------------------------------- /xwiki-enterprise-test/xwiki-enterprise-test-ui/src/test/it/org/xwiki/test/ui/RegisterWithoutLiveValidationTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * See the NOTICE file distributed with this work for additional 3 | * information regarding copyright ownership. 4 | * 5 | * This is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU Lesser General Public License as 7 | * published by the Free Software Foundation; either version 2.1 of 8 | * the License, or (at your option) any later version. 9 | * 10 | * This software is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this software; if not, write to the Free 17 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 18 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 19 | */ 20 | package org.xwiki.test.ui; 21 | 22 | /** 23 | * Test the user registration feature without javascript field validation. 24 | * 25 | * @version $Id: b619e7beccb81f33e4e2dc5883751c3b94fef3a6 $ 26 | * @since 2.4M2 27 | */ 28 | public class RegisterWithoutLiveValidationTest extends RegisterTest 29 | { 30 | @Override 31 | protected boolean useLiveValidation() 32 | { 33 | return false; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /xwiki-enterprise-installers/xwiki-enterprise-installer-debian/xwiki-enterprise-installer-debian-tomcat/xwiki-enterprise-installer-debian-tomcat8-common/src/deb/resources/etc/xwiki/xwiki-tomcat8.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 24 | 25 | 26 | 27 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /xwiki-enterprise-test/xwiki-enterprise-test-storage/src/test/it/org/xwiki/test/storage/profiles/DefaultProfile.java: -------------------------------------------------------------------------------- 1 | /* 2 | * See the NOTICE file distributed with this work for additional 3 | * information regarding copyright ownership. 4 | * 5 | * This is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU Lesser General Public License as 7 | * published by the Free Software Foundation; either version 2.1 of 8 | * the License, or (at your option) any later version. 9 | * 10 | * This software is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this software; if not, write to the Free 17 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 18 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 19 | */ 20 | package org.xwiki.test.storage.profiles; 21 | 22 | import org.xwiki.test.integration.XWikiExecutor; 23 | 24 | /** 25 | * Everything is default, nothing is changed in configuration. 26 | * 27 | * @version $Id: 4b151649250b56d4e67debd73268bafa1eced823 $ 28 | * @since 3.0RC1 29 | */ 30 | public class DefaultProfile implements Profile 31 | { 32 | @Override 33 | public void apply(final XWikiExecutor executor) throws Exception 34 | { 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /xwiki-enterprise-test/xwiki-enterprise-test-webstandards/src/test/it/org/xwiki/test/webstandards/framework/URLPathTarget.java: -------------------------------------------------------------------------------- 1 | /* 2 | * See the NOTICE file distributed with this work for additional 3 | * information regarding copyright ownership. 4 | * 5 | * This is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU Lesser General Public License as 7 | * published by the Free Software Foundation; either version 2.1 of 8 | * the License, or (at your option) any later version. 9 | * 10 | * This software is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this software; if not, write to the Free 17 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 18 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 19 | */ 20 | package org.xwiki.test.webstandards.framework; 21 | 22 | public class URLPathTarget implements Target 23 | { 24 | private String urlPath; 25 | 26 | public URLPathTarget(String urlPath) 27 | { 28 | this.urlPath = urlPath; 29 | } 30 | 31 | public String getUrlPath() 32 | { 33 | return urlPath; 34 | } 35 | 36 | @Override 37 | public String getName() 38 | { 39 | return getUrlPath(); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /xwiki-enterprise-installers/xwiki-enterprise-installer-debian/xwiki-enterprise-installer-debian-tomcat/xwiki-enterprise-installer-debian-tomcat7-common/src/deb/resources/etc/xwiki/xwiki-tomcat7.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 24 | 25 | 26 | 27 | 29 | 30 | 32 | 33 | -------------------------------------------------------------------------------- /xwiki-enterprise-test/xwiki-enterprise-test-selenium/src/test/it/org/xwiki/test/selenium/UrlMiscTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * See the NOTICE file distributed with this work for additional 3 | * information regarding copyright ownership. 4 | * 5 | * This is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU Lesser General Public License as 7 | * published by the Free Software Foundation; either version 2.1 of 8 | * the License, or (at your option) any later version. 9 | * 10 | * This software is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this software; if not, write to the Free 17 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 18 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 19 | */ 20 | package org.xwiki.test.selenium; 21 | 22 | import org.junit.Test; 23 | import org.xwiki.test.selenium.framework.AbstractXWikiTestCase; 24 | 25 | /** 26 | * Tests different URL features/bugs. 27 | * 28 | * @version $Id: 2fb77aef42b1fa0e390f381808001936ff0a8a0f $ 29 | */ 30 | public class UrlMiscTest extends AbstractXWikiTestCase 31 | { 32 | @Test 33 | public void testSimpleBinUrlDoesNotThrowException() 34 | { 35 | open("/xwiki/bin"); 36 | assertTextPresent("Welcome to your wiki"); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /xwiki-enterprise-installers/xwiki-enterprise-installer-windows/src/main/resources/launch4j.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 24 | 25 | 26 | gui 27 | ${project.build.directory}/dependency/xwiki-enterprise-installer-generic-standard.jar 28 | ${project.build.directory}/${pom.artifactId}-${pom.version}.exe 29 | XWiki Windows Installer 30 | true 31 | ${project.build.directory}/classes/xe.ico 32 | 33 | 1.7.0 34 | 35 | 36 | -------------------------------------------------------------------------------- /xwiki-enterprise-data/xwiki-enterprise-data-derby/src/assemble/data.xml: -------------------------------------------------------------------------------- 1 | 22 | 23 | 24 | data 25 | 26 | zip 27 | 28 | false 29 | 30 | 31 | 32 | ${project.build.directory}/data/ 33 | / 34 | 35 | 36 | 37 | ${project.build.directory}/maven-shared-archive-resources/META-INF 38 | META-INF 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /xwiki-enterprise-data/xwiki-enterprise-data-hsqldb/src/assemble/data.xml: -------------------------------------------------------------------------------- 1 | 22 | 23 | 24 | data 25 | 26 | zip 27 | 28 | false 29 | 30 | 31 | 32 | ${project.build.directory}/data/ 33 | / 34 | 35 | 36 | 37 | ${project.build.directory}/maven-shared-archive-resources/META-INF 38 | META-INF 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /xwiki-enterprise-test/xwiki-enterprise-test-misc/src/test/resources/entities/xhtml11.cat: -------------------------------------------------------------------------------- 1 | -- .......................................................................... -- 2 | -- File catalog ............................................................ -- 3 | 4 | -- XHTML 1.1 Catalog Data File 5 | 6 | Revision: @(#)xhtml11.cat 1.9 2001/04/04 SMI 7 | 8 | See "Entity Management", SGML Open Technical Resolution 9401 for detailed 9 | information on supplying and using catalog data. This document is available 10 | from OASIS at URL: 11 | 12 | 13 | -- 14 | 15 | -- .......................................................................... -- 16 | -- SGML declaration associated with XHTML .................................. -- 17 | 18 | OVERRIDE YES 19 | 20 | SGMLDECL "xml1.dcl" 21 | 22 | -- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -- 23 | 24 | -- XHTML 1.1 DTD modular driver file ....................................... -- 25 | -- note that this uses the local, flattened version of the DTD. If you want 26 | your catalog to use the master version of the XHTML Modules, change the 27 | entry to reference xhtml11.dtd instead of xhtml11-flat.dtd 28 | -- 29 | 30 | PUBLIC "-//W3C//DTD XHTML 1.1//EN" "xhtml11-flat.dtd" 31 | 32 | -- XHTML 1.1 framework modules .............................................. -- 33 | 34 | PUBLIC "-//W3C//ENTITIES XHTML 1.1 Document Model 1.0//EN" "xhtml11-model-1.mod" 35 | 36 | -- End of catalog data ..................................................... -- 37 | -- .......................................................................... -- 38 | 39 | -------------------------------------------------------------------------------- /xwiki-enterprise-test/xwiki-enterprise-test-webstandards/src/test/it/org/xwiki/test/webstandards/framework/DocumentReferenceTarget.java: -------------------------------------------------------------------------------- 1 | /* 2 | * See the NOTICE file distributed with this work for additional 3 | * information regarding copyright ownership. 4 | * 5 | * This is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU Lesser General Public License as 7 | * published by the Free Software Foundation; either version 2.1 of 8 | * the License, or (at your option) any later version. 9 | * 10 | * This software is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this software; if not, write to the Free 17 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 18 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 19 | */ 20 | package org.xwiki.test.webstandards.framework; 21 | 22 | import org.xwiki.model.reference.DocumentReference; 23 | 24 | public class DocumentReferenceTarget implements Target 25 | { 26 | private DocumentReference documentReference; 27 | 28 | public DocumentReferenceTarget(DocumentReference documentReference) 29 | { 30 | this.documentReference = documentReference; 31 | } 32 | 33 | public DocumentReference getDocumentReference() 34 | { 35 | return documentReference; 36 | } 37 | 38 | @Override 39 | public String getName() 40 | { 41 | return documentReference.toString(); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /xwiki-enterprise-test/xwiki-enterprise-test-pageobjects/src/main/java/org/xwiki/test/po/xe/HomePage.java: -------------------------------------------------------------------------------- 1 | /* 2 | * See the NOTICE file distributed with this work for additional 3 | * information regarding copyright ownership. 4 | * 5 | * This is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU Lesser General Public License as 7 | * published by the Free Software Foundation; either version 2.1 of 8 | * the License, or (at your option) any later version. 9 | * 10 | * This software is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this software; if not, write to the Free 17 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 18 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 19 | */ 20 | package org.xwiki.test.po.xe; 21 | 22 | import org.xwiki.test.ui.po.ViewPage; 23 | 24 | /** 25 | * Represents the actions possible on the Home Page. 26 | * 27 | * @version $Id: 2fd4eaaa0cdac3cdd18a8bb9b2ba5caf7079b94e $ 28 | * @since 3.2M3 29 | */ 30 | public class HomePage extends ViewPage 31 | { 32 | public static HomePage gotoPage() 33 | { 34 | getUtil().gotoPage("Main", "WebHome"); 35 | return new HomePage(); 36 | } 37 | 38 | public String getURL() 39 | { 40 | return getUtil().getURL("Main", "WebHome"); 41 | } 42 | 43 | public boolean isOnHomePage() 44 | { 45 | return getDriver().getCurrentUrl().equals(getURL()); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /xwiki-enterprise-test/xwiki-enterprise-test-jmeter/src/test/resources/jmeterbin/httpclient.parameters: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # Properties file used to define additional default Commons HttpClient parameters 17 | # 18 | # See: http://hc.apache.org/httpclient-3.x/preference-api.html 19 | # 20 | # This file is enabled by setting the JMeter property: httpclient.parameters.file 21 | # entries are of the form: 22 | # 23 | # property=value (for strings) 24 | # property$Type=value (for other types) 25 | # 26 | # where Type can be: 27 | # Integer 28 | # Long 29 | # Boolean 30 | # HttpVersion 31 | # 32 | # N.B. Other types are not yet implemented, so not all parameters are supported 33 | # 34 | 35 | # Examples: 36 | 37 | #http.protocol.version$HttpVersion=1.0 38 | 39 | #http.protocol.element-charset=ISO-8859-1 40 | 41 | #http.socket.timeout$Integer=10000 42 | 43 | #http.protocol.reject-relative-redirect$Boolean=true 44 | 45 | http.authentication.preemptive$Boolean=true -------------------------------------------------------------------------------- /xwiki-enterprise-installers/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 22 | 23 | 24 | 4.0.0 25 | 26 | org.xwiki.enterprise 27 | xwiki-enterprise 28 | 9.5-SNAPSHOT 29 | 30 | xwiki-enterprise-installers 31 | XWiki Enterprise - Installers - Parent POM 32 | pom 33 | 34 | xwiki-enterprise-installer-generic 35 | xwiki-enterprise-installer-windows 36 | xwiki-enterprise-installer-debian 37 | 38 | 39 | -------------------------------------------------------------------------------- /xwiki-enterprise-test/xwiki-enterprise-test-storage/src/test/it/org/xwiki/test/storage/AllTests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * See the NOTICE file distributed with this work for additional 3 | * information regarding copyright ownership. 4 | * 5 | * This is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU Lesser General Public License as 7 | * published by the Free Software Foundation; either version 2.1 of 8 | * the License, or (at your option) any later version. 9 | * 10 | * This software is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this software; if not, write to the Free 17 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 18 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 19 | */ 20 | package org.xwiki.test.storage; 21 | 22 | import javax.inject.Inject; 23 | 24 | import org.junit.runner.RunWith; 25 | import org.xwiki.component.phase.Initializable; 26 | import org.xwiki.test.integration.XWikiExecutor; 27 | import org.xwiki.test.storage.framework.AbstractTest; 28 | import org.xwiki.test.storage.profiles.ForEachProfileSuite; 29 | 30 | /** 31 | * Runs all functional tests found in the classpath. 32 | * 33 | * @version $Id: 8435b563221c83cd23ad093d978ab6a46166bac8 $ 34 | * @since 3.0RC1 35 | */ 36 | @RunWith(ForEachProfileSuite.class) 37 | public class AllTests implements Initializable 38 | { 39 | @Inject 40 | private XWikiExecutor executor; 41 | 42 | @Override 43 | public void initialize() 44 | { 45 | AbstractTest.setExecutor(executor); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # XWiki Enterprise 2 | 3 | [XWiki Enterprise](http://enterprise.xwiki.org/xwiki/bin/view/Main/) is a fully-featured wiki for the Enterprise. It's also a second generation wiki offering the ability to install and develop small applications inside wiki pages. 4 | 5 | XWiki Platform, XWiki Enterprise, XWiki Commons and XWiki Rendering are part of the [XWiki.org](http://www.xwiki.org/) software forge. They are released together and share the same version. 6 | 7 | ## Documentation 8 | * [API](http://platform.xwiki.org/xwiki/bin/view/DevGuide/API) 9 | * [Development Zone](http://dev.xwiki.org/xwiki/bin/view/Community/) 10 | * Guides: 11 | * [Developer Guide](http://platform.xwiki.org/xwiki/bin/view/DevGuide/) 12 | * [Administrator Guide](http://platform.xwiki.org/xwiki/bin/view/AdminGuide/) 13 | * [User Guide](http://enterprise.xwiki.org/xwiki/bin/view/GettingStarted/) 14 | 15 | ## Download 16 | Read our [Download and Installation](http://enterprise.xwiki.org/xwiki/bin/view/Main/Download) instructions. 17 | 18 | ## Release Notes 19 | Read our [Release Notes](http://www.xwiki.org/xwiki/bin/view/ReleaseNotes/). 20 | 21 | ## Tools 22 | * [Continuous Integration](http://ci.xwiki.org/) setup launches a build for each commit 23 | * [Issue Tracker](http://jira.xwiki.org/browse/XE) if you want to report an issue 24 | * [Development Flow](http://dev.xwiki.org/xwiki/bin/view/Community/DevelopmentPractices#HGeneralDevelopmentFlow) to see the full list of tools we use to build XWiki 25 | 26 | ## Community 27 | We're always looking for contributors! 28 | You should read our [Get Involved Guide](http://dev.xwiki.org/xwiki/bin/view/Community/Contributing) or get in touch: 29 | * [Blog](http://www.xwiki.org/xwiki/bin/view/Blog/) 30 | * [Mailing Lists](http://dev.xwiki.org/xwiki/bin/view/Community/MailingLists) 31 | * [IRC](http://dev.xwiki.org/xwiki/bin/view/Community/IRC) 32 | -------------------------------------------------------------------------------- /xwiki-enterprise-installers/xwiki-enterprise-installer-debian/xwiki-enterprise-installer-debian-tomcat/xwiki-enterprise-installer-debian-tomcat7-mysql/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 22 | 23 | 24 | 4.0.0 25 | 26 | org.xwiki.enterprise 27 | xwiki-enterprise-installer-debian-tomcat 28 | 9.5-SNAPSHOT 29 | 30 | xwiki-enterprise-installer-debian-tomcat7-mysql 31 | XWiki Enterprise - Installer - Debian - Tomcat 7 - MySQL 32 | deb 33 | XWiki enterprise Tomcat/MySQL based package 34 | 35 | -------------------------------------------------------------------------------- /xwiki-enterprise-installers/xwiki-enterprise-installer-debian/xwiki-enterprise-installer-debian-tomcat/xwiki-enterprise-installer-debian-tomcat7-pgsql/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 22 | 23 | 24 | 4.0.0 25 | 26 | org.xwiki.enterprise 27 | xwiki-enterprise-installer-debian-tomcat 28 | 9.5-SNAPSHOT 29 | 30 | xwiki-enterprise-installer-debian-tomcat7-pgsql 31 | XWiki Enterprise - Installer - Debian - Tomcat 7 - Postgres SQL 32 | deb 33 | XWiki enterprise Tomcat/PostgreSQL 34 | 35 | -------------------------------------------------------------------------------- /xwiki-enterprise-installers/xwiki-enterprise-installer-debian/xwiki-enterprise-installer-debian-tomcat/xwiki-enterprise-installer-debian-tomcat8-mysql/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 22 | 23 | 24 | 4.0.0 25 | 26 | org.xwiki.enterprise 27 | xwiki-enterprise-installer-debian-tomcat 28 | 9.5-SNAPSHOT 29 | 30 | xwiki-enterprise-installer-debian-tomcat8-mysql 31 | XWiki Enterprise - Installer - Debian - Tomcat 8 - MySQL 32 | deb 33 | XWiki enterprise Tomcat/MySQL based package 34 | 35 | -------------------------------------------------------------------------------- /xwiki-enterprise-installers/xwiki-enterprise-installer-debian/xwiki-enterprise-installer-debian-tomcat/xwiki-enterprise-installer-debian-tomcat8-pgsql/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 22 | 23 | 24 | 4.0.0 25 | 26 | org.xwiki.enterprise 27 | xwiki-enterprise-installer-debian-tomcat 28 | 9.5-SNAPSHOT 29 | 30 | xwiki-enterprise-installer-debian-tomcat8-pgsql 31 | XWiki Enterprise - Installer - Debian - Tomcat 8 - Postgres SQL 32 | deb 33 | XWiki enterprise Tomcat/PostgreSQL 34 | 35 | -------------------------------------------------------------------------------- /xwiki-enterprise-ui/xwiki-enterprise-ui-admin-user/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 22 | 23 | 24 | 4.0.0 25 | 26 | org.xwiki.enterprise 27 | xwiki-enterprise-ui 28 | 9.5-SNAPSHOT 29 | 30 | xwiki-enterprise-ui-admin-user 31 | XWiki Enterprise - UI - Admin User 32 | xar 33 | This application provides a default Admin user. 34 | 35 | 36 | Admin User Application 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /xwiki-enterprise-installers/xwiki-enterprise-installer-debian/xwiki-enterprise-installer-debian-pgsql-common/src/deb/control/postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | #set -x 5 | 6 | ######################### 7 | # Configuration 8 | ######################### 9 | 10 | . /usr/share/debconf/confmodule 11 | if [ -f /usr/share/dbconfig-common/dpkg/postinst.pgsql ]; then 12 | . /usr/share/dbconfig-common/dpkg/postinst.pgsql 13 | 14 | dbc_pgsql_createdb_encoding='UTF8' 15 | 16 | dbc_generate_include='template:/etc/xwiki/hibernate.cfg.xml' 17 | dbc_generate_include_perms='644' 18 | dbc_generate_include_args='-U -o template_infile=/usr/share/xwiki/templates/pgsql/hibernate.cfg.xml' 19 | 20 | dbc_go xwiki $@ 21 | 22 | # if they don't want our help, quit 23 | if [ "$dbc_install" != "true" ]; then return 0; fi 24 | 25 | # find out if we're upgrading/reinstalling 26 | if [ "$dbc_oldversion" ]; then 27 | # read that little crumb left in config if we're reconfiguring 28 | db_get $dbc_package/internal/reconfiguring && reconfiguring="$RET" 29 | # and set it back to false 30 | db_reset $dbc_package/internal/reconfiguring 31 | # if not, we're definitely upgrading 32 | if [ "$reconfiguring" = "false" ]; then 33 | upgrading="yes" 34 | else 35 | db_get $dbc_package/dbconfig-reinstall && reinstall=$RET 36 | db_reset $dbc_package/dbconfig-reinstall 37 | # if they've said they don't want to reinstall stuff... 38 | if [ "$reinstall" = "false" ]; then return 0; fi 39 | fi 40 | fi 41 | 42 | # don't perform the following block of code during upgrades 43 | if [ ! "$upgrading" ]; then 44 | # Allow creating new wikis (so new schemas) 45 | # TODO: ask it in an install step 46 | 47 | echo "allow $dbc_dbuser user to create new schemas in database $dbc_dbname" 48 | _dbc_pgsql_exec_command "GRANT CREATE ON DATABASE $dbc_dbname TO $dbc_dbuser" 49 | fi 50 | fi 51 | -------------------------------------------------------------------------------- /xwiki-enterprise-test/xwiki-enterprise-test-webstandards/src/test/it/org/xwiki/test/webstandards/CustomDutchWebGuidelinesValidationTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * See the NOTICE file distributed with this work for additional 3 | * information regarding copyright ownership. 4 | * 5 | * This is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU Lesser General Public License as 7 | * published by the Free Software Foundation; either version 2.1 of 8 | * the License, or (at your option) any later version. 9 | * 10 | * This software is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this software; if not, write to the Free 17 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 18 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 19 | */ 20 | package org.xwiki.test.webstandards; 21 | 22 | import org.apache.commons.httpclient.HttpClient; 23 | import org.xwiki.test.webstandards.framework.DefaultValidationTest; 24 | import org.xwiki.validator.Validator; 25 | 26 | import org.xwiki.test.webstandards.framework.Target; 27 | 28 | public class CustomDutchWebGuidelinesValidationTest extends DefaultValidationTest 29 | { 30 | public CustomDutchWebGuidelinesValidationTest(Target target, HttpClient client, Validator validator, 31 | String credentials) throws Exception 32 | { 33 | super(target, client, validator, credentials); 34 | } 35 | 36 | @Override 37 | public void testDocumentValidity() throws Exception 38 | { 39 | ((CustomDutchWebGuidelinesValidator) this.validator).setTarget(this.target); 40 | 41 | super.testDocumentValidity(); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /xwiki-enterprise-ui/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 22 | 23 | 24 | 4.0.0 25 | 26 | org.xwiki.enterprise 27 | xwiki-enterprise 28 | 9.5-SNAPSHOT 29 | 30 | xwiki-enterprise-ui 31 | XWiki Enterprise - UI 32 | pom 33 | Parent POM for the Enterprise UI. 34 | 35 | xwiki-enterprise-ui-common 36 | xwiki-enterprise-ui-mainwiki 37 | xwiki-enterprise-ui-wiki 38 | xwiki-enterprise-ui-admin-user 39 | xwiki-enterprise-ui-tour 40 | 41 | 42 | -------------------------------------------------------------------------------- /xwiki-enterprise-ui/xwiki-enterprise-ui-tour/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 22 | 23 | 24 | 4.0.0 25 | 26 | org.xwiki.enterprise 27 | xwiki-enterprise-ui 28 | 9.5-SNAPSHOT 29 | 30 | xwiki-enterprise-ui-tour 31 | XWiki Enterprise - UI - Tour 32 | xar 33 | Contains default set of wiki tour pages. 34 | 35 | 36 | org.xwiki.contrib 37 | application-tour-ui 38 | 1.1 39 | xar 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /xwiki-enterprise-test/xwiki-enterprise-test-storage/src/test/it/org/xwiki/test/storage/profiles/FilesystemAttachmentStorageProfile.java: -------------------------------------------------------------------------------- 1 | /* 2 | * See the NOTICE file distributed with this work for additional 3 | * information regarding copyright ownership. 4 | * 5 | * This is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU Lesser General Public License as 7 | * published by the Free Software Foundation; either version 2.1 of 8 | * the License, or (at your option) any later version. 9 | * 10 | * This software is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this software; if not, write to the Free 17 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 18 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 19 | */ 20 | package org.xwiki.test.storage.profiles; 21 | 22 | import java.util.Properties; 23 | 24 | import org.xwiki.test.integration.XWikiExecutor; 25 | 26 | /** 27 | * Test profile for running tests with filesystem attachment storage enabled. 28 | * 29 | * @version $Id: 6d7ab7700363ebe7f81dce1ba250859538ec8bfb $ 30 | * @since 3.0RC1 31 | */ 32 | public class FilesystemAttachmentStorageProfile implements Profile 33 | { 34 | @Override 35 | public void apply(final XWikiExecutor executor) throws Exception 36 | { 37 | final Properties conf = executor.loadXWikiCfg(); 38 | 39 | conf.setProperty("xwiki.store.attachment.hint", "file"); 40 | conf.setProperty("xwiki.store.attachment.versioning.hint", "file"); 41 | conf.setProperty("xwiki.store.attachment.recyclebin.hint", "file"); 42 | 43 | executor.saveXWikiCfg(conf); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /xwiki-enterprise-installers/xwiki-enterprise-installer-generic/src/main/resources/README.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | XWiki Enterprise - Readme 5 | 6 | 7 | 8 | 9 |

XWiki Enterprise Overview

10 | 11 |

XWiki Enterprise is a second generation Wiki engine, features professional features like 12 | Wiki, Blog, Comments, User Rights, LDAP Authentication, PDF Export, and a lot more.

13 |

XWiki Enterprise also includes an advanced form and scripting engine which makes it an ideal 14 | development environment for constructing data-based intranet applications. It has powerful 15 | extensibility features, supports scripting, extensions and is based on a highly modular 16 | architecture. The scripting engine allows to access a powerful API for accessing the XWiki 17 | repository in read and write mode.

18 |

XWiki Enterprise is used by major companies around the world and has strong 19 | Support for a professional usage of XWiki.

20 | 21 |

Pointers

22 | 23 |

Here are some pointers to get you started with XWiki once you have finished installing it:

24 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /xwiki-enterprise-test/xwiki-enterprise-test-selenium/src/test/it/org/xwiki/test/selenium/CacheTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * See the NOTICE file distributed with this work for additional 3 | * information regarding copyright ownership. 4 | * 5 | * This is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU Lesser General Public License as 7 | * published by the Free Software Foundation; either version 2.1 of 8 | * the License, or (at your option) any later version. 9 | * 10 | * This software is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this software; if not, write to the Free 17 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 18 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 19 | */ 20 | package org.xwiki.test.selenium; 21 | 22 | import org.junit.Test; 23 | import org.xwiki.test.selenium.framework.AbstractXWikiTestCase; 24 | 25 | /** 26 | * Verify the caching features of XWiki. 27 | * 28 | * @version $Id: 0d2ab9e124e1c916d63177f2160f1debb11e890a $ 29 | */ 30 | public class CacheTest extends AbstractXWikiTestCase 31 | { 32 | private static final String SYNTAX = "xwiki/2.1"; 33 | 34 | /** 35 | * Tests that the document dates are always of the type java.util.Date, as hibernate returns 36 | * java.sql.Timestamp, which is not entirely compatible with java.util.Date. When the cache 37 | * storage is enabled, this problem isn't detected until the document is removed from the cache. 38 | */ 39 | @Test 40 | public void testDateClass() 41 | { 42 | createPage("Main", "TestDateClass", 43 | "{{velocity}}$xwiki.flushCache()\n$xwiki.getDocument('Main.WebHome').date.class{{/velocity}}", SYNTAX); 44 | waitForBodyContains("java.util.Date"); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /xwiki-enterprise-distribution/xwiki-enterprise-glassfish/xwiki-enterprise-glassfish-derby/src/assemble/xwiki-war.xml: -------------------------------------------------------------------------------- 1 | 22 | 23 | 24 | distribution 25 | 26 | war 27 | 28 | false 29 | 30 | 31 | 32 | 33 | org.xwiki.enterprise:xwiki-enterprise-web 34 | 35 | webapps/xwiki 36 | true 37 | 38 | 39 | **/hibernate.cfg.xml 40 | 41 | 42 | 43 | 44 | 45 | 46 | ${basedir}/src/main/resources/sun-web.xml 47 | WEB-INF 48 | 49 | 50 | ${basedir}/target/maven-shared-archive-resources/hibernate.cfg.xml 51 | WEB-INF 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /xwiki-enterprise-test/xwiki-enterprise-test-ui/src/test/it/org/xwiki/test/ui/appwithinminutes/AbstractClassEditorTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * See the NOTICE file distributed with this work for additional 3 | * information regarding copyright ownership. 4 | * 5 | * This is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU Lesser General Public License as 7 | * published by the Free Software Foundation; either version 2.1 of 8 | * the License, or (at your option) any later version. 9 | * 10 | * This software is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this software; if not, write to the Free 17 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 18 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 19 | */ 20 | package org.xwiki.test.ui.appwithinminutes; 21 | 22 | import org.junit.Before; 23 | import org.junit.Rule; 24 | import org.xwiki.appwithinminutes.test.po.ApplicationClassEditPage; 25 | import org.xwiki.test.ui.AbstractTest; 26 | import org.xwiki.test.ui.AdminAuthenticationRule; 27 | 28 | /** 29 | * Base class for testing the application class editor. 30 | * 31 | * @version $Id: 2c9e0b5faab92b4bfb6dc5cbacd74d32b6cc90e1 $ 32 | * @since 3.5 33 | */ 34 | public abstract class AbstractClassEditorTest extends AbstractTest 35 | { 36 | @Rule 37 | public AdminAuthenticationRule adminAuthenticationRule = new AdminAuthenticationRule(true, getUtil()); 38 | 39 | /** 40 | * The page being tested. 41 | */ 42 | protected ApplicationClassEditPage editor; 43 | 44 | @Before 45 | public void setUp() throws Exception 46 | { 47 | getUtil().deleteSpace(getTestClassName()); 48 | getUtil().gotoPage(getTestClassName(), getTestMethodName(), "edit", 49 | "editor=inline&template=AppWithinMinutes.ClassTemplate&title=" + getTestMethodName() + " Class"); 50 | editor = new ApplicationClassEditPage(); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /xwiki-enterprise-installers/xwiki-enterprise-installer-debian/xwiki-enterprise-installer-debian-mysql-common/src/deb/control/postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | #set -x 5 | 6 | ######################### 7 | # Configuration 8 | ######################### 9 | 10 | . /usr/share/debconf/confmodule 11 | if [ -f /usr/share/dbconfig-common/dpkg/postinst.mysql ]; then 12 | . /usr/share/dbconfig-common/dpkg/postinst.mysql 13 | 14 | extrasql=" CHARACTER SET utf8 COLLATE utf8_bin" 15 | 16 | dbc_generate_include='template:/etc/xwiki/hibernate.cfg.xml' 17 | dbc_generate_include_perms='644' 18 | dbc_generate_include_args='-U -o template_infile=/usr/share/xwiki/templates/mysql/hibernate.cfg.xml' 19 | 20 | dbc_go xwiki $@ 21 | 22 | # if they don't want our help, quit 23 | if [ "$dbc_install" != "true" ]; then return 0; fi 24 | 25 | # find out if we're upgrading/reinstalling 26 | if [ "$dbc_oldversion" ]; then 27 | # read that little crumb left in config if we're reconfiguring 28 | db_get $dbc_package/internal/reconfiguring && reconfiguring="$RET" 29 | # and set it back to false 30 | db_reset $dbc_package/internal/reconfiguring 31 | # if not, we're definitely upgrading 32 | if [ "$reconfiguring" = "false" ]; then 33 | upgrading="yes" 34 | else 35 | db_get $dbc_package/dbconfig-reinstall && reinstall=$RET 36 | db_reset $dbc_package/dbconfig-reinstall 37 | # if they've said they don't want to reinstall stuff... 38 | if [ "$reinstall" = "false" ]; then return 0; fi 39 | fi 40 | fi 41 | 42 | # don't perform the following block of code during upgrades 43 | if [ ! "$upgrading" ]; then 44 | # Allow creating new wikis (so new databases) 45 | # TODO: ask it in an install step 46 | 47 | # Get the host 48 | if [ ! "${dbc_dballow:-}" ]; then 49 | if [ ! "${dbc_dbserver:-}" ] || [ "$dbc_dbserver" = "localhost" ]; then 50 | l_dballow=localhost 51 | else 52 | l_dballow=`hostname` 53 | fi 54 | else 55 | l_dballow="$dbc_dballow" 56 | fi 57 | 58 | echo "allow $dbc_dbuser user to create new databases" 59 | dbc_mysql_exec_command "GRANT ALL PRIVILEGES ON *.* to $dbc_dbuser@'$l_dballow'" 60 | fi 61 | fi 62 | -------------------------------------------------------------------------------- /xwiki-enterprise-test/xwiki-enterprise-test-ui/src/test/it/org/xwiki/test/ui/AllTests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * See the NOTICE file distributed with this work for additional 3 | * information regarding copyright ownership. 4 | * 5 | * This is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU Lesser General Public License as 7 | * published by the Free Software Foundation; either version 2.1 of 8 | * the License, or (at your option) any later version. 9 | * 10 | * This software is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this software; if not, write to the Free 17 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 18 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 19 | */ 20 | package org.xwiki.test.ui; 21 | 22 | import java.util.List; 23 | 24 | import org.apache.commons.configuration.PropertiesConfiguration; 25 | import org.junit.runner.RunWith; 26 | import org.slf4j.Logger; 27 | import org.slf4j.LoggerFactory; 28 | import org.xwiki.test.integration.XWikiExecutor; 29 | import org.xwiki.test.integration.XWikiExecutorSuite; 30 | 31 | /** 32 | * Runs all functional tests found in the classpath. 33 | * 34 | * @version $Id: e5b3342d73062702ce75cd862dc59606a61af96a $ 35 | * @since 2.3M1 36 | */ 37 | @RunWith(PageObjectSuite.class) 38 | public class AllTests 39 | { 40 | private static final Logger LOGGER = LoggerFactory.getLogger(AllTests.class); 41 | 42 | @XWikiExecutorSuite.PreStart 43 | public void preStart(List executors) throws Exception 44 | { 45 | XWikiExecutor executor = executors.get(0); 46 | 47 | LOGGER.info("Put back the old WYSIWYG editor in xwiki.properties"); 48 | 49 | PropertiesConfiguration properties = executor.loadXWikiPropertiesConfiguration(); 50 | properties.setProperty("edit.defaultEditor.org.xwiki.rendering.syntax.SyntaxContent#wysiwyg", "gwt"); 51 | executor.saveXWikiProperties(properties); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /xwiki-enterprise-installers/xwiki-enterprise-installer-generic/src/main/resources/registrySpec.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 24 | 25 | 29 | 30 | 34 | 38 | 42 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /xwiki-enterprise-test/xwiki-enterprise-test-escaping/src/test/it/org/xwiki/test/escaping/framework/URLContent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * See the NOTICE file distributed with this work for additional 3 | * information regarding copyright ownership. 4 | * 5 | * This is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU Lesser General Public License as 7 | * published by the Free Software Foundation; either version 2.1 of 8 | * the License, or (at your option) any later version. 9 | * 10 | * This software is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this software; if not, write to the Free 17 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 18 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 19 | */ 20 | package org.xwiki.test.escaping.framework; 21 | 22 | import java.io.BufferedReader; 23 | import java.io.ByteArrayInputStream; 24 | import java.io.InputStreamReader; 25 | import java.io.Reader; 26 | import java.nio.charset.Charset; 27 | import java.nio.charset.StandardCharsets; 28 | 29 | import org.apache.http.entity.ContentType; 30 | 31 | public class URLContent 32 | { 33 | private ContentType type; 34 | 35 | private byte[] content; 36 | 37 | public URLContent(String typeHeader, byte[] content) 38 | { 39 | this.type = typeHeader != null ? ContentType.parse(typeHeader) : null; 40 | this.content = content; 41 | } 42 | 43 | public ContentType getType() 44 | { 45 | return this.type; 46 | } 47 | 48 | public byte[] getContent() 49 | { 50 | return this.content; 51 | } 52 | 53 | public Reader getContentReader() 54 | { 55 | Charset charset; 56 | if (this.type != null && this.type.getCharset() != null) { 57 | charset = this.type.getCharset(); 58 | } else { 59 | charset = StandardCharsets.UTF_8; 60 | } 61 | 62 | return new BufferedReader(new InputStreamReader(new ByteArrayInputStream(getContent()), charset)); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /xwiki-enterprise-distribution/xwiki-enterprise-glassfish/xwiki-enterprise-glassfish-derby/src/assemble/application.xml: -------------------------------------------------------------------------------- 1 | 22 | 23 | 24 | distribution 25 | 26 | zip 27 | 28 | true 29 | 30 | 31 | 32 | org.glassfish.distributions:web 33 | 34 | / 35 | true 36 | 755 37 | 38 | 39 | 40 | org.xwiki.enterprise:xwiki-enterprise-data-derby 41 | 42 | ${glassfish.data.folder} 43 | true 44 | 45 | 46 | 47 | 48 | ${basedir}/target/xwiki-enterprise-${pom.version}.war 49 | ${glassfish.war.folder} 50 | 51 | 52 | 53 | 54 | 55 | ${basedir}/target/maven-shared-archive-resources/META-INF 56 | META-INF 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /xwiki-enterprise-distribution/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 22 | 23 | 24 | 4.0.0 25 | 26 | org.xwiki.enterprise 27 | xwiki-enterprise 28 | 9.5-SNAPSHOT 29 | 30 | xwiki-enterprise-distribution 31 | XWiki Enterprise - Distribution - Parent POM 32 | pom 33 | XWiki Enterprise - Distribution - Parent POM 34 | 35 | xwiki-enterprise-ui-wiki-all 36 | xwiki-enterprise-ui-mainwiki-all 37 | 38 | 39 | 40 | jetty 41 | 43 | 44 | true 45 | 46 | 47 | xwiki-enterprise-jetty 48 | 49 | 50 | 51 | glassfish 52 | 53 | xwiki-enterprise-glassfish 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /xwiki-enterprise-test/xwiki-enterprise-test-escaping/src/test/it/org/xwiki/test/escaping/suite/FileTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * See the NOTICE file distributed with this work for additional 3 | * information regarding copyright ownership. 4 | * 5 | * This is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU Lesser General Public License as 7 | * published by the Free Software Foundation; either version 2.1 of 8 | * the License, or (at your option) any later version. 9 | * 10 | * This software is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this software; if not, write to the Free 17 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 18 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 19 | */ 20 | 21 | package org.xwiki.test.escaping.suite; 22 | 23 | import java.io.Reader; 24 | 25 | 26 | /** 27 | * Defines a file test that can be run by the {@link ArchiveSuite}. 28 | *

29 | * {@link ArchiveSuite} reads files from an archive and generates a {@link FileTest} for each of them. 30 | * The implementations can decide whether the given file can be tested and how it should be tested.

31 | *

32 | * All test implementations should have one default constructor. The initialization method 33 | * {@link #initialize(String, Reader)} is guaranteed to be called only once, before any other public methods 34 | * are called.

35 | *

36 | * Note that the {@link Reader} passed to {@link #initialize(String, Reader)} is invalidated right after the 37 | * initialization phase.

38 | * 39 | * @version $Id: ac184ca5fb86f98568edafa971b1076f6e582066 $ 40 | * @since 2.5M1 41 | */ 42 | public interface FileTest 43 | { 44 | /** 45 | * Initialize the test. If this method returns false, the test is not run at all (is not counted 46 | * as a success or failure). 47 | * 48 | * @param name file name to use 49 | * @param reader the reader associated with the file data, should not be used after initialization 50 | * @return true if the test was initialized successfully and should be executed, false otherwise 51 | */ 52 | boolean initialize(String name, final Reader reader); 53 | } 54 | 55 | -------------------------------------------------------------------------------- /xwiki-enterprise-test/xwiki-enterprise-test-escaping/src/test/it/org/xwiki/test/escaping/framework/AbstractAutomaticTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * See the NOTICE file distributed with this work for additional 3 | * information regarding copyright ownership. 4 | * 5 | * This is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU Lesser General Public License as 7 | * published by the Free Software Foundation; either version 2.1 of 8 | * the License, or (at your option) any later version. 9 | * 10 | * This software is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this software; if not, write to the Free 17 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 18 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 19 | */ 20 | package org.xwiki.test.escaping.framework; 21 | 22 | import java.util.regex.Pattern; 23 | 24 | /** 25 | * Abstract base class for all automatic tests. Adds support for "patternExcludeFiles" properties. 26 | * 27 | * @version $Id: 020f7ec2be2b64f1af88e953c38f3d1d2a99a4e2 $ 28 | * @since 2.5M1 29 | */ 30 | public abstract class AbstractAutomaticTest extends AbstractEscapingTest 31 | { 32 | /** 33 | * Create new {@link AbstractAutomaticTest}. 34 | * 35 | * @param fileNameMatcher regex pattern used to filter files by name 36 | */ 37 | public AbstractAutomaticTest(Pattern fileNameMatcher) 38 | { 39 | super(fileNameMatcher); 40 | } 41 | 42 | /** 43 | * {@inheritDoc} 44 | *

45 | * The default implementation for automatic tests checks the "patternExcludeFiles" property (set in 46 | * maven build configuration). 47 | * 48 | * @param fileName file name to check 49 | * @return true if the file should be excluded, false otherwise 50 | * @see AbstractEscapingTest#isExcludedFile(java.lang.String) 51 | */ 52 | @Override 53 | protected boolean isExcludedFile(String fileName) 54 | { 55 | for (String pattern : System.getProperty("patternExcludeFiles", "").split("\\s+")) { 56 | Pattern exclude = Pattern.compile(pattern); 57 | if (exclude.matcher(fileName).matches()) { 58 | return true; 59 | } 60 | } 61 | return false; 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /xwiki-enterprise-test/xwiki-enterprise-test-escaping/src/test/it/org/xwiki/test/escaping/AllTests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * See the NOTICE file distributed with this work for additional 3 | * information regarding copyright ownership. 4 | * 5 | * This is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU Lesser General Public License as 7 | * published by the Free Software Foundation; either version 2.1 of 8 | * the License, or (at your option) any later version. 9 | * 10 | * This software is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this software; if not, write to the Free 17 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 18 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 19 | */ 20 | package org.xwiki.test.escaping; 21 | 22 | import org.junit.AfterClass; 23 | import org.junit.BeforeClass; 24 | import org.junit.extensions.cpsuite.ClasspathSuite; 25 | import org.junit.runner.RunWith; 26 | import org.xwiki.test.escaping.framework.SingleXWikiExecutor; 27 | 28 | /** 29 | * Parent test suite that runs all functional escaping tests. Starts XWiki server before other tests 30 | * and stops it afterwards. 31 | * 32 | * TODO 33 | * - check that the fixed templates are fixed 34 | * - add over-escaping test 35 | * - test for escaping of action 36 | * - need to test comments*.vm on a page with comments 37 | * - create the space and page named {@link org.xwiki.test.escaping.framework.XMLEscapingValidator#getTestString()} 38 | * before running space/page tests 39 | * - sometimes, templates need the document to be in syntax 1.0 40 | * 41 | * @version $Id: 1e134e21b8e153110a1d12e63058c1a3a2ec7ddd $ 42 | * @since 2.5M1 43 | */ 44 | @RunWith(ClasspathSuite.class) 45 | public class AllTests 46 | { 47 | /** 48 | * Start XWiki server. 49 | * 50 | * @throws Exception on errors 51 | */ 52 | @BeforeClass 53 | public static void init() throws Exception 54 | { 55 | SingleXWikiExecutor.getExecutor().start(); 56 | } 57 | 58 | /** 59 | * Stop XWiki server. 60 | * 61 | * @throws Exception on errors 62 | */ 63 | @AfterClass 64 | public static void shutdown() throws Exception 65 | { 66 | SingleXWikiExecutor.getExecutor().stop(); 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /xwiki-enterprise-installers/xwiki-enterprise-installer-debian/xwiki-enterprise-installer-debian-tomcat/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 22 | 23 | 24 | 4.0.0 25 | 26 | org.xwiki.enterprise 27 | xwiki-enterprise-installer-debian 28 | 9.5-SNAPSHOT 29 | 30 | xwiki-enterprise-installer-debian-tomcat 31 | XWiki Enterprise - Installer - Debian - Tomcat 32 | pom 33 | XWiki Enterprise - Installer - Debian - Tomcat 34 | 35 | xwiki-enterprise-installer-debian-tomcat7-common 36 | xwiki-enterprise-installer-debian-tomcat7-mysql 37 | xwiki-enterprise-installer-debian-tomcat7-pgsql 38 | xwiki-enterprise-installer-debian-tomcat8-common 39 | xwiki-enterprise-installer-debian-tomcat8-mysql 40 | xwiki-enterprise-installer-debian-tomcat8-pgsql 41 | 42 | 43 | 44 | ${project.groupId} 45 | xwiki-enterprise-installer-debian-common 46 | ${project.version} 47 | runtime 48 | deb 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /xwiki-enterprise-test/xwiki-enterprise-test-escaping/src/test/it/org/xwiki/test/escaping/suite/FileTestRunner.java: -------------------------------------------------------------------------------- 1 | /* 2 | * See the NOTICE file distributed with this work for additional 3 | * information regarding copyright ownership. 4 | * 5 | * This is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU Lesser General Public License as 7 | * published by the Free Software Foundation; either version 2.1 of 8 | * the License, or (at your option) any later version. 9 | * 10 | * This software is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this software; if not, write to the Free 17 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 18 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 19 | */ 20 | 21 | package org.xwiki.test.escaping.suite; 22 | 23 | import org.junit.runners.BlockJUnit4ClassRunner; 24 | import org.junit.runners.model.FrameworkMethod; 25 | import org.junit.runners.model.InitializationError; 26 | 27 | 28 | /** 29 | * A custom runner that runs all tests methods found in the given {@link FileTest}. The most important 30 | * difference to the default JUnit4 test runner is that the tests are created and initialized by the parent 31 | * test suite. 32 | * 33 | * @version $Id: 6191b61d856d556924f51790886043b2e371e444 $ 34 | * @since 2.5M1 35 | */ 36 | public class FileTestRunner extends BlockJUnit4ClassRunner 37 | { 38 | /** The test to run. */ 39 | private final FileTest test; 40 | 41 | /** 42 | * Create new FileTestRunner for the given file test. 43 | * 44 | * @param fileTest the test to run 45 | * @throws InitializationError on errors 46 | */ 47 | public FileTestRunner(FileTest fileTest) throws InitializationError 48 | { 49 | super(fileTest.getClass()); 50 | this.test = fileTest; 51 | } 52 | 53 | @Override 54 | protected Object createTest() throws Exception 55 | { 56 | return this.test; 57 | } 58 | 59 | @Override 60 | protected String getName() 61 | { 62 | return this.test.toString(); 63 | } 64 | 65 | @Override 66 | protected String testName(FrameworkMethod method) 67 | { 68 | return String.format("%-60s %s", this.test.toString(), method.getName()); 69 | } 70 | } 71 | 72 | -------------------------------------------------------------------------------- /xwiki-enterprise-distribution/xwiki-enterprise-jetty/xwiki-enterprise-jetty-mysql/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 22 | 23 | 24 | 4.0.0 25 | 26 | org.xwiki.enterprise 27 | xwiki-enterprise-jetty 28 | 9.5-SNAPSHOT 29 | 30 | xwiki-enterprise-jetty-mysql 31 | XWiki Enterprise - Distribution - Jetty - MySQL 32 | pom 33 | XWiki Enterprise - Distribution - Jetty - MySQL 34 | 35 | 36 | XWiki Enterprise Jetty MySQL 37 | 38 | 39 | 40 | 41 | 42 | org.apache.maven.plugins 43 | maven-remote-resources-plugin 44 | 45 | 46 | org.apache.maven.plugins 47 | maven-assembly-plugin 48 | 49 | 50 | src/assemble/application-no-database.xml 51 | 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /xwiki-enterprise-distribution/xwiki-enterprise-jetty/xwiki-enterprise-jetty-pgsql/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 22 | 23 | 24 | 4.0.0 25 | 26 | org.xwiki.enterprise 27 | xwiki-enterprise-jetty 28 | 9.5-SNAPSHOT 29 | 30 | xwiki-enterprise-jetty-pgsql 31 | XWiki Enterprise - Distribution - Jetty - PGSQL 32 | pom 33 | XWiki Enterprise - Distribution - Jetty - PGSQL 34 | 35 | 36 | XWiki Enterprise Jetty PGSQL 37 | 38 | 39 | 40 | 41 | 42 | org.apache.maven.plugins 43 | maven-remote-resources-plugin 44 | 45 | 46 | org.apache.maven.plugins 47 | maven-assembly-plugin 48 | 49 | 50 | src/assemble/application-no-database.xml 51 | 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /xwiki-enterprise-test/xwiki-enterprise-test-ui/src/test/it/org/xwiki/test/ui/ViewTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * See the NOTICE file distributed with this work for additional 3 | * information regarding copyright ownership. 4 | * 5 | * This is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU Lesser General Public License as 7 | * published by the Free Software Foundation; either version 2.1 of 8 | * the License, or (at your option) any later version. 9 | * 10 | * This software is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this software; if not, write to the Free 17 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 18 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 19 | */ 20 | package org.xwiki.test.ui; 21 | 22 | import org.junit.Assert; 23 | import org.junit.Rule; 24 | import org.junit.Test; 25 | import org.xwiki.test.ui.po.ViewPage; 26 | 27 | /** 28 | * Various tests for verifying the view mode of a page, for example to verify links displayed when a page contains 29 | * special characters, etc. 30 | * 31 | * @version $Id: d34dc1a8aa91172c7d967968caef1039b3a5ad1c $ 32 | * @since 4.5M1 33 | */ 34 | public class ViewTest extends AbstractTest 35 | { 36 | @Rule 37 | public AdminAuthenticationRule adminAuthenticationRule = new AdminAuthenticationRule(getUtil()); 38 | 39 | /** 40 | * See also XWIKI-8725. 41 | */ 42 | @Test 43 | public void viewPageWhenSpecialCharactersInName() throws Exception 44 | { 45 | // We test a page name containing a space and a dot 46 | String pageName = getTestMethodName() + " 1.0"; 47 | 48 | // Delete page since we create it below and want to start the test clean 49 | getUtil().rest().deletePage(getTestClassName(), pageName); 50 | 51 | // Create the page 52 | ViewPage vp = getUtil().createPage(getTestClassName(), pageName, "", pageName); 53 | 54 | // Verify that the page we're on has the correct URL and name 55 | String expectedURLPart = getTestClassName() + "/" + pageName.replaceAll(" ", "%20"); 56 | Assert.assertTrue("URL [" + vp.getPageURL() + "] doesn't contain expected part [" + expectedURLPart + "]", vp.getPageURL().contains(expectedURLPart)); 57 | Assert.assertEquals(pageName, vp.getMetaDataValue("page")); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /xwiki-enterprise-test/xwiki-enterprise-test-ui/src/test/it/org/xwiki/test/ui/BacklinksTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * See the NOTICE file distributed with this work for additional 3 | * information regarding copyright ownership. 4 | * 5 | * This is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU Lesser General Public License as 7 | * published by the Free Software Foundation; either version 2.1 of 8 | * the License, or (at your option) any later version. 9 | * 10 | * This software is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this software; if not, write to the Free 17 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 18 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 19 | */ 20 | package org.xwiki.test.ui; 21 | 22 | import org.junit.Rule; 23 | import org.junit.Test; 24 | import org.junit.Assert; 25 | import org.xwiki.test.ui.po.ViewPage; 26 | 27 | /** 28 | * Verify the Backlinks feature. 29 | * 30 | * @version $Id: 4f51e4c459296661f01285f2d186133f59705450 $ 31 | * @since 3.2M1 32 | */ 33 | public class BacklinksTest extends AbstractTest 34 | { 35 | @Rule 36 | public AdminAuthenticationRule adminAuthenticationRule = new AdminAuthenticationRule(getUtil()); 37 | 38 | @Test 39 | public void testBacklinksCreationSyntax20() throws Exception 40 | { 41 | testBacklinksCreation("xwiki/2.0", 42 | "{{velocity}}#foreach ($link in $doc.getBacklinks())\n$link\n#end{{/velocity}}", 43 | "[[backlink>>Test.BacklinkTargetTest]]"); 44 | } 45 | 46 | private void testBacklinksCreation(String syntaxId, String backlinkListCode, String backlinkLink) throws Exception 47 | { 48 | getUtil().rest().deletePage("Test", "BacklinkTargetTest"); 49 | getUtil().rest().deletePage("Test", "BacklinkSourceTest"); 50 | 51 | // Create page listing backlinks leading to it. 52 | ViewPage vp = getUtil().createPage("Test", "BacklinkTargetTest", backlinkListCode, null, syntaxId); 53 | // No backlinks at this stage 54 | Assert.assertEquals("", vp.getContent()); 55 | 56 | // Create page pointing to the page listing the backlinks. 57 | getUtil().createPage("Test", "BacklinkSourceTest", backlinkLink, null, syntaxId); 58 | 59 | vp = getUtil().gotoPage("Test", "BacklinkTargetTest"); 60 | Assert.assertEquals("Test.BacklinkSourceTest", vp.getContent()); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /xwiki-enterprise-test/xwiki-enterprise-test-selenium/src/test/it/org/xwiki/test/selenium/AllTests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * See the NOTICE file distributed with this work for additional 3 | * information regarding copyright ownership. 4 | * 5 | * This is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU Lesser General Public License as 7 | * published by the Free Software Foundation; either version 2.1 of 8 | * the License, or (at your option) any later version. 9 | * 10 | * This software is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this software; if not, write to the Free 17 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 18 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 19 | */ 20 | package org.xwiki.test.selenium; 21 | 22 | import java.util.List; 23 | 24 | import org.apache.commons.configuration.PropertiesConfiguration; 25 | import org.junit.runner.RunWith; 26 | import org.xwiki.test.integration.XWikiExecutor; 27 | import org.xwiki.test.integration.XWikiExecutorSuite; 28 | import org.xwiki.test.ui.PageObjectSuite; 29 | import org.xwiki.test.ui.PersistentTestContext; 30 | 31 | /** 32 | * Runs all functional tests found in the classpath. 33 | * 34 | * @version $Id: baf3a4d794be36f7d02f367becebc1324152be7b $ 35 | */ 36 | @RunWith(PageObjectSuite.class) 37 | public class AllTests 38 | { 39 | @XWikiExecutorSuite.PreStart 40 | public void preStart(List executors) throws Exception 41 | { 42 | // Put back the old WYSIWYG editor in xwiki.properties 43 | XWikiExecutor executor = executors.get(0); 44 | PropertiesConfiguration properties = executor.loadXWikiPropertiesConfiguration(); 45 | properties.setProperty("edit.defaultEditor.org.xwiki.rendering.syntax.SyntaxContent#wysiwyg", "gwt"); 46 | executor.saveXWikiProperties(properties); 47 | } 48 | 49 | @PageObjectSuite.PostStart 50 | public void postStart(PersistentTestContext context) throws Exception 51 | { 52 | // Disable the tour because it pops-up on the home page and many tests access the home page and they want to 53 | // skip the tour. We don't plan to test the tour here anyway. 54 | context.getUtil().loginAsAdmin(); 55 | context.getUtil().gotoPage("TourCode", "TourJS", "save", 56 | "XWiki.JavaScriptExtension_0_use=onDemand&xredirect=" + context.getUtil().getURL("Main", "WebHome")); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /xwiki-enterprise-test/xwiki-enterprise-test-misc/src/test/it/org/xwiki/test/misc/AllTests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * See the NOTICE file distributed with this work for additional 3 | * information regarding copyright ownership. 4 | * 5 | * This is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU Lesser General Public License as 7 | * published by the Free Software Foundation; either version 2.1 of 8 | * the License, or (at your option) any later version. 9 | * 10 | * This software is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this software; if not, write to the Free 17 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 18 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 19 | */ 20 | package org.xwiki.test.misc; 21 | 22 | import org.xwiki.test.integration.XWikiTestSetup; 23 | 24 | import junit.framework.Test; 25 | import junit.framework.TestCase; 26 | import junit.framework.TestSuite; 27 | 28 | /** 29 | * A class listing all the Functional tests to execute. We need such a class (rather than letting the JUnit Runner 30 | * discover the different TestCases classes by itself) because we want to start/stop XWiki before and after the tests 31 | * start (but only once). 32 | * 33 | * @version $Id: 12af2c7dccb846b74ca4d71f2ce9f6095fcc3f87 $ 34 | */ 35 | public class AllTests extends TestCase 36 | { 37 | private static final String PATTERN = ".*" + System.getProperty("pattern", ""); 38 | 39 | public static Test suite() throws Exception 40 | { 41 | TestSuite suite = new TestSuite(); 42 | 43 | // TODO: I don't like listing tests here as it means we can add a new TestCase class and 44 | // forget to add it here and the tests won't be run but we'll not know about it and we'll 45 | // think the tests are all running fine. I haven't found a simple solution to this yet 46 | // (there are complex solutions like searching for all tests by parsing the source tree). 47 | // I think there are TestSuite that do this out there but I haven't looked for them yet. 48 | addTestCase(suite, PDFTest.class); 49 | addTestCase(suite, SuggestTest.class); 50 | 51 | return new XWikiTestSetup(suite); 52 | } 53 | 54 | private static void addTestCase(TestSuite suite, Class< ? > testClass) throws Exception 55 | { 56 | if (testClass.getName().matches(PATTERN)) { 57 | suite.addTest(new TestSuite(testClass)); 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /xwiki-enterprise-test/xwiki-enterprise-test-ui/src/test/it/org/xwiki/test/ui/administration/RegisterFromAdministrationTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * See the NOTICE file distributed with this work for additional 3 | * information regarding copyright ownership. 4 | * 5 | * This is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU Lesser General Public License as 7 | * published by the Free Software Foundation; either version 2.1 of 8 | * the License, or (at your option) any later version. 9 | * 10 | * This software is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this software; if not, write to the Free 17 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 18 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 19 | */ 20 | package org.xwiki.test.ui.administration; 21 | 22 | import org.openqa.selenium.By; 23 | import org.xwiki.administration.test.po.LightBoxRegistrationPage; 24 | import org.xwiki.test.ui.po.AbstractRegistrationPage; 25 | import org.xwiki.test.ui.RegisterTest; 26 | import org.xwiki.test.ui.TestUtils; 27 | 28 | /** 29 | * Test the Admin->Users->AddNewUser feature by executing the same tests as in RegisterTest but from 30 | * the lightbox from Admin->Users->AddNewUser. 31 | * 32 | * @version $Id: 0043b203e52e7ea3cedd887217777008062c3d37 $ 33 | * @since 2.4M2 34 | */ 35 | public class RegisterFromAdministrationTest extends RegisterTest 36 | { 37 | @Override 38 | protected void switchUser() 39 | { 40 | getDriver().get(getUtil().getURLToLoginAsAdmin()); 41 | getUtil().recacheSecretToken(); 42 | getUtil().setDefaultCredentials(TestUtils.ADMIN_CREDENTIALS); 43 | } 44 | 45 | @Override 46 | protected AbstractRegistrationPage getRegistrationPage() 47 | { 48 | return LightBoxRegistrationPage.gotoPage(); 49 | } 50 | 51 | @Override 52 | protected boolean tryToRegister() 53 | { 54 | registrationPage.clickRegister(); 55 | 56 | getDriver().waitUntilElementsAreVisible( 57 | new By[] {By.xpath("//td[@class='username']/a[@href='/xwiki/bin/view/XWiki/JohnSmith']"), 58 | By.xpath("//dd/span[@class='LV_validation_message LV_invalid']") 59 | }, 60 | false 61 | ); 62 | 63 | return !getDriver() 64 | .findElements( 65 | By.xpath("//td[@class='username']/a[@href='/xwiki/bin/view/XWiki/JohnSmith']")) 66 | .isEmpty(); 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /xwiki-enterprise-test/xwiki-enterprise-test-wysiwyg/src/test/it/org/xwiki/test/wysiwyg/EmbedTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * See the NOTICE file distributed with this work for additional 3 | * information regarding copyright ownership. 4 | * 5 | * This is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU Lesser General Public License as 7 | * published by the Free Software Foundation; either version 2.1 of 8 | * the License, or (at your option) any later version. 9 | * 10 | * This software is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this software; if not, write to the Free 17 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 18 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 19 | */ 20 | package org.xwiki.test.wysiwyg; 21 | 22 | import org.junit.Test; 23 | import org.xwiki.test.wysiwyg.framework.AbstractWysiwygTestCase; 24 | 25 | /** 26 | * Integration tests for embedded object support inside the WYSIWYG editor. 27 | * 28 | * @version $Id: 608155ec5b6092528683dc6551a47c4c97ae6d4a $ 29 | */ 30 | public class EmbedTest extends AbstractWysiwygTestCase 31 | { 32 | /** 33 | * @see XWIKI-3975: Issue when inserting a video using the {{html}} macro when AdBlockPlus is enabled. 34 | */ 35 | @Test 36 | public void testEmbedFlashUsingHTMLMacro() 37 | { 38 | switchToSource(); 39 | String sourceText = 40 | "before\n\n{{html}}\n

" 42 | + "" 43 | + "
\n{{/html}}\n\nafter"; 46 | setSourceText(sourceText); 47 | switchToWysiwyg(); 48 | typeText("1 2"); 49 | // The tool bar is not updated right away. We have to wait for the undo push button to become enabled. 50 | waitForPushButton(TOOLBAR_BUTTON_UNDO_TITLE, true); 51 | clickUndoButton(2); 52 | switchToSource(); 53 | assertSourceText("1" + sourceText); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /xwiki-enterprise-data/xwiki-enterprise-data-derby/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 22 | 23 | 24 | 4.0.0 25 | 26 | org.xwiki.enterprise 27 | xwiki-enterprise-data 28 | 9.5-SNAPSHOT 29 | 30 | xwiki-enterprise-data-derby 31 | XWiki Enterprise - Data - Derby 32 | pom 33 | XWiki Enterprise - Data - Derby 34 | 35 | jdbc:derby:${project.build.directory}/data/database;create=true 36 | 37 | 38 | 39 | 41 | 42 | org.apache.maven.plugins 43 | maven-remote-resources-plugin 44 | 45 | 46 | xwiki-platform-tool-configuration-resources 47 | 48 | 49 | 50 | 51 | 52 | org.xwiki.platform 53 | xwiki-platform-tool-packager-plugin 54 | 55 | 56 | 57 | org.apache.maven.plugins 58 | maven-assembly-plugin 59 | 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /xwiki-enterprise-installers/xwiki-enterprise-installer-debian/xwiki-enterprise-installer-debian-tomcat/xwiki-enterprise-installer-debian-tomcat7-common/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 22 | 23 | 24 | 4.0.0 25 | 26 | org.xwiki.enterprise 27 | xwiki-enterprise-installer-debian-tomcat 28 | 9.5-SNAPSHOT 29 | 30 | xwiki-enterprise-installer-debian-tomcat7-common 31 | XWiki Enterprise - Installer - Debian - Tomcat 7 - Common 32 | deb 33 | XWiki enterprise Tomcat 7 common package 34 | 35 | 36 | 37 | 38 | jdeb 39 | org.vafer 40 | 41 | 42 | 43 | ${project.basedir}/src/deb/resources/ 44 | directory 45 | 46 | perm 47 | 48 | 49 | true 50 | 51 | 52 | 53 | 54 | link 55 | true 56 | /etc/tomcat7/Catalina/localhost/xwiki.xml 57 | /etc/xwiki/xwiki-tomcat7.xml 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /xwiki-enterprise-installers/xwiki-enterprise-installer-debian/xwiki-enterprise-installer-debian-tomcat/xwiki-enterprise-installer-debian-tomcat8-common/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 22 | 23 | 24 | 4.0.0 25 | 26 | org.xwiki.enterprise 27 | xwiki-enterprise-installer-debian-tomcat 28 | 9.5-SNAPSHOT 29 | 30 | xwiki-enterprise-installer-debian-tomcat8-common 31 | XWiki Enterprise - Installer - Debian - Tomcat 8 - Common 32 | deb 33 | XWiki enterprise Tomcat 8 common package 34 | 35 | 36 | 37 | 38 | jdeb 39 | org.vafer 40 | 41 | 42 | 43 | ${project.basedir}/src/deb/resources/ 44 | directory 45 | 46 | perm 47 | 48 | 49 | true 50 | 51 | 52 | 53 | 54 | link 55 | true 56 | /etc/tomcat8/Catalina/localhost/xwiki.xml 57 | /etc/xwiki/xwiki-tomcat8.xml 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /xwiki-enterprise-distribution/xwiki-enterprise-jetty/xwiki-enterprise-jetty-derby/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 22 | 23 | 24 | 4.0.0 25 | 26 | org.xwiki.enterprise 27 | xwiki-enterprise-jetty 28 | 9.5-SNAPSHOT 29 | 30 | xwiki-enterprise-jetty-derby 31 | XWiki Enterprise - Distribution - Jetty - Derby 32 | pom 33 | XWiki Enterprise - Distribution - Jetty - Derby 34 | 35 | 36 | XWiki Enterprise Jetty Derby 37 | 38 | 39 | 40 | org.xwiki.enterprise 41 | xwiki-enterprise-data-derby 42 | ${project.version} 43 | zip 44 | true 45 | 46 | 47 | 48 | 49 | 50 | 51 | org.apache.maven.plugins 52 | maven-remote-resources-plugin 53 | 54 | 55 | org.apache.maven.plugins 56 | maven-assembly-plugin 57 | 58 | 59 | src/assemble/application.xml 60 | 61 | 62 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /xwiki-enterprise-distribution/xwiki-enterprise-jetty/xwiki-enterprise-jetty-hsqldb/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 22 | 23 | 24 | 4.0.0 25 | 26 | org.xwiki.enterprise 27 | xwiki-enterprise-jetty 28 | 9.5-SNAPSHOT 29 | 30 | xwiki-enterprise-jetty-hsqldb 31 | XWiki Enterprise - Distribution - Jetty - HSQLDB 32 | pom 33 | XWiki Enterprise - Distribution - Jetty - HSQLDB 34 | 35 | 36 | XWiki Enterprise Jetty HSQLDB 37 | 38 | 39 | 40 | org.xwiki.enterprise 41 | xwiki-enterprise-data-hsqldb 42 | ${project.version} 43 | zip 44 | true 45 | 46 | 47 | 48 | 49 | 50 | 51 | org.apache.maven.plugins 52 | maven-remote-resources-plugin 53 | 54 | 55 | org.apache.maven.plugins 56 | maven-assembly-plugin 57 | 58 | 59 | src/assemble/application.xml 60 | 61 | 62 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /xwiki-enterprise-test/xwiki-enterprise-test-misc/src/test/it/org/xwiki/test/misc/SuggestTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * See the NOTICE file distributed with this work for additional 3 | * information regarding copyright ownership. 4 | * 5 | * This is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU Lesser General Public License as 7 | * published by the Free Software Foundation; either version 2.1 of 8 | * the License, or (at your option) any later version. 9 | * 10 | * This software is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this software; if not, write to the Free 17 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 18 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 19 | */ 20 | package org.xwiki.test.misc; 21 | 22 | import junit.framework.TestCase; 23 | 24 | import java.io.InputStream; 25 | import java.net.HttpURLConnection; 26 | import java.net.URL; 27 | 28 | import javax.xml.parsers.DocumentBuilderFactory; 29 | import javax.xml.parsers.DocumentBuilder; 30 | import org.w3c.dom.Document; 31 | import org.w3c.dom.Element; 32 | 33 | /** 34 | * Test that the suggest service works without programming rights on {@code Main.WebHome}. 35 | * 36 | * @see XE-539 37 | * @version $Id: c21d29738b075951aaeed930f7f7cf15f7a441f5 $ 38 | * @since 4.5M1 39 | */ 40 | public class SuggestTest extends TestCase 41 | { 42 | 43 | public void testSuggestWithNonexistingContextDocument() throws Exception 44 | { 45 | URL url = new URL("http://localhost:8080/xwiki/bin/view/NonExistingSpace/NonexistingPage" 46 | + "?xpage=suggest&classname=XWiki.TagClass&fieldname=tags&firCol=%2D&secCol=%2D&input=test"); 47 | HttpURLConnection connection = (HttpURLConnection) url.openConnection(); 48 | InputStream is = connection.getInputStream(); 49 | 50 | DocumentBuilder documentBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); 51 | Document document = documentBuilder.parse(is); 52 | 53 | assertNotNull(document); 54 | 55 | Element results = document.getDocumentElement(); 56 | 57 | assertNotNull(results); 58 | assertEquals("results", results.getTagName()); 59 | 60 | // The tag suggestion use a hibernate query to fetch the suggestions, which requires programming rights. If 61 | // programming rights are denied, the result type will be "8" and there will be no results. If programming 62 | // rights are granted, and the query succeeds the result type will be "3". 63 | assertEquals("3", results.getAttribute("type")); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /xwiki-enterprise-distribution/xwiki-enterprise-ui-wiki-all/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 22 | 23 | 4.0.0 24 | 25 | org.xwiki.enterprise 26 | xwiki-enterprise-distribution 27 | 9.5-SNAPSHOT 28 | 29 | xwiki-enterprise-ui-wiki-all 30 | XWiki Enterprise - UI - Wiki All 31 | xar 32 | All in one XWiki Enterprise XAR package for subwikis. To be used when installing without the Distribution Wizard 33 | 34 | ${xe.ui.wiki.all.features} 35 | 36 | 37 | 38 | org.xwiki.enterprise 39 | xwiki-enterprise-ui-wiki 40 | ${project.version} 41 | xar 42 | provided 43 | 44 | 45 | 46 | 47 | 48 | org.xwiki.platform 49 | xwiki-platform-oldcore 50 | [${platform.version}] 51 | jar 52 | runtime 53 | 54 | 55 | 56 | 57 | 58 | 59 | org.xwiki.commons 60 | xwiki-commons-tool-xar-plugin 61 | 62 | true 63 | 64 | 65 | 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /xwiki-enterprise-test/xwiki-enterprise-test-ui/src/test/it/org/xwiki/test/ui/administration/WYSIWYGEditorConfigTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * See the NOTICE file distributed with this work for additional 3 | * information regarding copyright ownership. 4 | * 5 | * This is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU Lesser General Public License as 7 | * published by the Free Software Foundation; either version 2.1 of 8 | * the License, or (at your option) any later version. 9 | * 10 | * This software is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this software; if not, write to the Free 17 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 18 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 19 | */ 20 | package org.xwiki.test.ui.administration; 21 | 22 | import org.junit.Assert; 23 | 24 | import org.apache.commons.lang3.RandomStringUtils; 25 | import org.junit.Before; 26 | import org.junit.Rule; 27 | import org.junit.Test; 28 | import org.xwiki.administration.test.po.AdministrationPage; 29 | import org.xwiki.administration.test.po.WYSIWYGEditorAdministrationSectionPage; 30 | import org.xwiki.test.ui.AbstractTest; 31 | import org.xwiki.test.ui.AdminAuthenticationRule; 32 | import org.xwiki.test.ui.browser.IgnoreBrowser; 33 | 34 | /** 35 | * Test the WYSIWYG Editor administration section. 36 | * 37 | * @version $Id: c1a3461751a175c8719aa6dcd4e32f962456279f $ 38 | * @since 3.3M2 39 | */ 40 | public class WYSIWYGEditorConfigTest extends AbstractTest 41 | { 42 | @Rule 43 | public AdminAuthenticationRule adminAuthenticationRule = new AdminAuthenticationRule(getUtil()); 44 | 45 | /** 46 | * The WYSIWYG Editor administration section. 47 | */ 48 | private WYSIWYGEditorAdministrationSectionPage wysiwygSection; 49 | 50 | @Before 51 | public void setUp() throws Exception 52 | { 53 | wysiwygSection = AdministrationPage.gotoPage().clickWYSIWYGEditorSection(); 54 | } 55 | 56 | /** 57 | * Try to enable a dummy WYSIWYG editor plugin from the administration. 58 | * 59 | * @since 3.3M2 60 | */ 61 | @Test 62 | @IgnoreBrowser(value = "internet.*", version = "8\\.*", reason="See https://jira.xwiki.org/browse/XE-1146") 63 | public void testEnablePlugin() 64 | { 65 | String pluginName = RandomStringUtils.randomAlphabetic(5); 66 | Assert.assertFalse(wysiwygSection.getEnabledPlugins().contains(pluginName)); 67 | wysiwygSection.enablePlugin(pluginName); 68 | wysiwygSection.clickSave(); 69 | // Reload the administration section. 70 | getDriver().navigate().refresh(); 71 | wysiwygSection = new WYSIWYGEditorAdministrationSectionPage(); 72 | Assert.assertTrue(wysiwygSection.getEnabledPlugins().contains(pluginName)); 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /xwiki-enterprise-test/xwiki-enterprise-test-selenium/src/test/it/org/xwiki/test/selenium/ValidationTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * See the NOTICE file distributed with this work for additional 3 | * information regarding copyright ownership. 4 | * 5 | * This is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU Lesser General Public License as 7 | * published by the Free Software Foundation; either version 2.1 of 8 | * the License, or (at your option) any later version. 9 | * 10 | * This software is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this software; if not, write to the Free 17 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 18 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 19 | */ 20 | package org.xwiki.test.selenium; 21 | 22 | import org.junit.Test; 23 | import org.xwiki.test.selenium.framework.AbstractXWikiTestCase; 24 | 25 | /** 26 | * Verify the data validation feature of XWiki. 27 | * 28 | * @version $Id: a87109a42262956b12851a85acead49ebcbf46fa $ 29 | */ 30 | public class ValidationTest extends AbstractXWikiTestCase 31 | { 32 | private static final String SYNTAX = "xwiki/2.1"; 33 | 34 | @Test 35 | public void testSaveActionValidatesWhenXValidateIsPresent() 36 | { 37 | deletePage("Main", "ValidatedClass"); 38 | open("Main", "ValidatedClass", "edit", "editor=class"); 39 | setFieldValue("propname", "prop"); 40 | setFieldValue("proptype", "String"); 41 | clickButtonAndContinue("//input[@name='action_propadd']"); 42 | setFieldValue("prop_validationRegExp", "/^[0-4][0-2]$/"); 43 | setFieldValue("prop_validationMessage", "invalid value for prop"); 44 | clickEditSaveAndView(); 45 | createPage("Main", "ValidatedObject", 46 | "{{velocity}}value: $doc.display('prop')\n\n#foreach($e in $xcontext.validationStatus.errors)$e #end{{/velocity}}", SYNTAX); 47 | open("Main", "ValidatedObject", "edit", "editor=object"); 48 | getSelenium().select("classname", "value=Main.ValidatedClass"); 49 | clickButtonAndContinue("//input[@name='action_objectadd']"); 50 | setFieldValue("Main.ValidatedClass_0_prop", "22"); 51 | clickEditSaveAndView(); 52 | open("Main", "ValidatedObject", "save", "xvalidate=1"); 53 | assertTextPresent("value: 22"); 54 | open("Main", "ValidatedObject", "edit", "editor=object"); 55 | setFieldValue("Main.ValidatedClass_0_prop", "44"); 56 | clickEditSaveAndView(); 57 | open("Main", "ValidatedObject", "save", "xvalidate=1"); 58 | assertTextNotPresent("value: 44"); 59 | assertTextPresent("invalid value for prop"); 60 | open("Main", "ValidatedObject", "save", "xvalidate=1&Main.ValidatedClass_0_prop=11"); 61 | assertTextPresent("value: 11"); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /xwiki-enterprise-test/xwiki-enterprise-test-wysiwyg/src/test/it/org/xwiki/test/wysiwyg/AllTests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * See the NOTICE file distributed with this work for additional 3 | * information regarding copyright ownership. 4 | * 5 | * This is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU Lesser General Public License as 7 | * published by the Free Software Foundation; either version 2.1 of 8 | * the License, or (at your option) any later version. 9 | * 10 | * This software is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this software; if not, write to the Free 17 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 18 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 19 | */ 20 | package org.xwiki.test.wysiwyg; 21 | 22 | import java.util.HashMap; 23 | import java.util.Map; 24 | 25 | import org.junit.runner.RunWith; 26 | import org.xwiki.repository.test.SolrTestUtils; 27 | import org.xwiki.test.ui.PageObjectSuite; 28 | import org.xwiki.test.ui.PersistentTestContext; 29 | 30 | /** 31 | * Runs all functional tests found in the classpath. 32 | * 33 | * @version $Id: 69e94b60f17b8b0b9aa6290ecc85e645240aa289 $ 34 | */ 35 | @RunWith(PageObjectSuite.class) 36 | public class AllTests extends org.xwiki.test.selenium.AllTests 37 | { 38 | @PageObjectSuite.PostStart 39 | @Override 40 | public void postStart(PersistentTestContext context) throws Exception 41 | { 42 | super.postStart(context); 43 | 44 | displayHiddenDocumentsForAdmin(context); 45 | enableAllEditingFeatures(context); 46 | 47 | new SolrTestUtils(context.getUtil()).waitEmpyQueue(); 48 | } 49 | 50 | private void displayHiddenDocumentsForAdmin(PersistentTestContext context) 51 | { 52 | context.getUtil().loginAsAdmin(); 53 | context.getUtil().gotoPage("XWiki", "Admin", "save", "XWiki.XWikiUsers_0_displayHiddenDocuments=1"); 54 | } 55 | 56 | private void enableAllEditingFeatures(PersistentTestContext context) 57 | { 58 | Map params = new HashMap<>(); 59 | params.put("XWiki.WysiwygEditorConfigClass_0_plugins", 60 | "submit readonly line separator embed text valign list " 61 | + "indent history format symbol link image " + "table macro import color justify font"); 62 | params.put("XWiki.WysiwygEditorConfigClass_0_toolBar", 63 | "bold italic underline strikethrough teletype | subscript superscript | " 64 | + "justifyleft justifycenter justifyright justifyfull | unorderedlist orderedlist | outdent indent | " 65 | + "undo redo | format | fontname fontsize forecolor backcolor | hr removeformat symbol | " 66 | + " paste | macro:velocity"); 67 | context.getUtil().gotoPage("XWiki", "WysiwygEditorConfig", "save", params); 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /xwiki-enterprise-test/xwiki-enterprise-test-wysiwyg/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 22 | 23 | 24 | 4.0.0 25 | 26 | org.xwiki.enterprise 27 | xwiki-enterprise-test 28 | 9.5-SNAPSHOT 29 | 30 | xwiki-enterprise-test-wysiwyg 31 | XWiki Enterprise - Functional Tests - WYSIWYG 32 | pom 33 | XWiki Enterprise - Functional Tests - WYSIWYG 34 | 35 | 36 | org.xwiki.enterprise 37 | xwiki-enterprise-test-selenium 38 | ${project.version} 39 | test-jar 40 | test 41 | 42 | 43 | org.xwiki.platform 44 | xwiki-platform-search-solr-test-utils 45 | ${platform.version} 46 | test 47 | 48 | 49 | 50 | 51 | 52 | 53 | org.apache.maven.plugins 54 | maven-compiler-plugin 55 | 56 | 57 | 58 | org.apache.maven.plugins 59 | maven-resources-plugin 60 | 61 | 62 | 63 | org.apache.maven.plugins 64 | maven-dependency-plugin 65 | 66 | 67 | 68 | org.apache.maven.plugins 69 | maven-surefire-plugin 70 | 71 | 72 | 73 | 74 | -------------------------------------------------------------------------------- /xwiki-enterprise-ui/xwiki-enterprise-ui-tour/src/main/resources/Tour/HomepageTour/Translations.zh.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 22 | 23 | 24 | Tour.HomepageTour 25 | Translations 26 | zh 27 | en 28 | 1 29 | Tour.HomepageTour.WebHome 30 | xwiki:XWiki.Admin 31 | xwiki:XWiki.Admin 32 | 33 | xwiki:XWiki.Admin 34 | 1465277605000 35 | 1467283422000 36 | 1467283422000 37 | 1.1 38 | Translations 39 | 40 | 41 | 42 | false 43 | plain/1.0 44 | true 45 | ##Homepage Tour (by steps order) 46 | tour.homepageTour.welcome.title=欢迎来到XWiki 47 | tour.homepageTour.welcome.content=在接下来的几分钟里你将会探索wiki的外观和他的基本功能。 48 | tour.homepageTour.panels.title=面板 49 | tour.homepageTour.panels.contentA=你可以通过当前面板链接到wiki上的应用程序和页面。 50 | tour.homepageTour.panels.contentB=管理员可以个性化这些面板,也可以设置那些面板可以出现在这里。 51 | tour.homepageTour.breadcrumbs.title=导航栏 52 | tour.homepageTour.breadcrumbs.contentA=你可以从导航栏看出你当前的网页位置和层次结构。 53 | tour.homepageTour.breadcrumbs.contentB= 你随时可以通过按{0}按钮的方式返回主页。 54 | tour.homepageTour.pageContent.title=页面内容 55 | tour.homepageTour.pageContent.contentA=这是将显示当前页面内容。 56 | tour.homepageTour.pageContent.contentB=编辑这个页面可以向这个页面增加表格、列表、宏和文章结构来整理你的知识。 57 | tour.homepageTour.pageMenu.title=页面菜单tour.homepageTour.pageMenu.contentA=这个菜单包括可以对这个页面进行的改动,若你有相应的权限,就可以编辑、创建、管理此页面。 58 | tour.homepageTour.pageMenu.contentB=这个{0}按钮可以显示更多的行为,比如导出、打印、分享。 59 | tour.homepageTour.pageTabs.title=页面标签 60 | tour.homepageTour.pageTabs.contentA=你可以和其他用户一起对页面的内容进行评论。 61 | tour.homepageTour.pageTabs.contentB=你也可以添加附件,查看页面版本和页面信息。 62 | tour.homepageTour.header.title=标题 63 | tour.homepageTour.header.contentA=你可以查找相关内容,查看页面改动,进入个人信息页面。 64 | tour.homepageTour.header.contentB={0} 按钮可以打开抽屉菜单,菜单里有更多与本wiki相关的行为,比如索引和管理。 65 | tour.homepageTour.tourComplete.title=导游完成 66 | tour.homepageTour.tourComplete.contentA=XWiki的基本外观和功能探索完毕。 67 | tour.homepageTour.tourComplete.contentB=每个特色更详细的介绍可以在{0}documentation{1}中查看。 68 | 69 | -------------------------------------------------------------------------------- /xwiki-enterprise-installers/xwiki-enterprise-installer-generic/src/main/resources/shortcutSpec_windows.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 24 | 25 | 29 | 30 | 31 | 32 | 42 | 52 | 62 | 72 | 82 | 83 | -------------------------------------------------------------------------------- /xwiki-enterprise-test/xwiki-enterprise-test-selenium/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 22 | 23 | 24 | 4.0.0 25 | 26 | org.xwiki.enterprise 27 | xwiki-enterprise-test 28 | 9.5-SNAPSHOT 29 | 30 | xwiki-enterprise-test-selenium 31 | XWiki Enterprise - Functional Tests - Selenium 32 | pom 33 | Deprecated: Tests to be moved to ui-tests 34 | 35 | 36 | org.xwiki.platform 37 | xwiki-platform-administration-test-pageobjects 38 | ${platform.version} 39 | 40 | 41 | org.seleniumhq.selenium 42 | selenium-java 43 | 44 | 45 | org.seleniumhq.selenium 46 | selenium-server 47 | ${selenium.version} 48 | 49 | 50 | com.icegreen 51 | greenmail 52 | 1.3 53 | test 54 | 55 | 56 | 57 | 58 | 59 | 60 | org.apache.maven.plugins 61 | maven-compiler-plugin 62 | 63 | 64 | 65 | org.apache.maven.plugins 66 | maven-jar-plugin 67 | 68 | 69 | 70 | org.apache.maven.plugins 71 | maven-dependency-plugin 72 | 73 | 74 | 75 | org.apache.maven.plugins 76 | maven-surefire-plugin 77 | 78 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /xwiki-enterprise-test/xwiki-enterprise-test-selenium/src/test/it/org/xwiki/test/selenium/VelocityMacrosTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * See the NOTICE file distributed with this work for additional 3 | * information regarding copyright ownership. 4 | * 5 | * This is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU Lesser General Public License as 7 | * published by the Free Software Foundation; either version 2.1 of 8 | * the License, or (at your option) any later version. 9 | * 10 | * This software is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this software; if not, write to the Free 17 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 18 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 19 | */ 20 | package org.xwiki.test.selenium; 21 | 22 | import org.junit.Test; 23 | import org.xwiki.test.selenium.framework.AbstractXWikiTestCase; 24 | 25 | /** 26 | * Verify proper execution of some Velocity Macros. 27 | * 28 | * @version $Id: adf97f890896d045ceb43826bb0d77b81bc396f5 $ 29 | */ 30 | public class VelocityMacrosTest extends AbstractXWikiTestCase 31 | { 32 | private static final String SYNTAX = "xwiki/2.1"; 33 | 34 | @Test 35 | public void testMacros() throws Exception 36 | { 37 | editInWikiEditor("Test", "VelocityMacrosTest", SYNTAX); 38 | 39 | // TODO: Add more macro tests here (for performance reasons it's much faster to have more 40 | // tests in a single junit test) and modify thet assert so that it checks for exact content 41 | setFieldValue("content", "{{velocity}}{{html}}#mimetypeimg('image/jpeg' 'photo.jpeg'){{/html}}{{/velocity}}"); 42 | clickEditSaveAndView(); 43 | assertGeneratedHTML("p/img[@src='/xwiki/resources/icons/silk/picture.png' " 44 | + "and @alt='Image' and @title='Image']"); 45 | } 46 | 47 | /** 48 | * Verify that we can create macros in a document and including them into another document. 49 | */ 50 | @Test 51 | public void testIncludeMacrosInPage() 52 | { 53 | editInWikiEditor("Test", "Macro", SYNTAX); 54 | setFieldValue("content", "{{velocity}}#macro(testIncludeMacrosInPage)hellomacro#end{{/velocity}}"); 55 | clickEditSaveAndView(); 56 | editInWikiEditor("Test", "IncludeMacroTest", SYNTAX); 57 | setFieldValue("content", "{{velocity}}#includeMacros(\"Test.Macro\")\n#testIncludeMacrosInPage(){{/velocity}}"); 58 | clickEditSaveAndView(); 59 | assertTextPresent("hellomacro"); 60 | } 61 | 62 | /** 63 | * Verify that a Macro defined in a document is not visible from another document (using XWiki Syntax 1.0). 64 | * Note that for XWiki Syntax 2.0 this is verified in a unit test in the Velocity Macro module. 65 | */ 66 | @Test 67 | public void testMacrosAreLocal() 68 | { 69 | editInWikiEditor("Test", "TestMacrosAreLocal1", SYNTAX); 70 | setFieldValue("content", "{{velocity}}#macro(testMacrosAreLocal)mymacro#end{{/velocity}}"); 71 | clickEditSaveAndView(); 72 | editInWikiEditor("Test", "TestMacrosAreLocal2", SYNTAX); 73 | setFieldValue("content", "{{velocity}}#testMacrosAreLocal(){{/velocity}}"); 74 | clickEditSaveAndView(); 75 | assertTextNotPresent("mymacro"); 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /xwiki-enterprise-ui/xwiki-enterprise-ui-admin-user/src/main/resources/XWiki/XWikiAllGroup.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 22 | 23 | 24 | XWiki 25 | XWikiAllGroup 26 | 27 | 28 | 0 29 | xwiki:XWiki.Admin 30 | 1106311621000 31 | XWiki.XWikiGroups 32 | xwiki:XWiki.Admin 33 | xwiki:XWiki.Admin 34 | 1177088815000 35 | 1177088815000 36 | 1.1 37 | 38 | <comment/> 39 | <minorEdit>false</minorEdit> 40 | <syntaxId>xwiki/2.1</syntaxId> 41 | <hidden>true</hidden> 42 | <content/> 43 | <object> 44 | <name>XWiki.XWikiAllGroup</name> 45 | <number>0</number> 46 | <className>XWiki.XWikiGroups</className> 47 | <guid>37289f9f-b468-479b-9d0d-4e444bf26b0a</guid> 48 | <class> 49 | <name>XWiki.XWikiGroups</name> 50 | <customClass/> 51 | <customMapping/> 52 | <defaultViewSheet/> 53 | <defaultEditSheet/> 54 | <defaultWeb/> 55 | <nameField/> 56 | <validationScript/> 57 | <member> 58 | <disabled>0</disabled> 59 | <name>member</name> 60 | <number>1</number> 61 | <prettyName>Member</prettyName> 62 | <size>30</size> 63 | <unmodifiable>0</unmodifiable> 64 | <classType>com.xpn.xwiki.objects.classes.StringClass</classType> 65 | </member> 66 | </class> 67 | <property> 68 | <member>XWiki.Admin</member> 69 | </property> 70 | </object> 71 | <object> 72 | <name>XWiki.XWikiAllGroup</name> 73 | <number>1</number> 74 | <className>XWiki.XWikiGroups</className> 75 | <guid>3065ac72-8a2b-4038-b991-6d0deea13aee</guid> 76 | <class> 77 | <name>XWiki.XWikiGroups</name> 78 | <customClass/> 79 | <customMapping/> 80 | <defaultViewSheet/> 81 | <defaultEditSheet/> 82 | <defaultWeb/> 83 | <nameField/> 84 | <validationScript/> 85 | <member> 86 | <disabled>0</disabled> 87 | <name>member</name> 88 | <number>1</number> 89 | <prettyName>Member</prettyName> 90 | <size>30</size> 91 | <unmodifiable>0</unmodifiable> 92 | <classType>com.xpn.xwiki.objects.classes.StringClass</classType> 93 | </member> 94 | </class> 95 | <property> 96 | <member/> 97 | </property> 98 | </object> 99 | </xwikidoc> 100 | -------------------------------------------------------------------------------- /xwiki-enterprise-test/xwiki-enterprise-test-escaping/src/test/it/org/xwiki/test/escaping/framework/SingleXWikiExecutor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * See the NOTICE file distributed with this work for additional 3 | * information regarding copyright ownership. 4 | * 5 | * This is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU Lesser General Public License as 7 | * published by the Free Software Foundation; either version 2.1 of 8 | * the License, or (at your option) any later version. 9 | * 10 | * This software is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this software; if not, write to the Free 17 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 18 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 19 | */ 20 | package org.xwiki.test.escaping.framework; 21 | 22 | import org.apache.commons.configuration.PropertiesConfiguration; 23 | import org.xwiki.test.integration.XWikiExecutor; 24 | 25 | /** 26 | * Starts and stops exactly one XWiki instance. The methods {@link #start()} and {@link #stop()} 27 | * allow to call them multiple times, starting and stopping the server only on the first and 28 | * last call respectively. 29 | * 30 | * @version $Id: 25c333b03ccc056800f71070ee7cdbcf06b20482 $ 31 | * @since 2.5M1 32 | */ 33 | public final class SingleXWikiExecutor extends XWikiExecutor 34 | { 35 | /** Singleton instance. */ 36 | private static SingleXWikiExecutor executor = null; 37 | 38 | /** Call counter. */ 39 | private static int counter = 0; 40 | 41 | /** 42 | * Create new SingleXWikiExecutor. 43 | */ 44 | private SingleXWikiExecutor() 45 | { 46 | super(0); 47 | } 48 | 49 | /** 50 | * Get the executor instance. 51 | * 52 | * @return XWiki server executor 53 | */ 54 | public static synchronized SingleXWikiExecutor getExecutor() 55 | { 56 | if (SingleXWikiExecutor.executor == null) { 57 | SingleXWikiExecutor.executor = new SingleXWikiExecutor(); 58 | } 59 | return SingleXWikiExecutor.executor; 60 | } 61 | 62 | /** 63 | * {@inheritDoc} 64 | * 65 | * Starts the server on the first call, subsequent calls only increase the internal counter by one. 66 | */ 67 | @Override 68 | public synchronized void start() throws Exception 69 | { 70 | if (counter == 0) { 71 | if (!VERIFY_RUNNING_XWIKI_AT_START.equals("true") || isXWikiStarted(getURL(), 15).timedOut) { 72 | // Disable extensions manager external repositories 73 | PropertiesConfiguration properties = loadXWikiPropertiesConfiguration(); 74 | if (!properties.containsKey("extension.repositories")) { 75 | properties.setProperty("extension.repositories", ""); 76 | } 77 | saveXWikiProperties(properties); 78 | } 79 | 80 | super.start(); 81 | } 82 | counter++; 83 | } 84 | 85 | /** 86 | * {@inheritDoc} 87 | * 88 | * Decreases the internal counter, stops the server when it reaches 0. 89 | */ 90 | @Override 91 | public synchronized void stop() throws Exception 92 | { 93 | if (counter == 1) { 94 | super.stop(); 95 | } 96 | counter--; 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /xwiki-enterprise-installers/xwiki-enterprise-installer-debian/pom.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | 3 | <!-- 4 | * See the NOTICE file distributed with this work for additional 5 | * information regarding copyright ownership. 6 | * 7 | * This is free software; you can redistribute it and/or modify it 8 | * under the terms of the GNU Lesser General Public License as 9 | * published by the Free Software Foundation; either version 2.1 of 10 | * the License, or (at your option) any later version. 11 | * 12 | * This software is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this software; if not, write to the Free 19 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 20 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 21 | --> 22 | 23 | <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> 24 | <modelVersion>4.0.0</modelVersion> 25 | <parent> 26 | <groupId>org.xwiki.enterprise</groupId> 27 | <artifactId>xwiki-enterprise-installers</artifactId> 28 | <version>9.5-SNAPSHOT</version> 29 | </parent> 30 | <artifactId>xwiki-enterprise-installer-debian</artifactId> 31 | <name>XWiki Enterprise - Installer - Debian</name> 32 | <packaging>pom</packaging> 33 | <description>Debian installer for XWiki Enterprise</description> 34 | <modules> 35 | <module>xwiki-enterprise-installer-debian-common</module> 36 | <module>xwiki-enterprise-installer-debian-mysql-common</module> 37 | <module>xwiki-enterprise-installer-debian-pgsql-common</module> 38 | <module>xwiki-enterprise-installer-debian-tomcat</module> 39 | </modules> 40 | <properties> 41 | <jdeb.version>1.5</jdeb.version> 42 | <debian.maintainer>XWiki Team (devs@xwiki.org)</debian.maintainer> 43 | <debian.license>LGPL 2.1</debian.license> 44 | <debian.xe.description> 45 | XWiki is a free wiki software platform written in Java with a design emphasis 46 | on extensibility. 47 | . 48 | XWiki Enterprise is an easily installed enterprise wiki with features such as 49 | WYSIWYG editing, OpenOffice based document import/export, semantic annotations 50 | and tagging, and advanced permissions management. 51 | . 52 | XWiki Enterprise is designed to help teams collaborate more efficiently. It 53 | runs in a Java servlet container such as Tomcat. 54 | </debian.xe.description> 55 | <debian.description> 56 | ${debian.xe.description} 57 | </debian.description> 58 | <debian.bugs>https://jira.xwiki.org</debian.bugs> 59 | <debian.homepage>http://www.xwiki.org</debian.homepage> 60 | </properties> 61 | <build> 62 | <extensions> 63 | <!-- Needed to add support for the "deb" packaging --> 64 | <extension> 65 | <groupId>org.vafer</groupId> 66 | <artifactId>jdeb</artifactId> 67 | <version>${jdeb.version}</version> 68 | </extension> 69 | </extensions> 70 | <pluginManagement> 71 | <plugins> 72 | <plugin> 73 | <artifactId>jdeb</artifactId> 74 | <groupId>org.vafer</groupId> 75 | <version>${jdeb.version}</version> 76 | <configuration> 77 | <snapshotExpand>true</snapshotExpand> 78 | </configuration> 79 | </plugin> 80 | </plugins> 81 | </pluginManagement> 82 | </build> 83 | </project> 84 | -------------------------------------------------------------------------------- /xwiki-enterprise-test/xwiki-enterprise-test-wysiwyg/src/test/it/org/xwiki/test/wysiwyg/ImportTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * See the NOTICE file distributed with this work for additional 3 | * information regarding copyright ownership. 4 | * 5 | * This is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU Lesser General Public License as 7 | * published by the Free Software Foundation; either version 2.1 of 8 | * the License, or (at your option) any later version. 9 | * 10 | * This software is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this software; if not, write to the Free 17 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 18 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 19 | */ 20 | package org.xwiki.test.wysiwyg; 21 | 22 | import org.junit.Test; 23 | import org.xwiki.test.wysiwyg.framework.AbstractWysiwygTestCase; 24 | 25 | /** 26 | * Test case for wysiwyg content import plugin. 27 | * 28 | * @version $Id: 808457a45ed859d36cdd585931b9d5a5d6b9149d $ 29 | * @since 2.0.1 30 | */ 31 | public class ImportTest extends AbstractWysiwygTestCase 32 | { 33 | public static final String IMPORT_BUTTON = "Import"; 34 | 35 | public static final String FILTER_STYLES = "//div[@class = 'xDialogBody']//input[@type = 'checkbox']"; 36 | 37 | /** 38 | * Test that the paste wizard works. 39 | */ 40 | @Test 41 | public void testPasteFromClipboard() 42 | { 43 | clickPasteButton(); 44 | populateOfficeContentEditor("<p>Hello <font color=\"#ff0000\">World</font></p>"); 45 | getSelenium().uncheck(FILTER_STYLES); 46 | clickButtonWithText(IMPORT_BUTTON); 47 | waitForDialogToClose(); 48 | switchToSource(); 49 | assertSourceText("Hello (% style=\"color:#ff0000;\" %)World"); 50 | } 51 | 52 | /** 53 | * @see XWIKI-3040: A rich text area on a dialog box looses its content if we move the dialog box 54 | */ 55 | @Test 56 | public void testPastedContentIsPreservedWhenDialogIsMoved() 57 | { 58 | clickPasteButton(); 59 | // Put some content inside the rich text area of the office import dialog. 60 | populateOfficeContentEditor("office"); 61 | // Move the dialog. 62 | getSelenium().dragdrop("//div[@class='gwt-Label xDialogCaption']", "100, 100"); 63 | // Import the pasted content. 64 | clickButtonWithText(IMPORT_BUTTON); 65 | waitForDialogToClose(); 66 | // Check the result. 67 | switchToSource(); 68 | assertSourceText("office"); 69 | } 70 | 71 | /** 72 | * Click the paste button on the tool bar. 73 | */ 74 | protected void clickPasteButton() 75 | { 76 | pushToolBarButton("Paste"); 77 | } 78 | 79 | /** 80 | * Utility method for injecting html content into office import wizard's copy paste area. 81 | * 82 | * @param innerHTML html content. 83 | */ 84 | private void populateOfficeContentEditor(String innerHTML) 85 | { 86 | StringBuilder script = new StringBuilder(); 87 | script.append("var eframe = document.getElementsByClassName('xImportOfficeContentEditor')[0];\n"); 88 | script.append("var rte = eframe.contentWindow.document.body;\n"); 89 | script.append(String.format("rte.innerHTML = '%s';\n", innerHTML)); 90 | getSelenium().getEval(script.toString()); 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /xwiki-enterprise-test/xwiki-enterprise-test-selenium/src/test/it/org/xwiki/test/selenium/PanelsTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * See the NOTICE file distributed with this work for additional 3 | * information regarding copyright ownership. 4 | * 5 | * This is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU Lesser General Public License as 7 | * published by the Free Software Foundation; either version 2.1 of 8 | * the License, or (at your option) any later version. 9 | * 10 | * This software is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this software; if not, write to the Free 17 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 18 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 19 | */ 20 | package org.xwiki.test.selenium; 21 | 22 | import org.junit.Test; 23 | import org.xwiki.test.selenium.framework.AbstractXWikiTestCase; 24 | 25 | /** 26 | * Test the Panel feature. Note that some panels tests are also done by the 27 | * {@link PanelWizardTest} test case class. 28 | * 29 | * @version $Id: 8208f7cc5b0f7403f173337b61013415f3eab0b8 $ 30 | * @since 1.6M1 31 | */ 32 | public class PanelsTest extends AbstractXWikiTestCase 33 | { 34 | /** 35 | * This method makes the following tests: 36 | * <ul> 37 | * <li>Opens the Panels page for XWiki instance.</li> 38 | * <li>Creates a panel - setting the title.</li> 39 | * <li>Completes the form with details for the newly created panel.</li> 40 | * <li>Goes to preview and pushes the button save and continue.</li> 41 | * <li>Completes the form and pushes the save&view button.</li> 42 | * <li>Goes back to panels list and check for the presence of the newly created panel.</li> 43 | * </ul> 44 | */ 45 | @Test 46 | public void testCreatePanel() 47 | { 48 | try { 49 | open("Panels", "WebHome"); 50 | setFieldValue("panelTitle", "Thesecondpaneltobecreated"); 51 | clickLinkWithXPath("//input[@value='Create']"); 52 | setFieldValue("Panels.PanelClass_0_description", "Tester panel"); 53 | setFieldValue("Panels.PanelClass_0_content", 54 | "{{velocity}}\n#panelheader(\"Test panel\")\nTest Panel\n#panelfooter()\n{{/velocity}}"); 55 | clickEditSaveAndView(); 56 | open("Panels", "WebHome"); 57 | assertElementPresent("//a[. = 'Thesecondpaneltobecreated']"); 58 | } finally { 59 | deletePage("Panels", "Thesecondpaneltobecreated"); 60 | } 61 | } 62 | 63 | /** 64 | * This method makes the following tests: 65 | * <ul> 66 | * <li>Opens the Panels page for XWiki instance.</li> 67 | * <li>Creates a panel - setting a title with special characters ('$&/\?#).</li> 68 | * <li>...Checking that no error occurred</li> 69 | * <li>Goes back to panels list and check for the presence of the newly created panel.</li> 70 | * </ul> 71 | */ 72 | @Test 73 | public void testCreatePanelWithSpecialSymbols() 74 | { 75 | String title = "Is # & \u0163 'triky\"? c:\\windows /root $util"; 76 | try { 77 | open("Panels", "WebHome"); 78 | setFieldValue("panelTitle", title); 79 | clickLinkWithXPath("//input[@value='Create']"); 80 | clickEditSaveAndView(); 81 | assertTextPresent(title); 82 | } finally { 83 | deletePage("Panels", title); 84 | } 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /xwiki-enterprise-test/xwiki-enterprise-test-ui/src/test/it/org/xwiki/test/ui/appwithinminutes/ApplicationsPanelEntryTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * See the NOTICE file distributed with this work for additional 3 | * information regarding copyright ownership. 4 | * 5 | * This is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU Lesser General Public License as 7 | * published by the Free Software Foundation; either version 2.1 of 8 | * the License, or (at your option) any later version. 9 | * 10 | * This software is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this software; if not, write to the Free 17 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 18 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 19 | */ 20 | package org.xwiki.test.ui.appwithinminutes; 21 | 22 | import java.util.HashMap; 23 | import java.util.Map; 24 | 25 | import org.junit.Assert; 26 | import org.junit.Before; 27 | import org.junit.Rule; 28 | import org.junit.Test; 29 | import org.xwiki.appwithinminutes.test.po.ApplicationHomeEditPage; 30 | import org.xwiki.panels.test.po.ApplicationsPanel; 31 | import org.xwiki.test.ui.AbstractTest; 32 | import org.xwiki.test.ui.AdminAuthenticationRule; 33 | import org.xwiki.test.ui.po.ViewPage; 34 | 35 | /** 36 | * Tests the applications panel entry. This test needs its own class because it needs to be in a separated space in the 37 | * wiki. In the other test classes we create one application per method, in the same space, which leads to duplicate 38 | * entries in the panel. 39 | * 40 | * @version $Id: 0f5a32b39ee152da07b8da821efb87836808e830 $ 41 | * @since 4.3RC1 42 | */ 43 | public class ApplicationsPanelEntryTest extends AbstractTest 44 | { 45 | @Rule 46 | public AdminAuthenticationRule adminAuthenticationRule = new AdminAuthenticationRule(getUtil()); 47 | 48 | /** 49 | * The page being tested. 50 | */ 51 | private ApplicationHomeEditPage editPage; 52 | 53 | /** 54 | * The query string parameters passed to the edit action. 55 | */ 56 | private final Map<String, String> editQueryStringParameters = new HashMap<String, String>(); 57 | 58 | @Before 59 | public void setUp() throws Exception 60 | { 61 | getUtil().rest().deletePage(getTestClassName(), getTestMethodName()); 62 | editQueryStringParameters.put("editor", "inline"); 63 | editQueryStringParameters.put("template", "AppWithinMinutes.LiveTableTemplate"); 64 | editQueryStringParameters.put("AppWithinMinutes.LiveTableClass_0_class", "XWiki.XWikiUsers"); 65 | getUtil().gotoPage(getTestClassName(), getTestMethodName(), "edit", editQueryStringParameters); 66 | editPage = new ApplicationHomeEditPage().waitUntilPageIsLoaded(); 67 | } 68 | 69 | @Test 70 | public void testApplicationPanelEntry() 71 | { 72 | // Test the icon remains the same between edits 73 | editPage.setIcon("icon:bell"); 74 | editPage.clickSaveAndView(); 75 | getUtil().gotoPage(getTestClassName(), getTestMethodName(), "edit"); 76 | Assert.assertEquals("icon:bell", editPage.getIcon()); 77 | 78 | ApplicationsPanel panel = ApplicationsPanel.gotoPage(); 79 | ViewPage page = panel.clickApplication(getTestClassName()); 80 | // Verify we're on the right page! 81 | Assert.assertEquals(getTestClassName(), page.getMetaDataValue("space")); 82 | Assert.assertEquals(getTestMethodName(), page.getMetaDataValue("page")); 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /xwiki-enterprise-test/xwiki-enterprise-test-webstandards/src/test/it/org/xwiki/test/webstandards/AllTests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * See the NOTICE file distributed with this work for additional 3 | * information regarding copyright ownership. 4 | * 5 | * This is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU Lesser General Public License as 7 | * published by the Free Software Foundation; either version 2.1 of 8 | * the License, or (at your option) any later version. 9 | * 10 | * This software is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this software; if not, write to the Free 17 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 18 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 19 | */ 20 | package org.xwiki.test.webstandards; 21 | 22 | import org.xwiki.test.integration.XWikiTestSetup; 23 | import org.xwiki.test.webstandards.framework.DefaultValidationTest; 24 | import org.xwiki.validator.HTML5Validator; 25 | import org.xwiki.validator.RSSValidator; 26 | import org.xwiki.validator.XWikiValidator; 27 | 28 | import junit.framework.Test; 29 | import junit.framework.TestCase; 30 | import junit.framework.TestSuite; 31 | 32 | /** 33 | * A class listing all the Functional tests to execute. We need such a class (rather than letting the JUnit Runner 34 | * discover the different TestCases classes by itself) because we want to start/stop XWiki before and after the tests 35 | * start (but only once). 36 | * 37 | * @version $Id: e582758e159cb92273a9e52d552244f6c5765151 $ 38 | */ 39 | public class AllTests extends TestCase 40 | { 41 | private static final String PATTERN = ".*" + System.getProperty("pattern", ""); 42 | 43 | public static Test suite() throws Exception 44 | { 45 | TestSuite suite = new TestSuite(); 46 | 47 | // TODO: I don't like listing tests here as it means we can add a new TestCase class and 48 | // forget to add it here and the tests won't be run but we'll not know about it and we'll 49 | // think the tests are all running fine. I haven't found a simple solution to this yet 50 | // (there are complex solutions like searching for all tests by parsing the source tree). 51 | // I think there are TestSuite that do this out there but I haven't looked for them yet. 52 | 53 | HTML5Validator html5Validator = new HTML5Validator(); 54 | addTest(suite, DefaultValidationTest.suite(DefaultValidationTest.class, html5Validator), 55 | DefaultValidationTest.class); 56 | 57 | CustomDutchWebGuidelinesValidator dwgValidator = new CustomDutchWebGuidelinesValidator(); 58 | addTest(suite, CustomDutchWebGuidelinesValidationTest.suite(CustomDutchWebGuidelinesValidationTest.class, 59 | dwgValidator), DefaultValidationTest.class); 60 | 61 | RSSValidator rssValidator = new RSSValidator(); 62 | addTest(suite, RSSValidationTest.suite(RSSValidationTest.class, rssValidator), RSSValidationTest.class); 63 | 64 | XWikiValidator xwikiValidator = new XWikiValidator(); 65 | addTest(suite, DefaultValidationTest.suite(DefaultValidationTest.class, xwikiValidator), 66 | DefaultValidationTest.class); 67 | 68 | return new XWikiTestSetup(suite); 69 | } 70 | 71 | private static void addTest(TestSuite suite, Test test, Class< ? > testClass) throws Exception 72 | { 73 | if (testClass.getName().matches(PATTERN)) { 74 | suite.addTest(test); 75 | } 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /xwiki-enterprise-test/xwiki-enterprise-test-webdav/pom.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | 3 | <!-- 4 | * See the NOTICE file distributed with this work for additional 5 | * information regarding copyright ownership. 6 | * 7 | * This is free software; you can redistribute it and/or modify it 8 | * under the terms of the GNU Lesser General Public License as 9 | * published by the Free Software Foundation; either version 2.1 of 10 | * the License, or (at your option) any later version. 11 | * 12 | * This software is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this software; if not, write to the Free 19 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 20 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 21 | --> 22 | 23 | <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> 24 | <modelVersion>4.0.0</modelVersion> 25 | <parent> 26 | <groupId>org.xwiki.enterprise</groupId> 27 | <artifactId>xwiki-enterprise-test</artifactId> 28 | <version>9.5-SNAPSHOT</version> 29 | </parent> 30 | <artifactId>xwiki-enterprise-test-webdav</artifactId> 31 | <name>XWiki Enterprise - Functional Tests - WebDAV</name> 32 | <packaging>pom</packaging> 33 | <description>XWiki Enterprise - Functional Tests - WebDAV</description> 34 | <dependencies> 35 | <dependency> 36 | <groupId>commons-httpclient</groupId> 37 | <artifactId>commons-httpclient</artifactId> 38 | </dependency> 39 | <dependency> 40 | <groupId>slide</groupId> 41 | <artifactId>webdavlib</artifactId> 42 | <version>2.1M1</version> 43 | </dependency> 44 | <dependency> 45 | <groupId>javax.servlet</groupId> 46 | <artifactId>javax.servlet-api</artifactId> 47 | </dependency> 48 | <dependency> 49 | <groupId>org.apache.jackrabbit</groupId> 50 | <artifactId>jackrabbit-jcr-server</artifactId> 51 | <version>1.4</version> 52 | </dependency> 53 | </dependencies> 54 | <build> 55 | <plugins> 56 | <!-- 57 | Step 1: Compile the JUnit WebDAV Tests and copy test resources 58 | files 59 | --> 60 | <plugin> 61 | <groupId>org.apache.maven.plugins</groupId> 62 | <artifactId>maven-compiler-plugin</artifactId> 63 | </plugin> 64 | <plugin> 65 | <groupId>org.apache.maven.plugins</groupId> 66 | <artifactId>maven-resources-plugin</artifactId> 67 | </plugin> 68 | <!-- 69 | Step 2: Create jar containing integration tests which will be 70 | installed 71 | --> 72 | <plugin> 73 | <groupId>org.apache.maven.plugins</groupId> 74 | <artifactId>maven-jar-plugin</artifactId> 75 | </plugin> 76 | <!-- Step 3: Unpack the application --> 77 | <plugin> 78 | <groupId>org.apache.maven.plugins</groupId> 79 | <artifactId>maven-dependency-plugin</artifactId> 80 | </plugin> 81 | <!-- Step 4: Start XWiki, Execute the tests and Stop XWiki --> 82 | <plugin> 83 | <groupId>org.apache.maven.plugins</groupId> 84 | <artifactId>maven-surefire-plugin</artifactId> 85 | <configuration> 86 | <!-- Display report on screen when all tests are completed --> 87 | <useFile>false</useFile> 88 | <reportFormat>plain</reportFormat> 89 | </configuration> 90 | </plugin> 91 | </plugins> 92 | </build> 93 | </project> 94 | -------------------------------------------------------------------------------- /xwiki-enterprise-web-legacydependencies/pom.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | 3 | <!-- 4 | * See the NOTICE file distributed with this work for additional 5 | * information regarding copyright ownership. 6 | * 7 | * This is free software; you can redistribute it and/or modify it 8 | * under the terms of the GNU Lesser General Public License as 9 | * published by the Free Software Foundation; either version 2.1 of 10 | * the License, or (at your option) any later version. 11 | * 12 | * This software is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this software; if not, write to the Free 19 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 20 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 21 | --> 22 | 23 | <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> 24 | <modelVersion>4.0.0</modelVersion> 25 | <parent> 26 | <groupId>org.xwiki.enterprise</groupId> 27 | <artifactId>xwiki-enterprise</artifactId> 28 | <version>9.5-SNAPSHOT</version> 29 | </parent> 30 | <artifactId>xwiki-enterprise-web-legacydependencies</artifactId> 31 | <name>XWiki Enterprise - Web - Legacy Dependencies</name> 32 | <packaging>pom</packaging> 33 | <description>The legacy dependencies of the WAR as a separate pom to be reusable in other distributions.</description> 34 | <properties> 35 | <!-- We have legacy dependencies on purpose --> 36 | <xwiki.enforcer.no-legacy-dependencies.skip>true</xwiki.enforcer.no-legacy-dependencies.skip> 37 | </properties> 38 | <dependencies> 39 | <!-- Platform dependencies --> 40 | <dependency> 41 | <groupId>org.xwiki.platform</groupId> 42 | <artifactId>xwiki-platform-distribution-war-legacydependencies</artifactId> 43 | <version>${platform.version}</version> 44 | <type>pom</type> 45 | </dependency> 46 | 47 | <!-- XE dependencies --> 48 | <dependency> 49 | <groupId>org.xwiki.enterprise</groupId> 50 | <artifactId>xwiki-enterprise-web-dependencies</artifactId> 51 | <version>${project.version}</version> 52 | <type>pom</type> 53 | <exclusions> 54 | <!-- Exclude transitive dependencies which are conflicting with legacy dependencies --> 55 | <!-- FIXME: not very nice having to repeat this here but could not find a simpler way --> 56 | <exclusion> 57 | <groupId>org.xwiki.commons</groupId> 58 | <artifactId>xwiki-commons-component-api</artifactId> 59 | </exclusion> 60 | <exclusion> 61 | <groupId>org.xwiki.commons</groupId> 62 | <artifactId>xwiki-commons-component-default</artifactId> 63 | </exclusion> 64 | <exclusion> 65 | <groupId>org.xwiki.rendering</groupId> 66 | <artifactId>xwiki-rendering-api</artifactId> 67 | </exclusion> 68 | <exclusion> 69 | <groupId>org.xwiki.platform</groupId> 70 | <artifactId>xwiki-platform-oldcore</artifactId> 71 | </exclusion> 72 | <exclusion> 73 | <groupId>org.xwiki.platform</groupId> 74 | <artifactId>xwiki-platform-office-importer</artifactId> 75 | </exclusion> 76 | <exclusion> 77 | <groupId>org.xwiki.platform</groupId> 78 | <artifactId>xwiki-platform-rendering-macro-include</artifactId> 79 | </exclusion> 80 | </exclusions> 81 | </dependency> 82 | </dependencies> 83 | </project> 84 | --------------------------------------------------------------------------------