chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dcaru...@apache.org
Subject svn commit: r936922 [8/18] - in /incubator/chemistry/opencmis/trunk/chemistry-opencmis-client: chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/ chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/c...
Date Thu, 22 Apr 2010 16:04:22 GMT
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/RepositoryServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/RepositoryServiceImpl.java?rev=936922&r1=936921&r2=936922&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/RepositoryServiceImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/RepositoryServiceImpl.java Thu Apr 22 16:04:19 2010
@@ -50,209 +50,209 @@ import org.apache.chemistry.opencmis.com
  */
 public class RepositoryServiceImpl extends AbstractAtomPubService implements RepositoryService {
 
-	/**
-	 * Constructor.
-	 */
-	public RepositoryServiceImpl(Session session) {
-		setSession(session);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.apache.opencmis.client.provider.RepositoryService#getRepositoryInfos
-	 * (org.apache.opencmis .client.provider .ExtensionsData)
-	 */
-	public List<RepositoryInfo> getRepositoryInfos(ExtensionsData extension) {
-		return getRepositoriesInternal(null);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.apache.opencmis.client.provider.RepositoryService#getRepositoryInfo
-	 * (java.lang.String, org.apache.opencmis.client.provider.ExtensionsData)
-	 */
-	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!");
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.apache.opencmis.client.provider.RepositoryService#getTypeDefinition
-	 * (java.lang.String, java.lang.String,
-	 * org.apache.opencmis.client.provider.ExtensionsData)
-	 */
-	public TypeDefinition getTypeDefinition(String repositoryId, String typeId, ExtensionsData extension) {
-		return getTypeDefinitionInternal(repositoryId, typeId);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.apache.opencmis.client.provider.RepositoryService#getTypeChildren
-	 * (java.lang.String, java.lang.String, java.lang.Boolean,
-	 * java.math.BigInteger, java.math.BigInteger,
-	 * org.apache.opencmis.client.provider.ExtensionsData)
-	 */
-	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 CmisTypeDefinitionType) {
-							child = convert((CmisTypeDefinitionType) element.getObject());
-						}
-					}
-				} finally {
-					unlockTypeLinks();
-				}
-
-				if (child != null) {
-					result.getList().add(child);
-				}
-			}
-		}
-
-		return result;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.apache.opencmis.client.provider.RepositoryService#getTypeDescendants
-	 * (java.lang.String, java.lang.String, java.math.BigInteger,
-	 * java.lang.Boolean, org.apache.opencmis.client.provider.ExtensionsData)
-	 */
-	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 CmisTypeDefinitionType) {
-						childContainer = new TypeDefinitionContainerImpl(convert((CmisTypeDefinitionType) 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);
-			}
-		}
-	}
+    /**
+     * Constructor.
+     */
+    public RepositoryServiceImpl(Session session) {
+        setSession(session);
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.opencmis.client.provider.RepositoryService#getRepositoryInfos
+     * (org.apache.opencmis .client.provider .ExtensionsData)
+     */
+    public List<RepositoryInfo> getRepositoryInfos(ExtensionsData extension) {
+        return getRepositoriesInternal(null);
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.opencmis.client.provider.RepositoryService#getRepositoryInfo
+     * (java.lang.String, org.apache.opencmis.client.provider.ExtensionsData)
+     */
+    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!");
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.opencmis.client.provider.RepositoryService#getTypeDefinition
+     * (java.lang.String, java.lang.String,
+     * org.apache.opencmis.client.provider.ExtensionsData)
+     */
+    public TypeDefinition getTypeDefinition(String repositoryId, String typeId, ExtensionsData extension) {
+        return getTypeDefinitionInternal(repositoryId, typeId);
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.opencmis.client.provider.RepositoryService#getTypeChildren
+     * (java.lang.String, java.lang.String, java.lang.Boolean,
+     * java.math.BigInteger, java.math.BigInteger,
+     * org.apache.opencmis.client.provider.ExtensionsData)
+     */
+    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 CmisTypeDefinitionType) {
+                            child = convert((CmisTypeDefinitionType) element.getObject());
+                        }
+                    }
+                } finally {
+                    unlockTypeLinks();
+                }
+
+                if (child != null) {
+                    result.getList().add(child);
+                }
+            }
+        }
+
+        return result;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.opencmis.client.provider.RepositoryService#getTypeDescendants
+     * (java.lang.String, java.lang.String, java.math.BigInteger,
+     * java.lang.Boolean, org.apache.opencmis.client.provider.ExtensionsData)
+     */
+    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 CmisTypeDefinitionType) {
+                        childContainer = new TypeDefinitionContainerImpl(convert((CmisTypeDefinitionType) 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);
+            }
+        }
+    }
 }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/SpiSessionParameter.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/SpiSessionParameter.java?rev=936922&r1=936921&r2=936922&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/SpiSessionParameter.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/SpiSessionParameter.java Thu Apr 22 16:04:19 2010
@@ -24,8 +24,8 @@ package org.apache.chemistry.opencmis.cl
  */
 public final class SpiSessionParameter {
 
-	public static final String LINK_CACHE = "org.apache.chemistry.opencmis.binding.atompub.linkcache";
+    public static final String LINK_CACHE = "org.apache.chemistry.opencmis.binding.atompub.linkcache";
 
-	private SpiSessionParameter() {
-	}
+    private SpiSessionParameter() {
+    }
 }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/VersioningServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/VersioningServiceImpl.java?rev=936922&r1=936921&r2=936922&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/VersioningServiceImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/VersioningServiceImpl.java Thu Apr 22 16:04:19 2010
@@ -53,236 +53,236 @@ import org.apache.chemistry.opencmis.com
  */
 public class VersioningServiceImpl extends AbstractAtomPubService implements VersioningService {
 
-	/**
-	 * Constructor.
-	 */
-	public VersioningServiceImpl(Session 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);
-		}
-
-		delete(new UrlBuilder(link));
-	}
-
-	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);
-		}
-
-		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
-		CmisObjectType object = new CmisObjectType();
-		object.setProperties(convert(properties));
-		object.setPolicyIds(convertPolicyIds(policies));
-
-		if (object.getProperties() == null) {
-			object.setProperties(new CmisPropertiesType());
-		}
-
-		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 CmisObjectType) {
-					// extract current ACL
-					object = (CmisObjectType) 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 CmisObjectType) {
-							version = convert((CmisObjectType) 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;
-		}
+    /**
+     * Constructor.
+     */
+    public VersioningServiceImpl(Session 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);
+        }
+
+        delete(new UrlBuilder(link));
+    }
+
+    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);
+        }
+
+        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
+        CmisObjectType object = new CmisObjectType();
+        object.setProperties(convert(properties));
+        object.setPolicyIds(convertPolicyIds(policies));
+
+        if (object.getProperties() == null) {
+            object.setProperties(new CmisPropertiesType());
+        }
+
+        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 CmisObjectType) {
+                    // extract current ACL
+                    object = (CmisObjectType) 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 CmisObjectType) {
+                            version = convert((CmisObjectType) 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);
+        ObjectData object = getObjectInternal(repositoryId, IdentifierType.ID, objectId, returnVersion, filter,
+                Boolean.FALSE, IncludeRelationships.NONE, "cmis:none", Boolean.FALSE, Boolean.FALSE, extension);
 
-		return object.getProperties();
-	}
+        return object.getProperties();
+    }
 }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/AtomAcl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/AtomAcl.java?rev=936922&r1=936921&r2=936922&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/AtomAcl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/AtomAcl.java Thu Apr 22 16:04:19 2010
@@ -26,36 +26,36 @@ import org.apache.chemistry.opencmis.com
  */
 public class AtomAcl extends AtomBase {
 
-	private static final long serialVersionUID = 1L;
+    private static final long serialVersionUID = 1L;
 
-	private CmisAccessControlListType fACL;
+    private CmisAccessControlListType fACL;
 
-	public AtomAcl() {
-		super();
-	}
-
-	public AtomAcl(CmisAccessControlListType acl) {
-		this();
-		setACL(acl);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.apache.opencmis.client.provider.spi.atompub.objects.AtomBase#getType
-	 * ()
-	 */
-	@Override
-	public String getType() {
-		return "ACL";
-	}
-
-	public CmisAccessControlListType getACL() {
-		return fACL;
-	}
-
-	public void setACL(CmisAccessControlListType acl) {
-		fACL = acl;
-	}
+    public AtomAcl() {
+        super();
+    }
+
+    public AtomAcl(CmisAccessControlListType acl) {
+        this();
+        setACL(acl);
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.opencmis.client.provider.spi.atompub.objects.AtomBase#getType
+     * ()
+     */
+    @Override
+    public String getType() {
+        return "ACL";
+    }
+
+    public CmisAccessControlListType getACL() {
+        return fACL;
+    }
+
+    public void setACL(CmisAccessControlListType acl) {
+        fACL = acl;
+    }
 }
\ No newline at end of file

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/AtomAllowableActions.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/AtomAllowableActions.java?rev=936922&r1=936921&r2=936922&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/AtomAllowableActions.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/AtomAllowableActions.java Thu Apr 22 16:04:19 2010
@@ -26,36 +26,36 @@ import org.apache.chemistry.opencmis.com
  */
 public class AtomAllowableActions extends AtomBase {
 
-	private static final long serialVersionUID = 1L;
+    private static final long serialVersionUID = 1L;
 
-	private CmisAllowableActionsType fAllowableActions;
+    private CmisAllowableActionsType fAllowableActions;
 
-	public AtomAllowableActions() {
-		super();
-	}
-
-	public AtomAllowableActions(CmisAllowableActionsType allowableActions) {
-		this();
-		setAllowableActions(allowableActions);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.apache.opencmis.client.provider.spi.atompub.objects.AtomBase#getType
-	 * ()
-	 */
-	@Override
-	public String getType() {
-		return "Allowable Actions";
-	}
-
-	public CmisAllowableActionsType getAllowableActions() {
-		return fAllowableActions;
-	}
-
-	public void setAllowableActions(CmisAllowableActionsType allowableActions) {
-		fAllowableActions = allowableActions;
-	}
+    public AtomAllowableActions() {
+        super();
+    }
+
+    public AtomAllowableActions(CmisAllowableActionsType allowableActions) {
+        this();
+        setAllowableActions(allowableActions);
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.opencmis.client.provider.spi.atompub.objects.AtomBase#getType
+     * ()
+     */
+    @Override
+    public String getType() {
+        return "Allowable Actions";
+    }
+
+    public CmisAllowableActionsType getAllowableActions() {
+        return fAllowableActions;
+    }
+
+    public void setAllowableActions(CmisAllowableActionsType allowableActions) {
+        fAllowableActions = allowableActions;
+    }
 }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/AtomBase.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/AtomBase.java?rev=936922&r1=936921&r2=936922&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/AtomBase.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/AtomBase.java Thu Apr 22 16:04:19 2010
@@ -28,22 +28,22 @@ import java.util.List;
  */
 public abstract class AtomBase implements Serializable {
 
-	private static final long serialVersionUID = 1L;
+    private static final long serialVersionUID = 1L;
 
-	private List<AtomElement> fElements = new ArrayList<AtomElement>();
+    private List<AtomElement> fElements = new ArrayList<AtomElement>();
 
-	public AtomBase() {
-	}
+    public AtomBase() {
+    }
 
-	public abstract String getType();
+    public abstract String getType();
 
-	public List<AtomElement> getElements() {
-		return fElements;
-	}
+    public List<AtomElement> getElements() {
+        return fElements;
+    }
 
-	public void addElement(AtomElement element) {
-		if (element != null) {
-			fElements.add(element);
-		}
-	}
+    public void addElement(AtomElement element) {
+        if (element != null) {
+            fElements.add(element);
+        }
+    }
 }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/AtomElement.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/AtomElement.java?rev=936922&r1=936921&r2=936922&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/AtomElement.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/AtomElement.java Thu Apr 22 16:04:19 2010
@@ -28,26 +28,26 @@ import javax.xml.namespace.QName;
  */
 public class AtomElement implements Serializable {
 
-	private static final long serialVersionUID = 1L;
+    private static final long serialVersionUID = 1L;
 
-	private QName fName;
-	private Object fObject;
+    private QName fName;
+    private 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;
-	}
+    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;
+    }
 }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/AtomEntry.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/AtomEntry.java?rev=936922&r1=936921&r2=936922&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/AtomEntry.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/AtomEntry.java Thu Apr 22 16:04:19 2010
@@ -24,36 +24,36 @@ package org.apache.chemistry.opencmis.cl
  */
 public class AtomEntry extends AtomBase {
 
-	private static final long serialVersionUID = 1L;
+    private static final long serialVersionUID = 1L;
 
-	private String fId;
+    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();
-	}
+    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();
+    }
 }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/AtomFeed.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/AtomFeed.java?rev=936922&r1=936921&r2=936922&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/AtomFeed.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/AtomFeed.java Thu Apr 22 16:04:19 2010
@@ -27,37 +27,37 @@ import java.util.List;
  */
 public class AtomFeed extends AtomBase {
 
-	private static final long serialVersionUID = 1L;
+    private static final long serialVersionUID = 1L;
 
-	private List<AtomEntry> fEntries = new ArrayList<AtomEntry>();
+    private List<AtomEntry> fEntries = new ArrayList<AtomEntry>();
 
-	public AtomFeed() {
-	}
+    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;
-	}
+    /*
+     * (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;
+    }
 }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/AtomLink.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/AtomLink.java?rev=936922&r1=936921&r2=936922&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/AtomLink.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/AtomLink.java Thu Apr 22 16:04:19 2010
@@ -26,41 +26,41 @@ import java.io.Serializable;
  */
 public class AtomLink implements Serializable {
 
-	private static final long serialVersionUID = 1L;
+    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 + "\"";
-	}
+    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 + "\"";
+    }
 }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/RepositoryWorkspace.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/RepositoryWorkspace.java?rev=936922&r1=936921&r2=936922&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/RepositoryWorkspace.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/RepositoryWorkspace.java Thu Apr 22 16:04:19 2010
@@ -24,35 +24,35 @@ package org.apache.chemistry.opencmis.cl
  */
 public class RepositoryWorkspace extends AtomBase {
 
-	private static final long serialVersionUID = 1L;
+    private static final long serialVersionUID = 1L;
 
-	private String fId;
+    private String fId;
 
-	public RepositoryWorkspace() {
-	}
+    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();
-	}
+    /*
+     * (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();
+    }
 }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/ServiceDoc.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/ServiceDoc.java?rev=936922&r1=936921&r2=936922&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/ServiceDoc.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/objects/ServiceDoc.java Thu Apr 22 16:04:19 2010
@@ -27,37 +27,37 @@ import java.util.List;
  */
 public class ServiceDoc extends AtomBase {
 
-	private static final long serialVersionUID = 1L;
+    private static final long serialVersionUID = 1L;
 
-	private List<RepositoryWorkspace> fWorkspaces = new ArrayList<RepositoryWorkspace>();
+    private List<RepositoryWorkspace> fWorkspaces = new ArrayList<RepositoryWorkspace>();
 
-	public ServiceDoc() {
-	}
+    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;
-	}
+    /*
+     * (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;
+    }
 }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/AbstractLocalService.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/AbstractLocalService.java?rev=936922&r1=936921&r2=936922&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/AbstractLocalService.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/AbstractLocalService.java Thu Apr 22 16:04:19 2010
@@ -14,98 +14,98 @@ import org.apache.chemistry.opencmis.com
  */
 public abstract class AbstractLocalService {
 
-	private Session session;
-	private CmisServiceFactory factory;
+    private Session session;
+    private CmisServiceFactory factory;
 
-	private String user;
-	private String password;
+    private String user;
+    private String password;
 
-	/**
-	 * Sets the current session.
-	 */
-	protected void setSession(Session session) {
-		this.session = session;
-
-		Object userObj = session.get(SessionParameter.USER);
-		user = userObj instanceof String ? userObj.toString() : null;
-
-		Object passwordObj = session.get(SessionParameter.PASSWORD);
-		password = passwordObj instanceof String ? passwordObj.toString() : null;
-	}
-
-	/**
-	 * Gets the current session.
-	 */
-	protected Session getSession() {
-		return session;
-	}
-
-	/**
-	 * Sets the service factory.
-	 */
-	protected void setServiceFactory(CmisServiceFactory factory) {
-		this.factory = factory;
-	}
-
-	/**
-	 * Gets the service factory.
-	 */
-	protected CmisServiceFactory getServiceFactory() {
-		return factory;
-	}
-
-	/**
-	 * creates a local call context.
-	 */
-	protected CallContext createCallContext(String repositoryId) {
-		return new LocalCallContext(repositoryId, user, password);
-	}
-
-	protected CmisService getService(String repositoryId) {
-		return factory.getService(createCallContext(repositoryId));
-	}
-
-	// ------------------------------------------------------------------
-
-	/**
-	 * Simple {@link CallContext} implementation.
-	 */
-	class LocalCallContext implements CallContext {
-
-		private Map<String, String> contextMap = new HashMap<String, String>();
-
-		public LocalCallContext(String repositoryId, String user, String password) {
-			contextMap.put(REPOSITORY_ID, repositoryId);
-			contextMap.put(USERNAME, user);
-			contextMap.put(PASSWORD, password);
-		}
-
-		public String getBinding() {
-			return BINDING_LOCAL;
-		}
-
-		public String get(String key) {
-			return contextMap.get(key);
-		}
-
-		public String getRepositoryId() {
-			return get(REPOSITORY_ID);
-		}
-
-		public String getUsername() {
-			return get(USERNAME);
-		}
-
-		public String getPassword() {
-			return get(PASSWORD);
-		}
-
-		public String getLocale() {
-			return null;
-		}
-
-		public boolean isObjectInfoRequired() {
-			return false;
-		}
-	}
+    /**
+     * Sets the current session.
+     */
+    protected void setSession(Session session) {
+        this.session = session;
+
+        Object userObj = session.get(SessionParameter.USER);
+        user = userObj instanceof String ? userObj.toString() : null;
+
+        Object passwordObj = session.get(SessionParameter.PASSWORD);
+        password = passwordObj instanceof String ? passwordObj.toString() : null;
+    }
+
+    /**
+     * Gets the current session.
+     */
+    protected Session getSession() {
+        return session;
+    }
+
+    /**
+     * Sets the service factory.
+     */
+    protected void setServiceFactory(CmisServiceFactory factory) {
+        this.factory = factory;
+    }
+
+    /**
+     * Gets the service factory.
+     */
+    protected CmisServiceFactory getServiceFactory() {
+        return factory;
+    }
+
+    /**
+     * creates a local call context.
+     */
+    protected CallContext createCallContext(String repositoryId) {
+        return new LocalCallContext(repositoryId, user, password);
+    }
+
+    protected CmisService getService(String repositoryId) {
+        return factory.getService(createCallContext(repositoryId));
+    }
+
+    // ------------------------------------------------------------------
+
+    /**
+     * Simple {@link CallContext} implementation.
+     */
+    class LocalCallContext implements CallContext {
+
+        private Map<String, String> contextMap = new HashMap<String, String>();
+
+        public LocalCallContext(String repositoryId, String user, String password) {
+            contextMap.put(REPOSITORY_ID, repositoryId);
+            contextMap.put(USERNAME, user);
+            contextMap.put(PASSWORD, password);
+        }
+
+        public String getBinding() {
+            return BINDING_LOCAL;
+        }
+
+        public String get(String key) {
+            return contextMap.get(key);
+        }
+
+        public String getRepositoryId() {
+            return get(REPOSITORY_ID);
+        }
+
+        public String getUsername() {
+            return get(USERNAME);
+        }
+
+        public String getPassword() {
+            return get(PASSWORD);
+        }
+
+        public String getLocale() {
+            return null;
+        }
+
+        public boolean isObjectInfoRequired() {
+            return false;
+        }
+    }
 }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/AclServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/AclServiceImpl.java?rev=936922&r1=936921&r2=936922&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/AclServiceImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/AclServiceImpl.java Thu Apr 22 16:04:19 2010
@@ -10,32 +10,32 @@ import org.apache.chemistry.opencmis.com
 
 public class AclServiceImpl extends AbstractLocalService implements AclService {
 
-	/**
-	 * Constructor.
-	 */
-	public AclServiceImpl(Session session, CmisServiceFactory factory) {
-		setSession(session);
-		setServiceFactory(factory);
-	}
-
-	public Acl applyAcl(String repositoryId, String objectId, Acl addAces, Acl removeAces,
-			AclPropagation aclPropagation, ExtensionsData extension) {
-		CmisService service = getService(repositoryId);
-
-		try {
-			return service.applyAcl(repositoryId, objectId, addAces, removeAces, aclPropagation, extension);
-		} finally {
-			service.close();
-		}
-	}
-
-	public Acl getAcl(String repositoryId, String objectId, Boolean onlyBasicPermissions, ExtensionsData extension) {
-		CmisService service = getService(repositoryId);
-
-		try {
-			return service.getAcl(repositoryId, objectId, onlyBasicPermissions, extension);
-		} finally {
-			service.close();
-		}
-	}
+    /**
+     * Constructor.
+     */
+    public AclServiceImpl(Session session, CmisServiceFactory factory) {
+        setSession(session);
+        setServiceFactory(factory);
+    }
+
+    public Acl applyAcl(String repositoryId, String objectId, Acl addAces, Acl removeAces,
+            AclPropagation aclPropagation, ExtensionsData extension) {
+        CmisService service = getService(repositoryId);
+
+        try {
+            return service.applyAcl(repositoryId, objectId, addAces, removeAces, aclPropagation, extension);
+        } finally {
+            service.close();
+        }
+    }
+
+    public Acl getAcl(String repositoryId, String objectId, Boolean onlyBasicPermissions, ExtensionsData extension) {
+        CmisService service = getService(repositoryId);
+
+        try {
+            return service.getAcl(repositoryId, objectId, onlyBasicPermissions, extension);
+        } finally {
+            service.close();
+        }
+    }
 }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/CmisLocalSpi.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/CmisLocalSpi.java?rev=936922&r1=936921&r2=936922&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/CmisLocalSpi.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/CmisLocalSpi.java Thu Apr 22 16:04:19 2010
@@ -26,111 +26,111 @@ import org.apache.commons.logging.LogFac
  */
 public class CmisLocalSpi implements CmisSpiFactory, CmisSpi {
 
-	private static final long serialVersionUID = 1L;
+    private static final long serialVersionUID = 1L;
 
-	private static Log log = LogFactory.getLog(CmisLocalSpi.class);
+    private static Log log = LogFactory.getLog(CmisLocalSpi.class);
 
-	private CmisServiceFactory factory;
+    private CmisServiceFactory factory;
 
-	private RepositoryService repositoryService;
-	private NavigationService navigationService;
-	private ObjectService objectService;
-	private VersioningService versioningService;
-	private DiscoveryService discoveryService;
-	private MultiFilingService multiFilingService;
-	private RelationshipService relationshipService;
-	private PolicyService policyService;
-	private AclService aclService;
-
-	/**
-	 * Constructor.
-	 */
-	public CmisLocalSpi() {
-	}
-
-	public CmisSpi getSpiInstance(Session session) {
-		if (log.isDebugEnabled()) {
-			log.debug("Initializing local SPI...");
-		}
-
-		// get the service factory class name
-		String serviceFactoryClassname = (String) session.get(SessionParameter.LOCAL_FACTORY);
-		if (serviceFactoryClassname == null) {
-			throw new CmisConnectionException("Factory class not set!");
-		}
-
-		try {
-			// gather parameters from session
-			Map<String, String> parameters = new HashMap<String, String>();
-			for (String key : session.getKeys()) {
-				Object value = session.get(key);
-				if (value instanceof String) {
-					parameters.put(key, (String) value);
-				}
-			}
-
-			// create and initialize factory
-			factory = (CmisServiceFactory) Class.forName(serviceFactoryClassname).newInstance();
-			factory.init(parameters);
-		} catch (Exception e) {
-			throw new CmisConnectionException("Factory cannot be created!", e);
-		}
-
-		repositoryService = new RepositoryServiceImpl(session, factory);
-		navigationService = new NavigationServiceImpl(session, factory);
-		objectService = new ObjectServiceImpl(session, factory);
-		versioningService = new VersioningServiceImpl(session, factory);
-		discoveryService = new DiscoveryServiceImpl(session, factory);
-		multiFilingService = new MultiFilingServiceImpl(session, factory);
-		relationshipService = new RelationshipServiceImpl(session, factory);
-		policyService = new PolicyServiceImpl(session, factory);
-
-		return this;
-	}
-
-	public RepositoryService getRepositoryService() {
-		return repositoryService;
-	}
-
-	public NavigationService getNavigationService() {
-		return navigationService;
-	}
-
-	public ObjectService getObjectService() {
-		return objectService;
-	}
-
-	public DiscoveryService getDiscoveryService() {
-		return discoveryService;
-	}
-
-	public VersioningService getVersioningService() {
-		return versioningService;
-	}
-
-	public MultiFilingService getMultiFilingService() {
-		return multiFilingService;
-	}
-
-	public RelationshipService getRelationshipService() {
-		return relationshipService;
-	}
-
-	public PolicyService getPolicyService() {
-		return policyService;
-	}
-
-	public AclService getAclService() {
-		return aclService;
-	}
-
-	public void clearAllCaches() {
-	}
-
-	public void clearRepositoryCache(String repositoryId) {
-	}
-
-	public void close() {
-		factory.destroy();
-	}
+    private RepositoryService repositoryService;
+    private NavigationService navigationService;
+    private ObjectService objectService;
+    private VersioningService versioningService;
+    private DiscoveryService discoveryService;
+    private MultiFilingService multiFilingService;
+    private RelationshipService relationshipService;
+    private PolicyService policyService;
+    private AclService aclService;
+
+    /**
+     * Constructor.
+     */
+    public CmisLocalSpi() {
+    }
+
+    public CmisSpi getSpiInstance(Session session) {
+        if (log.isDebugEnabled()) {
+            log.debug("Initializing local SPI...");
+        }
+
+        // get the service factory class name
+        String serviceFactoryClassname = (String) session.get(SessionParameter.LOCAL_FACTORY);
+        if (serviceFactoryClassname == null) {
+            throw new CmisConnectionException("Factory class not set!");
+        }
+
+        try {
+            // gather parameters from session
+            Map<String, String> parameters = new HashMap<String, String>();
+            for (String key : session.getKeys()) {
+                Object value = session.get(key);
+                if (value instanceof String) {
+                    parameters.put(key, (String) value);
+                }
+            }
+
+            // create and initialize factory
+            factory = (CmisServiceFactory) Class.forName(serviceFactoryClassname).newInstance();
+            factory.init(parameters);
+        } catch (Exception e) {
+            throw new CmisConnectionException("Factory cannot be created!", e);
+        }
+
+        repositoryService = new RepositoryServiceImpl(session, factory);
+        navigationService = new NavigationServiceImpl(session, factory);
+        objectService = new ObjectServiceImpl(session, factory);
+        versioningService = new VersioningServiceImpl(session, factory);
+        discoveryService = new DiscoveryServiceImpl(session, factory);
+        multiFilingService = new MultiFilingServiceImpl(session, factory);
+        relationshipService = new RelationshipServiceImpl(session, factory);
+        policyService = new PolicyServiceImpl(session, factory);
+
+        return this;
+    }
+
+    public RepositoryService getRepositoryService() {
+        return repositoryService;
+    }
+
+    public NavigationService getNavigationService() {
+        return navigationService;
+    }
+
+    public ObjectService getObjectService() {
+        return objectService;
+    }
+
+    public DiscoveryService getDiscoveryService() {
+        return discoveryService;
+    }
+
+    public VersioningService getVersioningService() {
+        return versioningService;
+    }
+
+    public MultiFilingService getMultiFilingService() {
+        return multiFilingService;
+    }
+
+    public RelationshipService getRelationshipService() {
+        return relationshipService;
+    }
+
+    public PolicyService getPolicyService() {
+        return policyService;
+    }
+
+    public AclService getAclService() {
+        return aclService;
+    }
+
+    public void clearAllCaches() {
+    }
+
+    public void clearRepositoryCache(String repositoryId) {
+    }
+
+    public void close() {
+        factory.destroy();
+    }
 }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/DiscoveryServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/DiscoveryServiceImpl.java?rev=936922&r1=936921&r2=936922&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/DiscoveryServiceImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/DiscoveryServiceImpl.java Thu Apr 22 16:04:19 2010
@@ -13,36 +13,36 @@ import org.apache.chemistry.opencmis.com
 
 public class DiscoveryServiceImpl extends AbstractLocalService implements DiscoveryService {
 
-	/**
-	 * Constructor.
-	 */
-	public DiscoveryServiceImpl(Session session, CmisServiceFactory factory) {
-		setSession(session);
-		setServiceFactory(factory);
-	}
-
-	public ObjectList getContentChanges(String repositoryId, Holder<String> changeLogToken, Boolean includeProperties,
-			String filter, Boolean includePolicyIds, Boolean includeAcl, BigInteger maxItems, ExtensionsData extension) {
-		CmisService service = getService(repositoryId);
-
-		try {
-			return service.getContentChanges(repositoryId, changeLogToken, includeProperties, filter, includePolicyIds,
-					includeAcl, maxItems, extension);
-		} finally {
-			service.close();
-		}
-	}
-
-	public ObjectList query(String repositoryId, String statement, Boolean searchAllVersions,
-			Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter,
-			BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) {
-		CmisService service = getService(repositoryId);
-
-		try {
-			return service.query(repositoryId, statement, searchAllVersions, includeAllowableActions,
-					includeRelationships, renditionFilter, maxItems, skipCount, extension);
-		} finally {
-			service.close();
-		}
-	}
+    /**
+     * Constructor.
+     */
+    public DiscoveryServiceImpl(Session session, CmisServiceFactory factory) {
+        setSession(session);
+        setServiceFactory(factory);
+    }
+
+    public ObjectList getContentChanges(String repositoryId, Holder<String> changeLogToken, Boolean includeProperties,
+            String filter, Boolean includePolicyIds, Boolean includeAcl, BigInteger maxItems, ExtensionsData extension) {
+        CmisService service = getService(repositoryId);
+
+        try {
+            return service.getContentChanges(repositoryId, changeLogToken, includeProperties, filter, includePolicyIds,
+                    includeAcl, maxItems, extension);
+        } finally {
+            service.close();
+        }
+    }
+
+    public ObjectList query(String repositoryId, String statement, Boolean searchAllVersions,
+            Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter,
+            BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) {
+        CmisService service = getService(repositoryId);
+
+        try {
+            return service.query(repositoryId, statement, searchAllVersions, includeAllowableActions,
+                    includeRelationships, renditionFilter, maxItems, skipCount, extension);
+        } finally {
+            service.close();
+        }
+    }
 }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/MultiFilingServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/MultiFilingServiceImpl.java?rev=936922&r1=936921&r2=936922&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/MultiFilingServiceImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/MultiFilingServiceImpl.java Thu Apr 22 16:04:19 2010
@@ -8,32 +8,32 @@ import org.apache.chemistry.opencmis.com
 
 public class MultiFilingServiceImpl extends AbstractLocalService implements MultiFilingService {
 
-	/**
-	 * Constructor.
-	 */
-	public MultiFilingServiceImpl(Session session, CmisServiceFactory factory) {
-		setSession(session);
-		setServiceFactory(factory);
-	}
-
-	public void addObjectToFolder(String repositoryId, String objectId, String folderId, Boolean allVersions,
-			ExtensionsData extension) {
-		CmisService service = getService(repositoryId);
-
-		try {
-			service.addObjectToFolder(repositoryId, objectId, folderId, allVersions, extension);
-		} finally {
-			service.close();
-		}
-	}
-
-	public void removeObjectFromFolder(String repositoryId, String objectId, String folderId, ExtensionsData extension) {
-		CmisService service = getService(repositoryId);
-
-		try {
-			service.removeObjectFromFolder(repositoryId, objectId, folderId, extension);
-		} finally {
-			service.close();
-		}
-	}
+    /**
+     * Constructor.
+     */
+    public MultiFilingServiceImpl(Session session, CmisServiceFactory factory) {
+        setSession(session);
+        setServiceFactory(factory);
+    }
+
+    public void addObjectToFolder(String repositoryId, String objectId, String folderId, Boolean allVersions,
+            ExtensionsData extension) {
+        CmisService service = getService(repositoryId);
+
+        try {
+            service.addObjectToFolder(repositoryId, objectId, folderId, allVersions, extension);
+        } finally {
+            service.close();
+        }
+    }
+
+    public void removeObjectFromFolder(String repositoryId, String objectId, String folderId, ExtensionsData extension) {
+        CmisService service = getService(repositoryId);
+
+        try {
+            service.removeObjectFromFolder(repositoryId, objectId, folderId, extension);
+        } finally {
+            service.close();
+        }
+    }
 }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/NavigationServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/NavigationServiceImpl.java?rev=936922&r1=936921&r2=936922&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/NavigationServiceImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/NavigationServiceImpl.java Thu Apr 22 16:04:19 2010
@@ -17,86 +17,86 @@ import org.apache.chemistry.opencmis.com
 
 public class NavigationServiceImpl extends AbstractLocalService implements NavigationService {
 
-	/**
-	 * Constructor.
-	 */
-	public NavigationServiceImpl(Session session, CmisServiceFactory factory) {
-		setSession(session);
-		setServiceFactory(factory);
-	}
-
-	public ObjectList getCheckedOutDocs(String repositoryId, String folderId, String filter, String orderBy,
-			Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter,
-			BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) {
-		CmisService service = getService(repositoryId);
-
-		try {
-			return service.getCheckedOutDocs(repositoryId, folderId, filter, orderBy, includeAllowableActions,
-					includeRelationships, renditionFilter, maxItems, skipCount, extension);
-		} finally {
-			service.close();
-		}
-	}
-
-	public ObjectInFolderList getChildren(String repositoryId, String folderId, String filter, String orderBy,
-			Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter,
-			Boolean includePathSegment, BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) {
-		CmisService service = getService(repositoryId);
-
-		try {
-			return service.getChildren(repositoryId, folderId, filter, orderBy, includeAllowableActions,
-					includeRelationships, renditionFilter, includePathSegment, maxItems, skipCount, extension);
-		} finally {
-			service.close();
-		}
-	}
-
-	public List<ObjectInFolderContainer> getDescendants(String repositoryId, String folderId, BigInteger depth,
-			String filter, Boolean includeAllowableActions, IncludeRelationships includeRelationships,
-			String renditionFilter, Boolean includePathSegment, ExtensionsData extension) {
-		CmisService service = getService(repositoryId);
-
-		try {
-			return service.getDescendants(repositoryId, folderId, depth, filter, includeAllowableActions,
-					includeRelationships, renditionFilter, includePathSegment, extension);
-		} finally {
-			service.close();
-		}
-	}
-
-	public ObjectData getFolderParent(String repositoryId, String folderId, String filter, ExtensionsData extension) {
-		CmisService service = getService(repositoryId);
-
-		try {
-			return service.getFolderParent(repositoryId, folderId, filter, extension);
-		} finally {
-			service.close();
-		}
-	}
-
-	public List<ObjectInFolderContainer> getFolderTree(String repositoryId, String folderId, BigInteger depth,
-			String filter, Boolean includeAllowableActions, IncludeRelationships includeRelationships,
-			String renditionFilter, Boolean includePathSegment, ExtensionsData extension) {
-		CmisService service = getService(repositoryId);
-
-		try {
-			return service.getFolderTree(repositoryId, folderId, depth, filter, includeAllowableActions,
-					includeRelationships, renditionFilter, includePathSegment, extension);
-		} finally {
-			service.close();
-		}
-	}
-
-	public List<ObjectParentData> getObjectParents(String repositoryId, String objectId, String filter,
-			Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter,
-			Boolean includeRelativePathSegment, ExtensionsData extension) {
-		CmisService service = getService(repositoryId);
-
-		try {
-			return service.getObjectParents(repositoryId, objectId, filter, includeAllowableActions,
-					includeRelationships, renditionFilter, includeRelativePathSegment, extension);
-		} finally {
-			service.close();
-		}
-	}
+    /**
+     * Constructor.
+     */
+    public NavigationServiceImpl(Session session, CmisServiceFactory factory) {
+        setSession(session);
+        setServiceFactory(factory);
+    }
+
+    public ObjectList getCheckedOutDocs(String repositoryId, String folderId, String filter, String orderBy,
+            Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter,
+            BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) {
+        CmisService service = getService(repositoryId);
+
+        try {
+            return service.getCheckedOutDocs(repositoryId, folderId, filter, orderBy, includeAllowableActions,
+                    includeRelationships, renditionFilter, maxItems, skipCount, extension);
+        } finally {
+            service.close();
+        }
+    }
+
+    public ObjectInFolderList getChildren(String repositoryId, String folderId, String filter, String orderBy,
+            Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter,
+            Boolean includePathSegment, BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) {
+        CmisService service = getService(repositoryId);
+
+        try {
+            return service.getChildren(repositoryId, folderId, filter, orderBy, includeAllowableActions,
+                    includeRelationships, renditionFilter, includePathSegment, maxItems, skipCount, extension);
+        } finally {
+            service.close();
+        }
+    }
+
+    public List<ObjectInFolderContainer> getDescendants(String repositoryId, String folderId, BigInteger depth,
+            String filter, Boolean includeAllowableActions, IncludeRelationships includeRelationships,
+            String renditionFilter, Boolean includePathSegment, ExtensionsData extension) {
+        CmisService service = getService(repositoryId);
+
+        try {
+            return service.getDescendants(repositoryId, folderId, depth, filter, includeAllowableActions,
+                    includeRelationships, renditionFilter, includePathSegment, extension);
+        } finally {
+            service.close();
+        }
+    }
+
+    public ObjectData getFolderParent(String repositoryId, String folderId, String filter, ExtensionsData extension) {
+        CmisService service = getService(repositoryId);
+
+        try {
+            return service.getFolderParent(repositoryId, folderId, filter, extension);
+        } finally {
+            service.close();
+        }
+    }
+
+    public List<ObjectInFolderContainer> getFolderTree(String repositoryId, String folderId, BigInteger depth,
+            String filter, Boolean includeAllowableActions, IncludeRelationships includeRelationships,
+            String renditionFilter, Boolean includePathSegment, ExtensionsData extension) {
+        CmisService service = getService(repositoryId);
+
+        try {
+            return service.getFolderTree(repositoryId, folderId, depth, filter, includeAllowableActions,
+                    includeRelationships, renditionFilter, includePathSegment, extension);
+        } finally {
+            service.close();
+        }
+    }
+
+    public List<ObjectParentData> getObjectParents(String repositoryId, String objectId, String filter,
+            Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter,
+            Boolean includeRelativePathSegment, ExtensionsData extension) {
+        CmisService service = getService(repositoryId);
+
+        try {
+            return service.getObjectParents(repositoryId, objectId, filter, includeAllowableActions,
+                    includeRelationships, renditionFilter, includeRelativePathSegment, extension);
+        } finally {
+            service.close();
+        }
+    }
 }



Mime
View raw message