Author: fmui
Date: Sat Mar 29 17:58:14 2014
New Revision: 1583034
URL: http://svn.apache.org/r1583034
Log:
Workbench: clean ups
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/AbstractLoginTab.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/ClientHelper.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/LoginDialog.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/model/ClientSession.java
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/AbstractLoginTab.java
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/AbstractLoginTab.java?rev=1583034&r1=1583033&r2=1583034&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/AbstractLoginTab.java
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/AbstractLoginTab.java
Sat Mar 29 17:58:14 2014
@@ -26,6 +26,7 @@ import javax.swing.JPanel;
import org.apache.chemistry.opencmis.client.api.ObjectFactory;
import org.apache.chemistry.opencmis.client.api.Repository;
import org.apache.chemistry.opencmis.client.api.Session;
+import org.apache.chemistry.opencmis.client.bindings.cache.TypeDefinitionCache;
import org.apache.chemistry.opencmis.client.runtime.cache.Cache;
import org.apache.chemistry.opencmis.commons.spi.AuthenticationProvider;
@@ -33,7 +34,7 @@ import org.apache.chemistry.opencmis.com
* Abstract Login Tab.
*
* To add a new login tab, derive a class from this class, create a file
- *
<code>META-INF/services/org.apache.chemistry.opencmis.workbench.AbstractLoginTab</code>
+ * {@code
META-INF/services/org.apache.chemistry.opencmis.workbench.AbstractLoginTab}
* , and put the name of the fully qualified name of your class into this file.
*/
public abstract class AbstractLoginTab extends JPanel {
@@ -52,33 +53,40 @@ public abstract class AbstractLoginTab e
public abstract Map<String, String> getSessionParameters();
/**
- * Returns an <code>ObjectFactory</code> instance or <code>null</code> for
- * the default object factory.
+ * Returns an {@code ObjectFactory} instance or {@code null} for the
default
+ * object factory.
*/
public ObjectFactory getObjectFactory() {
return null;
}
/**
- * Returns an <code>AuthenticationProvider</code> instance or
- * <code>null</code> for the default authentication provider.
+ * Returns an {@code AuthenticationProvider} instance or {@code null} for
+ * the default authentication provider.
*/
public AuthenticationProvider getAuthenticationProvider() {
return null;
}
/**
- * Returns a <code>Cache</code> instance or <code>null</code> for the
- * default cache.
+ * Returns a {@code Cache} instance or {@code null} for the default cache.
*/
public Cache getCache() {
return null;
}
/**
- * Defines if the session parameters should be transfered to the expert tab
- * when the user switches from the this tab to the expert tab. The default
- * is <code>false</code>.
+ * Returns an {@code TypeDefinitionCache} instance or {@code null} for the
+ * default authentication provider.
+ */
+ public TypeDefinitionCache getTypeDefinitionCache() {
+ return null;
+ }
+
+ /**
+ * Defines whether the session parameters should be transfered to the
expert
+ * tab when the user switches from the this tab to the expert tab or not.
+ * The default is {@code false}.
*/
public boolean transferSessionParametersToExpertTab() {
return false;
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/ClientHelper.java
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/ClientHelper.java?rev=1583034&r1=1583033&r2=1583034&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/ClientHelper.java
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/ClientHelper.java
Sat Mar 29 17:58:14 2014
@@ -79,7 +79,6 @@ import org.apache.chemistry.opencmis.cli
import org.apache.chemistry.opencmis.client.api.Session;
import org.apache.chemistry.opencmis.commons.SessionParameter;
import org.apache.chemistry.opencmis.commons.data.ContentStream;
-import org.apache.chemistry.opencmis.commons.enums.BindingType;
import org.apache.chemistry.opencmis.commons.exceptions.CmisBaseException;
import
org.apache.chemistry.opencmis.commons.exceptions.CmisConstraintException;
import org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException;
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/LoginDialog.java
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/LoginDialog.java?rev=1583034&r1=1583033&r2=1583034&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/LoginDialog.java
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/LoginDialog.java
Sat Mar 29 17:58:14 2014
@@ -259,7 +259,7 @@ public class LoginDialog extends JDialog
public void createClientSession() {
setClientSession(new ClientSession(currentTab.getSessionParameters(),
currentTab.getObjectFactory(),
- currentTab.getAuthenticationProvider(),
currentTab.getCache()));
+ currentTab.getAuthenticationProvider(), currentTab.getCache(),
currentTab.getTypeDefinitionCache()));
}
public void showDialog() {
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/model/ClientSession.java
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/model/ClientSession.java?rev=1583034&r1=1583033&r2=1583034&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/model/ClientSession.java
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/model/ClientSession.java
Sat Mar 29 17:58:14 2014
@@ -38,6 +38,7 @@ import org.apache.chemistry.opencmis.cli
import org.apache.chemistry.opencmis.client.api.OperationContext;
import org.apache.chemistry.opencmis.client.api.Repository;
import org.apache.chemistry.opencmis.client.api.Session;
+import org.apache.chemistry.opencmis.client.bindings.cache.TypeDefinitionCache;
import org.apache.chemistry.opencmis.client.runtime.SessionFactoryImpl;
import org.apache.chemistry.opencmis.client.runtime.cache.Cache;
import org.apache.chemistry.opencmis.commons.PropertyIds;
@@ -104,12 +105,12 @@ public class ClientSession {
private OperationContext versionOperationContext;
public ClientSession(Map<String, String> sessionParameters, ObjectFactory
objectFactory,
- AuthenticationProvider authenticationProvider, Cache cache) {
+ AuthenticationProvider authenticationProvider, Cache cache,
TypeDefinitionCache typeDefCache) {
if (sessionParameters == null) {
throw new IllegalArgumentException("Parameters must not be null!");
}
- connect(sessionParameters, objectFactory, authenticationProvider,
cache);
+ connect(sessionParameters, objectFactory, authenticationProvider,
cache, typeDefCache);
}
public static SessionParameterMap createSessionParameters(String url,
BindingType binding, String username,
@@ -162,7 +163,7 @@ public class ClientSession {
}
private void connect(Map<String, String> sessionParameters, ObjectFactory
objectFactory,
- AuthenticationProvider authenticationProvider, Cache cache) {
+ AuthenticationProvider authenticationProvider, Cache cache,
TypeDefinitionCache typeDefCache) {
this.sessionParameters = sessionParameters;
// set a new dummy authenticator
@@ -175,7 +176,7 @@ public class ClientSession {
}
repositories =
SessionFactoryImpl.newInstance().getRepositories(sessionParameters,
objectFactory,
- authenticationProvider, cache);
+ authenticationProvider, cache, typeDefCache);
}
public List<Repository> getRepositories() {