Skip to content

Commit

Permalink
I reduced the visibility on a few classes of the XMLA driver because …
Browse files Browse the repository at this point in the history
…it's namespace got polluted by my careless declarations... :D

From now on, the only public classes/interfaces are the following:

CLASSES

 - XmlaOlap4jDriver : This obviously has to stay public...

 - XmlaOlap4jHttpProxy : This has to stay public so that users can subclass it and do whatever they want with it. Suppose might want to send SOAP messages over something other than HTTP for example. The driver exposes a protected createProxy method in order to do that.

 - XmlaOlap4jProxyException : For the same reasons as the HTTP proxy, this has to be public.

 - XmlaOlap4jNamedMemoryCache : Just in case someone wants to subclass it and create their own SOAP cache, this will stay public. It also exposes enumerations that describe it's configuration, so this class stays public.

INTERFACES

 - XmlaOlap4jProxy and XmlaOlap4jCachedProxy : Read up there ^^

 - XmlaOlap4jCache : To let users implement their own SOAP cache and use it through the JBBC url parameters.

I had to move some test classes in different packages so they can access the protected classes, but this has no impact on end-users.

git-svn-id: https://olap4j.svn.sourceforge.net/svnroot/olap4j/trunk@122 c6a108a4-781c-0410-a6c6-c2d559e19af0
  • Loading branch information
lucboudreau committed Oct 30, 2008
1 parent 7b3729c commit 4692256
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* @author Luc Boudreau
* @version $Id: InvalidStateException.java 92 2008-07-17 07:41:10Z lucboudreau $
*/
public class XmlaOlap4jInvalidStateException extends RuntimeException {
class XmlaOlap4jInvalidStateException extends RuntimeException {
private static final long serialVersionUID = 7265273715459263740L;
}

Expand Down
2 changes: 1 addition & 1 deletion src/org/olap4j/driver/xmla/cache/XmlaOlap4jSHAEncoder.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* @version $Id: XmlaOlap4jSHAEncoder.java 92 2008-07-17 07:41:10Z lucboudreau $
*
*/
public class XmlaOlap4jSHAEncoder {
class XmlaOlap4jSHAEncoder {

private static String convertToHex(byte[] data) {
StringBuilder buf = new StringBuilder();
Expand Down
22 changes: 7 additions & 15 deletions src/org/olap4j/driver/xmla/proxy/XmlaOlap4jAbstractHttpProxy.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
* @author Luc Boudreau
* @version $Id: AbstractHttpProxy.java 92 2008-07-17 07:41:10Z lucboudreau $
*/
public abstract class XmlaOlap4jAbstractHttpProxy
abstract class XmlaOlap4jAbstractHttpProxy
implements XmlaOlap4jCachedProxy
{
/**
Expand Down Expand Up @@ -78,37 +78,29 @@ abstract public Future<byte[]> getResponseViaSubmit(
String request);

/**
* Helper method to save cookies for later use.
* @param urlConn The url connection for which we want the cookies
* saved for later use.
* @throws IOException An io exception gets thrown if the given url
* connection has not been opened yet.
* Helper method to add cookies to a given connection.
* @param urlConn The url connection to which we want the cookies
* applied to.
*/
protected void useCookies(URLConnection urlConn){
// Initializes the cookie manager
this.initCookieManager();

// Saves the current cookies
this.cookieManager.setCookies(urlConn);
}


/**
* Helper method to add cookies to a given connection.
* @param urlConn The url connection to which we want the cookies
* applied to.
* @throws IOException An io exception gets thrown if the given url
* connection has already been opened.
* Helper method to save cookies for later use.
* @param urlConn The url connection for which we want the cookies
* saved for later use.
*/
protected void saveCookies(URLConnection urlConn){
// Initializes the cookie manager
this.initCookieManager();

// Saves the current cookies
this.cookieManager.storeCookies(urlConn);
}


/* (non-Javadoc)
* @see org.olap4j.driver.xmla.XmlaOlap4jDriver.Proxy#setCache(
* java.lang.String, java.util.Properties)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
**/

@SuppressWarnings("unchecked")
public class XmlaOlap4jCookieManager {
class XmlaOlap4jCookieManager {

private Map store;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.olap4j;
package org.olap4j.driver.xmla.cache;

import junit.framework.TestCase;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package org.olap4j;
package org.olap4j.driver.xmla.proxy;

import java.util.HashMap;
import java.util.Map;

import junit.framework.TestCase;

import org.olap4j.OlapException;
import org.olap4j.driver.xmla.XmlaOlap4jDriver;
import org.olap4j.driver.xmla.cache.XmlaOlap4jNamedMemoryCache;
import org.olap4j.driver.xmla.proxy.XmlaOlap4jCachedProxy;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.olap4j;
package org.olap4j.driver.xmla.proxy;

import java.io.IOException;
import java.net.HttpURLConnection;
Expand Down

0 comments on commit 4692256

Please sign in to comment.