exo-jcr SVN: r2716 - kernel/trunk/exo.kernel.commons.test/src/main/java/org/exoplatform/commons/test.
by do-not-reply@jboss.org
Author: tolusha
Date: 2010-06-29 10:58:20 -0400 (Tue, 29 Jun 2010)
New Revision: 2716
Modified:
kernel/trunk/exo.kernel.commons.test/src/main/java/org/exoplatform/commons/test/TestSecurityManager.java
Log:
EXOJCR-758: remove log.error() from TestSecurityManager
Modified: kernel/trunk/exo.kernel.commons.test/src/main/java/org/exoplatform/commons/test/TestSecurityManager.java
===================================================================
--- kernel/trunk/exo.kernel.commons.test/src/main/java/org/exoplatform/commons/test/TestSecurityManager.java 2010-06-29 14:36:32 UTC (rev 2715)
+++ kernel/trunk/exo.kernel.commons.test/src/main/java/org/exoplatform/commons/test/TestSecurityManager.java 2010-06-29 14:58:20 UTC (rev 2716)
@@ -115,7 +115,8 @@
return;
}
- LOG.error("Check permission failed", se);
+ // Only for test purpose
+ // LOG.error("Check permission failed", se);
throw se;
}
}
14 years
exo-jcr SVN: r2715 - jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/config.
by do-not-reply@jboss.org
Author: dkatayev
Date: 2010-06-29 10:36:32 -0400 (Tue, 29 Jun 2010)
New Revision: 2715
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/config/JDBCConfigurationPersister.java
Log:
EXOJCR-794 Type of the field "CONFIG" in the table "JCR_CONFIG" changed from BLOB to LONGBLOB to be able to hold more than 65k bytes.
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/config/JDBCConfigurationPersister.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/config/JDBCConfigurationPersister.java 2010-06-29 13:01:48 UTC (rev 2714)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/config/JDBCConfigurationPersister.java 2010-06-29 14:36:32 UTC (rev 2715)
@@ -180,6 +180,10 @@
configTableName = configTableName.toUpperCase().toLowerCase(); // ingres needs it
binType = "LONG BYTE";
}
+ else if (DBConstants.DB_DIALECT_MYSQL.equalsIgnoreCase(dialect)
+ || DBConstants.DB_DIALECT_MYSQL_UTF8.equalsIgnoreCase(dialect)) {
+ binType = "LONGBLOB";
+ }
this.initSQL =
"CREATE TABLE " + configTableName + " (" + "NAME VARCHAR(64) NOT NULL, " + "CONFIG " + binType + " NOT NULL, "
14 years
exo-jcr SVN: r2714 - ws/branches/2.1.x/exo.ws.commons/src/main/java/org/exoplatform/common/http/client.
by do-not-reply@jboss.org
Author: aparfonov
Date: 2010-06-29 09:01:48 -0400 (Tue, 29 Jun 2010)
New Revision: 2714
Modified:
ws/branches/2.1.x/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/HTTPResponse.java
Log:
EXOJCR-800: restore to previous revision
Modified: ws/branches/2.1.x/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/HTTPResponse.java
===================================================================
--- ws/branches/2.1.x/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/HTTPResponse.java 2010-06-29 12:43:00 UTC (rev 2713)
+++ ws/branches/2.1.x/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/HTTPResponse.java 2010-06-29 13:01:48 UTC (rev 2714)
@@ -128,11 +128,14 @@
this.timeout = timeout;
try
{
- this.OriginalURI = new URI(orig.getRequestURI());
+ int qp = orig.getRequestURI().indexOf('?');
+ this.OriginalURI =
+ new URI(orig.getConnection().getProtocol(), null, orig.getConnection().getHost(), orig.getConnection()
+ .getPort(), qp < 0 ? orig.getRequestURI() : orig.getRequestURI().substring(0, qp), qp < 0 ? null : orig
+ .getRequestURI().substring(qp + 1), null);
}
catch (ParseException pe)
{
- log.error("Error while create OriginalURI from request URI sring representation: " + pe.getMessage());
}
this.method = orig.getMethod();
}
14 years
exo-jcr SVN: r2713 - ws/branches/2.1.x/exo.ws.rest.ext/src/main/java/org/exoplatform/services/rest/ext/proxy.
by do-not-reply@jboss.org
Author: dkatayev
Date: 2010-06-29 08:43:00 -0400 (Tue, 29 Jun 2010)
New Revision: 2713
Modified:
ws/branches/2.1.x/exo.ws.rest.ext/src/main/java/org/exoplatform/services/rest/ext/proxy/BaseConnector.java
Log:
EXOJCR-797 resp.getText replaced with resp.getData().
Modified: ws/branches/2.1.x/exo.ws.rest.ext/src/main/java/org/exoplatform/services/rest/ext/proxy/BaseConnector.java
===================================================================
--- ws/branches/2.1.x/exo.ws.rest.ext/src/main/java/org/exoplatform/services/rest/ext/proxy/BaseConnector.java 2010-06-29 10:48:18 UTC (rev 2712)
+++ ws/branches/2.1.x/exo.ws.rest.ext/src/main/java/org/exoplatform/services/rest/ext/proxy/BaseConnector.java 2010-06-29 12:43:00 UTC (rev 2713)
@@ -79,7 +79,7 @@
if (resp.getStatusCode() >= 300)
{
LOG.error("Received Error: " + resp.getReasonLine());
- LOG.error(resp.getText());
+ LOG.error(new String(resp.getData()));
}
return resp;
}
@@ -105,7 +105,7 @@
if (resp.getStatusCode() >= 300)
{
LOG.error("Received Error: " + resp.getReasonLine());
- LOG.error(resp.getText());
+ LOG.error(new String(resp.getData()));
}
return resp;
}
@@ -131,7 +131,7 @@
if (resp.getStatusCode() >= 300)
{
LOG.error("Received Error: " + resp.getReasonLine());
- LOG.error(resp.getText());
+ LOG.error(new String(resp.getData()));
}
return resp;
}
@@ -154,7 +154,7 @@
if (resp.getStatusCode() >= 300)
{
LOG.error("Received Error: " + resp.getReasonLine());
- LOG.error(resp.getText());
+ LOG.error(new String(resp.getData()));
}
return resp;
}
14 years
exo-jcr SVN: r2712 - in ws/branches/2.1.x: exo.ws.rest.ext/src/main/java/org/exoplatform/services/rest/ext/proxy and 1 other directory.
by do-not-reply@jboss.org
Author: aparfonov
Date: 2010-06-29 06:48:18 -0400 (Tue, 29 Jun 2010)
New Revision: 2712
Modified:
ws/branches/2.1.x/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/AuthorizationInfo.java
ws/branches/2.1.x/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/HTTPResponse.java
ws/branches/2.1.x/exo.ws.rest.ext/src/main/java/org/exoplatform/services/rest/ext/proxy/ProxyService.java
Log:
EXOJCR-800
Modified: ws/branches/2.1.x/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/AuthorizationInfo.java
===================================================================
--- ws/branches/2.1.x/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/AuthorizationInfo.java 2010-06-29 10:35:54 UTC (rev 2711)
+++ ws/branches/2.1.x/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/AuthorizationInfo.java 2010-06-29 10:48:18 UTC (rev 2712)
@@ -26,7 +26,7 @@
*
* The HTTPClient's home page is located at:
*
- * http://www.innovation.ch/java/HTTPClient/
+ * http://www.innovation.ch/java/HTTPClient/
*
*/
@@ -54,18 +54,18 @@
* used by the "Basic" scheme and derivatives, and the one used by the "Digest"
* scheme and derivatives. The first form contains just the the scheme and a
* "cookie":
- *
+ *
* <PRE>
* Authorization: Basic aGVsbG86d29ybGQ=
* </PRE>
- *
+ *
* The second form contains the scheme followed by a number of parameters in the
* form of name=value pairs:
- *
+ *
* <PRE>
* Authorization: Digest username="hello", realm="test", nonce="42", ...
* </PRE>
- *
+ *
* The two fields "cookie" and "params" correspond to these two forms. <A
* HREF="#toString()">toString()</A> is used by the AuthorizationModule when
* generating the Authorization header and will format the info accordingly.
@@ -85,6 +85,7 @@
* methods manipulate and query an internal list of AuthorizationInfo instances.
* There can be only one instance per host, port, scheme, and realm combination
* (see <A HREF="#equals">equals()</A>).
+ *
* @version 0.3-3 06/05/2001
* @author Ronald Tschal�r
* @since V0.1
@@ -113,8 +114,8 @@
private int port;
/**
- * the scheme. (e.g. "Basic") Note: don't lowercase because some buggy servers
- * use a case-sensitive match
+ * the scheme. (e.g. "Basic") Note: don't lowercase because some buggy
+ * servers use a case-sensitive match
*/
private String scheme;
@@ -140,6 +141,7 @@
/**
* Creates an new info structure for the specified host and port.
+ *
* @param host the host
* @param port the port
*/
@@ -152,6 +154,7 @@
/**
* Creates a new info structure for the specified host and port with the
* specified scheme, realm, params. The cookie is set to null.
+ *
* @param host the host
* @param port the port
* @param scheme the scheme
@@ -177,13 +180,14 @@
* Creates a new info structure for the specified host and port with the
* specified scheme, realm and cookie. The params is set to a zero-length
* array, and the extra_info is set to null.
+ *
* @param host the host
* @param port the port
* @param scheme the scheme
* @param realm the realm
* @param cookie for the "Basic" scheme this is the base64-encoded
- * username/password; for the "NTLM" scheme this is the
- * base64-encoded username/password message.
+ * username/password; for the "NTLM" scheme this is the base64-encoded
+ * username/password message.
*/
public AuthorizationInfo(String host, int port, String scheme, String realm, String cookie)
{
@@ -199,6 +203,7 @@
/**
* Creates a new copy of the given AuthorizationInfo.
+ *
* @param templ the info to copy
*/
AuthorizationInfo(AuthorizationInfo templ)
@@ -217,10 +222,10 @@
// Class Methods
/**
- * Set's the authorization handler. This handler is called whenever the server
- * requests authorization and no entry for the requested scheme and realm can
- * be found in the list. The handler must implement the AuthorizationHandler
- * interface.
+ * Set's the authorization handler. This handler is called whenever the
+ * server requests authorization and no entry for the requested scheme and
+ * realm can be found in the list. The handler must implement the
+ * AuthorizationHandler interface.
* <P>
* If no handler is set then a {@link DefaultAuthHandler default handler} is
* used. This handler currently only handles the "Basic" and "Digest" schemes
@@ -228,6 +233,7 @@
* <P>
* The default handler can be disabled by setting the auth handler to
* <var>null</var>.
+ *
* @param handler the new authorization handler
* @return the old authorization handler
* @see AuthorizationHandler
@@ -242,6 +248,7 @@
/**
* Get's the current authorization handler.
+ *
* @return the current authorization handler, or null if none is set.
* @see AuthorizationHandler
*/
@@ -253,6 +260,7 @@
/**
* Searches for the authorization info using the given host, port, scheme and
* realm. The context is the default context.
+ *
* @param host the host
* @param port the port
* @param scheme the scheme
@@ -267,6 +275,7 @@
/**
* Searches for the authorization info in the given context using the given
* host, port, scheme and realm.
+ *
* @param host the host
* @param port the port
* @param scheme the scheme
@@ -287,13 +296,15 @@
/**
* Queries the AuthHandler for authorization info. It also adds this info to
* the list.
- * @param auth_info any info needed by the AuthHandler; at a minimum the host,
- * scheme and realm should be set.
+ *
+ * @param auth_info any info needed by the AuthHandler; at a minimum the
+ * host, scheme and realm should be set.
* @param req the request which initiated this query
* @param resp the full response
* @return a structure containing the requested info, or null if either no
* AuthHandler is set or the user canceled the request.
- * @exception AuthSchemeNotImplException if this is thrown by the AuthHandler.
+ * @exception AuthSchemeNotImplException if this is thrown by the
+ * AuthHandler.
*/
static AuthorizationInfo queryAuthHandler(AuthorizationInfo auth_info, RoRequest req, RoResponse resp)
throws AuthSchemeNotImplException, IOException
@@ -317,6 +328,7 @@
* Searches for the authorization info using the host, port, scheme and realm
* from the given info struct. If not found it queries the AuthHandler (if
* set).
+ *
* @param auth_info the AuthorizationInfo
* @param req the request which initiated this query
* @param resp the full response
@@ -335,6 +347,11 @@
AuthorizationInfo new_info = (AuthorizationInfo)AuthList.get(auth_info);
+ if (new_info == null)
+ new_info =
+ (AuthorizationInfo)AuthList.get(new AuthorizationInfo(auth_info.getHost(), auth_info.getPort(), auth_info
+ .getScheme(), null, auth_info.getParams(), auth_info.getExtraInfo()));
+
if (new_info == null && query_auth_h)
new_info = queryAuthHandler(auth_info, req, resp);
@@ -344,6 +361,7 @@
/**
* Searches for the authorization info given a host, port, scheme and realm.
* Queries the AuthHandler if not found in list.
+ *
* @param host the host
* @param port the port
* @param scheme the scheme
@@ -363,8 +381,9 @@
/**
* Adds an authorization entry to the list using the default context. If an
- * entry for the specified scheme and realm already exists then its cookie and
- * params are replaced with the new data.
+ * entry for the specified scheme and realm already exists then its cookie
+ * and params are replaced with the new data.
+ *
* @param auth_info the AuthorizationInfo to add
*/
public static void addAuthorization(AuthorizationInfo auth_info)
@@ -376,6 +395,7 @@
* Adds an authorization entry to the list. If an entry for the specified
* scheme and realm already exists then its cookie and params are replaced
* with the new data.
+ *
* @param auth_info the AuthorizationInfo to add
* @param context the context to associate this info with
*/
@@ -403,8 +423,9 @@
/**
* Adds an authorization entry to the list using the default context. If an
- * entry for the specified scheme and realm already exists then its cookie and
- * params are replaced with the new data.
+ * entry for the specified scheme and realm already exists then its cookie
+ * and params are replaced with the new data.
+ *
* @param host the host
* @param port the port
* @param scheme the scheme
@@ -423,6 +444,7 @@
* Adds an authorization entry to the list. If an entry for the specified
* scheme and realm already exists then its cookie and params are replaced
* with the new data.
+ *
* @param host the host
* @param port the port
* @param scheme the scheme
@@ -447,6 +469,7 @@
* Adds an authorization entry for the "Basic" authorization scheme to the
* list using the default context. If an entry already exists for the "Basic"
* scheme and the specified realm then it is overwritten.
+ *
* @param host the host
* @param port the port
* @param realm the realm
@@ -462,6 +485,7 @@
* Adds an authorization entry for the "Basic" authorization scheme to the
* list. If an entry already exists for the "Basic" scheme and the specified
* realm then it is overwritten.
+ *
* @param host the host
* @param port the port
* @param realm the realm
@@ -478,8 +502,9 @@
/**
* Adds an authorization entry for the "Digest" authorization scheme to the
- * list using the default context. If an entry already exists for the "Digest"
- * scheme and the specified realm then it is overwritten.
+ * list using the default context. If an entry already exists for the
+ * "Digest" scheme and the specified realm then it is overwritten.
+ *
* @param host the host
* @param port the port
* @param realm the realm
@@ -495,6 +520,7 @@
* Adds an authorization entry for the "Digest" authorization scheme to the
* list. If an entry already exists for the "Digest" scheme and the specified
* realm then it is overwritten.
+ *
* @param host the host
* @param port the port
* @param realm the realm
@@ -538,6 +564,7 @@
* Removes an authorization entry from the list using the default context. If
* no entry for the specified host, port, scheme and realm exists then this
* does nothing.
+ *
* @param auth_info the AuthorizationInfo to remove
*/
public static void removeAuthorization(AuthorizationInfo auth_info)
@@ -546,8 +573,9 @@
}
/**
- * Removes an authorization entry from the list. If no entry for the specified
- * host, port, scheme and realm exists then this does nothing.
+ * Removes an authorization entry from the list. If no entry for the
+ * specified host, port, scheme and realm exists then this does nothing.
+ *
* @param auth_info the AuthorizationInfo to remove
* @param context the context this info is associated with
*/
@@ -561,6 +589,7 @@
* Removes an authorization entry from the list using the default context. If
* no entry for the specified host, port, scheme and realm exists then this
* does nothing.
+ *
* @param host the host
* @param port the port
* @param scheme the scheme
@@ -572,8 +601,9 @@
}
/**
- * Removes an authorization entry from the list. If no entry for the specified
- * host, port, scheme and realm exists then this does nothing.
+ * Removes an authorization entry from the list. If no entry for the
+ * specified host, port, scheme and realm exists then this does nothing.
+ *
* @param host the host
* @param port the port
* @param scheme the scheme
@@ -587,9 +617,10 @@
/**
* Tries to find the candidate in the current list of auth info for the given
- * request. The paths associated with each auth info are examined, and the one
- * with either the nearest direct parent or child is chosen. This is used for
- * preemptively sending auth info.
+ * request. The paths associated with each auth info are examined, and the
+ * one with either the nearest direct parent or child is chosen. This is used
+ * for preemptively sending auth info.
+ *
* @param req the Request
* @return an AuthorizationInfo containing the info for the best match, or
* null if none found.
@@ -675,6 +706,7 @@
/**
* Adds the path from the given resource to our path list. The path list is
* used for deciding when to preemptively send auth info.
+ *
* @param resource the resource from which to extract the path
*/
public synchronized void addPath(String resource)
@@ -692,11 +724,12 @@
}
/**
- * Parses the authentication challenge(s) into an array of new info structures
- * for the specified host and port.
- * @param challenge a string containing authentication info. This must have the
- * same format as value part of a WWW-authenticate response header
- * field, and may contain multiple authentication challenges.
+ * Parses the authentication challenge(s) into an array of new info
+ * structures for the specified host and port.
+ *
+ * @param challenge a string containing authentication info. This must have
+ * the same format as value part of a WWW-authenticate response header
+ * field, and may contain multiple authentication challenges.
* @param req the original request.
* @exception ProtocolException if any error during the parsing occurs.
*/
@@ -887,6 +920,7 @@
/**
* Get the host.
+ *
* @return a string containing the host name.
*/
public final String getHost()
@@ -896,6 +930,7 @@
/**
* Get the port.
+ *
* @return an int containing the port number.
*/
public final int getPort()
@@ -905,6 +940,7 @@
/**
* Get the scheme.
+ *
* @return a string containing the scheme.
*/
public final String getScheme()
@@ -914,6 +950,7 @@
/**
* Get the realm.
+ *
* @return a string containing the realm.
*/
public final String getRealm()
@@ -923,6 +960,7 @@
/**
* Get the cookie
+ *
* @return the cookie String
* @since V0.3-1
*/
@@ -933,6 +971,7 @@
/**
* Set the cookie
+ *
* @param cookie the new cookie
* @since V0.3-1
*/
@@ -943,6 +982,7 @@
/**
* Get the authentication parameters.
+ *
* @return an array of name/value pairs.
*/
public final NVPair[] getParams()
@@ -952,6 +992,7 @@
/**
* Set the authentication parameters.
+ *
* @param an array of name/value pairs.
*/
public final void setParams(NVPair[] params)
@@ -964,6 +1005,7 @@
/**
* Get the extra info.
+ *
* @return the extra_info object
*/
public final Object getExtraInfo()
@@ -973,6 +1015,7 @@
/**
* Set the extra info.
+ *
* @param info the extra info
*/
public final void setExtraInfo(Object info)
@@ -983,6 +1026,7 @@
/**
* Constructs a string containing the authorization info. The format is that
* of the http Authorization header.
+ *
* @return a String containing all info.
*/
public String toString()
@@ -1025,6 +1069,7 @@
* Produces a hash code based on host, scheme and realm. Port is not included
* for simplicity (and because it probably won't make much difference). Used
* in the AuthorizationInfo.AuthList hash table.
+ *
* @return the hash code
*/
public int hashCode()
@@ -1033,10 +1078,11 @@
}
/**
- * Two AuthorizationInfos are considered equal if their host, port, scheme and
- * realm match. Used in the AuthorizationInfo.AuthList hash table.
+ * Two AuthorizationInfos are considered equal if their host, port, scheme
+ * and realm match. Used in the AuthorizationInfo.AuthList hash table.
+ *
* @param obj another AuthorizationInfo against which this one is to be
- * compared.
+ * compared.
* @return true if they match in the above mentioned fields; false otherwise.
*/
public boolean equals(Object obj)
@@ -1045,7 +1091,7 @@
{
AuthorizationInfo auth = (AuthorizationInfo)obj;
if (host.equals(auth.host) && (port == auth.port) && scheme.equalsIgnoreCase(auth.scheme)
- && realm.equals(auth.realm))
+ && ((realm == null && auth.realm == null) || (realm != null && realm.equals(auth.realm))))
return true;
}
return false;
Modified: ws/branches/2.1.x/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/HTTPResponse.java
===================================================================
--- ws/branches/2.1.x/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/HTTPResponse.java 2010-06-29 10:35:54 UTC (rev 2711)
+++ ws/branches/2.1.x/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/HTTPResponse.java 2010-06-29 10:48:18 UTC (rev 2712)
@@ -128,14 +128,11 @@
this.timeout = timeout;
try
{
- int qp = orig.getRequestURI().indexOf('?');
- this.OriginalURI =
- new URI(orig.getConnection().getProtocol(), null, orig.getConnection().getHost(), orig.getConnection()
- .getPort(), qp < 0 ? orig.getRequestURI() : orig.getRequestURI().substring(0, qp), qp < 0 ? null : orig
- .getRequestURI().substring(qp + 1), null);
+ this.OriginalURI = new URI(orig.getRequestURI());
}
catch (ParseException pe)
{
+ log.error("Error while create OriginalURI from request URI sring representation: " + pe.getMessage());
}
this.method = orig.getMethod();
}
Modified: ws/branches/2.1.x/exo.ws.rest.ext/src/main/java/org/exoplatform/services/rest/ext/proxy/ProxyService.java
===================================================================
--- ws/branches/2.1.x/exo.ws.rest.ext/src/main/java/org/exoplatform/services/rest/ext/proxy/ProxyService.java 2010-06-29 10:35:54 UTC (rev 2711)
+++ ws/branches/2.1.x/exo.ws.rest.ext/src/main/java/org/exoplatform/services/rest/ext/proxy/ProxyService.java 2010-06-29 10:48:18 UTC (rev 2712)
@@ -18,11 +18,27 @@
*/
package org.exoplatform.services.rest.ext.proxy;
+import org.exoplatform.common.http.client.HTTPConnection;
+import org.exoplatform.common.http.client.HTTPResponse;
+import org.exoplatform.common.http.client.HttpOutputStream;
+import org.exoplatform.common.http.client.ModuleException;
+import org.exoplatform.common.http.client.NVPair;
+import org.exoplatform.common.http.client.ProtocolNotSuppException;
+import org.exoplatform.services.log.ExoLogger;
+import org.exoplatform.services.log.Log;
+import org.exoplatform.services.rest.resource.ResourceContainer;
+
import java.io.IOException;
+import java.io.InputStream;
import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Collections;
import java.util.Enumeration;
+import java.util.List;
+import java.util.Set;
+import java.util.Map.Entry;
-import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
@@ -31,15 +47,12 @@
import javax.ws.rs.QueryParam;
import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.Context;
+import javax.ws.rs.core.HttpHeaders;
+import javax.ws.rs.core.MultivaluedMap;
import javax.ws.rs.core.Response;
+import javax.ws.rs.core.UriInfo;
import javax.ws.rs.core.Response.ResponseBuilder;
-import org.exoplatform.common.http.client.HTTPResponse;
-import org.exoplatform.common.http.client.ModuleException;
-import org.exoplatform.common.http.client.ParseException;
-import org.exoplatform.common.http.client.ProtocolNotSuppException;
-import org.exoplatform.services.rest.resource.ResourceContainer;
-
/**
* @author <a href="mailto:max.shaposhnik@exoplatform.com">Max Shaposhnik</a>
* @version $Id$
@@ -47,25 +60,42 @@
@Path("proxy")
public class ProxyService implements ResourceContainer
{
- /**
- * Handles GET proxy request.
- *
- * @param httpRequestHttpServletRequest
- * @param url the url to request
- * @return response Response
- */
- @GET
- public Response doProxyGet(@Context HttpServletRequest httpRequest, @QueryParam("url") String url)
+ protected static final int DEFAULT_CONNECT_TIMEOUT_MS = 5000;
+
+ private static final Log LOG = ExoLogger.getLogger(ProxyService.class);
+
+ @DELETE
+ public Response doProxyDelete(@Context HttpHeaders headers, @Context UriInfo uriInfo,
+ @QueryParam("url") String urlParam)
{
- BaseConnector conn = new BaseConnector();
- if (url == null)
+ if (urlParam == null)
{
- Throwable e = new Throwable("Necessary URL parameter not found in proxy request");
+ IllegalArgumentException e = new IllegalArgumentException("'url' parameter not found in proxy request");
throw new WebApplicationException(e, createErrorResponse(e, 404));
}
try
{
- HTTPResponse resp = conn.fetchGet(httpRequest, url);
+ URL url = new URL(urlParam);
+ HTTPConnection conn = new HTTPConnection(url);
+ conn.setTimeout(DEFAULT_CONNECT_TIMEOUT_MS);
+ NVPair[] headerPairs =
+ toNVPair(headers.getRequestHeaders(), Collections.singleton(HttpHeaders.HOST.toLowerCase()));
+ conn.setAllowUserInteraction(false);
+ NVPair credentials = getCredentials(url);
+ if (credentials != null)
+ {
+ conn.addBasicAuthorization(null, credentials.getName(), credentials.getValue());
+ }
+ HTTPResponse resp = conn.Delete(url.getFile(), headerPairs);
+ if (resp.getStatusCode() >= 300)
+ {
+ LOG.warn("DELETE Received : " + resp.getReasonLine());
+ byte[] data = resp.getData();
+ if (data != null)
+ {
+ LOG.warn("DELETE Received : " + new String(data));
+ }
+ }
return createResponse(resp);
}
catch (MalformedURLException mue)
@@ -84,32 +114,39 @@
{
throw new WebApplicationException(me, createErrorResponse(me, 500));
}
- catch (ParseException pe)
- {
- throw new WebApplicationException(pe, createErrorResponse(pe, 400));
- }
-
}
- /**
- * Handles POST proxy request.
- *
- * @param httpRequestHttpServletRequest
- * @param url the url to request
- * @return response Response
- */
- @POST
- public Response doProxyPost(@Context HttpServletRequest httpRequest, @QueryParam("url") String url)
+ @GET
+ public Response doProxyGet(@Context HttpHeaders headers, @Context UriInfo uriInfo, @QueryParam("url") String urlParam)
{
- BaseConnector conn = new BaseConnector();
- if (url == null)
+ if (urlParam == null)
{
- Throwable e = new Throwable("Necessary URL parameter not found in proxy request");
+ IllegalArgumentException e = new IllegalArgumentException("'url' parameter not found in proxy request");
throw new WebApplicationException(e, createErrorResponse(e, 404));
}
try
{
- HTTPResponse resp = conn.fetchPost(httpRequest, url);
+ URL url = new URL(urlParam);
+ HTTPConnection conn = new HTTPConnection(url);
+ conn.setTimeout(DEFAULT_CONNECT_TIMEOUT_MS);
+ NVPair[] headerPairs =
+ toNVPair(headers.getRequestHeaders(), Collections.singleton(HttpHeaders.HOST.toLowerCase()));
+ conn.setAllowUserInteraction(false);
+ NVPair credentials = getCredentials(url);
+ if (credentials != null)
+ {
+ conn.addBasicAuthorization(null, credentials.getName(), credentials.getValue());
+ }
+ HTTPResponse resp = conn.Get(url.getFile(), (NVPair[])null, headerPairs);
+ if (resp.getStatusCode() >= 300)
+ {
+ LOG.warn("GET Received: " + resp.getReasonLine());
+ byte[] data = resp.getData();
+ if (data != null)
+ {
+ LOG.warn("GET Received: " + new String(data));
+ }
+ }
return createResponse(resp);
}
catch (MalformedURLException mue)
@@ -128,31 +165,58 @@
{
throw new WebApplicationException(me, createErrorResponse(me, 500));
}
- catch (ParseException pe)
- {
- throw new WebApplicationException(pe, createErrorResponse(pe, 400));
- }
}
- /**
- * Handles PUT proxy request.
- *
- * @param httpRequestHttpServletRequest
- * @param url the url to request
- * @return response Response
- */
- @PUT
- public Response doProxyPut(@Context HttpServletRequest httpRequest, @QueryParam("url") String url)
+ @POST
+ public Response doProxyPost(@Context HttpHeaders headers, @Context UriInfo uriInfo,
+ @QueryParam("url") String urlParam, InputStream entity)
{
- BaseConnector conn = new BaseConnector();
- if (url == null)
+ if (urlParam == null)
{
- Throwable e = new Throwable("Necessary URL parameter not found in proxy request");
+ IllegalArgumentException e = new IllegalArgumentException("'url' parameter not found in proxy request");
throw new WebApplicationException(e, createErrorResponse(e, 404));
}
+
try
{
- HTTPResponse resp = conn.doPut(httpRequest, url);
+ URL url = new URL(urlParam);
+ HTTPConnection conn = new HTTPConnection(url);
+ conn.setTimeout(DEFAULT_CONNECT_TIMEOUT_MS);
+ NVPair[] headerPairs =
+ toNVPair(headers.getRequestHeaders(), Collections.singleton(HttpHeaders.HOST.toLowerCase()));
+ conn.setAllowUserInteraction(false);
+ NVPair credentials = getCredentials(url);
+ if (credentials != null)
+ {
+ conn.addBasicAuthorization(null, credentials.getName(), credentials.getValue());
+ }
+ HTTPResponse resp = null;
+ if (entity != null)
+ {
+ HttpOutputStream stream = new HttpOutputStream();
+ resp = conn.Post(url.getFile(), stream, headerPairs);
+ byte[] buf = new byte[1024];
+ int r = -1;
+ while ((r = entity.read()) != -1)
+ {
+ stream.write(buf, 0, r);
+ }
+ stream.close();
+ }
+ else
+ {
+ resp = conn.Post(url.getFile(), (NVPair[])null, headerPairs);
+ }
+
+ if (resp.getStatusCode() >= 300)
+ {
+ LOG.warn("POST Received: " + resp.getReasonLine());
+ byte[] data = resp.getData();
+ if (data != null)
+ {
+ LOG.warn("POST Received: " + new String(data));
+ }
+ }
return createResponse(resp);
}
catch (MalformedURLException mue)
@@ -171,32 +235,58 @@
{
throw new WebApplicationException(me, createErrorResponse(me, 500));
}
- catch (ParseException pe)
- {
- throw new WebApplicationException(pe, createErrorResponse(pe, 400));
- }
-
}
- /**
- * Handles DELETE proxy request.
- *
- * @param httpRequestHttpServletRequest
- * @param url the url to request
- * @return response Response
- */
- @DELETE
- public Response doProxyDelete(@Context HttpServletRequest httpRequest, @QueryParam("url") String url)
+ @PUT
+ public Response doProxyPut(@Context HttpHeaders headers, @Context UriInfo uriInfo,
+ @QueryParam("url") String urlParam, InputStream entity)
{
- BaseConnector conn = new BaseConnector();
- if (url == null)
+ if (urlParam == null)
{
- Throwable e = new Throwable("Necessary URL parameter not found in proxy request");
+ IllegalArgumentException e = new IllegalArgumentException("'url' parameter not found in proxy request");
throw new WebApplicationException(e, createErrorResponse(e, 404));
}
+
try
{
- HTTPResponse resp = conn.doDelete(httpRequest, url);
+ URL url = new URL(urlParam);
+ HTTPConnection conn = new HTTPConnection(url);
+ conn.setTimeout(DEFAULT_CONNECT_TIMEOUT_MS);
+ NVPair[] headerPairs =
+ toNVPair(headers.getRequestHeaders(), Collections.singleton(HttpHeaders.HOST.toLowerCase()));
+ conn.setAllowUserInteraction(false);
+ NVPair credentials = getCredentials(url);
+ if (credentials != null)
+ {
+ conn.addBasicAuthorization(null, credentials.getName(), credentials.getValue());
+ }
+ HTTPResponse resp = null;
+ if (entity != null)
+ {
+ HttpOutputStream stream = new HttpOutputStream();
+ resp = conn.Put(url.getFile(), stream, headerPairs);
+ byte[] buf = new byte[1024];
+ int r = -1;
+ while ((r = entity.read()) != -1)
+ {
+ stream.write(buf, 0, r);
+ }
+ stream.close();
+ }
+ else
+ {
+ resp = conn.Put(url.getFile(), new byte[0], headerPairs);
+ }
+
+ if (resp.getStatusCode() >= 300)
+ {
+ LOG.warn("PUT Received : " + resp.getReasonLine());
+ byte[] data = resp.getData();
+ if (data != null)
+ {
+ LOG.warn("PUT Received : " + new String(data));
+ }
+ }
return createResponse(resp);
}
catch (MalformedURLException mue)
@@ -215,16 +305,23 @@
{
throw new WebApplicationException(me, createErrorResponse(me, 500));
}
- catch (ParseException pe)
- {
- throw new WebApplicationException(pe, createErrorResponse(pe, 400));
- }
+ }
+ /**
+ * Creates the error response.
+ *
+ * @param t Throwable
+ * @param status integer response status
+ * @return response Response
+ */
+ private Response createErrorResponse(Throwable t, int status)
+ {
+ return Response.status(status).entity(t.getMessage()).type("text/plain").build();
}
/**
* Creates the response from HTTP response.
- *
+ *
* @param httpResponse the http response
* @return response Response
*/
@@ -236,7 +333,7 @@
responseBuilder = Response.status(httpResponse.getStatusCode());
for (Enumeration<String> en = httpResponse.listHeaders(); en.hasMoreElements();)
{
- String headerName = (String)en.nextElement();
+ String headerName = en.nextElement();
responseBuilder.header(headerName, httpResponse.getHeader(headerName));
}
return responseBuilder.entity(httpResponse.getInputStream()).build();
@@ -251,15 +348,42 @@
}
}
- /**
- * Creates the error response.
- *
- * @param t Throwable
- * @param status integer response status
- * @return response Response
- */
- private Response createErrorResponse(Throwable t, int status)
+ private NVPair getCredentials(URL url)
{
- return Response.status(status).entity(t.getMessage()).type("text/plain").build();
+ String userInfo = url.getUserInfo();
+ NVPair credentials = null;
+ if (userInfo != null)
+ {
+ int col = userInfo.indexOf(':');
+ if (col == -1)
+ {
+ credentials = new NVPair(userInfo, "");
+ }
+ else if (col == userInfo.length() - 1)
+ {
+ credentials = new NVPair(userInfo.substring(0, userInfo.length() - 1), "");
+ }
+ else
+ {
+ credentials = new NVPair(userInfo.substring(0, col), userInfo.substring(col + 1));
+ }
+ }
+ return credentials;
}
+
+ private NVPair[] toNVPair(MultivaluedMap<String, String> map, Set<String> skip)
+ {
+ List<NVPair> hds = new ArrayList<NVPair>();
+ for (Entry<String, List<String>> e : map.entrySet())
+ {
+ if (!skip.contains(e.getKey()))
+ {
+ for (String v : e.getValue())
+ {
+ hds.add(new NVPair(e.getKey(), v));
+ }
+ }
+ }
+ return hds.toArray(new NVPair[hds.size()]);
+ }
}
14 years
exo-jcr SVN: r2711 - in ws/trunk: exo.ws.rest.ext/src/main/java/org/exoplatform/services/rest/ext/proxy and 1 other directory.
by do-not-reply@jboss.org
Author: aparfonov
Date: 2010-06-29 06:35:54 -0400 (Tue, 29 Jun 2010)
New Revision: 2711
Modified:
ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/AuthorizationInfo.java
ws/trunk/exo.ws.rest.ext/src/main/java/org/exoplatform/services/rest/ext/proxy/ProxyService.java
Log:
EXOJCR-800
Modified: ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/AuthorizationInfo.java
===================================================================
--- ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/AuthorizationInfo.java 2010-06-25 14:51:32 UTC (rev 2710)
+++ ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/AuthorizationInfo.java 2010-06-29 10:35:54 UTC (rev 2711)
@@ -26,7 +26,7 @@
*
* The HTTPClient's home page is located at:
*
- * http://www.innovation.ch/java/HTTPClient/
+ * http://www.innovation.ch/java/HTTPClient/
*
*/
@@ -54,18 +54,18 @@
* used by the "Basic" scheme and derivatives, and the one used by the "Digest"
* scheme and derivatives. The first form contains just the the scheme and a
* "cookie":
- *
+ *
* <PRE>
* Authorization: Basic aGVsbG86d29ybGQ=
* </PRE>
- *
+ *
* The second form contains the scheme followed by a number of parameters in the
* form of name=value pairs:
- *
+ *
* <PRE>
* Authorization: Digest username="hello", realm="test", nonce="42", ...
* </PRE>
- *
+ *
* The two fields "cookie" and "params" correspond to these two forms. <A
* HREF="#toString()">toString()</A> is used by the AuthorizationModule when
* generating the Authorization header and will format the info accordingly.
@@ -85,6 +85,7 @@
* methods manipulate and query an internal list of AuthorizationInfo instances.
* There can be only one instance per host, port, scheme, and realm combination
* (see <A HREF="#equals">equals()</A>).
+ *
* @version 0.3-3 06/05/2001
* @author Ronald Tschal�r
* @since V0.1
@@ -113,8 +114,8 @@
private int port;
/**
- * the scheme. (e.g. "Basic") Note: don't lowercase because some buggy servers
- * use a case-sensitive match
+ * the scheme. (e.g. "Basic") Note: don't lowercase because some buggy
+ * servers use a case-sensitive match
*/
private String scheme;
@@ -140,6 +141,7 @@
/**
* Creates an new info structure for the specified host and port.
+ *
* @param host the host
* @param port the port
*/
@@ -152,6 +154,7 @@
/**
* Creates a new info structure for the specified host and port with the
* specified scheme, realm, params. The cookie is set to null.
+ *
* @param host the host
* @param port the port
* @param scheme the scheme
@@ -177,13 +180,14 @@
* Creates a new info structure for the specified host and port with the
* specified scheme, realm and cookie. The params is set to a zero-length
* array, and the extra_info is set to null.
+ *
* @param host the host
* @param port the port
* @param scheme the scheme
* @param realm the realm
* @param cookie for the "Basic" scheme this is the base64-encoded
- * username/password; for the "NTLM" scheme this is the
- * base64-encoded username/password message.
+ * username/password; for the "NTLM" scheme this is the base64-encoded
+ * username/password message.
*/
public AuthorizationInfo(String host, int port, String scheme, String realm, String cookie)
{
@@ -199,6 +203,7 @@
/**
* Creates a new copy of the given AuthorizationInfo.
+ *
* @param templ the info to copy
*/
AuthorizationInfo(AuthorizationInfo templ)
@@ -217,10 +222,10 @@
// Class Methods
/**
- * Set's the authorization handler. This handler is called whenever the server
- * requests authorization and no entry for the requested scheme and realm can
- * be found in the list. The handler must implement the AuthorizationHandler
- * interface.
+ * Set's the authorization handler. This handler is called whenever the
+ * server requests authorization and no entry for the requested scheme and
+ * realm can be found in the list. The handler must implement the
+ * AuthorizationHandler interface.
* <P>
* If no handler is set then a {@link DefaultAuthHandler default handler} is
* used. This handler currently only handles the "Basic" and "Digest" schemes
@@ -228,6 +233,7 @@
* <P>
* The default handler can be disabled by setting the auth handler to
* <var>null</var>.
+ *
* @param handler the new authorization handler
* @return the old authorization handler
* @see AuthorizationHandler
@@ -242,6 +248,7 @@
/**
* Get's the current authorization handler.
+ *
* @return the current authorization handler, or null if none is set.
* @see AuthorizationHandler
*/
@@ -253,6 +260,7 @@
/**
* Searches for the authorization info using the given host, port, scheme and
* realm. The context is the default context.
+ *
* @param host the host
* @param port the port
* @param scheme the scheme
@@ -267,6 +275,7 @@
/**
* Searches for the authorization info in the given context using the given
* host, port, scheme and realm.
+ *
* @param host the host
* @param port the port
* @param scheme the scheme
@@ -287,13 +296,15 @@
/**
* Queries the AuthHandler for authorization info. It also adds this info to
* the list.
- * @param auth_info any info needed by the AuthHandler; at a minimum the host,
- * scheme and realm should be set.
+ *
+ * @param auth_info any info needed by the AuthHandler; at a minimum the
+ * host, scheme and realm should be set.
* @param req the request which initiated this query
* @param resp the full response
* @return a structure containing the requested info, or null if either no
* AuthHandler is set or the user canceled the request.
- * @exception AuthSchemeNotImplException if this is thrown by the AuthHandler.
+ * @exception AuthSchemeNotImplException if this is thrown by the
+ * AuthHandler.
*/
static AuthorizationInfo queryAuthHandler(AuthorizationInfo auth_info, RoRequest req, RoResponse resp)
throws AuthSchemeNotImplException, IOException
@@ -317,6 +328,7 @@
* Searches for the authorization info using the host, port, scheme and realm
* from the given info struct. If not found it queries the AuthHandler (if
* set).
+ *
* @param auth_info the AuthorizationInfo
* @param req the request which initiated this query
* @param resp the full response
@@ -335,6 +347,11 @@
AuthorizationInfo new_info = (AuthorizationInfo)AuthList.get(auth_info);
+ if (new_info == null)
+ new_info =
+ (AuthorizationInfo)AuthList.get(new AuthorizationInfo(auth_info.getHost(), auth_info.getPort(), auth_info
+ .getScheme(), null, auth_info.getParams(), auth_info.getExtraInfo()));
+
if (new_info == null && query_auth_h)
new_info = queryAuthHandler(auth_info, req, resp);
@@ -344,6 +361,7 @@
/**
* Searches for the authorization info given a host, port, scheme and realm.
* Queries the AuthHandler if not found in list.
+ *
* @param host the host
* @param port the port
* @param scheme the scheme
@@ -363,8 +381,9 @@
/**
* Adds an authorization entry to the list using the default context. If an
- * entry for the specified scheme and realm already exists then its cookie and
- * params are replaced with the new data.
+ * entry for the specified scheme and realm already exists then its cookie
+ * and params are replaced with the new data.
+ *
* @param auth_info the AuthorizationInfo to add
*/
public static void addAuthorization(AuthorizationInfo auth_info)
@@ -376,6 +395,7 @@
* Adds an authorization entry to the list. If an entry for the specified
* scheme and realm already exists then its cookie and params are replaced
* with the new data.
+ *
* @param auth_info the AuthorizationInfo to add
* @param context the context to associate this info with
*/
@@ -403,8 +423,9 @@
/**
* Adds an authorization entry to the list using the default context. If an
- * entry for the specified scheme and realm already exists then its cookie and
- * params are replaced with the new data.
+ * entry for the specified scheme and realm already exists then its cookie
+ * and params are replaced with the new data.
+ *
* @param host the host
* @param port the port
* @param scheme the scheme
@@ -423,6 +444,7 @@
* Adds an authorization entry to the list. If an entry for the specified
* scheme and realm already exists then its cookie and params are replaced
* with the new data.
+ *
* @param host the host
* @param port the port
* @param scheme the scheme
@@ -447,6 +469,7 @@
* Adds an authorization entry for the "Basic" authorization scheme to the
* list using the default context. If an entry already exists for the "Basic"
* scheme and the specified realm then it is overwritten.
+ *
* @param host the host
* @param port the port
* @param realm the realm
@@ -462,6 +485,7 @@
* Adds an authorization entry for the "Basic" authorization scheme to the
* list. If an entry already exists for the "Basic" scheme and the specified
* realm then it is overwritten.
+ *
* @param host the host
* @param port the port
* @param realm the realm
@@ -478,8 +502,9 @@
/**
* Adds an authorization entry for the "Digest" authorization scheme to the
- * list using the default context. If an entry already exists for the "Digest"
- * scheme and the specified realm then it is overwritten.
+ * list using the default context. If an entry already exists for the
+ * "Digest" scheme and the specified realm then it is overwritten.
+ *
* @param host the host
* @param port the port
* @param realm the realm
@@ -495,6 +520,7 @@
* Adds an authorization entry for the "Digest" authorization scheme to the
* list. If an entry already exists for the "Digest" scheme and the specified
* realm then it is overwritten.
+ *
* @param host the host
* @param port the port
* @param realm the realm
@@ -538,6 +564,7 @@
* Removes an authorization entry from the list using the default context. If
* no entry for the specified host, port, scheme and realm exists then this
* does nothing.
+ *
* @param auth_info the AuthorizationInfo to remove
*/
public static void removeAuthorization(AuthorizationInfo auth_info)
@@ -546,8 +573,9 @@
}
/**
- * Removes an authorization entry from the list. If no entry for the specified
- * host, port, scheme and realm exists then this does nothing.
+ * Removes an authorization entry from the list. If no entry for the
+ * specified host, port, scheme and realm exists then this does nothing.
+ *
* @param auth_info the AuthorizationInfo to remove
* @param context the context this info is associated with
*/
@@ -561,6 +589,7 @@
* Removes an authorization entry from the list using the default context. If
* no entry for the specified host, port, scheme and realm exists then this
* does nothing.
+ *
* @param host the host
* @param port the port
* @param scheme the scheme
@@ -572,8 +601,9 @@
}
/**
- * Removes an authorization entry from the list. If no entry for the specified
- * host, port, scheme and realm exists then this does nothing.
+ * Removes an authorization entry from the list. If no entry for the
+ * specified host, port, scheme and realm exists then this does nothing.
+ *
* @param host the host
* @param port the port
* @param scheme the scheme
@@ -587,9 +617,10 @@
/**
* Tries to find the candidate in the current list of auth info for the given
- * request. The paths associated with each auth info are examined, and the one
- * with either the nearest direct parent or child is chosen. This is used for
- * preemptively sending auth info.
+ * request. The paths associated with each auth info are examined, and the
+ * one with either the nearest direct parent or child is chosen. This is used
+ * for preemptively sending auth info.
+ *
* @param req the Request
* @return an AuthorizationInfo containing the info for the best match, or
* null if none found.
@@ -675,6 +706,7 @@
/**
* Adds the path from the given resource to our path list. The path list is
* used for deciding when to preemptively send auth info.
+ *
* @param resource the resource from which to extract the path
*/
public synchronized void addPath(String resource)
@@ -692,11 +724,12 @@
}
/**
- * Parses the authentication challenge(s) into an array of new info structures
- * for the specified host and port.
- * @param challenge a string containing authentication info. This must have the
- * same format as value part of a WWW-authenticate response header
- * field, and may contain multiple authentication challenges.
+ * Parses the authentication challenge(s) into an array of new info
+ * structures for the specified host and port.
+ *
+ * @param challenge a string containing authentication info. This must have
+ * the same format as value part of a WWW-authenticate response header
+ * field, and may contain multiple authentication challenges.
* @param req the original request.
* @exception ProtocolException if any error during the parsing occurs.
*/
@@ -887,6 +920,7 @@
/**
* Get the host.
+ *
* @return a string containing the host name.
*/
public final String getHost()
@@ -896,6 +930,7 @@
/**
* Get the port.
+ *
* @return an int containing the port number.
*/
public final int getPort()
@@ -905,6 +940,7 @@
/**
* Get the scheme.
+ *
* @return a string containing the scheme.
*/
public final String getScheme()
@@ -914,6 +950,7 @@
/**
* Get the realm.
+ *
* @return a string containing the realm.
*/
public final String getRealm()
@@ -923,6 +960,7 @@
/**
* Get the cookie
+ *
* @return the cookie String
* @since V0.3-1
*/
@@ -933,6 +971,7 @@
/**
* Set the cookie
+ *
* @param cookie the new cookie
* @since V0.3-1
*/
@@ -943,6 +982,7 @@
/**
* Get the authentication parameters.
+ *
* @return an array of name/value pairs.
*/
public final NVPair[] getParams()
@@ -952,6 +992,7 @@
/**
* Set the authentication parameters.
+ *
* @param an array of name/value pairs.
*/
public final void setParams(NVPair[] params)
@@ -964,6 +1005,7 @@
/**
* Get the extra info.
+ *
* @return the extra_info object
*/
public final Object getExtraInfo()
@@ -973,6 +1015,7 @@
/**
* Set the extra info.
+ *
* @param info the extra info
*/
public final void setExtraInfo(Object info)
@@ -983,6 +1026,7 @@
/**
* Constructs a string containing the authorization info. The format is that
* of the http Authorization header.
+ *
* @return a String containing all info.
*/
public String toString()
@@ -1025,6 +1069,7 @@
* Produces a hash code based on host, scheme and realm. Port is not included
* for simplicity (and because it probably won't make much difference). Used
* in the AuthorizationInfo.AuthList hash table.
+ *
* @return the hash code
*/
public int hashCode()
@@ -1033,10 +1078,11 @@
}
/**
- * Two AuthorizationInfos are considered equal if their host, port, scheme and
- * realm match. Used in the AuthorizationInfo.AuthList hash table.
+ * Two AuthorizationInfos are considered equal if their host, port, scheme
+ * and realm match. Used in the AuthorizationInfo.AuthList hash table.
+ *
* @param obj another AuthorizationInfo against which this one is to be
- * compared.
+ * compared.
* @return true if they match in the above mentioned fields; false otherwise.
*/
public boolean equals(Object obj)
@@ -1045,7 +1091,7 @@
{
AuthorizationInfo auth = (AuthorizationInfo)obj;
if (host.equals(auth.host) && (port == auth.port) && scheme.equalsIgnoreCase(auth.scheme)
- && realm.equals(auth.realm))
+ && ((realm == null && auth.realm == null) || (realm != null && realm.equals(auth.realm))))
return true;
}
return false;
Modified: ws/trunk/exo.ws.rest.ext/src/main/java/org/exoplatform/services/rest/ext/proxy/ProxyService.java
===================================================================
--- ws/trunk/exo.ws.rest.ext/src/main/java/org/exoplatform/services/rest/ext/proxy/ProxyService.java 2010-06-25 14:51:32 UTC (rev 2710)
+++ ws/trunk/exo.ws.rest.ext/src/main/java/org/exoplatform/services/rest/ext/proxy/ProxyService.java 2010-06-29 10:35:54 UTC (rev 2711)
@@ -18,11 +18,27 @@
*/
package org.exoplatform.services.rest.ext.proxy;
+import org.exoplatform.common.http.client.HTTPConnection;
+import org.exoplatform.common.http.client.HTTPResponse;
+import org.exoplatform.common.http.client.HttpOutputStream;
+import org.exoplatform.common.http.client.ModuleException;
+import org.exoplatform.common.http.client.NVPair;
+import org.exoplatform.common.http.client.ProtocolNotSuppException;
+import org.exoplatform.services.log.ExoLogger;
+import org.exoplatform.services.log.Log;
+import org.exoplatform.services.rest.resource.ResourceContainer;
+
import java.io.IOException;
+import java.io.InputStream;
import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Collections;
import java.util.Enumeration;
+import java.util.List;
+import java.util.Set;
+import java.util.Map.Entry;
-import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
@@ -31,15 +47,12 @@
import javax.ws.rs.QueryParam;
import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.Context;
+import javax.ws.rs.core.HttpHeaders;
+import javax.ws.rs.core.MultivaluedMap;
import javax.ws.rs.core.Response;
+import javax.ws.rs.core.UriInfo;
import javax.ws.rs.core.Response.ResponseBuilder;
-import org.exoplatform.common.http.client.HTTPResponse;
-import org.exoplatform.common.http.client.ModuleException;
-import org.exoplatform.common.http.client.ParseException;
-import org.exoplatform.common.http.client.ProtocolNotSuppException;
-import org.exoplatform.services.rest.resource.ResourceContainer;
-
/**
* @author <a href="mailto:max.shaposhnik@exoplatform.com">Max Shaposhnik</a>
* @version $Id$
@@ -47,25 +60,42 @@
@Path("proxy")
public class ProxyService implements ResourceContainer
{
- /**
- * Handles GET proxy request.
- *
- * @param httpRequestHttpServletRequest
- * @param url the url to request
- * @return response Response
- */
- @GET
- public Response doProxyGet(@Context HttpServletRequest httpRequest, @QueryParam("url") String url)
+ protected static final int DEFAULT_CONNECT_TIMEOUT_MS = 5000;
+
+ private static final Log LOG = ExoLogger.getLogger(ProxyService.class);
+
+ @DELETE
+ public Response doProxyDelete(@Context HttpHeaders headers, @Context UriInfo uriInfo,
+ @QueryParam("url") String urlParam)
{
- BaseConnector conn = new BaseConnector();
- if (url == null)
+ if (urlParam == null)
{
- Throwable e = new Throwable("Necessary URL parameter not found in proxy request");
+ IllegalArgumentException e = new IllegalArgumentException("'url' parameter not found in proxy request");
throw new WebApplicationException(e, createErrorResponse(e, 404));
}
try
{
- HTTPResponse resp = conn.fetchGet(httpRequest, url);
+ URL url = new URL(urlParam);
+ HTTPConnection conn = new HTTPConnection(url);
+ conn.setTimeout(DEFAULT_CONNECT_TIMEOUT_MS);
+ NVPair[] headerPairs =
+ toNVPair(headers.getRequestHeaders(), Collections.singleton(HttpHeaders.HOST.toLowerCase()));
+ conn.setAllowUserInteraction(false);
+ NVPair credentials = getCredentials(url);
+ if (credentials != null)
+ {
+ conn.addBasicAuthorization(null, credentials.getName(), credentials.getValue());
+ }
+ HTTPResponse resp = conn.Delete(url.getFile(), headerPairs);
+ if (resp.getStatusCode() >= 300)
+ {
+ LOG.warn("DELETE Received : " + resp.getReasonLine());
+ byte[] data = resp.getData();
+ if (data != null)
+ {
+ LOG.warn("DELETE Received : " + new String(data));
+ }
+ }
return createResponse(resp);
}
catch (MalformedURLException mue)
@@ -84,32 +114,39 @@
{
throw new WebApplicationException(me, createErrorResponse(me, 500));
}
- catch (ParseException pe)
- {
- throw new WebApplicationException(pe, createErrorResponse(pe, 400));
- }
-
}
- /**
- * Handles POST proxy request.
- *
- * @param httpRequestHttpServletRequest
- * @param url the url to request
- * @return response Response
- */
- @POST
- public Response doProxyPost(@Context HttpServletRequest httpRequest, @QueryParam("url") String url)
+ @GET
+ public Response doProxyGet(@Context HttpHeaders headers, @Context UriInfo uriInfo, @QueryParam("url") String urlParam)
{
- BaseConnector conn = new BaseConnector();
- if (url == null)
+ if (urlParam == null)
{
- Throwable e = new Throwable("Necessary URL parameter not found in proxy request");
+ IllegalArgumentException e = new IllegalArgumentException("'url' parameter not found in proxy request");
throw new WebApplicationException(e, createErrorResponse(e, 404));
}
try
{
- HTTPResponse resp = conn.fetchPost(httpRequest, url);
+ URL url = new URL(urlParam);
+ HTTPConnection conn = new HTTPConnection(url);
+ conn.setTimeout(DEFAULT_CONNECT_TIMEOUT_MS);
+ NVPair[] headerPairs =
+ toNVPair(headers.getRequestHeaders(), Collections.singleton(HttpHeaders.HOST.toLowerCase()));
+ conn.setAllowUserInteraction(false);
+ NVPair credentials = getCredentials(url);
+ if (credentials != null)
+ {
+ conn.addBasicAuthorization(null, credentials.getName(), credentials.getValue());
+ }
+ HTTPResponse resp = conn.Get(url.getFile(), (NVPair[])null, headerPairs);
+ if (resp.getStatusCode() >= 300)
+ {
+ LOG.warn("GET Received: " + resp.getReasonLine());
+ byte[] data = resp.getData();
+ if (data != null)
+ {
+ LOG.warn("GET Received: " + new String(data));
+ }
+ }
return createResponse(resp);
}
catch (MalformedURLException mue)
@@ -128,31 +165,58 @@
{
throw new WebApplicationException(me, createErrorResponse(me, 500));
}
- catch (ParseException pe)
- {
- throw new WebApplicationException(pe, createErrorResponse(pe, 400));
- }
}
- /**
- * Handles PUT proxy request.
- *
- * @param httpRequestHttpServletRequest
- * @param url the url to request
- * @return response Response
- */
- @PUT
- public Response doProxyPut(@Context HttpServletRequest httpRequest, @QueryParam("url") String url)
+ @POST
+ public Response doProxyPost(@Context HttpHeaders headers, @Context UriInfo uriInfo,
+ @QueryParam("url") String urlParam, InputStream entity)
{
- BaseConnector conn = new BaseConnector();
- if (url == null)
+ if (urlParam == null)
{
- Throwable e = new Throwable("Necessary URL parameter not found in proxy request");
+ IllegalArgumentException e = new IllegalArgumentException("'url' parameter not found in proxy request");
throw new WebApplicationException(e, createErrorResponse(e, 404));
}
+
try
{
- HTTPResponse resp = conn.doPut(httpRequest, url);
+ URL url = new URL(urlParam);
+ HTTPConnection conn = new HTTPConnection(url);
+ conn.setTimeout(DEFAULT_CONNECT_TIMEOUT_MS);
+ NVPair[] headerPairs =
+ toNVPair(headers.getRequestHeaders(), Collections.singleton(HttpHeaders.HOST.toLowerCase()));
+ conn.setAllowUserInteraction(false);
+ NVPair credentials = getCredentials(url);
+ if (credentials != null)
+ {
+ conn.addBasicAuthorization(null, credentials.getName(), credentials.getValue());
+ }
+ HTTPResponse resp = null;
+ if (entity != null)
+ {
+ HttpOutputStream stream = new HttpOutputStream();
+ resp = conn.Post(url.getFile(), stream, headerPairs);
+ byte[] buf = new byte[1024];
+ int r = -1;
+ while ((r = entity.read()) != -1)
+ {
+ stream.write(buf, 0, r);
+ }
+ stream.close();
+ }
+ else
+ {
+ resp = conn.Post(url.getFile(), (NVPair[])null, headerPairs);
+ }
+
+ if (resp.getStatusCode() >= 300)
+ {
+ LOG.warn("POST Received: " + resp.getReasonLine());
+ byte[] data = resp.getData();
+ if (data != null)
+ {
+ LOG.warn("POST Received: " + new String(data));
+ }
+ }
return createResponse(resp);
}
catch (MalformedURLException mue)
@@ -171,32 +235,58 @@
{
throw new WebApplicationException(me, createErrorResponse(me, 500));
}
- catch (ParseException pe)
- {
- throw new WebApplicationException(pe, createErrorResponse(pe, 400));
- }
-
}
- /**
- * Handles DELETE proxy request.
- *
- * @param httpRequestHttpServletRequest
- * @param url the url to request
- * @return response Response
- */
- @DELETE
- public Response doProxyDelete(@Context HttpServletRequest httpRequest, @QueryParam("url") String url)
+ @PUT
+ public Response doProxyPut(@Context HttpHeaders headers, @Context UriInfo uriInfo,
+ @QueryParam("url") String urlParam, InputStream entity)
{
- BaseConnector conn = new BaseConnector();
- if (url == null)
+ if (urlParam == null)
{
- Throwable e = new Throwable("Necessary URL parameter not found in proxy request");
+ IllegalArgumentException e = new IllegalArgumentException("'url' parameter not found in proxy request");
throw new WebApplicationException(e, createErrorResponse(e, 404));
}
+
try
{
- HTTPResponse resp = conn.doDelete(httpRequest, url);
+ URL url = new URL(urlParam);
+ HTTPConnection conn = new HTTPConnection(url);
+ conn.setTimeout(DEFAULT_CONNECT_TIMEOUT_MS);
+ NVPair[] headerPairs =
+ toNVPair(headers.getRequestHeaders(), Collections.singleton(HttpHeaders.HOST.toLowerCase()));
+ conn.setAllowUserInteraction(false);
+ NVPair credentials = getCredentials(url);
+ if (credentials != null)
+ {
+ conn.addBasicAuthorization(null, credentials.getName(), credentials.getValue());
+ }
+ HTTPResponse resp = null;
+ if (entity != null)
+ {
+ HttpOutputStream stream = new HttpOutputStream();
+ resp = conn.Put(url.getFile(), stream, headerPairs);
+ byte[] buf = new byte[1024];
+ int r = -1;
+ while ((r = entity.read()) != -1)
+ {
+ stream.write(buf, 0, r);
+ }
+ stream.close();
+ }
+ else
+ {
+ resp = conn.Put(url.getFile(), new byte[0], headerPairs);
+ }
+
+ if (resp.getStatusCode() >= 300)
+ {
+ LOG.warn("PUT Received : " + resp.getReasonLine());
+ byte[] data = resp.getData();
+ if (data != null)
+ {
+ LOG.warn("PUT Received : " + new String(data));
+ }
+ }
return createResponse(resp);
}
catch (MalformedURLException mue)
@@ -215,16 +305,23 @@
{
throw new WebApplicationException(me, createErrorResponse(me, 500));
}
- catch (ParseException pe)
- {
- throw new WebApplicationException(pe, createErrorResponse(pe, 400));
- }
+ }
+ /**
+ * Creates the error response.
+ *
+ * @param t Throwable
+ * @param status integer response status
+ * @return response Response
+ */
+ private Response createErrorResponse(Throwable t, int status)
+ {
+ return Response.status(status).entity(t.getMessage()).type("text/plain").build();
}
/**
* Creates the response from HTTP response.
- *
+ *
* @param httpResponse the http response
* @return response Response
*/
@@ -236,7 +333,7 @@
responseBuilder = Response.status(httpResponse.getStatusCode());
for (Enumeration<String> en = httpResponse.listHeaders(); en.hasMoreElements();)
{
- String headerName = (String)en.nextElement();
+ String headerName = en.nextElement();
responseBuilder.header(headerName, httpResponse.getHeader(headerName));
}
return responseBuilder.entity(httpResponse.getInputStream()).build();
@@ -251,15 +348,42 @@
}
}
- /**
- * Creates the error response.
- *
- * @param t Throwable
- * @param status integer response status
- * @return response Response
- */
- private Response createErrorResponse(Throwable t, int status)
+ private NVPair getCredentials(URL url)
{
- return Response.status(status).entity(t.getMessage()).type("text/plain").build();
+ String userInfo = url.getUserInfo();
+ NVPair credentials = null;
+ if (userInfo != null)
+ {
+ int col = userInfo.indexOf(':');
+ if (col == -1)
+ {
+ credentials = new NVPair(userInfo, "");
+ }
+ else if (col == userInfo.length() - 1)
+ {
+ credentials = new NVPair(userInfo.substring(0, userInfo.length() - 1), "");
+ }
+ else
+ {
+ credentials = new NVPair(userInfo.substring(0, col), userInfo.substring(col + 1));
+ }
+ }
+ return credentials;
}
+
+ private NVPair[] toNVPair(MultivaluedMap<String, String> map, Set<String> skip)
+ {
+ List<NVPair> hds = new ArrayList<NVPair>();
+ for (Entry<String, List<String>> e : map.entrySet())
+ {
+ if (!skip.contains(e.getKey()))
+ {
+ for (String v : e.getValue())
+ {
+ hds.add(new NVPair(e.getKey(), v));
+ }
+ }
+ }
+ return hds.toArray(new NVPair[hds.size()]);
+ }
}
14 years
exo-jcr SVN: r2710 - in jcr/branches/1.12.2-CP01/exo.jcr.component.core/src: test/java/org/exoplatform/services/jcr/usecases and 1 other directory.
by do-not-reply@jboss.org
Author: dkatayev
Date: 2010-06-25 10:51:32 -0400 (Fri, 25 Jun 2010)
New Revision: 2710
Added:
jcr/branches/1.12.2-CP01/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/usecases/TestMixin.java
Modified:
jcr/branches/1.12.2-CP01/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/ItemImpl.java
Log:
EXOJCR-818: EXOJCR-813 ported to 1.12.2-CP01 branch
Modified: jcr/branches/1.12.2-CP01/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/ItemImpl.java
===================================================================
--- jcr/branches/1.12.2-CP01/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/ItemImpl.java 2010-06-25 14:19:08 UTC (rev 2709)
+++ jcr/branches/1.12.2-CP01/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/ItemImpl.java 2010-06-25 14:51:32 UTC (rev 2710)
@@ -224,7 +224,7 @@
if (isRoot())
throw new ItemNotFoundException("Root node does not have a parent");
- return parent();
+ return parent(true);
}
/**
@@ -723,27 +723,32 @@
return getData().getQPath().getName();
}
- protected ItemImpl item(String identifier) throws RepositoryException
+ /**
+ * Get parent node item. Session pool is ignored.
+ *
+ * @return parent item
+ * @throws RepositoryException if parent item is null
+ */
+ protected NodeImpl parent() throws RepositoryException
{
- return dataManager.getItemByIdentifier(identifier, false);
+ return parent(false);
}
/**
- * Get parent node item.
+ * Get parent node item.
*
+ * @param pool - take a parent from session pool
* @return parent item
- * @throws RepositoryException
- * if parent item is null
+ * @throws RepositoryException if parent item is null
*/
- protected NodeImpl parent() throws RepositoryException
+ protected NodeImpl parent(final boolean pool) throws RepositoryException
{
- NodeImpl parent = (NodeImpl)item(getParentIdentifier());
+ NodeImpl parent = (NodeImpl)dataManager.getItemByIdentifier(getParentIdentifier(), pool);
if (parent == null)
{
throw new ItemNotFoundException("FATAL: Parent is null for " + getPath() + " parent UUID: "
+ getParentIdentifier());
}
-
return parent;
}
Copied: jcr/branches/1.12.2-CP01/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/usecases/TestMixin.java (from rev 2700, jcr/branches/1.12.x/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/usecases/TestMixin.java)
===================================================================
--- jcr/branches/1.12.2-CP01/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/usecases/TestMixin.java (rev 0)
+++ jcr/branches/1.12.2-CP01/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/usecases/TestMixin.java 2010-06-25 14:51:32 UTC (rev 2710)
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2003-2010 eXo Platform SAS.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Affero General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see<http://www.gnu.org/licenses/>.
+ */
+package org.exoplatform.services.jcr.usecases;
+
+import javax.jcr.Node;
+import javax.jcr.Property;
+
+/**
+ * Created by The eXo Platform SAS.
+ *
+ * <br/>Date:
+ *
+ * @author <a href="karpenko.sergiy(a)gmail.com">Karpenko Sergiy</a>
+ * @version $Id: TestMixin.java 111 2008-11-11 11:11:11Z serg $
+ */
+public class TestMixin extends BaseUsecasesTest
+{
+
+ public void testMixin() throws Exception
+ {
+ Node a = session.getRootNode().addNode("a");
+ a.addMixin("mix:referenceable");
+
+ Property p = a.setProperty("prop", "string");
+ Node a1 = p.getParent();
+
+ a1.addMixin("mix:lockable");
+ a.addMixin("mix:versionable");
+ session.save();
+
+ //check result
+ Node a2 = session.getRootNode().getNode("a");
+ assertTrue(a2.isNodeType("mix:referenceable"));
+ assertTrue(a2.isNodeType("mix:versionable"));
+ assertTrue(a2.isNodeType("mix:lockable"));
+ }
+}
14 years
exo-jcr SVN: r2709 - in jcr/branches/1.12.2-CP01: applications and 25 other directories.
by do-not-reply@jboss.org
Author: dkatayev
Date: 2010-06-25 10:19:08 -0400 (Fri, 25 Jun 2010)
New Revision: 2709
Modified:
jcr/branches/1.12.2-CP01/applications/exo.jcr.applications.backupconsole/pom.xml
jcr/branches/1.12.2-CP01/applications/exo.jcr.applications.browser/pom.xml
jcr/branches/1.12.2-CP01/applications/exo.jcr.applications.config/pom.xml
jcr/branches/1.12.2-CP01/applications/exo.jcr.applications.fckeditor/pom.xml
jcr/branches/1.12.2-CP01/applications/exo.jcr.applications.jboss/pom.xml
jcr/branches/1.12.2-CP01/applications/exo.jcr.applications.jonas/pom.xml
jcr/branches/1.12.2-CP01/applications/exo.jcr.applications.rest/pom.xml
jcr/branches/1.12.2-CP01/applications/exo.jcr.applications.tomcat/pom.xml
jcr/branches/1.12.2-CP01/applications/exo.jcr.cluster.testclient/pom.xml
jcr/branches/1.12.2-CP01/applications/exo.jcr.ear/pom.xml
jcr/branches/1.12.2-CP01/applications/pom.xml
jcr/branches/1.12.2-CP01/docs/pom.xml
jcr/branches/1.12.2-CP01/docs/reference/en/pom.xml
jcr/branches/1.12.2-CP01/docs/reference/pom.xml
jcr/branches/1.12.2-CP01/docs/userguide/en/pom.xml
jcr/branches/1.12.2-CP01/docs/userguide/pom.xml
jcr/branches/1.12.2-CP01/exo.jcr.component.core/pom.xml
jcr/branches/1.12.2-CP01/exo.jcr.component.ext/pom.xml
jcr/branches/1.12.2-CP01/exo.jcr.component.ftp/pom.xml
jcr/branches/1.12.2-CP01/exo.jcr.component.statistics/pom.xml
jcr/branches/1.12.2-CP01/exo.jcr.component.webdav/pom.xml
jcr/branches/1.12.2-CP01/exo.jcr.connectors.localadapter/pom.xml
jcr/branches/1.12.2-CP01/exo.jcr.framework.command/pom.xml
jcr/branches/1.12.2-CP01/exo.jcr.framework.ftpclient/pom.xml
jcr/branches/1.12.2-CP01/exo.jcr.framework.web/pom.xml
jcr/branches/1.12.2-CP01/packaging/module/pom.xml
jcr/branches/1.12.2-CP01/pom.xml
Log:
EXOJCR-818 project version updated
Modified: jcr/branches/1.12.2-CP01/applications/exo.jcr.applications.backupconsole/pom.xml
===================================================================
--- jcr/branches/1.12.2-CP01/applications/exo.jcr.applications.backupconsole/pom.xml 2010-06-25 14:03:45 UTC (rev 2708)
+++ jcr/branches/1.12.2-CP01/applications/exo.jcr.applications.backupconsole/pom.xml 2010-06-25 14:19:08 UTC (rev 2709)
@@ -24,7 +24,7 @@
<parent>
<groupId>org.exoplatform.jcr</groupId>
<artifactId>jcr-applications-parent</artifactId>
- <version>1.12.2-GA</version>
+ <version>1.12.2-CP01-SNAPSHOT</version>
</parent>
<artifactId>exo.jcr.applications.backupconsole</artifactId>
<name>eXo JCR :: Applications :: Backup Console</name>
Modified: jcr/branches/1.12.2-CP01/applications/exo.jcr.applications.browser/pom.xml
===================================================================
--- jcr/branches/1.12.2-CP01/applications/exo.jcr.applications.browser/pom.xml 2010-06-25 14:03:45 UTC (rev 2708)
+++ jcr/branches/1.12.2-CP01/applications/exo.jcr.applications.browser/pom.xml 2010-06-25 14:19:08 UTC (rev 2709)
@@ -24,7 +24,7 @@
<parent>
<groupId>org.exoplatform.jcr</groupId>
<artifactId>jcr-applications-parent</artifactId>
- <version>1.12.2-GA</version>
+ <version>1.12.2-CP01-SNAPSHOT</version>
</parent>
<artifactId>exo.jcr.applications.browser</artifactId>
<packaging>war</packaging>
Modified: jcr/branches/1.12.2-CP01/applications/exo.jcr.applications.config/pom.xml
===================================================================
--- jcr/branches/1.12.2-CP01/applications/exo.jcr.applications.config/pom.xml 2010-06-25 14:03:45 UTC (rev 2708)
+++ jcr/branches/1.12.2-CP01/applications/exo.jcr.applications.config/pom.xml 2010-06-25 14:19:08 UTC (rev 2709)
@@ -24,7 +24,7 @@
<parent>
<groupId>org.exoplatform.jcr</groupId>
<artifactId>jcr-applications-parent</artifactId>
- <version>1.12.2-GA</version>
+ <version>1.12.2-CP01-SNAPSHOT</version>
</parent>
<artifactId>exo.jcr.applications.config</artifactId>
<packaging>pom</packaging>
Modified: jcr/branches/1.12.2-CP01/applications/exo.jcr.applications.fckeditor/pom.xml
===================================================================
--- jcr/branches/1.12.2-CP01/applications/exo.jcr.applications.fckeditor/pom.xml 2010-06-25 14:03:45 UTC (rev 2708)
+++ jcr/branches/1.12.2-CP01/applications/exo.jcr.applications.fckeditor/pom.xml 2010-06-25 14:19:08 UTC (rev 2709)
@@ -24,7 +24,7 @@
<parent>
<groupId>org.exoplatform.jcr</groupId>
<artifactId>jcr-applications-parent</artifactId>
- <version>1.12.2-GA</version>
+ <version>1.12.2-CP01-SNAPSHOT</version>
</parent>
<artifactId>exo.jcr.applications.fckeditor</artifactId>
<packaging>war</packaging>
Modified: jcr/branches/1.12.2-CP01/applications/exo.jcr.applications.jboss/pom.xml
===================================================================
--- jcr/branches/1.12.2-CP01/applications/exo.jcr.applications.jboss/pom.xml 2010-06-25 14:03:45 UTC (rev 2708)
+++ jcr/branches/1.12.2-CP01/applications/exo.jcr.applications.jboss/pom.xml 2010-06-25 14:19:08 UTC (rev 2709)
@@ -22,7 +22,7 @@
<parent>
<groupId>org.exoplatform.jcr</groupId>
<artifactId>exo.jcr.applications.config</artifactId>
- <version>1.12.2-GA</version>
+ <version>1.12.2-CP01-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -40,7 +40,7 @@
<dependency>
<groupId>org.exoplatform.jcr</groupId>
<artifactId>exo.jcr.ear</artifactId>
- <version>1.12.2-GA</version>
+ <version>1.12.2-CP01-SNAPSHOT</version>
<type>ear</type>
<scope>runtime</scope>
</dependency>
Modified: jcr/branches/1.12.2-CP01/applications/exo.jcr.applications.jonas/pom.xml
===================================================================
--- jcr/branches/1.12.2-CP01/applications/exo.jcr.applications.jonas/pom.xml 2010-06-25 14:03:45 UTC (rev 2708)
+++ jcr/branches/1.12.2-CP01/applications/exo.jcr.applications.jonas/pom.xml 2010-06-25 14:19:08 UTC (rev 2709)
@@ -22,7 +22,7 @@
<parent>
<groupId>org.exoplatform.jcr</groupId>
<artifactId>exo.jcr.applications.config</artifactId>
- <version>1.12.2-GA</version>
+ <version>1.12.2-CP01-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -40,7 +40,7 @@
<dependency>
<groupId>org.exoplatform.jcr</groupId>
<artifactId>exo.jcr.ear</artifactId>
- <version>1.12.2-GA</version>
+ <version>1.12.2-CP01-SNAPSHOT</version>
<type>ear</type>
<scope>runtime</scope>
</dependency>
Modified: jcr/branches/1.12.2-CP01/applications/exo.jcr.applications.rest/pom.xml
===================================================================
--- jcr/branches/1.12.2-CP01/applications/exo.jcr.applications.rest/pom.xml 2010-06-25 14:03:45 UTC (rev 2708)
+++ jcr/branches/1.12.2-CP01/applications/exo.jcr.applications.rest/pom.xml 2010-06-25 14:19:08 UTC (rev 2709)
@@ -24,7 +24,7 @@
<parent>
<groupId>org.exoplatform.jcr</groupId>
<artifactId>jcr-applications-parent</artifactId>
- <version>1.12.2-GA</version>
+ <version>1.12.2-CP01-SNAPSHOT</version>
</parent>
<artifactId>exo.jcr.applications.rest</artifactId>
<packaging>war</packaging>
Modified: jcr/branches/1.12.2-CP01/applications/exo.jcr.applications.tomcat/pom.xml
===================================================================
--- jcr/branches/1.12.2-CP01/applications/exo.jcr.applications.tomcat/pom.xml 2010-06-25 14:03:45 UTC (rev 2708)
+++ jcr/branches/1.12.2-CP01/applications/exo.jcr.applications.tomcat/pom.xml 2010-06-25 14:19:08 UTC (rev 2709)
@@ -22,7 +22,7 @@
<parent>
<groupId>org.exoplatform.jcr</groupId>
<artifactId>exo.jcr.applications.config</artifactId>
- <version>1.12.2-GA</version>
+ <version>1.12.2-CP01-SNAPSHOT</version>
<relativePath>exo.jcr.applications.config</relativePath>
</parent>
Modified: jcr/branches/1.12.2-CP01/applications/exo.jcr.cluster.testclient/pom.xml
===================================================================
--- jcr/branches/1.12.2-CP01/applications/exo.jcr.cluster.testclient/pom.xml 2010-06-25 14:03:45 UTC (rev 2708)
+++ jcr/branches/1.12.2-CP01/applications/exo.jcr.cluster.testclient/pom.xml 2010-06-25 14:19:08 UTC (rev 2709)
@@ -24,7 +24,7 @@
<parent>
<groupId>org.exoplatform.jcr</groupId>
<artifactId>jcr-applications-parent</artifactId>
- <version>1.12.2-GA</version>
+ <version>1.12.2-CP01-SNAPSHOT</version>
</parent>
<artifactId>exo.jcr.cluster.testclient</artifactId>
<name>eXo JCR :: Cluster :: Test Client</name>
Modified: jcr/branches/1.12.2-CP01/applications/exo.jcr.ear/pom.xml
===================================================================
--- jcr/branches/1.12.2-CP01/applications/exo.jcr.ear/pom.xml 2010-06-25 14:03:45 UTC (rev 2708)
+++ jcr/branches/1.12.2-CP01/applications/exo.jcr.ear/pom.xml 2010-06-25 14:19:08 UTC (rev 2709)
@@ -24,7 +24,7 @@
<parent>
<groupId>org.exoplatform.jcr</groupId>
<artifactId>jcr-applications-parent</artifactId>
- <version>1.12.2-GA</version>
+ <version>1.12.2-CP01-SNAPSHOT</version>
</parent>
<artifactId>exo.jcr.ear</artifactId>
<packaging>ear</packaging>
Modified: jcr/branches/1.12.2-CP01/applications/pom.xml
===================================================================
--- jcr/branches/1.12.2-CP01/applications/pom.xml 2010-06-25 14:03:45 UTC (rev 2708)
+++ jcr/branches/1.12.2-CP01/applications/pom.xml 2010-06-25 14:19:08 UTC (rev 2709)
@@ -22,12 +22,12 @@
<parent>
<groupId>org.exoplatform.jcr</groupId>
<artifactId>jcr-parent</artifactId>
- <version>1.12.2-GA</version>
+ <version>1.12.2-CP01-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jcr-applications-parent</artifactId>
- <version>1.12.2-GA</version>
+ <version>1.12.2-CP01-SNAPSHOT</version>
<name>eXo JCR :: Applications :: Reactor</name>
<packaging>pom</packaging>
Modified: jcr/branches/1.12.2-CP01/docs/pom.xml
===================================================================
--- jcr/branches/1.12.2-CP01/docs/pom.xml 2010-06-25 14:03:45 UTC (rev 2708)
+++ jcr/branches/1.12.2-CP01/docs/pom.xml 2010-06-25 14:19:08 UTC (rev 2709)
@@ -22,7 +22,7 @@
<parent>
<groupId>org.exoplatform.jcr</groupId>
<artifactId>jcr-parent</artifactId>
- <version>1.12.2-GA</version>
+ <version>1.12.2-CP01-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: jcr/branches/1.12.2-CP01/docs/reference/en/pom.xml
===================================================================
--- jcr/branches/1.12.2-CP01/docs/reference/en/pom.xml 2010-06-25 14:03:45 UTC (rev 2708)
+++ jcr/branches/1.12.2-CP01/docs/reference/en/pom.xml 2010-06-25 14:19:08 UTC (rev 2709)
@@ -22,7 +22,7 @@
<parent>
<groupId>org.exoplatform.jcr</groupId>
<artifactId>reference-docs</artifactId>
- <version>1.12.2-GA</version>
+ <version>1.12.2-CP01-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: jcr/branches/1.12.2-CP01/docs/reference/pom.xml
===================================================================
--- jcr/branches/1.12.2-CP01/docs/reference/pom.xml 2010-06-25 14:03:45 UTC (rev 2708)
+++ jcr/branches/1.12.2-CP01/docs/reference/pom.xml 2010-06-25 14:19:08 UTC (rev 2709)
@@ -22,7 +22,7 @@
<parent>
<groupId>org.exoplatform.jcr</groupId>
<artifactId>docs</artifactId>
- <version>1.12.2-GA</version>
+ <version>1.12.2-CP01-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: jcr/branches/1.12.2-CP01/docs/userguide/en/pom.xml
===================================================================
--- jcr/branches/1.12.2-CP01/docs/userguide/en/pom.xml 2010-06-25 14:03:45 UTC (rev 2708)
+++ jcr/branches/1.12.2-CP01/docs/userguide/en/pom.xml 2010-06-25 14:19:08 UTC (rev 2709)
@@ -22,7 +22,7 @@
<parent>
<groupId>org.exoplatform.jcr</groupId>
<artifactId>userguide-docs</artifactId>
- <version>1.12.2-GA</version>
+ <version>1.12.2-CP01-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: jcr/branches/1.12.2-CP01/docs/userguide/pom.xml
===================================================================
--- jcr/branches/1.12.2-CP01/docs/userguide/pom.xml 2010-06-25 14:03:45 UTC (rev 2708)
+++ jcr/branches/1.12.2-CP01/docs/userguide/pom.xml 2010-06-25 14:19:08 UTC (rev 2709)
@@ -22,7 +22,7 @@
<parent>
<groupId>org.exoplatform.jcr</groupId>
<artifactId>docs</artifactId>
- <version>1.12.2-GA</version>
+ <version>1.12.2-CP01-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: jcr/branches/1.12.2-CP01/exo.jcr.component.core/pom.xml
===================================================================
--- jcr/branches/1.12.2-CP01/exo.jcr.component.core/pom.xml 2010-06-25 14:03:45 UTC (rev 2708)
+++ jcr/branches/1.12.2-CP01/exo.jcr.component.core/pom.xml 2010-06-25 14:19:08 UTC (rev 2709)
@@ -24,7 +24,7 @@
<parent>
<groupId>org.exoplatform.jcr</groupId>
<artifactId>jcr-parent</artifactId>
- <version>1.12.2-GA</version>
+ <version>1.12.2-CP01-SNAPSHOT</version>
</parent>
<artifactId>exo.jcr.component.core</artifactId>
<name>eXo JCR :: Component :: Core Service</name>
Modified: jcr/branches/1.12.2-CP01/exo.jcr.component.ext/pom.xml
===================================================================
--- jcr/branches/1.12.2-CP01/exo.jcr.component.ext/pom.xml 2010-06-25 14:03:45 UTC (rev 2708)
+++ jcr/branches/1.12.2-CP01/exo.jcr.component.ext/pom.xml 2010-06-25 14:19:08 UTC (rev 2709)
@@ -24,7 +24,7 @@
<parent>
<groupId>org.exoplatform.jcr</groupId>
<artifactId>jcr-parent</artifactId>
- <version>1.12.2-GA</version>
+ <version>1.12.2-CP01-SNAPSHOT</version>
</parent>
<artifactId>exo.jcr.component.ext</artifactId>
<name>eXo JCR :: Component :: Extension Service</name>
Modified: jcr/branches/1.12.2-CP01/exo.jcr.component.ftp/pom.xml
===================================================================
--- jcr/branches/1.12.2-CP01/exo.jcr.component.ftp/pom.xml 2010-06-25 14:03:45 UTC (rev 2708)
+++ jcr/branches/1.12.2-CP01/exo.jcr.component.ftp/pom.xml 2010-06-25 14:19:08 UTC (rev 2709)
@@ -24,7 +24,7 @@
<parent>
<groupId>org.exoplatform.jcr</groupId>
<artifactId>jcr-parent</artifactId>
- <version>1.12.2-GA</version>
+ <version>1.12.2-CP01-SNAPSHOT</version>
</parent>
<artifactId>exo.jcr.component.ftp</artifactId>
<name>eXo JCR :: Component :: FTP Service</name>
Modified: jcr/branches/1.12.2-CP01/exo.jcr.component.statistics/pom.xml
===================================================================
--- jcr/branches/1.12.2-CP01/exo.jcr.component.statistics/pom.xml 2010-06-25 14:03:45 UTC (rev 2708)
+++ jcr/branches/1.12.2-CP01/exo.jcr.component.statistics/pom.xml 2010-06-25 14:19:08 UTC (rev 2709)
@@ -24,7 +24,7 @@
<parent>
<groupId>org.exoplatform.jcr</groupId>
<artifactId>jcr-parent</artifactId>
- <version>1.12.2-GA</version>
+ <version>1.12.2-CP01-SNAPSHOT</version>
</parent>
<artifactId>exo.jcr.component.statistics</artifactId>
<name>eXo JCR :: Component :: Statistics Provider</name>
Modified: jcr/branches/1.12.2-CP01/exo.jcr.component.webdav/pom.xml
===================================================================
--- jcr/branches/1.12.2-CP01/exo.jcr.component.webdav/pom.xml 2010-06-25 14:03:45 UTC (rev 2708)
+++ jcr/branches/1.12.2-CP01/exo.jcr.component.webdav/pom.xml 2010-06-25 14:19:08 UTC (rev 2709)
@@ -24,7 +24,7 @@
<parent>
<groupId>org.exoplatform.jcr</groupId>
<artifactId>jcr-parent</artifactId>
- <version>1.12.2-GA</version>
+ <version>1.12.2-CP01-SNAPSHOT</version>
</parent>
<artifactId>exo.jcr.component.webdav</artifactId>
<name>eXo JCR :: Component :: Webdav Service</name>
Modified: jcr/branches/1.12.2-CP01/exo.jcr.connectors.localadapter/pom.xml
===================================================================
--- jcr/branches/1.12.2-CP01/exo.jcr.connectors.localadapter/pom.xml 2010-06-25 14:03:45 UTC (rev 2708)
+++ jcr/branches/1.12.2-CP01/exo.jcr.connectors.localadapter/pom.xml 2010-06-25 14:19:08 UTC (rev 2709)
@@ -24,7 +24,7 @@
<parent>
<groupId>org.exoplatform.jcr</groupId>
<artifactId>jcr-parent</artifactId>
- <version>1.12.2-GA</version>
+ <version>1.12.2-CP01-SNAPSHOT</version>
</parent>
<artifactId>exo.jcr.connectors.localadapter</artifactId>
<packaging>rar</packaging>
Modified: jcr/branches/1.12.2-CP01/exo.jcr.framework.command/pom.xml
===================================================================
--- jcr/branches/1.12.2-CP01/exo.jcr.framework.command/pom.xml 2010-06-25 14:03:45 UTC (rev 2708)
+++ jcr/branches/1.12.2-CP01/exo.jcr.framework.command/pom.xml 2010-06-25 14:19:08 UTC (rev 2709)
@@ -12,7 +12,7 @@
<parent>
<groupId>org.exoplatform.jcr</groupId>
<artifactId>jcr-parent</artifactId>
- <version>1.12.2-GA</version>
+ <version>1.12.2-CP01-SNAPSHOT</version>
</parent>
<artifactId>exo.jcr.framework.command</artifactId>
<name>eXo JCR :: Framework :: Command</name>
Modified: jcr/branches/1.12.2-CP01/exo.jcr.framework.ftpclient/pom.xml
===================================================================
--- jcr/branches/1.12.2-CP01/exo.jcr.framework.ftpclient/pom.xml 2010-06-25 14:03:45 UTC (rev 2708)
+++ jcr/branches/1.12.2-CP01/exo.jcr.framework.ftpclient/pom.xml 2010-06-25 14:19:08 UTC (rev 2709)
@@ -24,7 +24,7 @@
<parent>
<groupId>org.exoplatform.jcr</groupId>
<artifactId>jcr-parent</artifactId>
- <version>1.12.2-GA</version>
+ <version>1.12.2-CP01-SNAPSHOT</version>
</parent>
<artifactId>exo.jcr.framework.ftpclient</artifactId>
<name>eXo JCR :: Framework :: FTP Client</name>
Modified: jcr/branches/1.12.2-CP01/exo.jcr.framework.web/pom.xml
===================================================================
--- jcr/branches/1.12.2-CP01/exo.jcr.framework.web/pom.xml 2010-06-25 14:03:45 UTC (rev 2708)
+++ jcr/branches/1.12.2-CP01/exo.jcr.framework.web/pom.xml 2010-06-25 14:19:08 UTC (rev 2709)
@@ -24,7 +24,7 @@
<parent>
<groupId>org.exoplatform.jcr</groupId>
<artifactId>jcr-parent</artifactId>
- <version>1.12.2-GA</version>
+ <version>1.12.2-CP01-SNAPSHOT</version>
</parent>
<artifactId>exo.jcr.framework.web</artifactId>
<name>eXo JCR :: Framework :: Web</name>
Modified: jcr/branches/1.12.2-CP01/packaging/module/pom.xml
===================================================================
--- jcr/branches/1.12.2-CP01/packaging/module/pom.xml 2010-06-25 14:03:45 UTC (rev 2708)
+++ jcr/branches/1.12.2-CP01/packaging/module/pom.xml 2010-06-25 14:19:08 UTC (rev 2709)
@@ -4,7 +4,7 @@
<parent>
<groupId>org.exoplatform.jcr</groupId>
<artifactId>jcr-parent</artifactId>
- <version>1.12.2-GA</version>
+ <version>1.12.2-CP01-SNAPSHOT</version>
</parent>
<artifactId>jcr.packaging.module</artifactId>
<packaging>pom</packaging>
Modified: jcr/branches/1.12.2-CP01/pom.xml
===================================================================
--- jcr/branches/1.12.2-CP01/pom.xml 2010-06-25 14:03:45 UTC (rev 2708)
+++ jcr/branches/1.12.2-CP01/pom.xml 2010-06-25 14:19:08 UTC (rev 2709)
@@ -29,14 +29,14 @@
<groupId>org.exoplatform.jcr</groupId>
<artifactId>jcr-parent</artifactId>
- <version>1.12.2-GA</version>
+ <version>1.12.2-CP01-SNAPSHOT</version>
<packaging>pom</packaging>
<name>eXo JCR</name>
<scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/exo-jcr/jcr/tags/1.12.2-GA</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/exo-jcr/jcr/tags/1.12.2-GA</developerConnection>
- <url>http://fisheye.jboss.org/browse/exo-jcr/jcr/tags/1.12.2-GA</url>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/exo-jcr/jcr/branches/1.12.2-CP01/</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/exo-jcr/jcr/branches/1.12.2-CP01/</developerConnection>
+ <url>http://fisheye.jboss.org/browse/exo-jcr/jcr/branches/1.12.2-CP01/</url>
</scm>
<properties>
14 years
exo-jcr SVN: r2708 - jcr/branches.
by do-not-reply@jboss.org
Author: dkatayev
Date: 2010-06-25 10:03:45 -0400 (Fri, 25 Jun 2010)
New Revision: 2708
Added:
jcr/branches/1.12.2-CP01/
Removed:
jcr/branches/JCR-1.12.2-CP01/
Log:
EXOJCR-818 JCR-1.12.2-CP01 branch renamed to 1.12.2-CP01
Copied: jcr/branches/1.12.2-CP01 (from rev 2707, jcr/branches/JCR-1.12.2-CP01)
14 years
exo-jcr SVN: r2707 - jcr/branches.
by do-not-reply@jboss.org
Author: dkatayev
Date: 2010-06-25 10:02:02 -0400 (Fri, 25 Jun 2010)
New Revision: 2707
Added:
jcr/branches/JCR-1.12.2-CP01/
Log:
EXOJCR-818 JCR 1.12.2-CP01 branch created
Copied: jcr/branches/JCR-1.12.2-CP01 (from rev 2706, jcr/tags/1.12.2-GA)
14 years