Added: chemistry/site/trunk/content/java/0.13.0/maven/chemistry-opencmis-workbench/chemistry-opencmis-workbench/xref/org/apache/chemistry/opencmis/workbench/details/PolicyTable.html URL: http://svn.apache.org/viewvc/chemistry/site/trunk/content/java/0.13.0/maven/chemistry-opencmis-workbench/chemistry-opencmis-workbench/xref/org/apache/chemistry/opencmis/workbench/details/PolicyTable.html?rev=1671614&view=auto ============================================================================== --- chemistry/site/trunk/content/java/0.13.0/maven/chemistry-opencmis-workbench/chemistry-opencmis-workbench/xref/org/apache/chemistry/opencmis/workbench/details/PolicyTable.html (added) +++ chemistry/site/trunk/content/java/0.13.0/maven/chemistry-opencmis-workbench/chemistry-opencmis-workbench/xref/org/apache/chemistry/opencmis/workbench/details/PolicyTable.html Mon Apr 6 17:19:59 2015 @@ -0,0 +1,99 @@ + + + + +PolicyTable xref + + + +
View Javadoc
+
+1   /*
+2    * Licensed to the Apache Software Foundation (ASF) under one
+3    * or more contributor license agreements.  See the NOTICE file
+4    * distributed with this work for additional information
+5    * regarding copyright ownership.  The ASF licenses this file
+6    * to you under the Apache License, Version 2.0 (the
+7    * "License"); you may not use this file except in compliance
+8    * with the License.  You may obtain a copy of the License at
+9    *
+10   * http://www.apache.org/licenses/LICENSE-2.0
+11   *
+12   * Unless required by applicable law or agreed to in writing,
+13   * software distributed under the License is distributed on an
+14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+15   * KIND, either express or implied.  See the License for the
+16   * specific language governing permissions and limitations
+17   * under the License.
+18   */
+19  package org.apache.chemistry.opencmis.workbench.details;
+20  
+21  import java.awt.event.MouseEvent;
+22  
+23  import org.apache.chemistry.opencmis.client.api.ObjectId;
+24  import org.apache.chemistry.opencmis.client.api.Policy;
+25  import org.apache.chemistry.opencmis.workbench.ClientHelper;
+26  import org.apache.chemistry.opencmis.workbench.model.ClientModel;
+27  
+28  public class PolicyTable extends AbstractDetailsTable {
+29  
+30      private static final long serialVersionUID = 1L;
+31  
+32      private static final String[] COLUMN_NAMES = { "Name", "Id" };
+33      private static final int[] COLUMN_WIDTHS = { 200, 400 };
+34  
+35      public PolicyTable(ClientModel model) {
+36          super();
+37          init(model, COLUMN_NAMES, COLUMN_WIDTHS);
+38      }
+39  
+40      @Override
+41      public void singleClickAction(MouseEvent e, int rowIndex, int colIndex) {
+42          if (getColumnClass(colIndex) != ObjectId.class) {
+43              return;
+44          }
+45  
+46          try {
+47              getClientModel().loadObject(
+48                      getObject().getPolicies().get(getRowSorter().convertRowIndexToModel(rowIndex)).getId());
+49              setTab(0);
+50          } catch (Exception ex) {
+51              ClientHelper.showError(this, ex);
+52          }
+53      }
+54  
+55      public int getDetailRowCount() {
+56          if (getObject().getPolicies() == null) {
+57              return 0;
+58          }
+59  
+60          return getObject().getPolicies().size();
+61      }
+62  
+63      public Object getDetailValueAt(int rowIndex, int columnIndex) {
+64          Policy policy = getObject().getPolicies().get(rowIndex);
+65  
+66          switch (columnIndex) {
+67          case 0:
+68              return policy.getName();
+69          case 1:
+70              return policy;
+71          default:
+72          }
+73  
+74          return null;
+75      }
+76  
+77      @Override
+78      public Class<?> getDetailColumClass(int columnIndex) {
+79          if (columnIndex == 1) {
+80              return ObjectId.class;
+81          }
+82  
+83          return super.getDetailColumClass(columnIndex);
+84      }
+85  }
+
+
+ + Added: chemistry/site/trunk/content/java/0.13.0/maven/chemistry-opencmis-workbench/chemistry-opencmis-workbench/xref/org/apache/chemistry/opencmis/workbench/details/PropertyTable.html URL: http://svn.apache.org/viewvc/chemistry/site/trunk/content/java/0.13.0/maven/chemistry-opencmis-workbench/chemistry-opencmis-workbench/xref/org/apache/chemistry/opencmis/workbench/details/PropertyTable.html?rev=1671614&view=auto ============================================================================== --- chemistry/site/trunk/content/java/0.13.0/maven/chemistry-opencmis-workbench/chemistry-opencmis-workbench/xref/org/apache/chemistry/opencmis/workbench/details/PropertyTable.html (added) +++ chemistry/site/trunk/content/java/0.13.0/maven/chemistry-opencmis-workbench/chemistry-opencmis-workbench/xref/org/apache/chemistry/opencmis/workbench/details/PropertyTable.html Mon Apr 6 17:19:59 2015 @@ -0,0 +1,92 @@ + + + + +PropertyTable xref + + + +
View Javadoc
+
+1   /*
+2    * Licensed to the Apache Software Foundation (ASF) under one
+3    * or more contributor license agreements.  See the NOTICE file
+4    * distributed with this work for additional information
+5    * regarding copyright ownership.  The ASF licenses this file
+6    * to you under the Apache License, Version 2.0 (the
+7    * "License"); you may not use this file except in compliance
+8    * with the License.  You may obtain a copy of the License at
+9    *
+10   * http://www.apache.org/licenses/LICENSE-2.0
+11   *
+12   * Unless required by applicable law or agreed to in writing,
+13   * software distributed under the License is distributed on an
+14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+15   * KIND, either express or implied.  See the License for the
+16   * specific language governing permissions and limitations
+17   * under the License.
+18   */
+19  package org.apache.chemistry.opencmis.workbench.details;
+20  
+21  import java.awt.event.MouseEvent;
+22  import java.util.Collection;
+23  
+24  import org.apache.chemistry.opencmis.client.api.Property;
+25  import org.apache.chemistry.opencmis.commons.enums.Action;
+26  import org.apache.chemistry.opencmis.workbench.PropertyEditorFrame;
+27  import org.apache.chemistry.opencmis.workbench.model.ClientModel;
+28  
+29  public class PropertyTable extends AbstractDetailsTable {
+30  
+31      private static final long serialVersionUID = 1L;
+32  
+33      private static final String[] COLUMN_NAMES = { "Name", "Id", "Type", "Value" };
+34      private static final int[] COLUMN_WIDTHS = { 200, 200, 80, 300 };
+35  
+36      public PropertyTable(ClientModel model) {
+37          super();
+38          init(model, COLUMN_NAMES, COLUMN_WIDTHS);
+39      }
+40  
+41      @Override
+42      public void doubleClickAction(MouseEvent e, int rowIndex) {
+43          if (getObject().hasAllowableAction(Action.CAN_UPDATE_PROPERTIES)) {
+44              new PropertyEditorFrame(getClientModel(), getObject());
+45          }
+46      }
+47  
+48      public int getDetailRowCount() {
+49          return getObject().getProperties().size();
+50      }
+51  
+52      public Object getDetailValueAt(int rowIndex, int columnIndex) {
+53          Property<?> property = getObject().getProperties().get(rowIndex);
+54  
+55          switch (columnIndex) {
+56          case 0:
+57              return property.getDefinition().getDisplayName();
+58          case 1:
+59              return property.getId();
+60          case 2:
+61              return property.getDefinition().getPropertyType().value();
+62          case 3:
+63              return property.getValues();
+64          default:
+65          }
+66  
+67          return null;
+68      }
+69  
+70      @Override
+71      public Class<?> getDetailColumClass(int columnIndex) {
+72          if (columnIndex == 3) {
+73              return Collection.class;
+74          }
+75  
+76          return super.getDetailColumClass(columnIndex);
+77      }
+78  }
+
+
+ + Added: chemistry/site/trunk/content/java/0.13.0/maven/chemistry-opencmis-workbench/chemistry-opencmis-workbench/xref/org/apache/chemistry/opencmis/workbench/details/RelationshipTable.html URL: http://svn.apache.org/viewvc/chemistry/site/trunk/content/java/0.13.0/maven/chemistry-opencmis-workbench/chemistry-opencmis-workbench/xref/org/apache/chemistry/opencmis/workbench/details/RelationshipTable.html?rev=1671614&view=auto ============================================================================== --- chemistry/site/trunk/content/java/0.13.0/maven/chemistry-opencmis-workbench/chemistry-opencmis-workbench/xref/org/apache/chemistry/opencmis/workbench/details/RelationshipTable.html (added) +++ chemistry/site/trunk/content/java/0.13.0/maven/chemistry-opencmis-workbench/chemistry-opencmis-workbench/xref/org/apache/chemistry/opencmis/workbench/details/RelationshipTable.html Mon Apr 6 17:19:59 2015 @@ -0,0 +1,111 @@ + + + + +RelationshipTable xref + + + +
View Javadoc
+
+1   /*
+2    * Licensed to the Apache Software Foundation (ASF) under one
+3    * or more contributor license agreements.  See the NOTICE file
+4    * distributed with this work for additional information
+5    * regarding copyright ownership.  The ASF licenses this file
+6    * to you under the Apache License, Version 2.0 (the
+7    * "License"); you may not use this file except in compliance
+8    * with the License.  You may obtain a copy of the License at
+9    *
+10   * http://www.apache.org/licenses/LICENSE-2.0
+11   *
+12   * Unless required by applicable law or agreed to in writing,
+13   * software distributed under the License is distributed on an
+14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+15   * KIND, either express or implied.  See the License for the
+16   * specific language governing permissions and limitations
+17   * under the License.
+18   */
+19  package org.apache.chemistry.opencmis.workbench.details;
+20  
+21  import java.awt.event.MouseEvent;
+22  
+23  import org.apache.chemistry.opencmis.client.api.ObjectId;
+24  import org.apache.chemistry.opencmis.client.api.Relationship;
+25  import org.apache.chemistry.opencmis.workbench.ClientHelper;
+26  import org.apache.chemistry.opencmis.workbench.model.ClientModel;
+27  
+28  public class RelationshipTable extends AbstractDetailsTable {
+29  
+30      private static final long serialVersionUID = 1L;
+31  
+32      private static final String[] COLUMN_NAMES = { "Name", "Type", "Relationship Id", "Source", "Target" };
+33      private static final int[] COLUMN_WIDTHS = { 200, 200, 200, 200, 200 };
+34  
+35      public RelationshipTable(ClientModel model) {
+36          super();
+37          init(model, COLUMN_NAMES, COLUMN_WIDTHS);
+38      }
+39  
+40      @Override
+41      public void singleClickAction(MouseEvent e, int rowIndex, int colIndex) {
+42          if (getColumnClass(colIndex) != ObjectId.class) {
+43              return;
+44          }
+45  
+46          ObjectId id = (ObjectId) getValueAt(rowIndex, colIndex);
+47          if ((id == null) || (id.getId() == null)) {
+48              return;
+49          }
+50  
+51          try {
+52              getClientModel().loadObject(id.getId());
+53              setTab(0);
+54          } catch (Exception ex) {
+55              ClientHelper.showError(this, ex);
+56          }
+57      }
+58  
+59      @Override
+60      public int getDetailRowCount() {
+61          if (getObject().getRelationships() == null) {
+62              return 0;
+63          }
+64  
+65          return getObject().getRelationships().size();
+66      }
+67  
+68      @Override
+69      public Object getDetailValueAt(int rowIndex, int columnIndex) {
+70          Relationship relationship = getObject().getRelationships().get(rowIndex);
+71  
+72          switch (columnIndex) {
+73          case 0:
+74              return relationship.getName();
+75          case 1:
+76              return relationship.getType().getId();
+77          case 2:
+78              return relationship;
+79          case 3:
+80              return relationship.getSourceId();
+81          case 4:
+82              return relationship.getTarget();
+83          default:
+84          }
+85  
+86          return null;
+87      }
+88  
+89      @Override
+90      public Class<?> getDetailColumClass(int columnIndex) {
+91          if ((columnIndex == 2) || (columnIndex == 3) || (columnIndex == 4)) {
+92              return ObjectId.class;
+93          }
+94  
+95          return super.getDetailColumClass(columnIndex);
+96      }
+97  }
+
+
+ + Added: chemistry/site/trunk/content/java/0.13.0/maven/chemistry-opencmis-workbench/chemistry-opencmis-workbench/xref/org/apache/chemistry/opencmis/workbench/details/RenditionTable.html URL: http://svn.apache.org/viewvc/chemistry/site/trunk/content/java/0.13.0/maven/chemistry-opencmis-workbench/chemistry-opencmis-workbench/xref/org/apache/chemistry/opencmis/workbench/details/RenditionTable.html?rev=1671614&view=auto ============================================================================== --- chemistry/site/trunk/content/java/0.13.0/maven/chemistry-opencmis-workbench/chemistry-opencmis-workbench/xref/org/apache/chemistry/opencmis/workbench/details/RenditionTable.html (added) +++ chemistry/site/trunk/content/java/0.13.0/maven/chemistry-opencmis-workbench/chemistry-opencmis-workbench/xref/org/apache/chemistry/opencmis/workbench/details/RenditionTable.html Mon Apr 6 17:19:59 2015 @@ -0,0 +1,94 @@ + + + + +RenditionTable xref + + + +
View Javadoc
+
+1   /*
+2    * Licensed to the Apache Software Foundation (ASF) under one
+3    * or more contributor license agreements.  See the NOTICE file
+4    * distributed with this work for additional information
+5    * regarding copyright ownership.  The ASF licenses this file
+6    * to you under the Apache License, Version 2.0 (the
+7    * "License"); you may not use this file except in compliance
+8    * with the License.  You may obtain a copy of the License at
+9    *
+10   * http://www.apache.org/licenses/LICENSE-2.0
+11   *
+12   * Unless required by applicable law or agreed to in writing,
+13   * software distributed under the License is distributed on an
+14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+15   * KIND, either express or implied.  See the License for the
+16   * specific language governing permissions and limitations
+17   * under the License.
+18   */
+19  package org.apache.chemistry.opencmis.workbench.details;
+20  
+21  import java.awt.event.MouseEvent;
+22  
+23  import org.apache.chemistry.opencmis.client.api.Rendition;
+24  import org.apache.chemistry.opencmis.workbench.ClientHelper;
+25  import org.apache.chemistry.opencmis.workbench.model.ClientModel;
+26  
+27  public class RenditionTable extends AbstractDetailsTable {
+28  
+29      private static final long serialVersionUID = 1L;
+30  
+31      private static final String[] COLUMN_NAMES = { "Title", "Kind", "MIME Type", "Size", "Stream Id" };
+32      private static final int[] COLUMN_WIDTHS = { 200, 200, 80, 80, 200 };
+33  
+34      public RenditionTable(ClientModel model) {
+35          super();
+36          init(model, COLUMN_NAMES, COLUMN_WIDTHS);
+37      }
+38  
+39      @Override
+40      public void doubleClickAction(MouseEvent e, int rowIndex) {
+41          String streamId = getObject().getRenditions().get(getRowSorter().convertRowIndexToModel(rowIndex))
+42                  .getStreamId();
+43  
+44          if (e.isShiftDown()) {
+45              ClientHelper.download(this.getParent(), getObject(), streamId);
+46          } else {
+47              ClientHelper.open(this.getParent(), getObject(), streamId);
+48          }
+49      }
+50  
+51      @Override
+52      public int getDetailRowCount() {
+53          if (getObject().getRenditions() == null) {
+54              return 0;
+55          }
+56  
+57          return getObject().getRenditions().size();
+58      }
+59  
+60      @Override
+61      public Object getDetailValueAt(int rowIndex, int columnIndex) {
+62          Rendition rendition = getObject().getRenditions().get(rowIndex);
+63  
+64          switch (columnIndex) {
+65          case 0:
+66              return rendition.getTitle();
+67          case 1:
+68              return rendition.getKind();
+69          case 2:
+70              return rendition.getMimeType();
+71          case 3:
+72              return rendition.getLength();
+73          case 4:
+74              return rendition.getStreamId();
+75          default:
+76          }
+77  
+78          return null;
+79      }
+80  }
+
+
+ + Added: chemistry/site/trunk/content/java/0.13.0/maven/chemistry-opencmis-workbench/chemistry-opencmis-workbench/xref/org/apache/chemistry/opencmis/workbench/details/TypesPanel.html URL: http://svn.apache.org/viewvc/chemistry/site/trunk/content/java/0.13.0/maven/chemistry-opencmis-workbench/chemistry-opencmis-workbench/xref/org/apache/chemistry/opencmis/workbench/details/TypesPanel.html?rev=1671614&view=auto ============================================================================== --- chemistry/site/trunk/content/java/0.13.0/maven/chemistry-opencmis-workbench/chemistry-opencmis-workbench/xref/org/apache/chemistry/opencmis/workbench/details/TypesPanel.html (added) +++ chemistry/site/trunk/content/java/0.13.0/maven/chemistry-opencmis-workbench/chemistry-opencmis-workbench/xref/org/apache/chemistry/opencmis/workbench/details/TypesPanel.html Mon Apr 6 17:19:59 2015 @@ -0,0 +1,66 @@ + + + + +TypesPanel xref + + + +
View Javadoc
+
+1   /*
+2    * Licensed to the Apache Software Foundation (ASF) under one
+3    * or more contributor license agreements.  See the NOTICE file
+4    * distributed with this work for additional information
+5    * regarding copyright ownership.  The ASF licenses this file
+6    * to you under the Apache License, Version 2.0 (the
+7    * "License"); you may not use this file except in compliance
+8    * with the License.  You may obtain a copy of the License at
+9    *
+10   * http://www.apache.org/licenses/LICENSE-2.0
+11   *
+12   * Unless required by applicable law or agreed to in writing,
+13   * software distributed under the License is distributed on an
+14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+15   * KIND, either express or implied.  See the License for the
+16   * specific language governing permissions and limitations
+17   * under the License.
+18   */
+19  package org.apache.chemistry.opencmis.workbench.details;
+20  
+21  import javax.swing.SwingUtilities;
+22  
+23  import org.apache.chemistry.opencmis.client.api.CmisObject;
+24  import org.apache.chemistry.opencmis.workbench.TypeSplitPane;
+25  import org.apache.chemistry.opencmis.workbench.model.ClientModel;
+26  import org.apache.chemistry.opencmis.workbench.model.ClientModelEvent;
+27  import org.apache.chemistry.opencmis.workbench.model.ObjectListener;
+28  
+29  public class TypesPanel extends TypeSplitPane implements ObjectListener {
+30  
+31      private static final long serialVersionUID = 1L;
+32  
+33      public TypesPanel(ClientModel model) {
+34          super(model);
+35          model.addObjectListener(this);
+36      }
+37  
+38      @Override
+39      public void objectLoaded(ClientModelEvent event) {
+40          SwingUtilities.invokeLater(new Runnable() {
+41              public void run() {
+42                  CmisObject object = getClientModel().getCurrentObject();
+43  
+44                  if (object == null) {
+45                      setType(null);
+46                  } else {
+47                      setType(object.getType());
+48                  }
+49              }
+50          });
+51      }
+52  }
+
+
+ + Added: chemistry/site/trunk/content/java/0.13.0/maven/chemistry-opencmis-workbench/chemistry-opencmis-workbench/xref/org/apache/chemistry/opencmis/workbench/details/VersionTable.html URL: http://svn.apache.org/viewvc/chemistry/site/trunk/content/java/0.13.0/maven/chemistry-opencmis-workbench/chemistry-opencmis-workbench/xref/org/apache/chemistry/opencmis/workbench/details/VersionTable.html?rev=1671614&view=auto ============================================================================== --- chemistry/site/trunk/content/java/0.13.0/maven/chemistry-opencmis-workbench/chemistry-opencmis-workbench/xref/org/apache/chemistry/opencmis/workbench/details/VersionTable.html (added) +++ chemistry/site/trunk/content/java/0.13.0/maven/chemistry-opencmis-workbench/chemistry-opencmis-workbench/xref/org/apache/chemistry/opencmis/workbench/details/VersionTable.html Mon Apr 6 17:19:59 2015 @@ -0,0 +1,216 @@ + + + + +VersionTable xref + + + +
View Javadoc
+
+1   /*
+2    * Licensed to the Apache Software Foundation (ASF) under one
+3    * or more contributor license agreements.  See the NOTICE file
+4    * distributed with this work for additional information
+5    * regarding copyright ownership.  The ASF licenses this file
+6    * to you under the Apache License, Version 2.0 (the
+7    * "License"); you may not use this file except in compliance
+8    * with the License.  You may obtain a copy of the License at
+9    *
+10   * http://www.apache.org/licenses/LICENSE-2.0
+11   *
+12   * Unless required by applicable law or agreed to in writing,
+13   * software distributed under the License is distributed on an
+14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+15   * KIND, either express or implied.  See the License for the
+16   * specific language governing permissions and limitations
+17   * under the License.
+18   */
+19  package org.apache.chemistry.opencmis.workbench.details;
+20  
+21  import java.awt.Cursor;
+22  import java.awt.event.MouseEvent;
+23  import java.util.Collections;
+24  import java.util.List;
+25  import java.util.concurrent.locks.ReentrantReadWriteLock;
+26  
+27  import javax.swing.SwingUtilities;
+28  
+29  import org.apache.chemistry.opencmis.client.api.Document;
+30  import org.apache.chemistry.opencmis.client.api.ObjectId;
+31  import org.apache.chemistry.opencmis.commons.enums.Action;
+32  import org.apache.chemistry.opencmis.commons.exceptions.CmisNotSupportedException;
+33  import org.apache.chemistry.opencmis.workbench.ClientHelper;
+34  import org.apache.chemistry.opencmis.workbench.model.ClientModel;
+35  import org.apache.chemistry.opencmis.workbench.model.ClientModelEvent;
+36  
+37  public class VersionTable extends AbstractDetailsTable {
+38  
+39      private static final long serialVersionUID = 1L;
+40  
+41      private static final String[] COLUMN_NAMES = { "Name", "Label", "Latest", "Major", "Latest Major", "Id",
+42              "Filename", "MIME Type", "Length" };
+43      private static final int[] COLUMN_WIDTHS = { 200, 200, 50, 50, 50, 400, 200, 100, 100 };
+44  
+45      private List<Document> versions;
+46      private final ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
+47  
+48      public VersionTable(ClientModel model) {
+49          super();
+50  
+51          versions = Collections.emptyList();
+52          init(model, COLUMN_NAMES, COLUMN_WIDTHS);
+53      }
+54  
+55      @Override
+56      public void objectLoaded(ClientModelEvent event) {
+57          lock.writeLock().lock();
+58          try {
+59              versions = Collections.emptyList();
+60          } finally {
+61              lock.writeLock().unlock();
+62          }
+63  
+64          if (getObject() instanceof Document) {
+65              final Document doc = (Document) getObject();
+66  
+67              boolean fetchVersions = (getObject().getAllowableActions() == null)
+68                      || (getObject().getAllowableActions().getAllowableActions() == null)
+69                      || doc.hasAllowableAction(Action.CAN_GET_ALL_VERSIONS);
+70              
+71              if (fetchVersions) {
+72                  SwingUtilities.invokeLater(new Runnable() {
+73                      @Override
+74                      public void run() {
+75                          try {
+76                              setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
+77                              List<Document> newVersions = doc.getAllVersions(getClientModel().getClientSession()
+78                                      .getVersionOperationContext());
+79  
+80                              lock.writeLock().lock();
+81                              try {
+82                                  versions = newVersions;
+83                              } finally {
+84                                  lock.writeLock().unlock();
+85                              }
+86                          } catch (Exception ex) {
+87                              if (!(ex instanceof CmisNotSupportedException)) {
+88                                  ClientHelper.showError(null, ex);
+89                              }
+90                          } finally {
+91                              setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
+92                          }
+93                          ((DetailsTableModel) getModel()).fireTableDataChanged();
+94                      }
+95                  });
+96              }
+97          }
+98  
+99          super.objectLoaded(event);
+100     }
+101 
+102     @Override
+103     public void singleClickAction(MouseEvent e, int rowIndex, int colIndex) {
+104         if (getColumnClass(colIndex) != ObjectId.class) {
+105             return;
+106         }
+107 
+108         String versionId = null;
+109         lock.readLock().lock();
+110         try {
+111             versionId = versions.get(getRowSorter().convertRowIndexToModel(rowIndex)).getId();
+112         } finally {
+113             lock.readLock().unlock();
+114         }
+115 
+116         try {
+117             getClientModel().loadObject(versionId);
+118             setTab(0);
+119         } catch (Exception ex) {
+120             ClientHelper.showError(this, ex);
+121         }
+122     }
+123 
+124     @Override
+125     public void doubleClickAction(MouseEvent e, int rowIndex) {
+126         lock.readLock().lock();
+127         try {
+128             if (e.isShiftDown()) {
+129                 ClientHelper.download(this.getParent(), versions.get(getRowSorter().convertRowIndexToModel(rowIndex)),
+130                         null);
+131             } else {
+132                 ClientHelper
+133                         .open(this.getParent(), versions.get(getRowSorter().convertRowIndexToModel(rowIndex)), null);
+134             }
+135         } finally {
+136             lock.readLock().unlock();
+137         }
+138     }
+139 
+140     @Override
+141     public int getDetailRowCount() {
+142         if (!(getObject() instanceof Document)) {
+143             return 0;
+144         }
+145 
+146         lock.readLock().lock();
+147         try {
+148             return versions.size();
+149         } finally {
+150             lock.readLock().unlock();
+151         }
+152     }
+153 
+154     @Override
+155     public Object getDetailValueAt(int rowIndex, int columnIndex) {
+156         Document version = null;
+157 
+158         lock.readLock().lock();
+159         try {
+160             version = versions.get(rowIndex);
+161         } finally {
+162             lock.readLock().unlock();
+163         }
+164 
+165         switch (columnIndex) {
+166         case 0:
+167             return version.getName();
+168         case 1:
+169             return version.getVersionLabel();
+170         case 2:
+171             return version.isLatestVersion();
+172         case 3:
+173             return version.isMajorVersion();
+174         case 4:
+175             return version.isLatestMajorVersion();
+176         case 5:
+177             return version;
+178         case 6:
+179             return version.getContentStreamFileName();
+180         case 7:
+181             return version.getContentStreamMimeType();
+182         case 8:
+183             return version.getContentStreamLength() == -1 ? null : version.getContentStreamLength();
+184         default:
+185         }
+186 
+187         return null;
+188     }
+189 
+190     @Override
+191     public Class<?> getDetailColumClass(int columnIndex) {
+192         if ((columnIndex == 2) || (columnIndex == 3) || (columnIndex == 4)) {
+193             return Boolean.class;
+194         } else if (columnIndex == 5) {
+195             return ObjectId.class;
+196         } else if (columnIndex == 8) {
+197             return Long.class;
+198         }
+199 
+200         return super.getDetailColumClass(columnIndex);
+201     }
+202 }
+
+
+ + Added: chemistry/site/trunk/content/java/0.13.0/maven/chemistry-opencmis-workbench/chemistry-opencmis-workbench/xref/org/apache/chemistry/opencmis/workbench/details/package-frame.html URL: http://svn.apache.org/viewvc/chemistry/site/trunk/content/java/0.13.0/maven/chemistry-opencmis-workbench/chemistry-opencmis-workbench/xref/org/apache/chemistry/opencmis/workbench/details/package-frame.html?rev=1671614&view=auto ============================================================================== --- chemistry/site/trunk/content/java/0.13.0/maven/chemistry-opencmis-workbench/chemistry-opencmis-workbench/xref/org/apache/chemistry/opencmis/workbench/details/package-frame.html (added) +++ chemistry/site/trunk/content/java/0.13.0/maven/chemistry-opencmis-workbench/chemistry-opencmis-workbench/xref/org/apache/chemistry/opencmis/workbench/details/package-frame.html Mon Apr 6 17:19:59 2015 @@ -0,0 +1,66 @@ + + + + + + OpenCMIS Workbench 0.13.0 Reference Package org.apache.chemistry.opencmis.workbench.details + + + + +

+ org.apache.chemistry.opencmis.workbench.details +

+ +

Classes

+ + + + + \ No newline at end of file