chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmpas...@apache.org
Subject svn commit: r1341891 [4/5] - in /chemistry/opencmis/trunk: ./ chemistry-opencmis-android/ chemistry-opencmis-android/chemistry-opencmis-android-client/ chemistry-opencmis-android/chemistry-opencmis-android-client/src/ chemistry-opencmis-android/chemist...
Date Wed, 23 May 2012 15:14:44 GMT
Added: chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/RepositoryServiceImpl.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/RepositoryServiceImpl.java?rev=1341891&view=auto
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/RepositoryServiceImpl.java (added)
+++ chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/RepositoryServiceImpl.java Wed May 23 15:14:42 2012
@@ -0,0 +1,213 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.chemistry.opencmis.client.bindings.spi.atompub;
+
+import java.math.BigInteger;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.chemistry.opencmis.client.bindings.spi.BindingSession;
+import org.apache.chemistry.opencmis.client.bindings.spi.atompub.objects.AtomElement;
+import org.apache.chemistry.opencmis.client.bindings.spi.atompub.objects.AtomEntry;
+import org.apache.chemistry.opencmis.client.bindings.spi.atompub.objects.AtomFeed;
+import org.apache.chemistry.opencmis.client.bindings.spi.atompub.objects.AtomLink;
+import org.apache.chemistry.opencmis.client.bindings.spi.http.HttpUtils;
+import org.apache.chemistry.opencmis.commons.data.ExtensionsData;
+import org.apache.chemistry.opencmis.commons.data.RepositoryInfo;
+import org.apache.chemistry.opencmis.commons.definitions.TypeDefinition;
+import org.apache.chemistry.opencmis.commons.definitions.TypeDefinitionContainer;
+import org.apache.chemistry.opencmis.commons.definitions.TypeDefinitionList;
+import org.apache.chemistry.opencmis.commons.exceptions.CmisObjectNotFoundException;
+import org.apache.chemistry.opencmis.commons.impl.Constants;
+import org.apache.chemistry.opencmis.commons.impl.UrlBuilder;
+import org.apache.chemistry.opencmis.commons.impl.dataobjects.TypeDefinitionContainerImpl;
+import org.apache.chemistry.opencmis.commons.impl.dataobjects.TypeDefinitionListImpl;
+import org.apache.chemistry.opencmis.commons.spi.RepositoryService;
+
+/**
+ * Repository Service AtomPub client.
+ */
+public class RepositoryServiceImpl extends AbstractAtomPubService implements RepositoryService {
+
+    /**
+     * Constructor.
+     */
+    public RepositoryServiceImpl(BindingSession session) {
+        setSession(session);
+    }
+
+    public List<RepositoryInfo> getRepositoryInfos(ExtensionsData extension) {
+        return getRepositoriesInternal(null);
+    }
+
+    public RepositoryInfo getRepositoryInfo(String repositoryId, ExtensionsData extension) {
+        List<RepositoryInfo> repositoryInfos = getRepositoriesInternal(repositoryId);
+
+        // find the repository
+        for (RepositoryInfo info : repositoryInfos) {
+            if (info.getId() == null) {
+                continue;
+            }
+
+            if (info.getId().equals(repositoryId)) {
+                return info;
+            }
+        }
+
+        throw new CmisObjectNotFoundException("Repository not found!");
+    }
+
+    public TypeDefinition getTypeDefinition(String repositoryId, String typeId, ExtensionsData extension) {
+        return getTypeDefinitionInternal(repositoryId, typeId);
+    }
+
+    public TypeDefinitionList getTypeChildren(String repositoryId, String typeId, Boolean includePropertyDefinitions,
+            BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) {
+        TypeDefinitionListImpl result = new TypeDefinitionListImpl();
+
+        // find the link
+        String link = null;
+        if (typeId == null) {
+            link = loadCollection(repositoryId, Constants.COLLECTION_TYPES);
+        } else {
+            link = loadTypeLink(repositoryId, typeId, Constants.REL_DOWN, Constants.MEDIATYPE_CHILDREN);
+        }
+
+        if (link == null) {
+            throw new CmisObjectNotFoundException("Unknown repository or type!");
+        }
+
+        UrlBuilder url = new UrlBuilder(link);
+        url.addParameter(Constants.PARAM_TYPE_ID, typeId);
+        url.addParameter(Constants.PARAM_PROPERTY_DEFINITIONS, includePropertyDefinitions);
+        url.addParameter(Constants.PARAM_MAX_ITEMS, maxItems);
+        url.addParameter(Constants.PARAM_SKIP_COUNT, skipCount);
+
+        // read and parse
+        HttpUtils.Response resp = read(url);
+        AtomFeed feed = parse(resp.getStream(), AtomFeed.class);
+
+        // handle top level
+        for (AtomElement element : feed.getElements()) {
+            if (element.getObject() instanceof AtomLink) {
+                if (isNextLink(element)) {
+                    result.setHasMoreItems(Boolean.TRUE);
+                }
+            } else if (isInt(NAME_NUM_ITEMS, element)) {
+                result.setNumItems((BigInteger) element.getObject());
+            }
+        }
+
+        result.setList(new ArrayList<TypeDefinition>(feed.getEntries().size()));
+
+        // get the children
+        if (!feed.getEntries().isEmpty()) {
+            for (AtomEntry entry : feed.getEntries()) {
+                TypeDefinition child = null;
+
+                lockTypeLinks();
+                try {
+                    // walk through the entry
+                    for (AtomElement element : entry.getElements()) {
+                        if (element.getObject() instanceof AtomLink) {
+                            addTypeLink(repositoryId, entry.getId(), (AtomLink) element.getObject());
+                        } else if (element.getObject() instanceof TypeDefinition) {
+                            child = (TypeDefinition) element.getObject();
+                        }
+                    }
+                } finally {
+                    unlockTypeLinks();
+                }
+
+                if (child != null) {
+                    result.getList().add(child);
+                }
+            }
+        }
+
+        return result;
+    }
+
+    public List<TypeDefinitionContainer> getTypeDescendants(String repositoryId, String typeId, BigInteger depth,
+            Boolean includePropertyDefinitions, ExtensionsData extension) {
+        List<TypeDefinitionContainer> result = new ArrayList<TypeDefinitionContainer>();
+
+        // find the link
+        String link = null;
+        if (typeId == null) {
+            link = loadRepositoryLink(repositoryId, Constants.REP_REL_TYPEDESC);
+        } else {
+            link = loadTypeLink(repositoryId, typeId, Constants.REL_DOWN, Constants.MEDIATYPE_DESCENDANTS);
+        }
+
+        if (link == null) {
+            throw new CmisObjectNotFoundException("Unknown repository or type!");
+        }
+
+        UrlBuilder url = new UrlBuilder(link);
+        url.addParameter(Constants.PARAM_TYPE_ID, typeId);
+        url.addParameter(Constants.PARAM_DEPTH, depth);
+        url.addParameter(Constants.PARAM_PROPERTY_DEFINITIONS, includePropertyDefinitions);
+
+        // read and parse
+        HttpUtils.Response resp = read(url);
+        AtomFeed feed = parse(resp.getStream(), AtomFeed.class);
+
+        // process tree
+        addTypeDescendantsLevel(repositoryId, feed, result);
+
+        return result;
+    }
+
+    /**
+     * Adds type descendants level recursively.
+     */
+    private void addTypeDescendantsLevel(String repositoryId, AtomFeed feed, List<TypeDefinitionContainer> containerList) {
+        if ((feed == null) || (feed.getEntries().isEmpty())) {
+            return;
+        }
+
+        // walk through the feed
+        for (AtomEntry entry : feed.getEntries()) {
+            TypeDefinitionContainerImpl childContainer = null;
+            List<TypeDefinitionContainer> childContainerList = new ArrayList<TypeDefinitionContainer>();
+
+            // walk through the entry
+            lockTypeLinks();
+            try {
+                for (AtomElement element : entry.getElements()) {
+                    if (element.getObject() instanceof AtomLink) {
+                        addTypeLink(repositoryId, entry.getId(), (AtomLink) element.getObject());
+                    } else if (element.getObject() instanceof TypeDefinition) {
+                        childContainer = new TypeDefinitionContainerImpl((TypeDefinition) element.getObject());
+                    } else if (element.getObject() instanceof AtomFeed) {
+                        addTypeDescendantsLevel(repositoryId, (AtomFeed) element.getObject(), childContainerList);
+                    }
+                }
+            } finally {
+                unlockTypeLinks();
+            }
+
+            if (childContainer != null) {
+                childContainer.setChildren(childContainerList);
+                containerList.add(childContainer);
+            }
+        }
+    }
+}

Added: chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/SpiSessionParameter.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/SpiSessionParameter.java?rev=1341891&view=auto
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/SpiSessionParameter.java (added)
+++ chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/SpiSessionParameter.java Wed May 23 15:14:42 2012
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.chemistry.opencmis.client.bindings.spi.atompub;
+
+/**
+ * Internal session parameters.
+ */
+public final class SpiSessionParameter {
+
+    public static final String LINK_CACHE = "org.apache.chemistry.opencmis.binding.atompub.linkcache";
+
+    private SpiSessionParameter() {
+    }
+}

Added: chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/VersioningServiceImpl.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/VersioningServiceImpl.java?rev=1341891&view=auto
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/VersioningServiceImpl.java (added)
+++ chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/VersioningServiceImpl.java Wed May 23 15:14:42 2012
@@ -0,0 +1,303 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.chemistry.opencmis.client.bindings.spi.atompub;
+
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.chemistry.opencmis.client.bindings.spi.BindingSession;
+import org.apache.chemistry.opencmis.client.bindings.spi.atompub.objects.AtomElement;
+import org.apache.chemistry.opencmis.client.bindings.spi.atompub.objects.AtomEntry;
+import org.apache.chemistry.opencmis.client.bindings.spi.atompub.objects.AtomFeed;
+import org.apache.chemistry.opencmis.client.bindings.spi.atompub.objects.AtomLink;
+import org.apache.chemistry.opencmis.client.bindings.spi.http.HttpUtils;
+import org.apache.chemistry.opencmis.commons.data.Acl;
+import org.apache.chemistry.opencmis.commons.data.ContentStream;
+import org.apache.chemistry.opencmis.commons.data.ExtensionsData;
+import org.apache.chemistry.opencmis.commons.data.ObjectData;
+import org.apache.chemistry.opencmis.commons.data.Properties;
+import org.apache.chemistry.opencmis.commons.enums.IncludeRelationships;
+import org.apache.chemistry.opencmis.commons.exceptions.CmisConnectionException;
+import org.apache.chemistry.opencmis.commons.exceptions.CmisInvalidArgumentException;
+import org.apache.chemistry.opencmis.commons.exceptions.CmisObjectNotFoundException;
+import org.apache.chemistry.opencmis.commons.impl.Constants;
+import org.apache.chemistry.opencmis.commons.impl.ReturnVersion;
+import org.apache.chemistry.opencmis.commons.impl.UrlBuilder;
+import org.apache.chemistry.opencmis.commons.impl.dataobjects.ObjectDataImpl;
+import org.apache.chemistry.opencmis.commons.impl.dataobjects.PropertiesImpl;
+import org.apache.chemistry.opencmis.commons.spi.Holder;
+import org.apache.chemistry.opencmis.commons.spi.VersioningService;
+
+/**
+ * Versioning Service AtomPub client.
+ */
+public class VersioningServiceImpl extends AbstractAtomPubService implements VersioningService {
+
+    /**
+     * Constructor.
+     */
+    public VersioningServiceImpl(BindingSession session) {
+        setSession(session);
+    }
+
+    public void checkOut(String repositoryId, Holder<String> objectId, ExtensionsData extension,
+            Holder<Boolean> contentCopied) {
+        if ((objectId == null) || (objectId.getValue() == null) || (objectId.getValue().length() == 0)) {
+            throw new CmisInvalidArgumentException("Object id must be set!");
+        }
+
+        // find the link
+        String link = loadCollection(repositoryId, Constants.COLLECTION_CHECKEDOUT);
+
+        if (link == null) {
+            throw new CmisObjectNotFoundException("Unknown repository or checkedout collection not supported!");
+        }
+
+        UrlBuilder url = new UrlBuilder(link);
+
+        // set up object and writer
+        final AtomEntryWriter entryWriter = new AtomEntryWriter(createIdObject(objectId.getValue()));
+
+        // post move request
+        HttpUtils.Response resp = post(url, Constants.MEDIATYPE_ENTRY, new HttpUtils.Output() {
+            public void write(OutputStream out) throws Exception {
+                entryWriter.write(out);
+            }
+        });
+
+        // parse the response
+        AtomEntry entry = parse(resp.getStream(), AtomEntry.class);
+
+        objectId.setValue(entry.getId());
+
+        lockLinks();
+        try {
+            // clean up cache
+            removeLinks(repositoryId, entry.getId());
+
+            // walk through the entry
+            for (AtomElement element : entry.getElements()) {
+                if (element.getObject() instanceof AtomLink) {
+                    addLink(repositoryId, entry.getId(), (AtomLink) element.getObject());
+                }
+            }
+        } finally {
+            unlockLinks();
+        }
+
+        if (contentCopied != null) {
+            contentCopied.setValue(null);
+        }
+    }
+
+    public void cancelCheckOut(String repositoryId, String objectId, ExtensionsData extension) {
+        // find the link
+        String link = loadLink(repositoryId, objectId, Constants.REL_SELF, Constants.MEDIATYPE_ENTRY);
+
+        if (link == null) {
+            throwLinkException(repositoryId, objectId, Constants.REL_SELF, Constants.MEDIATYPE_ENTRY);
+        }
+
+        // prefer working copy link if available
+        // (workaround for non-compliant repositories)
+        String wcLink = getLink(repositoryId, objectId, Constants.REL_WORKINGCOPY, Constants.MEDIATYPE_ENTRY);
+        if (wcLink != null) {
+            link = wcLink;
+        }
+
+        delete(new UrlBuilder(link));
+    }
+
+    @SuppressWarnings("unused")
+    public void checkIn(String repositoryId, Holder<String> objectId, Boolean major, Properties properties,
+            ContentStream contentStream, String checkinComment, List<String> policies, Acl addAces, Acl removeAces,
+            ExtensionsData extension) {
+        // we need an object id
+        if ((objectId == null) || (objectId.getValue() == null) || (objectId.getValue().length() == 0)) {
+            throw new CmisInvalidArgumentException("Object id must be set!");
+        }
+
+        // find the link
+        String link = loadLink(repositoryId, objectId.getValue(), Constants.REL_SELF, Constants.MEDIATYPE_ENTRY);
+
+        if (link == null) {
+            throwLinkException(repositoryId, objectId.getValue(), Constants.REL_SELF, Constants.MEDIATYPE_ENTRY);
+        }
+
+        // prefer working copy link if available
+        // (workaround for non-compliant repositories)
+        String wcLink = getLink(repositoryId, objectId.getValue(), Constants.REL_WORKINGCOPY, Constants.MEDIATYPE_ENTRY);
+        if (wcLink != null) {
+            link = wcLink;
+        }
+
+        UrlBuilder url = new UrlBuilder(link);
+        url.addParameter(Constants.PARAM_CHECKIN_COMMENT, checkinComment);
+        url.addParameter(Constants.PARAM_MAJOR, major);
+        url.addParameter(Constants.PARAM_CHECK_IN, "true");
+
+        // set up object and writer
+        ObjectDataImpl object = new ObjectDataImpl();
+        object.setProperties(properties);
+        // object.setPolicyIds(convertPolicyIds(policies));
+
+        if (object.getProperties() == null) {
+            object.setProperties(new PropertiesImpl());
+        }
+
+        String mediaType = null;
+        InputStream stream = null;
+
+        if (contentStream != null) {
+            mediaType = contentStream.getMimeType();
+            stream = contentStream.getStream();
+        }
+
+        final AtomEntryWriter entryWriter = new AtomEntryWriter(object, mediaType, stream);
+
+        // update
+        HttpUtils.Response resp = put(url, Constants.MEDIATYPE_ENTRY, new HttpUtils.Output() {
+            public void write(OutputStream out) throws Exception {
+                entryWriter.write(out);
+            }
+        });
+
+        // parse new entry
+        AtomEntry entry = parse(resp.getStream(), AtomEntry.class);
+
+        // we expect a CMIS entry
+        if (entry.getId() == null) {
+            throw new CmisConnectionException("Received Atom entry is not a CMIS entry!");
+        }
+
+        // set object id
+        objectId.setValue(entry.getId());
+
+        Acl originalAces = null;
+
+        lockLinks();
+        try {
+            // clean up cache
+            removeLinks(repositoryId, entry.getId());
+
+            // walk through the entry
+            for (AtomElement element : entry.getElements()) {
+                if (element.getObject() instanceof AtomLink) {
+                    addLink(repositoryId, entry.getId(), (AtomLink) element.getObject());
+                } else if (element.getObject() instanceof ObjectData) {
+                    // extract current ACL
+                    // TODO Update This part for Android.
+                    object = (ObjectDataImpl) element.getObject();
+                    // originalAces = convert(object.getAcl(),
+                    // object.isExactACL());
+                }
+            }
+        } finally {
+            unlockLinks();
+        }
+
+        // handle ACL modifications
+        if ((originalAces != null) && (isAclMergeRequired(addAces, removeAces))) {
+            // merge and update ACL
+            Acl newACL = mergeAcls(originalAces, addAces, removeAces);
+            if (newACL != null) {
+                updateAcl(repositoryId, entry.getId(), newACL, null);
+            }
+        }
+    }
+
+    public List<ObjectData> getAllVersions(String repositoryId, String objectId, String versionSeriesId, String filter,
+            Boolean includeAllowableActions, ExtensionsData extension) {
+        List<ObjectData> result = new ArrayList<ObjectData>();
+
+        // find the link
+        String link = loadLink(repositoryId, objectId, Constants.REL_VERSIONHISTORY, Constants.MEDIATYPE_FEED);
+
+        if (link == null) {
+            throwLinkException(repositoryId, objectId, Constants.REL_VERSIONHISTORY, Constants.MEDIATYPE_FEED);
+        }
+
+        UrlBuilder url = new UrlBuilder(link);
+        url.addParameter(Constants.PARAM_FILTER, filter);
+        url.addParameter(Constants.PARAM_ALLOWABLE_ACTIONS, includeAllowableActions);
+
+        // read and parse
+        HttpUtils.Response resp = read(url);
+        AtomFeed feed = parse(resp.getStream(), AtomFeed.class);
+
+        // get the versions
+        if (!feed.getEntries().isEmpty()) {
+            for (AtomEntry entry : feed.getEntries()) {
+                ObjectData version = null;
+
+                lockLinks();
+                try {
+                    // clean up cache
+                    removeLinks(repositoryId, entry.getId());
+
+                    // walk through the entry
+                    for (AtomElement element : entry.getElements()) {
+                        if (element.getObject() instanceof AtomLink) {
+                            addLink(repositoryId, entry.getId(), (AtomLink) element.getObject());
+                        } else if (element.getObject() instanceof ObjectData) {
+                            version = (ObjectData) element.getObject();
+                        }
+                    }
+                } finally {
+                    unlockLinks();
+                }
+
+                if (version != null) {
+                    result.add(version);
+                }
+            }
+        }
+
+        return result;
+    }
+
+    public ObjectData getObjectOfLatestVersion(String repositoryId, String objectId, String versionSeriesId,
+            Boolean major, String filter, Boolean includeAllowableActions, IncludeRelationships includeRelationships,
+            String renditionFilter, Boolean includePolicyIds, Boolean includeACL, ExtensionsData extension) {
+
+        ReturnVersion returnVersion = ReturnVersion.LATEST;
+        if ((major != null) && (major.booleanValue())) {
+            returnVersion = ReturnVersion.LASTESTMAJOR;
+        }
+
+        return getObjectInternal(repositoryId, IdentifierType.ID, objectId, returnVersion, filter,
+                includeAllowableActions, includeRelationships, renditionFilter, includePolicyIds, includeACL, extension);
+    }
+
+    public Properties getPropertiesOfLatestVersion(String repositoryId, String objectId, String versionSeriesId,
+            Boolean major, String filter, ExtensionsData extension) {
+
+        ReturnVersion returnVersion = ReturnVersion.LATEST;
+        if ((major != null) && (major.booleanValue())) {
+            returnVersion = ReturnVersion.LASTESTMAJOR;
+        }
+
+        ObjectData object = getObjectInternal(repositoryId, IdentifierType.ID, objectId, returnVersion, filter,
+                Boolean.FALSE, IncludeRelationships.NONE, "cmis:none", Boolean.FALSE, Boolean.FALSE, extension);
+
+        return object.getProperties();
+    }
+}

Added: chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/AtomAcl.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/AtomAcl.java?rev=1341891&view=auto
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/AtomAcl.java (added)
+++ chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/AtomAcl.java Wed May 23 15:14:42 2012
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.chemistry.opencmis.client.bindings.spi.atompub.objects;
+
+import org.apache.chemistry.opencmis.commons.data.Acl;
+
+/**
+ * AtomAcl.
+ */
+public class AtomAcl extends AtomBase {
+
+    private static final long serialVersionUID = 1L;
+
+    private Acl acl;
+
+    public AtomAcl() {
+        super();
+    }
+
+    public AtomAcl(Acl acl) {
+        this();
+        setACL(acl);
+    }
+
+    @Override
+    public String getType() {
+        return "ACL";
+    }
+
+    public Acl getACL() {
+        return acl;
+    }
+
+    public void setACL(Acl acl) {
+        this.acl = acl;
+    }
+}
\ No newline at end of file

Added: chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/AtomAllowableActions.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/AtomAllowableActions.java?rev=1341891&view=auto
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/AtomAllowableActions.java (added)
+++ chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/AtomAllowableActions.java Wed May 23 15:14:42 2012
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.chemistry.opencmis.client.bindings.spi.atompub.objects;
+
+import org.apache.chemistry.opencmis.commons.data.AllowableActions;
+
+/**
+ * AtomAllowableActions.
+ */
+public class AtomAllowableActions extends AtomBase {
+
+    private static final long serialVersionUID = 1L;
+
+    private AllowableActions allowableActions;
+
+    public AtomAllowableActions() {
+        super();
+    }
+
+    public AtomAllowableActions(AllowableActions allowableActions) {
+        this();
+        setAllowableActions(allowableActions);
+    }
+
+    @Override
+    public String getType() {
+        return "Allowable Actions";
+    }
+
+    public AllowableActions getAllowableActions() {
+        return allowableActions;
+    }
+
+    public void setAllowableActions(AllowableActions allowableActions) {
+        this.allowableActions = allowableActions;
+    }
+}

Added: chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/AtomBase.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/AtomBase.java?rev=1341891&view=auto
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/AtomBase.java (added)
+++ chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/AtomBase.java Wed May 23 15:14:42 2012
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.chemistry.opencmis.client.bindings.spi.atompub.objects;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:fmueller@opentext.com">Florian M&uuml;ller</a>
+ * 
+ */
+public abstract class AtomBase implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    private final List<AtomElement> fElements = new ArrayList<AtomElement>();
+
+    protected AtomBase() {
+    }
+
+    public abstract String getType();
+
+    public List<AtomElement> getElements() {
+        return fElements;
+    }
+
+    public void addElement(AtomElement element) {
+        if (element != null) {
+            fElements.add(element);
+        }
+    }
+}

Added: chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/AtomElement.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/AtomElement.java?rev=1341891&view=auto
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/AtomElement.java (added)
+++ chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/AtomElement.java Wed May 23 15:14:42 2012
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.chemistry.opencmis.client.bindings.spi.atompub.objects;
+
+import java.io.Serializable;
+
+import javax.xml.namespace.QName;
+
+/**
+ * @author <a href="mailto:fmueller@opentext.com">Florian M&uuml;ller</a>
+ * 
+ */
+public class AtomElement implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    private final QName fName;
+    private final Object fObject;
+
+    public AtomElement(QName name, Object object) {
+        fName = name;
+        fObject = object;
+    }
+
+    public QName getName() {
+        return fName;
+    }
+
+    public Object getObject() {
+        return fObject;
+    }
+
+    @Override
+    public String toString() {
+        return fName + ": " + fObject;
+    }
+}

Added: chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/AtomEntry.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/AtomEntry.java?rev=1341891&view=auto
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/AtomEntry.java (added)
+++ chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/AtomEntry.java Wed May 23 15:14:42 2012
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.chemistry.opencmis.client.bindings.spi.atompub.objects;
+
+/**
+ * @author <a href="mailto:fmueller@opentext.com">Florian M&uuml;ller</a>
+ * 
+ */
+public class AtomEntry extends AtomBase {
+
+    private static final long serialVersionUID = 1L;
+
+    private String fId;
+
+    public AtomEntry() {
+        super();
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.opencmis.client.provider.spi.atompub.objects.AtomBase#getType
+     * ()
+     */
+    @Override
+    public String getType() {
+        return "Atom Entry";
+    }
+
+    public String getId() {
+        return fId;
+    }
+
+    public void setId(String id) {
+        fId = id;
+    }
+
+    @Override
+    public String toString() {
+        return "Entry \"" + fId + "\": " + getElements();
+    }
+}

Added: chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/AtomFeed.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/AtomFeed.java?rev=1341891&view=auto
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/AtomFeed.java (added)
+++ chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/AtomFeed.java Wed May 23 15:14:42 2012
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.chemistry.opencmis.client.bindings.spi.atompub.objects;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:fmueller@opentext.com">Florian M&uuml;ller</a>
+ * 
+ */
+public class AtomFeed extends AtomBase {
+
+    private static final long serialVersionUID = 1L;
+
+    private final List<AtomEntry> fEntries = new ArrayList<AtomEntry>();
+
+    public AtomFeed() {
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.opencmis.client.provider.spi.atompub.objects.AtomBase#getType
+     * ()
+     */
+    @Override
+    public String getType() {
+        return "Atom Feed";
+    }
+
+    public List<AtomEntry> getEntries() {
+        return fEntries;
+    }
+
+    public void addEntry(AtomEntry entry) {
+        if (entry != null) {
+            fEntries.add(entry);
+        }
+    }
+
+    @Override
+    public String toString() {
+        return "Feed : " + getElements() + " " + fEntries;
+    }
+}

Added: chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/AtomLink.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/AtomLink.java?rev=1341891&view=auto
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/AtomLink.java (added)
+++ chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/AtomLink.java Wed May 23 15:14:42 2012
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.chemistry.opencmis.client.bindings.spi.atompub.objects;
+
+import java.io.Serializable;
+
+/**
+ * @author <a href="mailto:fmueller@opentext.com">Florian M&uuml;ller</a>
+ * 
+ */
+public class AtomLink implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    private String fRel;
+    private String fType;
+    private String fHref;
+
+    public AtomLink() {
+    }
+
+    public String getRel() {
+        return fRel;
+    }
+
+    public void setRel(String rel) {
+        fRel = rel;
+    }
+
+    public String getType() {
+        return fType;
+    }
+
+    public void setType(String type) {
+        fType = type;
+    }
+
+    public String getHref() {
+        return fHref;
+    }
+
+    public void setHref(String href) {
+        fHref = href;
+    }
+
+    @Override
+    public String toString() {
+        return "Link: rel=\"" + fRel + "\" type=\"" + fType + "\" href=\"" + fHref + "\"";
+    }
+}

Added: chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/HtmlDoc.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/HtmlDoc.java?rev=1341891&view=auto
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/HtmlDoc.java (added)
+++ chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/HtmlDoc.java Wed May 23 15:14:42 2012
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.chemistry.opencmis.client.bindings.spi.atompub.objects;
+
+public class HtmlDoc extends AtomBase {
+
+	private static final long serialVersionUID = 1L;
+
+	@Override
+	public String getType() {
+		return "HTML document";
+	}
+
+}

Added: chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/RepositoryWorkspace.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/RepositoryWorkspace.java?rev=1341891&view=auto
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/RepositoryWorkspace.java (added)
+++ chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/RepositoryWorkspace.java Wed May 23 15:14:42 2012
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.chemistry.opencmis.client.bindings.spi.atompub.objects;
+
+/**
+ * @author <a href="mailto:fmueller@opentext.com">Florian M&uuml;ller</a>
+ * 
+ */
+public class RepositoryWorkspace extends AtomBase {
+
+    private static final long serialVersionUID = 1L;
+
+    private String fId;
+
+    public RepositoryWorkspace() {
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.opencmis.client.provider.spi.atompub.objects.AtomBase#getType
+     * ()
+     */
+    @Override
+    public String getType() {
+        return "Repository Workspace";
+    }
+
+    public String getId() {
+        return fId;
+    }
+
+    public void setId(String id) {
+        fId = id;
+    }
+
+    @Override
+    public String toString() {
+        return "Workspace \"" + fId + "\": " + getElements();
+    }
+}

Added: chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/ServiceDoc.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/ServiceDoc.java?rev=1341891&view=auto
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/ServiceDoc.java (added)
+++ chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/ServiceDoc.java Wed May 23 15:14:42 2012
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.chemistry.opencmis.client.bindings.spi.atompub.objects;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:fmueller@opentext.com">Florian M&uuml;ller</a>
+ * 
+ */
+public class ServiceDoc extends AtomBase {
+
+    private static final long serialVersionUID = 1L;
+
+    private final List<RepositoryWorkspace> fWorkspaces = new ArrayList<RepositoryWorkspace>();
+
+    public ServiceDoc() {
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.opencmis.client.provider.spi.atompub.objects.AtomBase#getType
+     * ()
+     */
+    @Override
+    public String getType() {
+        return "Service Document";
+    }
+
+    public List<RepositoryWorkspace> getWorkspaces() {
+        return fWorkspaces;
+    }
+
+    public void addWorkspace(RepositoryWorkspace ws) {
+        if (ws != null) {
+            fWorkspaces.add(ws);
+        }
+    }
+
+    @Override
+    public String toString() {
+        return "Service Doc: " + fWorkspaces;
+    }
+}

Added: chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/commons/enums/AtomPropertyType.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/commons/enums/AtomPropertyType.java?rev=1341891&view=auto
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/commons/enums/AtomPropertyType.java (added)
+++ chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/commons/enums/AtomPropertyType.java Wed May 23 15:14:42 2012
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.chemistry.opencmis.commons.enums;
+
+/**
+ * Atom Property Type Enum.
+ * 
+ * @author <a href="mailto:jeanmarie.pascal@alfresco.com">JM.PASCAL</a>
+ * 
+ */
+public enum AtomPropertyType {
+
+    BOOLEAN("propertyBoolean"), ID("propertyId"), INTEGER("propertyInteger"), DATETIME("propertyDateTime"), DECIMAL(
+            "propertyDecimal"), HTML("propertyHtml"), STRING("propertyString"), URI("propertyUri");
+    private final String value;
+
+    AtomPropertyType(String v) {
+        value = v;
+    }
+
+    public String value() {
+        return value;
+    }
+
+    public static AtomPropertyType fromValue(String v) {
+        for (AtomPropertyType c : AtomPropertyType.values()) {
+            if (c.value.equals(v)) {
+                return c;
+            }
+        }
+        throw new IllegalArgumentException(v);
+    }
+
+}



Mime
View raw message