You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@chemistry.apache.org by fm...@apache.org on 2014/05/28 14:41:11 UTC
svn commit: r1597994 - in
/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench:
./ actions/ details/
Author: fmui
Date: Wed May 28 12:41:10 2014
New Revision: 1597994
URL: http://svn.apache.org/r1597994
Log:
CMIS-807: Workbench: handle incompliant repositories that don't provide allowable actions (and using the new convenience methods)
Modified:
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/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/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/details/PropertyTable.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/details/VersionTable.java
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=1597994&r1=1597993&r2=1597994&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 Wed May 28 12:41:10 2014
@@ -126,8 +126,8 @@ public class PropertyEditorFrame extends
// primary type
for (PropertyDefinition<?> propDef : object.getType().getPropertyDefinitions().values()) {
boolean isUpdatable = (propDef.getUpdatability() == Updatability.READWRITE)
- || (propDef.getUpdatability() == Updatability.WHENCHECKEDOUT && object.getAllowableActions()
- .getAllowableActions().contains(Action.CAN_CHECK_IN));
+ || (propDef.getUpdatability() == Updatability.WHENCHECKEDOUT && object
+ .hasAllowableAction(Action.CAN_CHECK_IN));
if (isUpdatable) {
PropertyInputPanel propertyPanel = new PropertyInputPanel(propDef, object.getPropertyValue(propDef
@@ -145,7 +145,7 @@ public class PropertyEditorFrame extends
for (PropertyDefinition<?> propDef : secType.getPropertyDefinitions().values()) {
boolean isUpdatable = (propDef.getUpdatability() == Updatability.READWRITE)
|| (propDef.getUpdatability() == Updatability.WHENCHECKEDOUT && object
- .getAllowableActions().getAllowableActions().contains(Action.CAN_CHECK_IN));
+ .hasAllowableAction(Action.CAN_CHECK_IN));
if (isUpdatable) {
PropertyInputPanel propertyPanel = new PropertyInputPanel(propDef,
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=1597994&r1=1597993&r2=1597994&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 Wed May 28 12:41:10 2014
@@ -46,7 +46,7 @@ public class AclUpdatePanel extends Acti
return true;
}
- return getObject().getAllowableActions().getAllowableActions().contains(Action.CAN_APPLY_ACL);
+ return getObject().hasAllowableAction(Action.CAN_APPLY_ACL);
}
@Override
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=1597994&r1=1597993&r2=1597994&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 Wed May 28 12:41:10 2014
@@ -70,7 +70,7 @@ public class AddObjectToFolderPanel exte
return true;
}
- return getObject().getAllowableActions().getAllowableActions().contains(Action.CAN_ADD_OBJECT_TO_FOLDER);
+ return getObject().hasAllowableAction(Action.CAN_ADD_OBJECT_TO_FOLDER);
}
@Override
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=1597994&r1=1597993&r2=1597994&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 Wed May 28 12:41:10 2014
@@ -66,7 +66,7 @@ public class AppendContentStreamPanel ex
return true;
}
- return getObject().getAllowableActions().getAllowableActions().contains(Action.CAN_SET_CONTENT_STREAM);
+ return getObject().hasAllowableAction(Action.CAN_SET_CONTENT_STREAM);
}
@Override
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=1597994&r1=1597993&r2=1597994&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 Wed May 28 12:41:10 2014
@@ -64,7 +64,7 @@ public class ApplyPolicyPanel extends Ac
return true;
}
- return getObject().getAllowableActions().getAllowableActions().contains(Action.CAN_APPLY_POLICY);
+ return getObject().hasAllowableAction(Action.CAN_APPLY_POLICY);
}
@Override
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=1597994&r1=1597993&r2=1597994&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 Wed May 28 12:41:10 2014
@@ -46,7 +46,7 @@ public class CancelCheckOutPanel extends
return true;
}
- return getObject().getAllowableActions().getAllowableActions().contains(Action.CAN_CANCEL_CHECK_OUT);
+ return getObject().hasAllowableAction(Action.CAN_CANCEL_CHECK_OUT);
}
@Override
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=1597994&r1=1597993&r2=1597994&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 Wed May 28 12:41:10 2014
@@ -61,7 +61,7 @@ public class CheckInPanel extends Action
return true;
}
- return getObject().getAllowableActions().getAllowableActions().contains(Action.CAN_CHECK_IN);
+ return getObject().hasAllowableAction(Action.CAN_CHECK_IN);
}
@Override
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=1597994&r1=1597993&r2=1597994&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 Wed May 28 12:41:10 2014
@@ -46,7 +46,7 @@ public class CheckOutPanel extends Actio
return true;
}
- return getObject().getAllowableActions().getAllowableActions().contains(Action.CAN_CHECK_OUT);
+ return getObject().hasAllowableAction(Action.CAN_CHECK_OUT);
}
@Override
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=1597994&r1=1597993&r2=1597994&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 Wed May 28 12:41:10 2014
@@ -46,7 +46,7 @@ public class DeleteContentStreamPanel ex
return true;
}
- return getObject().getAllowableActions().getAllowableActions().contains(Action.CAN_DELETE_CONTENT_STREAM);
+ return getObject().hasAllowableAction(Action.CAN_DELETE_CONTENT_STREAM);
}
@Override
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=1597994&r1=1597993&r2=1597994&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 Wed May 28 12:41:10 2014
@@ -51,7 +51,7 @@ public class DeletePanel extends ActionP
return true;
}
- return getObject().getAllowableActions().getAllowableActions().contains(Action.CAN_DELETE_OBJECT);
+ return getObject().hasAllowableAction(Action.CAN_DELETE_OBJECT);
}
@Override
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=1597994&r1=1597993&r2=1597994&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 Wed May 28 12:41:10 2014
@@ -67,7 +67,7 @@ public class DeleteTreePanel extends Act
return true;
}
- return getObject().getAllowableActions().getAllowableActions().contains(Action.CAN_DELETE_TREE);
+ return getObject().hasAllowableAction(Action.CAN_DELETE_TREE);
}
@Override
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=1597994&r1=1597993&r2=1597994&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 Wed May 28 12:41:10 2014
@@ -66,7 +66,7 @@ public class MovePanel extends ActionPan
return true;
}
- return getObject().getAllowableActions().getAllowableActions().contains(Action.CAN_MOVE_OBJECT);
+ return getObject().hasAllowableAction(Action.CAN_MOVE_OBJECT);
}
@Override
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=1597994&r1=1597993&r2=1597994&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 Wed May 28 12:41:10 2014
@@ -46,7 +46,7 @@ public class PropertyUpdatePanel extends
return true;
}
- return getObject().getAllowableActions().getAllowableActions().contains(Action.CAN_UPDATE_PROPERTIES);
+ return getObject().hasAllowableAction(Action.CAN_UPDATE_PROPERTIES);
}
@Override
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=1597994&r1=1597993&r2=1597994&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 Wed May 28 12:41:10 2014
@@ -78,7 +78,7 @@ public class RemoveObjectFromFolderPanel
return true;
}
- return getObject().getAllowableActions().getAllowableActions().contains(Action.CAN_REMOVE_OBJECT_FROM_FOLDER);
+ return getObject().hasAllowableAction(Action.CAN_REMOVE_OBJECT_FROM_FOLDER);
}
@Override
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=1597994&r1=1597993&r2=1597994&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 Wed May 28 12:41:10 2014
@@ -64,7 +64,7 @@ public class RemovePolicyPanel extends A
return true;
}
- return getObject().getAllowableActions().getAllowableActions().contains(Action.CAN_REMOVE_POLICY);
+ return getObject().hasAllowableAction(Action.CAN_REMOVE_POLICY);
}
@Override
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=1597994&r1=1597993&r2=1597994&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 Wed May 28 12:41:10 2014
@@ -61,7 +61,7 @@ public class SetContentStreamPanel exten
return true;
}
- return getObject().getAllowableActions().getAllowableActions().contains(Action.CAN_SET_CONTENT_STREAM);
+ return getObject().hasAllowableAction(Action.CAN_SET_CONTENT_STREAM);
}
@Override
Modified: chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/details/PropertyTable.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/details/PropertyTable.java?rev=1597994&r1=1597993&r2=1597994&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/details/PropertyTable.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/details/PropertyTable.java Wed May 28 12:41:10 2014
@@ -41,10 +41,7 @@ public class PropertyTable extends Abstr
@Override
public void doubleClickAction(MouseEvent e, int rowIndex) {
- AllowableActions aa = getObject().getAllowableActions();
-
- if ((aa == null) || (aa.getAllowableActions() == null)
- || aa.getAllowableActions().contains(Action.CAN_UPDATE_PROPERTIES)) {
+ if (getObject().hasAllowableAction(Action.CAN_UPDATE_PROPERTIES)) {
new PropertyEditorFrame(getClientModel(), getObject());
}
}
Modified: chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/details/VersionTable.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/details/VersionTable.java?rev=1597994&r1=1597993&r2=1597994&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/details/VersionTable.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/details/VersionTable.java Wed May 28 12:41:10 2014
@@ -64,7 +64,11 @@ public class VersionTable extends Abstra
if (getObject() instanceof Document) {
final Document doc = (Document) getObject();
- if (doc.getAllowableActions().getAllowableActions().contains(Action.CAN_GET_ALL_VERSIONS)) {
+ boolean fetchVersions = (getObject().getAllowableActions() == null)
+ || (getObject().getAllowableActions().getAllowableActions() == null)
+ || doc.hasAllowableAction(Action.CAN_GET_ALL_VERSIONS);
+
+ if (fetchVersions) {
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {