Author: areshetnyak
Date: 2011-01-13 02:54:49 -0500 (Thu, 13 Jan 2011)
New Revision: 3797
Modified:
jcr/branches/1.12.x/applications/exo.jcr.applications.backupconsole.dist/bin/exobackup.cmd
jcr/branches/1.12.x/applications/exo.jcr.applications.backupconsole.dist/bin/exobackup.sh
jcr/branches/1.12.x/applications/exo.jcr.applications.backupconsole.dist/src/main/doc/readme.txt
jcr/branches/1.12.x/applications/exo.jcr.applications.backupconsole/src/main/java/org/exoplatform/jcr/backupconsole/BackupClientImpl.java
jcr/branches/1.12.x/applications/exo.jcr.applications.backupconsole/src/main/java/org/exoplatform/jcr/backupconsole/BackupConsole.java
jcr/branches/1.12.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/backup/backup-client.xml
Log:
JCR-1564: The problem with form authentication on Platform 3.0.2 was fixed.
Modified:
jcr/branches/1.12.x/applications/exo.jcr.applications.backupconsole/src/main/java/org/exoplatform/jcr/backupconsole/BackupClientImpl.java
===================================================================
---
jcr/branches/1.12.x/applications/exo.jcr.applications.backupconsole/src/main/java/org/exoplatform/jcr/backupconsole/BackupClientImpl.java 2011-01-13
07:40:37 UTC (rev 3796)
+++
jcr/branches/1.12.x/applications/exo.jcr.applications.backupconsole/src/main/java/org/exoplatform/jcr/backupconsole/BackupClientImpl.java 2011-01-13
07:54:49 UTC (rev 3797)
@@ -696,8 +696,7 @@
String result =
"\nThe backup service information : \n" + "\tfull backup
type : "
- + info.getFullBackupType()
- + "\n" + "\tincremental backup type : "
+ + info.getFullBackupType() + "\n" +
"\tincremental backup type : "
+ info.getIncrementalBackupType() + "\n" +
"\tbackup log folder : "
+ info.getBackupLogDir() + "\n" + "\tdefault
incremental job period : "
+ info.getDefaultIncrementalJobPeriod() + "\n\n";
Modified:
jcr/branches/1.12.x/applications/exo.jcr.applications.backupconsole/src/main/java/org/exoplatform/jcr/backupconsole/BackupConsole.java
===================================================================
---
jcr/branches/1.12.x/applications/exo.jcr.applications.backupconsole/src/main/java/org/exoplatform/jcr/backupconsole/BackupConsole.java 2011-01-13
07:40:37 UTC (rev 3796)
+++
jcr/branches/1.12.x/applications/exo.jcr.applications.backupconsole/src/main/java/org/exoplatform/jcr/backupconsole/BackupConsole.java 2011-01-13
07:54:49 UTC (rev 3797)
@@ -65,7 +65,7 @@
+ " <form auth parm> : form <method>
<form path>\n"
+ " <method> : POST or GET\n"
+ " <form path> :
/path/path?<paramName1>=<paramValue1>&<paramName2>=<paramValue2>...\n"
- + " Example to <url form authentication> :
http://127.0.0.1:8080/portal/rest form POST
\"/portal/login?username=root&password=gtn\"\n\n"
+ + " Example to <url form authentication> :
http://127.0.0.1:8080/portal/rest form POST
\"/portal/login?initialURI=/portal/private&username=root&password=gtn\"\n\n"
+ " <cmd> : start <repo[/ws]> <backup_dir>
[<incr>] \n"
+ " stop <backup_id> \n"
Modified:
jcr/branches/1.12.x/applications/exo.jcr.applications.backupconsole.dist/bin/exobackup.cmd
===================================================================
---
jcr/branches/1.12.x/applications/exo.jcr.applications.backupconsole.dist/bin/exobackup.cmd 2011-01-13
07:40:37 UTC (rev 3796)
+++
jcr/branches/1.12.x/applications/exo.jcr.applications.backupconsole.dist/bin/exobackup.cmd 2011-01-13
07:54:49 UTC (rev 3797)
@@ -1,6 +1,7 @@
@echo off
set auth=-b
+set context=portal
if NOT "%1" == "-u" goto :help
shift
@@ -17,6 +18,12 @@
set auth=%1
shift
)
+if "%1" == "-c" (
+shift
+set context=%2
+shift
+)
+
if "%1" == "-b" (
shift
)
@@ -46,7 +53,7 @@
jcrbackup http://%user%:%pass%@%host%/rest/private %comm%
)
if "%auth%" == "-f" (
-jcrbackup http://%host%/portal/rest form POST
/portal/login?username=%user%^^^&password=%pass% %comm%
+jcrbackup http://%host%/%context%/rest form POST
/%context%/login?initialURI=/%context%/private^^^&username=%user%^^^&password=%pass%
%comm%
)
@@ -55,8 +62,10 @@
echo -u ^<user^> -p ^<password^> [form_of_authentication]
^<host:port^> ^<command^>
echo.
echo [form_of_authentication] : -b - is used for basic authentication
-echo -f - is used for form authentication
+echo : -f [-c ^<context^>] - is used for form
authentication with context portal
+echo if parameter context not specified
echo if no authentication set basic
authentication is used
+echo -c ^<context^> : context, by default context is
portal
echo.
echo ^<command^> : start ^<repo[/ws]^>
^<backup_dir^> [^<incr^>]
echo stop ^<backup_id^>
Modified:
jcr/branches/1.12.x/applications/exo.jcr.applications.backupconsole.dist/bin/exobackup.sh
===================================================================
---
jcr/branches/1.12.x/applications/exo.jcr.applications.backupconsole.dist/bin/exobackup.sh 2011-01-13
07:40:37 UTC (rev 3796)
+++
jcr/branches/1.12.x/applications/exo.jcr.applications.backupconsole.dist/bin/exobackup.sh 2011-01-13
07:54:49 UTC (rev 3797)
@@ -7,8 +7,9 @@
echo " -u <user> -p <password> [form_of_authentication]
<host:port> <command> "
echo " "
echo " [form_of_authentication] : -b - is used for basic authentication
"
-echo " -f - is used for form authentication
"
+echo " -f [-c <context>] - is used for
form authentication with context portal if parameter context not specified "
echo " if no authentication set basic
authentication is used"
+echo " -c <context> : context, by default context is
portal"
echo " <command> : start <repo[/ws]>
<backup_dir> [<incr>] "
echo " stop <backup_id> "
echo " status <backup_id> "
@@ -45,8 +46,18 @@
if [ "$5" = "-f" ]
then
- host=${6#*"http://"}
- newargs="http://$host/portal/rest form POST
/portal/login?username=$user&password=$pass ${args[@]:6}"
+
+ if [ "$6" = "-c" ]
+ then
+ context="$7"
+ host=${8#*"http://"}
+ newargs="http://$host/$context/rest form POST
/$context/login?initialURI=/$context/private&username=$user&password=$pass
${args[@]:8}"
+ else
+ context="portal"
+ host=${6#*"http://"}
+ newargs="http://$host/$context/rest form POST
/$context/login?initialURI=/$context/private&username=$user&password=$pass
${args[@]:6}"
+ fi
+
else
if [ "$5" = "-b" ]
then
Modified:
jcr/branches/1.12.x/applications/exo.jcr.applications.backupconsole.dist/src/main/doc/readme.txt
===================================================================
---
jcr/branches/1.12.x/applications/exo.jcr.applications.backupconsole.dist/src/main/doc/readme.txt 2011-01-13
07:40:37 UTC (rev 3796)
+++
jcr/branches/1.12.x/applications/exo.jcr.applications.backupconsole.dist/src/main/doc/readme.txt 2011-01-13
07:54:49 UTC (rev 3797)
@@ -9,7 +9,7 @@
<method> : POST or GET
<form_path> :
/path/path?<paramName1>=<paramValue1>&<paramName2>=<paramValue2>...
- Example of <url_form_authentication> -
http://127.0.0.1:8080/portal/rest
form POST "/portal/login?username=root&password=gtn"
+ Example of <url_form_authentication> -
http://127.0.0.1:8080/portal/rest
form POST
"/portal/login?initialURI=/portal/private&username=root&password=gtn"
<command> : start <repo[/ws]> <backup_dir>
[<incr>]
stop <backup_id>
@@ -46,8 +46,9 @@
-u <user> -p <password> [form_of_authentication] <host:port>
<command>
<form_of_authentication> : -b - is used for basic authentication
- -f - is used for form authentication
+ -f [-c <context>] - is used for form
authentication with context portal if parameter context not specified
if no authentication set basic authentication is
used
+ -c <context> : context, by default context is portal
<command> : start <repo[/ws]> <backup_dir>
[<incr>]
stop <backup_id>
Modified:
jcr/branches/1.12.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/backup/backup-client.xml
===================================================================
---
jcr/branches/1.12.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/backup/backup-client.xml 2011-01-13
07:40:37 UTC (rev 3796)
+++
jcr/branches/1.12.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/backup/backup-client.xml 2011-01-13
07:54:49 UTC (rev 3797)
@@ -982,7 +982,8 @@
command "info" with form authentication to GateIn :</para>
<para>./jcrbackup.sh
http://127.0.0.1:8080/portal/rest form POST
- "/portal/login?username=root&password=gtn" info</para>
+
"/portal/login?initialURI=/portal/private&username=root&password=gtn"
+ info</para>
</highlights>
<para>Backup client is console application.</para>
@@ -999,7 +1000,7 @@
<form auth parm> : form <method> <form
path>
<method> : POST or GET
<form path> :
/path/path?<paramName1>=<paramValue1>&<paramName2>=<paramValue2>...
- Example to <url form authentication> :
http://127.0.0.1:8080/portal/rest form POST
"/portal/login?username=root&password=gtn"
+ Example to <url form authentication> :
http://127.0.0.1:8080/portal/rest form POST
"/portal/login?initialURI=/portal/private&username=root&password=gtn"
<cmd> : start <repo[/ws]> <backup_dir>
[<incr>]
stop <backup_id>
@@ -1281,7 +1282,7 @@
</section>
<section>
- <title>Restoring workspace with original configuation </title>
+ <title>Restoring workspace with original configuation</title>
<para>Restore to workspace "backup" with original configuration of
workspace (the original configuration was stored in backup set), for