Author: fmui
Date: Thu Aug 15 13:23:28 2013
New Revision: 1514256
URL: http://svn.apache.org/r1514256
Log:
code clean up
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/impl/TransientWrapper.java
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/UrlBuilder.java
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/json/parser/Yytoken.java
chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/impl/JUnitHelper.java
chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/runner/ConsoleRunner.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/ClientFrame.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/PropertyEditorFrame.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/TckDialog.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/AclUpdatePanel.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/AddObjectToFolderPanel.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/AppendContentStreamPanel.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/ApplyPolicyPanel.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/CancelCheckOutPanel.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/CheckInPanel.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/CheckOutPanel.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/CopyPanel.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/DeleteContentStreamPanel.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/DeletePanel.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/DeleteTreePanel.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/MovePanel.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/PropertyUpdatePanel.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/RemoveObjectFromFolderPanel.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/RemovePolicyPanel.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/SetContentStreamPanel.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/checks/ObjectComplianceCheck.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/checks/SwingReport.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/model/ClientModel.java
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/impl/TransientWrapper.java
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/impl/TransientWrapper.java?rev=1514256&r1=1514255&r2=1514256&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/impl/TransientWrapper.java
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/impl/TransientWrapper.java
Thu Aug 15 13:23:28 2013
@@ -18,6 +18,9 @@
*/
package org.apache.chemistry.opencmis.client.bindings.impl;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
import java.io.Serializable;
/**
@@ -40,4 +43,11 @@ public class TransientWrapper implements
public String toString() {
return (object == null ? "(no object)" : "(transient) " +
object.toString());
}
+
+ private void writeObject(ObjectOutputStream out) throws IOException {
+ }
+
+ private void readObject(ObjectInputStream in) throws IOException,
ClassNotFoundException {
+ object = null;
+ }
}
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/UrlBuilder.java
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/UrlBuilder.java?rev=1514256&r1=1514255&r2=1514256&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/UrlBuilder.java
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/UrlBuilder.java
Thu Aug 15 13:23:28 2013
@@ -188,7 +188,7 @@ public class UrlBuilder {
return this;
}
- public static final char[] RFC7232_RESERVED = ";?:@&=+$,[]".toCharArray();
+ private static final char[] RFC7232_RESERVED = ";?:@&=+$,[]".toCharArray();
public static String quoteURIPathComponent(String s, boolean quoteSlash) {
if (s.length() == 0) {
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/json/parser/Yytoken.java
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/json/parser/Yytoken.java?rev=1514256&r1=1514255&r2=1514256&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/json/parser/Yytoken.java
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/json/parser/Yytoken.java
Thu Aug 15 13:23:28 2013
@@ -70,6 +70,8 @@ public class Yytoken {
case TYPE_EOF:
sb.append("END OF FILE");
break;
+ default:
+ assert false;
}
return sb.toString();
}
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/impl/JUnitHelper.java
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/impl/JUnitHelper.java?rev=1514256&r1=1514255&r2=1514256&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/impl/JUnitHelper.java
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/impl/JUnitHelper.java
Thu Aug 15 13:23:28 2013
@@ -31,7 +31,7 @@ import org.apache.chemistry.opencmis.tck
import org.apache.chemistry.opencmis.tck.runner.AbstractRunner;
import org.junit.Assert;
-public class JUnitHelper {
+public final class JUnitHelper {
public static final String JUNIT_PARAMETERS =
"org.apache.chemistry.opencmis.tck.junit.parameters";
@@ -85,6 +85,8 @@ public class JUnitHelper {
}
private static class JUnitProgressMonitor implements
CmisTestProgressMonitor {
+
+ @SuppressWarnings("PMD.SystemPrintln")
public void startGroup(CmisTestGroup group) {
System.out.println(group.getName() + " (" +
group.getTests().size() + " tests)");
}
@@ -92,6 +94,7 @@ public class JUnitHelper {
public void endGroup(CmisTestGroup group) {
}
+ @SuppressWarnings("PMD.SystemPrintln")
public void startTest(CmisTest test) {
System.out.println(" " + test.getName());
}
@@ -99,6 +102,7 @@ public class JUnitHelper {
public void endTest(CmisTest test) {
}
+ @SuppressWarnings("PMD.SystemPrintln")
public void message(String msg) {
System.out.println(msg);
}
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/runner/ConsoleRunner.java
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/runner/ConsoleRunner.java?rev=1514256&r1=1514255&r2=1514256&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/runner/ConsoleRunner.java
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/runner/ConsoleRunner.java
Thu Aug 15 13:23:28 2013
@@ -55,14 +55,18 @@ public class ConsoleRunner extends Abstr
}
private static class ConsoleProgressMonitor implements
CmisTestProgressMonitor {
+
+ @SuppressWarnings("PMD.SystemPrintln")
public void startGroup(CmisTestGroup group) {
System.out.println(group.getName() + " (" +
group.getTests().size() + " tests)");
}
+ @SuppressWarnings("PMD.SystemPrintln")
public void endGroup(CmisTestGroup group) {
System.out.println();
}
+ @SuppressWarnings("PMD.SystemPrintln")
public void startTest(CmisTest test) {
System.out.print('.');
}
@@ -70,6 +74,7 @@ public class ConsoleRunner extends Abstr
public void endTest(CmisTest test) {
}
+ @SuppressWarnings("PMD.SystemPrintln")
public void message(String msg) {
System.out.println(msg);
}
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/ClientFrame.java
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/ClientFrame.java?rev=1514256&r1=1514255&r2=1514256&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/ClientFrame.java
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/ClientFrame.java
Thu Aug 15 13:23:28 2013
@@ -49,11 +49,15 @@ import org.apache.chemistry.opencmis.wor
import org.apache.chemistry.opencmis.workbench.details.DetailsTabs;
import org.apache.chemistry.opencmis.workbench.model.ClientModel;
import org.apache.chemistry.opencmis.workbench.model.ClientSession;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class ClientFrame extends JFrame implements WindowListener {
private static final long serialVersionUID = 1L;
+ private static final Logger LOG =
LoggerFactory.getLogger(ClientFrame.class);
+
public static final String SYSPROP_SCRIPTS =
ClientSession.WORKBENCH_PREFIX + "scripts";
private static final String WINDOW_TITLE = "CMIS Workbench";
@@ -127,7 +131,7 @@ public class ClientFrame extends JFrame
macAppClass.getMethod("setDockIconImage", new
Class<?>[] { Image.class }).invoke(macApp,
new Object[] { icon.getImage() });
} catch (Exception e) {
- // ignore
+ LOG.debug("Could not set dock icon!", e);
}
}
@@ -136,10 +140,10 @@ public class ClientFrame extends JFrame
fullscreenClass.getMethod("setWindowCanFullScreen", new
Class<?>[] { Window.class, Boolean.TYPE })
.invoke(fullscreenClass, this, true);
} catch (Exception e) {
- // ignore
+ LOG.debug("Could not add fullscreen button!", e);
}
} catch (Exception e) {
- // ignore
+ LOG.debug("Could not get com.apple.eawt.Application object!",
e);
}
}
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=1514256&r1=1514255&r2=1514256&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
Thu Aug 15 13:23:28 2013
@@ -91,7 +91,7 @@ import org.apache.chemistry.opencmis.wor
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public class ClientHelper {
+public final class ClientHelper {
public static final Color LINK_COLOR = new Color(105, 29, 21);
public static final Color LINK_SELECTED_COLOR = new Color(255, 255, 255);
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/PropertyEditorFrame.java
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/PropertyEditorFrame.java?rev=1514256&r1=1514255&r2=1514256&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/PropertyEditorFrame.java
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/PropertyEditorFrame.java
Thu Aug 15 13:23:28 2013
@@ -31,6 +31,7 @@ import java.awt.event.KeyListener;
import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.text.Format;
+import java.text.ParseException;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Collections;
@@ -520,7 +521,7 @@ public class PropertyEditorFrame extends
});
}
- public Object getPropertyValue() throws Exception {
+ public Object getPropertyValue() throws ParseException {
commitEdit();
return getValue();
}
@@ -544,7 +545,7 @@ public class PropertyEditorFrame extends
return result;
}
- public Object getPropertyValue() throws Exception {
+ public Object getPropertyValue() {
return ((BigDecimal) super.getValue()).toBigIntegerExact();
}
}
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/TckDialog.java
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/TckDialog.java?rev=1514256&r1=1514255&r2=1514256&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/TckDialog.java
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/TckDialog.java
Thu Aug 15 13:23:28 2013
@@ -324,7 +324,7 @@ public class TckDialog {
}
}
- private class TestTreeNode extends DefaultMutableTreeNode {
+ private static class TestTreeNode extends DefaultMutableTreeNode {
private static final long serialVersionUID = 1L;
private final JTree tree;
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/AclUpdatePanel.java
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/AclUpdatePanel.java?rev=1514256&r1=1514255&r2=1514256&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/AclUpdatePanel.java
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/AclUpdatePanel.java
Thu Aug 15 13:23:28 2013
@@ -50,7 +50,7 @@ public class AclUpdatePanel extends Acti
}
@Override
- public boolean doAction() throws Exception {
+ public boolean doAction() {
new AclEditorFrame(getClientModel(), getObject());
return false;
}
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/AddObjectToFolderPanel.java
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/AddObjectToFolderPanel.java?rev=1514256&r1=1514255&r2=1514256&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/AddObjectToFolderPanel.java
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/AddObjectToFolderPanel.java
Thu Aug 15 13:23:28 2013
@@ -74,7 +74,7 @@ public class AddObjectToFolderPanel exte
}
@Override
- public boolean doAction() throws Exception {
+ public boolean doAction() {
ObjectId folderId =
getClientModel().getClientSession().getSession().createObjectId(folderField.getText());
((FileableCmisObject) getObject()).addToFolder(folderId,
allVersionsBox.isSelected());
return true;
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/AppendContentStreamPanel.java
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/AppendContentStreamPanel.java?rev=1514256&r1=1514255&r2=1514256&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/AppendContentStreamPanel.java
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/AppendContentStreamPanel.java
Thu Aug 15 13:23:28 2013
@@ -18,6 +18,8 @@
*/
package org.apache.chemistry.opencmis.workbench.actions;
+import java.io.FileNotFoundException;
+
import javax.swing.JCheckBox;
import javax.swing.JTextField;
@@ -68,7 +70,7 @@ public class AppendContentStreamPanel ex
}
@Override
- public boolean doAction() throws Exception {
+ public boolean doAction() throws FileNotFoundException {
ContentStream content =
getClientModel().createContentStream(filenameField.getText());
try {
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/ApplyPolicyPanel.java
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/ApplyPolicyPanel.java?rev=1514256&r1=1514255&r2=1514256&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/ApplyPolicyPanel.java
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/ApplyPolicyPanel.java
Thu Aug 15 13:23:28 2013
@@ -68,7 +68,7 @@ public class ApplyPolicyPanel extends Ac
}
@Override
- public boolean doAction() throws Exception {
+ public boolean doAction() {
getObject().applyPolicy(new ObjectIdImpl(policyField.getText()));
return true;
}
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/CancelCheckOutPanel.java
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/CancelCheckOutPanel.java?rev=1514256&r1=1514255&r2=1514256&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/CancelCheckOutPanel.java
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/CancelCheckOutPanel.java
Thu Aug 15 13:23:28 2013
@@ -50,7 +50,7 @@ public class CancelCheckOutPanel extends
}
@Override
- public boolean doAction() throws Exception {
+ public boolean doAction() {
((Document) getObject()).cancelCheckOut();
return false;
}
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/CheckInPanel.java
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/CheckInPanel.java?rev=1514256&r1=1514255&r2=1514256&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/CheckInPanel.java
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/CheckInPanel.java
Thu Aug 15 13:23:28 2013
@@ -18,6 +18,8 @@
*/
package org.apache.chemistry.opencmis.workbench.actions;
+import java.io.FileNotFoundException;
+
import javax.swing.JCheckBox;
import javax.swing.JTextField;
@@ -63,7 +65,7 @@ public class CheckInPanel extends Action
}
@Override
- public boolean doAction() throws Exception {
+ public boolean doAction() throws FileNotFoundException {
ContentStream content =
getClientModel().createContentStream(filenameField.getText());
try {
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/CheckOutPanel.java
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/CheckOutPanel.java?rev=1514256&r1=1514255&r2=1514256&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/CheckOutPanel.java
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/CheckOutPanel.java
Thu Aug 15 13:23:28 2013
@@ -50,7 +50,7 @@ public class CheckOutPanel extends Actio
}
@Override
- public boolean doAction() throws Exception {
+ public boolean doAction() {
((Document) getObject()).checkOut();
return true;
}
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/CopyPanel.java
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/CopyPanel.java?rev=1514256&r1=1514255&r2=1514256&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/CopyPanel.java
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/CopyPanel.java
Thu Aug 15 13:23:28 2013
@@ -64,7 +64,7 @@ public class CopyPanel extends ActionPan
}
@Override
- public boolean doAction() throws Exception {
+ public boolean doAction() {
ObjectId targetFolderId = new
ObjectIdImpl(targetFolderField.getText());
((Document) getObject()).copy(targetFolderId);
return true;
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/DeleteContentStreamPanel.java
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/DeleteContentStreamPanel.java?rev=1514256&r1=1514255&r2=1514256&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/DeleteContentStreamPanel.java
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/DeleteContentStreamPanel.java
Thu Aug 15 13:23:28 2013
@@ -50,7 +50,7 @@ public class DeleteContentStreamPanel ex
}
@Override
- public boolean doAction() throws Exception {
+ public boolean doAction() {
((Document) getObject()).deleteContentStream();
return true;
}
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/DeletePanel.java
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/DeletePanel.java?rev=1514256&r1=1514255&r2=1514256&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/DeletePanel.java
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/DeletePanel.java
Thu Aug 15 13:23:28 2013
@@ -55,7 +55,7 @@ public class DeletePanel extends ActionP
}
@Override
- public boolean doAction() throws Exception {
+ public boolean doAction() {
getObject().delete(allVersionsBox.isSelected());
return false;
}
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/DeleteTreePanel.java
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/DeleteTreePanel.java?rev=1514256&r1=1514255&r2=1514256&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/DeleteTreePanel.java
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/DeleteTreePanel.java
Thu Aug 15 13:23:28 2013
@@ -71,7 +71,7 @@ public class DeleteTreePanel extends Act
}
@Override
- public boolean doAction() throws Exception {
+ public boolean doAction() {
List<String> ids = ((Folder)
getObject()).deleteTree(allVersionsBox.isSelected(),
(UnfileObject) unfileObjectsBox.getSelectedItem(),
continueOnFailureBox.isSelected());
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/MovePanel.java
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/MovePanel.java?rev=1514256&r1=1514255&r2=1514256&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/MovePanel.java
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/MovePanel.java
Thu Aug 15 13:23:28 2013
@@ -70,7 +70,7 @@ public class MovePanel extends ActionPan
}
@Override
- public boolean doAction() throws Exception {
+ public boolean doAction() {
ObjectId targetFolderId = new
ObjectIdImpl(targetFolderField.getText());
FileableCmisObject before = (FileableCmisObject) getObject();
FileableCmisObject after =
before.move(getClientModel().getCurrentFolder(), targetFolderId);
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/PropertyUpdatePanel.java
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/PropertyUpdatePanel.java?rev=1514256&r1=1514255&r2=1514256&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/PropertyUpdatePanel.java
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/PropertyUpdatePanel.java
Thu Aug 15 13:23:28 2013
@@ -50,7 +50,7 @@ public class PropertyUpdatePanel extends
}
@Override
- public boolean doAction() throws Exception {
+ public boolean doAction() {
new PropertyEditorFrame(getClientModel(), getObject());
return false;
}
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/RemoveObjectFromFolderPanel.java
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/RemoveObjectFromFolderPanel.java?rev=1514256&r1=1514255&r2=1514256&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/RemoveObjectFromFolderPanel.java
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/RemoveObjectFromFolderPanel.java
Thu Aug 15 13:23:28 2013
@@ -82,7 +82,7 @@ public class RemoveObjectFromFolderPanel
}
@Override
- public boolean doAction() throws Exception {
+ public boolean doAction() {
ObjectId folderId =
getClientModel().getClientSession().getSession().createObjectId(folderField.getText());
((FileableCmisObject) getObject()).removeFromFolder(folderId);
return true;
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/RemovePolicyPanel.java
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/RemovePolicyPanel.java?rev=1514256&r1=1514255&r2=1514256&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/RemovePolicyPanel.java
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/RemovePolicyPanel.java
Thu Aug 15 13:23:28 2013
@@ -68,7 +68,7 @@ public class RemovePolicyPanel extends A
}
@Override
- public boolean doAction() throws Exception {
+ public boolean doAction() {
getObject().removePolicy(new ObjectIdImpl(policyField.getText()));
return true;
}
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/SetContentStreamPanel.java
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/SetContentStreamPanel.java?rev=1514256&r1=1514255&r2=1514256&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/SetContentStreamPanel.java
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/actions/SetContentStreamPanel.java
Thu Aug 15 13:23:28 2013
@@ -18,6 +18,8 @@
*/
package org.apache.chemistry.opencmis.workbench.actions;
+import java.io.FileNotFoundException;
+
import javax.swing.JCheckBox;
import javax.swing.JTextField;
@@ -63,7 +65,7 @@ public class SetContentStreamPanel exten
}
@Override
- public boolean doAction() throws Exception {
+ public boolean doAction() throws FileNotFoundException {
ContentStream content =
getClientModel().createContentStream(filenameField.getText());
try {
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/checks/ObjectComplianceCheck.java
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/checks/ObjectComplianceCheck.java?rev=1514256&r1=1514255&r2=1514256&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/checks/ObjectComplianceCheck.java
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/checks/ObjectComplianceCheck.java
Thu Aug 15 13:23:28 2013
@@ -34,7 +34,7 @@ public class ObjectComplianceCheck exten
private String objectId;
- public ObjectComplianceCheck(String objectId) throws Exception {
+ public ObjectComplianceCheck(String objectId) {
this.objectId = objectId;
}
@@ -45,7 +45,7 @@ public class ObjectComplianceCheck exten
}
@Override
- public void run(Session session) throws Exception {
+ public void run(Session session) {
CmisObject object = session.getObject(objectId,
SELECT_ALL_NO_CACHE_OC);
String[] propertiesToCheck = getAllProperties(object);
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/checks/SwingReport.java
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/checks/SwingReport.java?rev=1514256&r1=1514255&r2=1514256&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/checks/SwingReport.java
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/checks/SwingReport.java
Thu Aug 15 13:23:28 2013
@@ -81,8 +81,7 @@ public class SwingReport extends Abstrac
}
@Override
- public void createReport(Map<String, String> parameters,
List<CmisTestGroup> groups, Writer writer)
- throws Exception {
+ public void createReport(Map<String, String> parameters,
List<CmisTestGroup> groups, Writer writer) {
this.parameters = parameters;
this.groups = groups;
new SwingReportDialog();
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/model/ClientModel.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/ClientModel.java?rev=1514256&r1=1514255&r2=1514256&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/model/ClientModel.java
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/model/ClientModel.java
Thu Aug 15 13:23:28 2013
@@ -21,6 +21,7 @@ package org.apache.chemistry.opencmis.wo
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
+import java.io.FileNotFoundException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Collections;
@@ -96,7 +97,7 @@ public class ClientModel {
return clientSession;
}
- public synchronized RepositoryInfo getRepositoryInfo() throws Exception {
+ public synchronized RepositoryInfo getRepositoryInfo() {
Session session = clientSession.getSession();
return session.getRepositoryInfo();
}
@@ -155,7 +156,7 @@ public class ClientModel {
return false;
}
- public synchronized ObjectId loadFolder(String folderId, boolean byPath)
throws Exception {
+ public synchronized ObjectId loadFolder(String folderId, boolean byPath) {
try {
Session session = clientSession.getSession();
CmisObject selectedObject = null;
@@ -194,32 +195,32 @@ public class ClientModel {
setCurrentFolder((Folder) folderObject, children);
return selectedObject;
- } catch (Exception ex) {
+ } catch (CmisBaseException ex) {
setCurrentFolder(null, new ArrayList<CmisObject>(0));
throw ex;
}
}
- public synchronized void reloadFolder() throws Exception {
+ public synchronized void reloadFolder() {
if (currentFolder != null) {
loadFolder(currentFolder.getId(), false);
}
}
- public synchronized void loadObject(String objectId) throws Exception {
+ public synchronized void loadObject(String objectId) {
try {
Session session = clientSession.getSession();
CmisObject object = session.getObject(objectId,
clientSession.getObjectOperationContext());
object.refreshIfOld(OLD);
setCurrentObject(object);
- } catch (Exception ex) {
+ } catch (CmisBaseException ex) {
setCurrentObject(null);
throw ex;
}
}
- public synchronized void reloadObject() throws Exception {
+ public synchronized void reloadObject() {
if (currentObject == null) {
return;
}
@@ -230,14 +231,13 @@ public class ClientModel {
object.refresh();
setCurrentObject(object);
- } catch (Exception ex) {
+ } catch (CmisBaseException ex) {
setCurrentObject(null);
throw ex;
}
}
- public synchronized ItemIterable<QueryResult> query(String q, boolean
searchAllVersions, int maxHits)
- throws Exception {
+ public synchronized ItemIterable<QueryResult> query(String q, boolean
searchAllVersions, int maxHits) {
OperationContext queryContext = new OperationContextImpl(null, false,
false, false, IncludeRelationships.NONE,
null, false, null, false, maxHits);
@@ -245,12 +245,12 @@ public class ClientModel {
return session.query(q, searchAllVersions, queryContext);
}
- public synchronized List<Tree<ObjectType>> getTypeDescendants() throws
Exception {
+ public synchronized List<Tree<ObjectType>> getTypeDescendants() {
Session session = clientSession.getSession();
return session.getTypeDescendants(null, -1, true);
}
- public ContentStream createContentStream(String filename) throws Exception
{
+ public ContentStream createContentStream(String filename) throws
FileNotFoundException {
ContentStream content = null;
if ((filename != null) && (filename.length() > 0)) {
File file = new File(filename);
@@ -265,7 +265,7 @@ public class ClientModel {
public synchronized ObjectId createDocument(String name, String type,
String filename,
Map<String, Object> additionalProperties, VersioningState
versioningState, boolean unfiled)
- throws Exception {
+ throws FileNotFoundException {
Map<String, Object> properties = new HashMap<String, Object>();
properties.put(PropertyIds.NAME, name);
properties.put(PropertyIds.OBJECT_TYPE_ID, type);
@@ -284,13 +284,13 @@ public class ClientModel {
}
}
- public ContentStream createContentStream(String name, long length, long
seed) throws Exception {
+ public ContentStream createContentStream(String name, long length, long
seed) {
return clientSession.getSession().getObjectFactory()
.createContentStream(name, length, "application/octet-stream",
new RandomInputStream(length, seed));
}
public synchronized ObjectId createDocument(String name, String type,
Map<String, Object> additionalProperties,
- long length, long seed, VersioningState versioningState, boolean
unfiled) throws Exception {
+ long length, long seed, VersioningState versioningState, boolean
unfiled) {
Map<String, Object> properties = new HashMap<String, Object>();
properties.put(PropertyIds.NAME, name);
properties.put(PropertyIds.OBJECT_TYPE_ID, type);
@@ -308,8 +308,7 @@ public class ClientModel {
}
}
- public synchronized ObjectId createItem(String name, String type,
Map<String, Object> additionalProperties)
- throws Exception {
+ public synchronized ObjectId createItem(String name, String type,
Map<String, Object> additionalProperties) {
Map<String, Object> properties = new HashMap<String, Object>();
properties.put(PropertyIds.NAME, name);
properties.put(PropertyIds.OBJECT_TYPE_ID, type);
@@ -321,8 +320,7 @@ public class ClientModel {
return clientSession.getSession().createItem(properties,
currentFolder, null, null, null);
}
- public synchronized ObjectId createFolder(String name, String type,
Map<String, Object> additionalProperties)
- throws Exception {
+ public synchronized ObjectId createFolder(String name, String type,
Map<String, Object> additionalProperties) {
Map<String, Object> properties = new HashMap<String, Object>();
properties.put(PropertyIds.NAME, name);
properties.put(PropertyIds.OBJECT_TYPE_ID, type);
@@ -335,7 +333,7 @@ public class ClientModel {
}
public synchronized ObjectId createRelationship(String name, String type,
String sourceId, String targetId,
- Map<String, Object> additionalProperties) throws Exception {
+ Map<String, Object> additionalProperties) {
Map<String, Object> properties = new HashMap<String, Object>();
properties.put(PropertyIds.NAME, name);
properties.put(PropertyIds.OBJECT_TYPE_ID, type);
@@ -381,6 +379,9 @@ public class ClientModel {
}
private void addType(List<Tree<ObjectType>> types, List<ObjectType>
resultList, boolean creatableOnly) {
+ assert types != null;
+ assert resultList != null;
+
for (Tree<ObjectType> tt : types) {
if (tt.getItem() != null) {
if (creatableOnly) {