Return-Path: X-Original-To: apmail-chemistry-commits-archive@www.apache.org Delivered-To: apmail-chemistry-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2F43D97C6 for ; Tue, 3 Apr 2012 04:58:28 +0000 (UTC) Received: (qmail 83763 invoked by uid 500); 3 Apr 2012 04:58:27 -0000 Delivered-To: apmail-chemistry-commits-archive@chemistry.apache.org Received: (qmail 83710 invoked by uid 500); 3 Apr 2012 04:58:27 -0000 Mailing-List: contact commits-help@chemistry.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@chemistry.apache.org Delivered-To: mailing list commits@chemistry.apache.org Received: (qmail 83691 invoked by uid 99); 3 Apr 2012 04:58:27 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Apr 2012 04:58:27 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Apr 2012 04:57:56 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id A61D32388C91 for ; Tue, 3 Apr 2012 04:57:05 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r811229 [12/17] - in /websites/staging/chemistry/trunk/content: ./ java/0.7.0/maven/chemistry-opencmis-client/chemistry-opencmis-client-impl/ java/0.7.0/maven/chemistry-opencmis-client/chemistry-opencmis-client-impl/css/ java/0.7.0/maven/ch... Date: Tue, 03 Apr 2012 04:57:00 -0000 To: commits@chemistry.apache.org From: buildbot@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120403045705.A61D32388C91@eris.apache.org> Added: websites/staging/chemistry/trunk/content/java/0.7.0/maven/chemistry-opencmis-client/chemistry-opencmis-client-impl/xref/org/apache/chemistry/opencmis/client/runtime/TransientDocumentImpl.html ============================================================================== --- websites/staging/chemistry/trunk/content/java/0.7.0/maven/chemistry-opencmis-client/chemistry-opencmis-client-impl/xref/org/apache/chemistry/opencmis/client/runtime/TransientDocumentImpl.html (added) +++ websites/staging/chemistry/trunk/content/java/0.7.0/maven/chemistry-opencmis-client/chemistry-opencmis-client-impl/xref/org/apache/chemistry/opencmis/client/runtime/TransientDocumentImpl.html Tue Apr 3 04:56:56 2012 @@ -0,0 +1,278 @@ + + + + +TransientDocumentImpl xref + + + +
+
+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.client.runtime;
+20  
+21  import java.math.BigInteger;
+22  import java.util.ArrayList;
+23  import java.util.List;
+24  import java.util.Map;
+25  
+26  import org.apache.chemistry.opencmis.client.api.CmisObject;
+27  import org.apache.chemistry.opencmis.client.api.Document;
+28  import org.apache.chemistry.opencmis.client.api.ObjectId;
+29  import org.apache.chemistry.opencmis.client.api.OperationContext;
+30  import org.apache.chemistry.opencmis.client.api.Policy;
+31  import org.apache.chemistry.opencmis.client.api.Session;
+32  import org.apache.chemistry.opencmis.client.api.TransientDocument;
+33  import org.apache.chemistry.opencmis.commons.PropertyIds;
+34  import org.apache.chemistry.opencmis.commons.data.Ace;
+35  import org.apache.chemistry.opencmis.commons.data.ContentStream;
+36  import org.apache.chemistry.opencmis.commons.data.Properties;
+37  import org.apache.chemistry.opencmis.commons.enums.AclPropagation;
+38  import org.apache.chemistry.opencmis.commons.enums.VersioningState;
+39  import org.apache.chemistry.opencmis.commons.spi.Holder;
+40  
+41  public class TransientDocumentImpl extends AbstractTransientFileableCmisObject implements TransientDocument {
+42  
+43      private ContentStream contentStream;
+44      private boolean contentOverwrite;
+45      private boolean deleteContent;
+46  
+47      @Override
+48      protected void initialize(Session session, CmisObject object) {
+49          super.initialize(session, object);
+50  
+51          contentStream = null;
+52          contentOverwrite = false;
+53          deleteContent = false;
+54      }
+55  
+56      public void deleteAllVersions() {
+57          delete(true);
+58      }
+59  
+60      public ContentStream getContentStream() {
+61          return ((Document) getCmisObject()).getContentStream();
+62      }
+63  
+64      public ContentStream getContentStream(String streamId) {
+65          return ((Document) getCmisObject()).getContentStream(streamId);
+66      }
+67  
+68      public void setContentStream(ContentStream contentStream, boolean overwrite) {
+69          this.contentStream = contentStream;
+70          this.contentOverwrite = overwrite;
+71  
+72          deleteContent = false;
+73          isModified = true;
+74      }
+75  
+76      public void deleteContentStream() {
+77          deleteContent = true;
+78  
+79          contentStream = null;
+80          isModified = true;
+81      }
+82  
+83      public Document getObjectOfLatestVersion(boolean major) {
+84          return ((Document) getCmisObject()).getObjectOfLatestVersion(major);
+85      }
+86  
+87      public Document getObjectOfLatestVersion(boolean major, OperationContext context) {
+88          return ((Document) getCmisObject()).getObjectOfLatestVersion(major, context);
+89      }
+90  
+91      public List<Document> getAllVersions() {
+92          return ((Document) getCmisObject()).getAllVersions();
+93      }
+94  
+95      public List<Document> getAllVersions(OperationContext context) {
+96          return ((Document) getCmisObject()).getAllVersions(context);
+97      }
+98  
+99      public Document copy(ObjectId targetFolderId) {
+100         return ((Document) getCmisObject()).copy(targetFolderId);
+101     }
+102 
+103     public Document copy(ObjectId targetFolderId, Map<String, ?> properties, VersioningState versioningState,
+104             List<Policy> policies, List<Ace> addACEs, List<Ace> removeACEs, OperationContext context) {
+105         return ((Document) getCmisObject()).copy(targetFolderId, properties, versioningState, policies, addACEs,
+106                 removeACEs, context);
+107     }
+108 
+109     // properties
+110 
+111     public String getCheckinComment() {
+112         return getPropertyValue(PropertyIds.CHECKIN_COMMENT);
+113     }
+114 
+115     public String getVersionLabel() {
+116         return getPropertyValue(PropertyIds.VERSION_LABEL);
+117     }
+118 
+119     public String getVersionSeriesId() {
+120         return getPropertyValue(PropertyIds.VERSION_SERIES_ID);
+121     }
+122 
+123     public String getVersionSeriesCheckedOutId() {
+124         return getPropertyValue(PropertyIds.VERSION_SERIES_CHECKED_OUT_ID);
+125     }
+126 
+127     public String getVersionSeriesCheckedOutBy() {
+128         return getPropertyValue(PropertyIds.VERSION_SERIES_CHECKED_OUT_BY);
+129     }
+130 
+131     public Boolean isImmutable() {
+132         return getPropertyValue(PropertyIds.IS_IMMUTABLE);
+133     }
+134 
+135     public Boolean isLatestMajorVersion() {
+136         return getPropertyValue(PropertyIds.IS_LATEST_MAJOR_VERSION);
+137     }
+138 
+139     public Boolean isLatestVersion() {
+140         return getPropertyValue(PropertyIds.IS_LATEST_VERSION);
+141     }
+142 
+143     public Boolean isMajorVersion() {
+144         return getPropertyValue(PropertyIds.IS_MAJOR_VERSION);
+145     }
+146 
+147     public Boolean isVersionSeriesCheckedOut() {
+148         return getPropertyValue(PropertyIds.IS_VERSION_SERIES_CHECKED_OUT);
+149     }
+150 
+151     public long getContentStreamLength() {
+152         BigInteger bigInt = getPropertyValue(PropertyIds.CONTENT_STREAM_LENGTH);
+153         return (bigInt == null) ? (long) -1 : bigInt.longValue();
+154     }
+155 
+156     public String getContentStreamMimeType() {
+157         return getPropertyValue(PropertyIds.CONTENT_STREAM_MIME_TYPE);
+158     }
+159 
+160     public String getContentStreamFileName() {
+161         return getPropertyValue(PropertyIds.CONTENT_STREAM_FILE_NAME);
+162     }
+163 
+164     public String getContentStreamId() {
+165         return getPropertyValue(PropertyIds.CONTENT_STREAM_ID);
+166     }
+167 
+168     // override save()
+169 
+170     @Override
+171     public ObjectId save() {
+172         if (!isModified()) {
+173             // nothing has change, so there is nothing to do
+174             return getObjectId();
+175         }
+176 
+177         String objectId = getId();
+178 
+179         if (saveDelete(objectId)) {
+180             // object has been deleted, there is nothing else to do
+181             // ... and there is no object id anymore
+182             return null;
+183         }
+184 
+185         String newObjectId = objectId;
+186         String newChangeToken = getChangeToken();
+187 
+188         newObjectId = saveProperties(getId(), newChangeToken);
+189 
+190         if (isPropertyUpdateRequired && ((contentStream != null) || deleteContent)) {
+191             // we only need a new change token if the properties have changed
+192             // AND the content should be modified
+193             newChangeToken = getLatestChangeToken(newObjectId);
+194         }
+195 
+196         newObjectId = saveContent(newObjectId, newChangeToken);
+197 
+198         saveACL(newObjectId);
+199         savePolicies(newObjectId);
+200 
+201         return getSession().createObjectId(newObjectId);
+202     }
+203 
+204     protected String saveContent(String objectId, String changeToken) {
+205         Holder<String> objectIdHolder = new Holder<String>(objectId);
+206         Holder<String> changeTokenHolder = new Holder<String>(changeToken);
+207 
+208         if (contentStream != null) {
+209             getBinding().getObjectService().setContentStream(getRepositoryId(), objectIdHolder, contentOverwrite,
+210                     changeTokenHolder, contentStream, null);
+211         } else if (deleteContent) {
+212             getBinding().getObjectService().deleteContentStream(getRepositoryId(), objectIdHolder, changeTokenHolder,
+213                     null);
+214         }
+215 
+216         if (objectIdHolder.getValue() != null) {
+217             return objectIdHolder.getValue();
+218         }
+219 
+220         return objectId;
+221     }
+222 
+223     public ObjectId checkIn(boolean major, String checkinComment) {
+224         Holder<String> objectIdHolder = new Holder<String>(getId());
+225 
+226         // convert properties
+227         Properties checkinProperties = prepareProperties();
+228 
+229         // prepare policies
+230         List<String> checkinPolicies = null;
+231         if ((addPolicies != null) && (!addPolicies.isEmpty())) {
+232             checkinPolicies = new ArrayList<String>(addPolicies);
+233         }
+234 
+235         // prepare ACLs
+236         List<AceChangeHolder> checkinAddAces = new ArrayList<AceChangeHolder>();
+237         List<AceChangeHolder> checkinRemoveAces = new ArrayList<AceChangeHolder>();
+238         for (AclPropagation ap : AclPropagation.values()) {
+239             if (addAces.containsKey(ap)) {
+240                 checkinAddAces.addAll(addAces.get(ap));
+241             }
+242             if (removeAces.containsKey(ap)) {
+243                 checkinAddAces.addAll(removeAces.get(ap));
+244             }
+245         }
+246         if (addAces.containsKey(null)) {
+247             checkinAddAces.addAll(addAces.get(null));
+248         }
+249         if (removeAces.containsKey(null)) {
+250             checkinAddAces.addAll(removeAces.get(null));
+251         }
+252 
+253         // check in
+254         getBinding().getVersioningService().checkIn(getRepositoryId(), objectIdHolder, major, checkinProperties,
+255                 contentStream, checkinComment, checkinPolicies, prepareAcl(checkinAddAces),
+256                 prepareAcl(checkinRemoveAces), null);
+257 
+258         if (objectIdHolder.getValue() != null) {
+259             return getSession().createObjectId(objectIdHolder.getValue());
+260         }
+261 
+262         return getObjectId();
+263     }
+264 }
+
+
+ + Added: websites/staging/chemistry/trunk/content/java/0.7.0/maven/chemistry-opencmis-client/chemistry-opencmis-client-impl/xref/org/apache/chemistry/opencmis/client/runtime/TransientFolderImpl.html ============================================================================== --- websites/staging/chemistry/trunk/content/java/0.7.0/maven/chemistry-opencmis-client/chemistry-opencmis-client-impl/xref/org/apache/chemistry/opencmis/client/runtime/TransientFolderImpl.html (added) +++ websites/staging/chemistry/trunk/content/java/0.7.0/maven/chemistry-opencmis-client/chemistry-opencmis-client-impl/xref/org/apache/chemistry/opencmis/client/runtime/TransientFolderImpl.html Tue Apr 3 04:56:56 2012 @@ -0,0 +1,223 @@ + + + + +TransientFolderImpl xref + + + +
+
+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.client.runtime;
+20  
+21  import java.util.ArrayList;
+22  import java.util.List;
+23  import java.util.Map;
+24  
+25  import org.apache.chemistry.opencmis.client.api.CmisObject;
+26  import org.apache.chemistry.opencmis.client.api.Document;
+27  import org.apache.chemistry.opencmis.client.api.FileableCmisObject;
+28  import org.apache.chemistry.opencmis.client.api.Folder;
+29  import org.apache.chemistry.opencmis.client.api.ItemIterable;
+30  import org.apache.chemistry.opencmis.client.api.ObjectId;
+31  import org.apache.chemistry.opencmis.client.api.ObjectType;
+32  import org.apache.chemistry.opencmis.client.api.OperationContext;
+33  import org.apache.chemistry.opencmis.client.api.Policy;
+34  import org.apache.chemistry.opencmis.client.api.Session;
+35  import org.apache.chemistry.opencmis.client.api.TransientFolder;
+36  import org.apache.chemistry.opencmis.client.api.Tree;
+37  import org.apache.chemistry.opencmis.commons.PropertyIds;
+38  import org.apache.chemistry.opencmis.commons.data.Ace;
+39  import org.apache.chemistry.opencmis.commons.data.ContentStream;
+40  import org.apache.chemistry.opencmis.commons.data.FailedToDeleteData;
+41  import org.apache.chemistry.opencmis.commons.enums.UnfileObject;
+42  import org.apache.chemistry.opencmis.commons.enums.VersioningState;
+43  import org.apache.chemistry.opencmis.commons.exceptions.CmisConstraintException;
+44  
+45  public class TransientFolderImpl extends AbstractTransientFileableCmisObject implements TransientFolder {
+46  
+47      private boolean isMarkedForDeleteTree;
+48      private boolean deleteTreeAllVersions;
+49      private UnfileObject deleteTreeUnfile;
+50      private boolean deleteTreeContinueOnFailure;
+51  
+52      @Override
+53      protected void initialize(Session session, CmisObject object) {
+54          super.initialize(session, object);
+55  
+56          isMarkedForDeleteTree = false;
+57      }
+58  
+59      public Document createDocument(Map<String, ?> properties, ContentStream contentStream,
+60              VersioningState versioningState, List<Policy> policies, List<Ace> addAces, List<Ace> removeAces,
+61              OperationContext context) {
+62          return ((Folder) getCmisObject()).createDocument(properties, contentStream, versioningState, policies, addAces,
+63                  removeAces, context);
+64      }
+65  
+66      public Document createDocument(Map<String, ?> properties, ContentStream contentStream,
+67              VersioningState versioningState) {
+68          return ((Folder) getCmisObject()).createDocument(properties, contentStream, versioningState);
+69      }
+70  
+71      public Document createDocumentFromSource(ObjectId source, Map<String, ?> properties,
+72              VersioningState versioningState, List<Policy> policies, List<Ace> addAces, List<Ace> removeAces,
+73              OperationContext context) {
+74          return ((Folder) getCmisObject()).createDocumentFromSource(source, properties, versioningState, policies,
+75                  addAces, removeAces, context);
+76      }
+77  
+78      public Document createDocumentFromSource(ObjectId source, Map<String, ?> properties, VersioningState versioningState) {
+79          return ((Folder) getCmisObject()).createDocumentFromSource(source, properties, versioningState);
+80      }
+81  
+82      public Folder createFolder(Map<String, ?> properties, List<Policy> policies, List<Ace> addAces,
+83              List<Ace> removeAces, OperationContext context) {
+84          return ((Folder) getCmisObject()).createFolder(properties, policies, addAces, removeAces, context);
+85      }
+86  
+87      public Folder createFolder(Map<String, ?> properties) {
+88          return ((Folder) getCmisObject()).createFolder(properties);
+89      }
+90  
+91      public Policy createPolicy(Map<String, ?> properties, List<Policy> policies, List<Ace> addAces,
+92              List<Ace> removeAces, OperationContext context) {
+93          return ((Folder) getCmisObject()).createPolicy(properties, policies, addAces, removeAces, context);
+94      }
+95  
+96      public Policy createPolicy(Map<String, ?> properties) {
+97          return ((Folder) getCmisObject()).createPolicy(properties);
+98      }
+99  
+100     public void deleteTree(boolean allversions, UnfileObject unfile, boolean continueOnFailure) {
+101         deleteTreeAllVersions = allversions;
+102         deleteTreeUnfile = unfile;
+103         deleteTreeContinueOnFailure = continueOnFailure;
+104 
+105         isMarkedForDeleteTree = true;
+106         isMarkedForDelete = true;
+107         isModified = true;
+108     }
+109 
+110     public List<Tree<FileableCmisObject>> getFolderTree(int depth) {
+111         return ((Folder) getCmisObject()).getFolderTree(depth);
+112     }
+113 
+114     public List<Tree<FileableCmisObject>> getFolderTree(int depth, OperationContext context) {
+115         return ((Folder) getCmisObject()).getFolderTree(depth, context);
+116     }
+117 
+118     public List<Tree<FileableCmisObject>> getDescendants(int depth) {
+119         return ((Folder) getCmisObject()).getDescendants(depth);
+120     }
+121 
+122     public List<Tree<FileableCmisObject>> getDescendants(int depth, OperationContext context) {
+123         return ((Folder) getCmisObject()).getDescendants(depth, context);
+124     }
+125 
+126     public ItemIterable<CmisObject> getChildren() {
+127         return ((Folder) getCmisObject()).getChildren();
+128     }
+129 
+130     public ItemIterable<CmisObject> getChildren(OperationContext context) {
+131         return ((Folder) getCmisObject()).getChildren(context);
+132     }
+133 
+134     public boolean isRootFolder() {
+135         return ((Folder) getCmisObject()).isRootFolder();
+136     }
+137 
+138     public Folder getFolderParent() {
+139         return ((Folder) getCmisObject()).getFolderParent();
+140     }
+141 
+142     public String getPath() {
+143         return ((Folder) getCmisObject()).getPath();
+144     }
+145 
+146     public ItemIterable<Document> getCheckedOutDocs() {
+147         return ((Folder) getCmisObject()).getCheckedOutDocs();
+148     }
+149 
+150     public ItemIterable<Document> getCheckedOutDocs(OperationContext context) {
+151         return ((Folder) getCmisObject()).getCheckedOutDocs();
+152     }
+153 
+154     public String getParentId() {
+155         return getPropertyValue(PropertyIds.PARENT_ID);
+156     }
+157 
+158     public List<ObjectType> getAllowedChildObjectTypes() {
+159         List<ObjectType> result = new ArrayList<ObjectType>();
+160 
+161         List<String> otids = getPropertyValue(PropertyIds.ALLOWED_CHILD_OBJECT_TYPE_IDS);
+162         if (otids == null) {
+163             return result;
+164         }
+165 
+166         for (String otid : otids) {
+167             result.add(getSession().getTypeDefinition(otid));
+168         }
+169 
+170         return result;
+171     }
+172 
+173     public void setAllowedChildObjectTypes(List<ObjectType> types) {
+174         List<String> typeIds = new ArrayList<String>();
+175 
+176         if ((types != null) && (!types.isEmpty())) {
+177             for (ObjectType type : types) {
+178                 if (type != null) {
+179                     typeIds.add(type.getId());
+180                 }
+181             }
+182         }
+183 
+184         setPropertyValue(PropertyIds.ALLOWED_CHILD_OBJECT_TYPE_IDS, typeIds);
+185     }
+186 
+187     // override save()
+188 
+189     @Override
+190     public ObjectId save() {
+191         if (!isModified()) {
+192             // nothing has change, so there is nothing to do
+193             return getObjectId();
+194         }
+195 
+196         if (isMarkedForDeleteTree) {
+197             FailedToDeleteData ftd = getBinding().getObjectService().deleteTree(getRepositoryId(), getId(),
+198                     deleteTreeAllVersions, deleteTreeUnfile, deleteTreeContinueOnFailure, null);
+199 
+200             if ((ftd != null) && (!ftd.getIds().isEmpty())) {
+201                 throw new CmisConstraintException("deleteTree could not delete all folder children: " + ftd.getIds());
+202             }
+203 
+204             return null;
+205         }
+206 
+207         return super.save();
+208     }
+209 }
+
+
+ + Added: websites/staging/chemistry/trunk/content/java/0.7.0/maven/chemistry-opencmis-client/chemistry-opencmis-client-impl/xref/org/apache/chemistry/opencmis/client/runtime/TransientPolicyImpl.html ============================================================================== --- websites/staging/chemistry/trunk/content/java/0.7.0/maven/chemistry-opencmis-client/chemistry-opencmis-client-impl/xref/org/apache/chemistry/opencmis/client/runtime/TransientPolicyImpl.html (added) +++ websites/staging/chemistry/trunk/content/java/0.7.0/maven/chemistry-opencmis-client/chemistry-opencmis-client-impl/xref/org/apache/chemistry/opencmis/client/runtime/TransientPolicyImpl.html Tue Apr 3 04:56:56 2012 @@ -0,0 +1,47 @@ + + + + +TransientPolicyImpl xref + + + +
+
+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.client.runtime;
+20  
+21  import org.apache.chemistry.opencmis.client.api.TransientPolicy;
+22  import org.apache.chemistry.opencmis.commons.PropertyIds;
+23  
+24  public class TransientPolicyImpl extends AbstractTransientFileableCmisObject implements TransientPolicy {
+25  
+26      public String getPolicyText() {
+27          return getPropertyValue(PropertyIds.POLICY_TEXT);
+28      }
+29  
+30      public void setPolicyText(String policyText) {
+31          setPropertyValue(PropertyIds.POLICY_TEXT, policyText);
+32      }
+33  }
+
+
+ + Added: websites/staging/chemistry/trunk/content/java/0.7.0/maven/chemistry-opencmis-client/chemistry-opencmis-client-impl/xref/org/apache/chemistry/opencmis/client/runtime/TransientRelationshipImpl.html ============================================================================== --- websites/staging/chemistry/trunk/content/java/0.7.0/maven/chemistry-opencmis-client/chemistry-opencmis-client-impl/xref/org/apache/chemistry/opencmis/client/runtime/TransientRelationshipImpl.html (added) +++ websites/staging/chemistry/trunk/content/java/0.7.0/maven/chemistry-opencmis-client/chemistry-opencmis-client-impl/xref/org/apache/chemistry/opencmis/client/runtime/TransientRelationshipImpl.html Tue Apr 3 04:56:56 2012 @@ -0,0 +1,92 @@ + + + + +TransientRelationshipImpl xref + + + +
+
+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.client.runtime;
+20  
+21  import org.apache.chemistry.opencmis.client.api.CmisObject;
+22  import org.apache.chemistry.opencmis.client.api.ObjectId;
+23  import org.apache.chemistry.opencmis.client.api.OperationContext;
+24  import org.apache.chemistry.opencmis.client.api.TransientRelationship;
+25  import org.apache.chemistry.opencmis.commons.PropertyIds;
+26  
+27  public class TransientRelationshipImpl extends AbstractTransientCmisObject implements TransientRelationship {
+28  
+29      public CmisObject getSource() {
+30          return getSource(getSession().getDefaultContext());
+31      }
+32  
+33      public CmisObject getSource(OperationContext context) {
+34          return getSession().getObject(getSourceId(), context);
+35      }
+36  
+37      public ObjectId getSourceId() {
+38          String sourceId = getPropertyValue(PropertyIds.SOURCE_ID);
+39          if ((sourceId == null) || (sourceId.length() == 0)) {
+40              return null;
+41          }
+42  
+43          return getSession().createObjectId(sourceId);
+44      }
+45  
+46      public void setSourceId(ObjectId id) {
+47          if ((id == null) || (id.getId() == null) || (id.getId().length() == 0)) {
+48              throw new IllegalArgumentException("Id is invalid!");
+49          }
+50  
+51          setPropertyValue(PropertyIds.SOURCE_ID, id.getId());
+52      }
+53  
+54      public CmisObject getTarget() {
+55          return getTarget(getSession().getDefaultContext());
+56      }
+57  
+58      public CmisObject getTarget(OperationContext context) {
+59          return getSession().getObject(getTargetId(), context);
+60      }
+61  
+62      public ObjectId getTargetId() {
+63          String targetId = getPropertyValue(PropertyIds.TARGET_ID);
+64          if ((targetId == null) || (targetId.length() == 0)) {
+65              return null;
+66          }
+67  
+68          return getSession().createObjectId(targetId);
+69      }
+70  
+71      public void setTargetId(ObjectId id) {
+72          if ((id == null) || (id.getId() == null) || (id.getId().length() == 0)) {
+73              throw new IllegalArgumentException("Id is invalid!");
+74          }
+75  
+76          setPropertyValue(PropertyIds.TARGET_ID, id.getId());
+77      }
+78  }
+
+
+ + Added: websites/staging/chemistry/trunk/content/java/0.7.0/maven/chemistry-opencmis-client/chemistry-opencmis-client-impl/xref/org/apache/chemistry/opencmis/client/runtime/cache/Cache.html ============================================================================== --- websites/staging/chemistry/trunk/content/java/0.7.0/maven/chemistry-opencmis-client/chemistry-opencmis-client-impl/xref/org/apache/chemistry/opencmis/client/runtime/cache/Cache.html (added) +++ websites/staging/chemistry/trunk/content/java/0.7.0/maven/chemistry-opencmis-client/chemistry-opencmis-client-impl/xref/org/apache/chemistry/opencmis/client/runtime/cache/Cache.html Tue Apr 3 04:56:56 2012 @@ -0,0 +1,70 @@ + + + + +Cache xref + + + +
+
+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.client.runtime.cache;
+20  
+21  import java.io.Serializable;
+22  import java.util.Map;
+23  
+24  import org.apache.chemistry.opencmis.client.api.CmisObject;
+25  import org.apache.chemistry.opencmis.client.api.Session;
+26  
+27  /**
+28   * Implements a session cache providing following capabilities:
+29   * <p>
+30   * <ul>
+31   * <li>access CmisObject by object id</li>
+32   * <li>access CmisObject by object path</li>
+33   * </ul>
+34   */
+35  public interface Cache extends Serializable {
+36  
+37      void initialize(Session session, Map<String, String> parameters);
+38  
+39      boolean containsId(String objectId, String cacheKey);
+40  
+41      boolean containsPath(String path, String cacheKey);
+42  
+43      void put(CmisObject object, String cacheKey);
+44  
+45      void putPath(String path, CmisObject object, String cacheKey);
+46  
+47      CmisObject getById(String objectId, String cacheKey);
+48  
+49      CmisObject getByPath(String path, String cacheKey);
+50  
+51      void remove(String objectId);
+52  
+53      void clear();
+54  
+55      int getCacheSize();
+56  }
+
+
+ +