You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@chemistry.apache.org by fm...@apache.org on 2015/08/26 12:43:48 UTC
svn commit: r1697878 [1/2] - in /chemistry/opencmis/trunk:
chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/
chemistry-opencmis-android/chemistry-opencmis-android-clien...
Author: fmui
Date: Wed Aug 26 10:43:47 2015
New Revision: 1697878
URL: http://svn.apache.org/r1697878
Log:
code clean up
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/AbstractAtomPubService.java
chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/AclServiceImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/AtomEntryWriter.java
chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/CmisAtomPubSpi.java
chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/DiscoveryServiceImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/MultiFilingServiceImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/NavigationServiceImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/ObjectServiceImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/PolicyServiceImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/RelationshipServiceImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/RepositoryServiceImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/VersioningServiceImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/http/ApacheClientHttpInvoker.java
chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/http/DefaultHttpInvoker.java
chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/commons/impl/XMLConverter.java
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/cache/impl/AbstractMapCacheLevel.java
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/cache/impl/CacheImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/impl/TypeDefinitionCacheImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/AbstractFilableCmisObject.java
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/FolderImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/OperationContextImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/RelationshipImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/SessionImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/SessionParameterDefaults.java
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/Base64.java
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/Constants.java
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/JSONConverter.java
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/XMLConstants.java
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/ObjectDataImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/ObjectService.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/RepositoryService.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/POSTHttpServletRequestWrapper.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/shared/AbstractServiceCall.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/shared/QueryStringHttpServletRequestWrapper.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/shared/ThresholdOutputStream.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/icons/AbstractWorkbenchIcon.java
Modified: chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/AbstractAtomPubService.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/AbstractAtomPubService.java?rev=1697878&r1=1697877&r2=1697878&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/AbstractAtomPubService.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/AbstractAtomPubService.java Wed Aug 26 10:43:47 2015
@@ -201,6 +201,7 @@ public abstract class AbstractAtomPubSer
* Gets a link from the cache if it is there or loads it into the cache if
* it is not there.
*/
+ @Override
public String loadLink(String repositoryId, String id, String rel, String type) {
String link = getLink(repositoryId, id, rel, type);
if (link == null) {
@@ -216,6 +217,7 @@ public abstract class AbstractAtomPubSer
* Gets the content link from the cache if it is there or loads it into the
* cache if it is not there.
*/
+ @Override
public String loadContentLink(String repositoryId, String id) {
return loadLink(repositoryId, id, AtomPubParser.LINK_REL_CONTENT, null);
}
@@ -224,6 +226,7 @@ public abstract class AbstractAtomPubSer
* Gets a rendition content link from the cache if it is there or loads it
* into the cache if it is not there.
*/
+ @Override
public String loadRenditionContentLink(String repositoryId, String id, String streamId) {
return loadLink(repositoryId, id, Constants.REL_ALTERNATE, streamId);
}
@@ -667,7 +670,7 @@ public abstract class AbstractAtomPubSer
Response resp = getHttpInvoker().invokePUT(url, contentType, headers, writer, session);
// check response code
- if ((resp.getResponseCode() < 200) || (resp.getResponseCode() > 299)) {
+ if (resp.getResponseCode() < 200 || resp.getResponseCode() > 299) {
throw convertStatusCode(resp.getResponseCode(), resp.getResponseMessage(), resp.getErrorContent(), null);
}
@@ -966,6 +969,7 @@ public abstract class AbstractAtomPubSer
// update
Response resp = put(aclUrl, Constants.MEDIATYPE_ACL, new Output() {
+ @Override
public void write(OutputStream out) throws Exception {
XmlSerializer writer = XMLUtils.createWriter(out);
XMLUtils.startXmlDocument(writer);
Modified: chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/AclServiceImpl.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/AclServiceImpl.java?rev=1697878&r1=1697877&r2=1697878&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/AclServiceImpl.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/AclServiceImpl.java Wed Aug 26 10:43:47 2015
@@ -38,6 +38,7 @@ public class AclServiceImpl extends Abst
setSession(session);
}
+ @Override
public Acl applyAcl(String repositoryId, String objectId, Acl addAces, Acl removeAces,
AclPropagation aclPropagation, ExtensionsData extension) {
@@ -59,10 +60,12 @@ public class AclServiceImpl extends Abst
return result;
}
+ @Override
public Acl getAcl(String repositoryId, String objectId, Boolean onlyBasicPermissions, ExtensionsData extension) {
return getAclInternal(repositoryId, objectId, onlyBasicPermissions, extension);
}
+ @Override
public Acl setAcl(String repositoryId, String objectId, Acl aces) {
AtomAcl acl = updateAcl(repositoryId, objectId, aces, AclPropagation.OBJECTONLY);
Acl result = acl.getACL();
Modified: chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/AtomEntryWriter.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/AtomEntryWriter.java?rev=1697878&r1=1697877&r2=1697878&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/AtomEntryWriter.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/AtomEntryWriter.java Wed Aug 26 10:43:47 2015
@@ -76,11 +76,11 @@ public class AtomEntryWriter {
* Constructor for objects.
*/
public AtomEntryWriter(ObjectData object, CmisVersion cmisVersion, ContentStream contentStream) {
- if ((object == null) || (object.getProperties() == null)) {
+ if (object == null || object.getProperties() == null) {
throw new CmisInvalidArgumentException("Object and properties must not be null!");
}
- if ((contentStream != null) && (contentStream.getMimeType() == null)) {
+ if (contentStream != null && contentStream.getMimeType() == null) {
throw new CmisInvalidArgumentException("Media type must be set if a stream is present!");
}
@@ -143,7 +143,7 @@ public class AtomEntryWriter {
* @throws IllegalArgumentException
*/
public void write(OutputStream out) throws IOException {
- XmlSerializer writer = XMLUtils.createWriter(out);
+ XmlSerializer writer = XMLUtils.createWriter(out);
// start doc
XMLUtils.startXmlDocument(writer);
@@ -154,11 +154,10 @@ public class AtomEntryWriter {
writer.attribute("", XMLConstants.PREFIX_ATOM, XMLConstants.NAMESPACE_ATOM);
writer.attribute("", XMLConstants.PREFIX_CMIS, XMLConstants.NAMESPACE_CMIS);
writer.attribute("", XMLConstants.PREFIX_RESTATOM, XMLConstants.NAMESPACE_RESTATOM);
-
+
if (contentStream != null && contentStream.getFileName() != null) {
- writer.attribute("", XMLConstants.PREFIX_APACHE_CHEMISTY,XMLConstants.NAMESPACE_APACHE_CHEMISTRY);
+ writer.attribute("", XMLConstants.PREFIX_APACHE_CHEMISTY, XMLConstants.NAMESPACE_APACHE_CHEMISTRY);
}
-
// atom:id
writeTag(writer, XMLConstants.NAMESPACE_ATOM, TAG_ATOM_ID, "urn:uuid:00000000-0000-0000-0000-00000000000");
Modified: chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/CmisAtomPubSpi.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/CmisAtomPubSpi.java?rev=1697878&r1=1697877&r2=1697878&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/CmisAtomPubSpi.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/CmisAtomPubSpi.java Wed Aug 26 10:43:47 2015
@@ -72,46 +72,57 @@ public class CmisAtomPubSpi implements C
aclService = new AclServiceImpl(session);
}
+ @Override
public RepositoryService getRepositoryService() {
return repositoryService;
}
+ @Override
public NavigationService getNavigationService() {
return navigationService;
}
+ @Override
public ObjectService getObjectService() {
return objectService;
}
+ @Override
public DiscoveryService getDiscoveryService() {
return discoveryService;
}
+ @Override
public VersioningService getVersioningService() {
return versioningService;
}
+ @Override
public MultiFilingService getMultiFilingService() {
return multiFilingService;
}
+ @Override
public RelationshipService getRelationshipService() {
return relationshipService;
}
+ @Override
public PolicyService getPolicyService() {
return policyService;
}
+ @Override
public AclService getAclService() {
return aclService;
}
+ @Override
public void clearAllCaches() {
session.remove(SpiSessionParameter.LINK_CACHE);
}
+ @Override
public void clearRepositoryCache(String repositoryId) {
LinkCache linkCache = (LinkCache) session.get(SpiSessionParameter.LINK_CACHE);
if (linkCache != null) {
@@ -119,6 +130,7 @@ public class CmisAtomPubSpi implements C
}
}
+ @Override
public void close() {
// no-op for AtomPub
}
Modified: chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/DiscoveryServiceImpl.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/DiscoveryServiceImpl.java?rev=1697878&r1=1697877&r2=1697878&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/DiscoveryServiceImpl.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/DiscoveryServiceImpl.java Wed Aug 26 10:43:47 2015
@@ -58,6 +58,7 @@ public class DiscoveryServiceImpl extend
setSession(session);
}
+ @Override
public ObjectList getContentChanges(String repositoryId, Holder<String> changeLogToken, Boolean includeProperties,
String filter, Boolean includePolicyIds, Boolean includeACL, BigInteger maxItems, ExtensionsData extension) {
ObjectListImpl result = new ObjectListImpl();
@@ -148,6 +149,7 @@ public class DiscoveryServiceImpl extend
return result;
}
+ @Override
public ObjectList query(String repositoryId, String statement, Boolean searchAllVersions,
Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter,
BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) {
@@ -176,6 +178,7 @@ public class DiscoveryServiceImpl extend
// post the query and parse results
Response resp = post(url, Constants.MEDIATYPE_QUERY, new Output() {
+ @Override
public void write(OutputStream out) throws Exception {
XmlSerializer writer = XMLUtils.createWriter(out);
XMLUtils.startXmlDocument(writer);
Modified: chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/MultiFilingServiceImpl.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/MultiFilingServiceImpl.java?rev=1697878&r1=1697877&r2=1697878&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/MultiFilingServiceImpl.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/MultiFilingServiceImpl.java Wed Aug 26 10:43:47 2015
@@ -42,6 +42,7 @@ public class MultiFilingServiceImpl exte
setSession(session);
}
+ @Override
public void addObjectToFolder(String repositoryId, String objectId, String folderId, Boolean allVersions,
ExtensionsData extension) {
if (objectId == null) {
@@ -63,12 +64,14 @@ public class MultiFilingServiceImpl exte
// post addObjectToFolder request
post(url, Constants.MEDIATYPE_ENTRY, new Output() {
+ @Override
public void write(OutputStream out) throws IOException {
entryWriter.write(out);
}
});
}
+ @Override
public void removeObjectFromFolder(String repositoryId, String objectId, String folderId, ExtensionsData extension) {
if (objectId == null) {
throw new CmisInvalidArgumentException("Object id must be set!");
@@ -89,6 +92,7 @@ public class MultiFilingServiceImpl exte
// post removeObjectFromFolder request
post(url, Constants.MEDIATYPE_ENTRY, new Output() {
+ @Override
public void write(OutputStream out) throws IOException {
entryWriter.write(out);
}
Modified: chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/NavigationServiceImpl.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/NavigationServiceImpl.java?rev=1697878&r1=1697877&r2=1697878&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/NavigationServiceImpl.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/NavigationServiceImpl.java Wed Aug 26 10:43:47 2015
@@ -60,6 +60,7 @@ public class NavigationServiceImpl exten
setSession(session);
}
+ @Override
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) {
@@ -135,6 +136,7 @@ public class NavigationServiceImpl exten
return result;
}
+ @Override
public List<ObjectInFolderContainer> getDescendants(String repositoryId, String folderId, BigInteger depth,
String filter, Boolean includeAllowableActions, IncludeRelationships includeRelationships,
String renditionFilter, Boolean includePathSegment, ExtensionsData extension) {
@@ -165,6 +167,7 @@ public class NavigationServiceImpl exten
return result;
}
+ @Override
public ObjectData getFolderParent(String repositoryId, String folderId, String filter, ExtensionsData extension) {
ObjectData result = null;
@@ -217,6 +220,7 @@ public class NavigationServiceImpl exten
return result;
}
+ @Override
public List<ObjectInFolderContainer> getFolderTree(String repositoryId, String folderId, BigInteger depth,
String filter, Boolean includeAllowableActions, IncludeRelationships includeRelationships,
String renditionFilter, Boolean includePathSegment, ExtensionsData extension) {
@@ -247,6 +251,7 @@ public class NavigationServiceImpl exten
return result;
}
+ @Override
public List<ObjectParentData> getObjectParents(String repositoryId, String objectId, String filter,
Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter,
Boolean includeRelativePathSegment, ExtensionsData extension) {
@@ -328,6 +333,7 @@ public class NavigationServiceImpl exten
return result;
}
+ @Override
public ObjectList getCheckedOutDocs(String repositoryId, String folderId, String filter, String orderBy,
Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter,
BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) {
@@ -404,7 +410,7 @@ public class NavigationServiceImpl exten
* Adds descendants level recursively.
*/
private void addDescendantsLevel(String repositoryId, AtomFeed feed, List<ObjectInFolderContainer> containerList) {
- if ((feed == null) || (feed.getEntries().isEmpty())) {
+ if (feed == null || feed.getEntries().isEmpty()) {
return;
}
Modified: chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/ObjectServiceImpl.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/ObjectServiceImpl.java?rev=1697878&r1=1697877&r2=1697878&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/ObjectServiceImpl.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/ObjectServiceImpl.java Wed Aug 26 10:43:47 2015
@@ -81,6 +81,7 @@ public class ObjectServiceImpl extends A
setSession(session);
}
+ @Override
public String createDocument(String repositoryId, Properties properties, String folderId,
ContentStream contentStream, VersioningState versioningState, List<String> policies, Acl addAces,
Acl removeAces, ExtensionsData extension) {
@@ -116,6 +117,7 @@ public class ObjectServiceImpl extends A
// post the new folder object
Response resp = post(url, Constants.MEDIATYPE_ENTRY, new Output() {
+ @Override
public void write(OutputStream out) throws IOException {
entryWriter.write(out);
}
@@ -130,12 +132,14 @@ public class ObjectServiceImpl extends A
return entry.getId();
}
+ @Override
public String createDocumentFromSource(String repositoryId, String sourceId, Properties properties,
String folderId, VersioningState versioningState, List<String> policies, Acl addACEs, Acl removeACEs,
ExtensionsData extension) {
throw new CmisNotSupportedException("createDocumentFromSource is not supported by the AtomPub binding!");
}
+ @Override
public String createFolder(String repositoryId, Properties properties, String folderId, List<String> policies,
Acl addAces, Acl removeAces, ExtensionsData extension) {
checkCreateProperties(properties);
@@ -155,6 +159,7 @@ public class ObjectServiceImpl extends A
// post the new folder object
Response resp = post(url, Constants.MEDIATYPE_ENTRY, new Output() {
+ @Override
public void write(OutputStream out) throws IOException {
entryWriter.write(out);
}
@@ -169,6 +174,7 @@ public class ObjectServiceImpl extends A
return entry.getId();
}
+ @Override
public String createPolicy(String repositoryId, Properties properties, String folderId, List<String> policies,
Acl addAces, Acl removeAces, ExtensionsData extension) {
checkCreateProperties(properties);
@@ -202,6 +208,7 @@ public class ObjectServiceImpl extends A
// post the new folder object
Response resp = post(url, Constants.MEDIATYPE_ENTRY, new Output() {
+ @Override
public void write(OutputStream out) throws IOException {
entryWriter.write(out);
}
@@ -216,6 +223,7 @@ public class ObjectServiceImpl extends A
return entry.getId();
}
+ @Override
public String createItem(String repositoryId, Properties properties, String folderId, List<String> policies,
Acl addAces, Acl removeAces, ExtensionsData extension) {
checkCreateProperties(properties);
@@ -245,6 +253,7 @@ public class ObjectServiceImpl extends A
// post the new folder object
Response resp = post(url, Constants.MEDIATYPE_ENTRY, new Output() {
+ @Override
public void write(OutputStream out) throws IOException {
entryWriter.write(out);
}
@@ -259,6 +268,7 @@ public class ObjectServiceImpl extends A
return entry.getId();
}
+ @Override
public String createRelationship(String repositoryId, Properties properties, List<String> policies, Acl addAces,
Acl removeAces, ExtensionsData extension) {
checkCreateProperties(properties);
@@ -289,6 +299,7 @@ public class ObjectServiceImpl extends A
// post the new folder object
Response resp = post(url, Constants.MEDIATYPE_ENTRY, new Output() {
+ @Override
public void write(OutputStream out) throws IOException {
entryWriter.write(out);
}
@@ -303,10 +314,11 @@ public class ObjectServiceImpl extends A
return entry.getId();
}
+ @Override
public void updateProperties(String repositoryId, Holder<String> objectId, Holder<String> changeToken,
Properties properties, ExtensionsData extension) {
// we need an object id
- if ((objectId == null) || (objectId.getValue() == null) || (objectId.getValue().length() == 0)) {
+ if (objectId == null || objectId.getValue() == null || objectId.getValue().length() == 0) {
throw new CmisInvalidArgumentException("Object id must be set!");
}
@@ -330,6 +342,7 @@ public class ObjectServiceImpl extends A
// update
Response resp = put(url, Constants.MEDIATYPE_ENTRY, new Output() {
+ @Override
public void write(OutputStream out) throws IOException {
entryWriter.write(out);
}
@@ -379,6 +392,7 @@ public class ObjectServiceImpl extends A
}
}
+ @Override
public List<BulkUpdateObjectIdAndChangeToken> bulkUpdateProperties(String repositoryId,
List<BulkUpdateObjectIdAndChangeToken> objectIdAndChangeToken, Properties properties,
List<String> addSecondaryTypeIds, List<String> removeSecondaryTypeIds, ExtensionsData extension) {
@@ -400,6 +414,7 @@ public class ObjectServiceImpl extends A
// post the new folder object
Response resp = post(new UrlBuilder(link), Constants.MEDIATYPE_ENTRY, new Output() {
+ @Override
public void write(OutputStream out) throws IOException {
entryWriter.write(out);
}
@@ -438,6 +453,7 @@ public class ObjectServiceImpl extends A
return result;
}
+ @Override
public void deleteObject(String repositoryId, String objectId, Boolean allVersions, ExtensionsData extension) {
// find the link
@@ -453,6 +469,7 @@ public class ObjectServiceImpl extends A
delete(url);
}
+ @Override
public FailedToDeleteData deleteTree(String repositoryId, String folderId, Boolean allVersions,
UnfileObject unfileObjects, Boolean continueOnFailure, ExtensionsData extension) {
@@ -539,6 +556,7 @@ public class ObjectServiceImpl extends A
throw convertStatusCode(resp.getResponseCode(), resp.getResponseMessage(), resp.getErrorContent(), null);
}
+ @Override
public AllowableActions getAllowableActions(String repositoryId, String objectId, ExtensionsData extension) {
// find the link
String link = loadLink(repositoryId, objectId, Constants.REL_ALLOWABLEACTIONS,
@@ -558,6 +576,7 @@ public class ObjectServiceImpl extends A
return allowableActions.getAllowableActions();
}
+ @Override
public ContentStream getContentStream(String repositoryId, String objectId, String streamId, BigInteger offset,
BigInteger length, ExtensionsData extension) {
// find the link
@@ -611,6 +630,7 @@ public class ObjectServiceImpl extends A
return result;
}
+ @Override
public ObjectData getObject(String repositoryId, String objectId, String filter, Boolean includeAllowableActions,
IncludeRelationships includeRelationships, String renditionFilter, Boolean includePolicyIds,
Boolean includeACL, ExtensionsData extension) {
@@ -619,6 +639,7 @@ public class ObjectServiceImpl extends A
includeAllowableActions, includeRelationships, renditionFilter, includePolicyIds, includeACL, extension);
}
+ @Override
public ObjectData getObjectByPath(String repositoryId, String path, String filter, Boolean includeAllowableActions,
IncludeRelationships includeRelationships, String renditionFilter, Boolean includePolicyIds,
Boolean includeACL, ExtensionsData extension) {
@@ -627,6 +648,7 @@ public class ObjectServiceImpl extends A
includeAllowableActions, includeRelationships, renditionFilter, includePolicyIds, includeACL, extension);
}
+ @Override
public Properties getProperties(String repositoryId, String objectId, String filter, ExtensionsData extension) {
ObjectData object = getObjectInternal(repositoryId, IdentifierType.ID, objectId, ReturnVersion.THIS, filter,
Boolean.FALSE, IncludeRelationships.NONE, "cmis:none", Boolean.FALSE, Boolean.FALSE, extension);
@@ -634,6 +656,7 @@ public class ObjectServiceImpl extends A
return object.getProperties();
}
+ @Override
public List<RenditionData> getRenditions(String repositoryId, String objectId, String renditionFilter,
BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) {
ObjectData object = getObjectInternal(repositoryId, IdentifierType.ID, objectId, ReturnVersion.THIS,
@@ -648,14 +671,15 @@ public class ObjectServiceImpl extends A
return result;
}
+ @Override
public void moveObject(String repositoryId, Holder<String> objectId, String targetFolderId, String sourceFolderId,
ExtensionsData extension) {
- if ((objectId == null) || (objectId.getValue() == null) || (objectId.getValue().length() == 0)) {
+ if (objectId == null || objectId.getValue() == null || objectId.getValue().length() == 0) {
throw new CmisInvalidArgumentException("Object id must be set!");
}
- if ((targetFolderId == null) || (targetFolderId.length() == 0) || (sourceFolderId == null)
- || (sourceFolderId.length() == 0)) {
+ if (targetFolderId == null || targetFolderId.length() == 0 || sourceFolderId == null
+ || sourceFolderId.length() == 0) {
throw new CmisInvalidArgumentException("Source and target folder must be set!");
}
@@ -675,6 +699,7 @@ public class ObjectServiceImpl extends A
// post move request
Response resp = post(url, Constants.MEDIATYPE_ENTRY, new Output() {
+ @Override
public void write(OutputStream out) throws IOException {
entryWriter.write(out);
}
@@ -686,15 +711,17 @@ public class ObjectServiceImpl extends A
objectId.setValue(entry.getId());
}
+ @Override
public void setContentStream(String repositoryId, Holder<String> objectId, Boolean overwriteFlag,
Holder<String> changeToken, ContentStream contentStream, ExtensionsData extension) {
setOrAppendContent(repositoryId, objectId, overwriteFlag, changeToken, contentStream, true, false, extension);
}
+ @Override
public void deleteContentStream(String repositoryId, Holder<String> objectId, Holder<String> changeToken,
ExtensionsData extension) {
// we need an object id
- if ((objectId == null) || (objectId.getValue() == null)) {
+ if (objectId == null || objectId.getValue() == null) {
throw new CmisInvalidArgumentException("Object ID must be set!");
}
@@ -718,6 +745,7 @@ public class ObjectServiceImpl extends A
}
}
+ @Override
public void appendContentStream(String repositoryId, Holder<String> objectId, Holder<String> changeToken,
ContentStream contentStream, boolean isLastChunk, ExtensionsData extension) {
setOrAppendContent(repositoryId, objectId, null, changeToken, contentStream, isLastChunk, true, extension);
@@ -726,7 +754,7 @@ public class ObjectServiceImpl extends A
// ---- internal ----
private static void checkCreateProperties(Properties properties) {
- if ((properties == null) || (properties.getProperties() == null)) {
+ if (properties == null || properties.getProperties() == null) {
throw new CmisInvalidArgumentException("Properties must be set!");
}
@@ -765,12 +793,12 @@ public class ObjectServiceImpl extends A
Holder<String> changeToken, ContentStream contentStream, boolean isLastChunk, boolean append,
ExtensionsData extension) {
// we need an object id
- if ((objectId == null) || (objectId.getValue() == null)) {
+ if (objectId == null || objectId.getValue() == null) {
throw new CmisInvalidArgumentException("Object ID must be set!");
}
// we need content
- if ((contentStream == null) || (contentStream.getStream() == null) || (contentStream.getMimeType() == null)) {
+ if (contentStream == null || contentStream.getStream() == null || contentStream.getMimeType() == null) {
throw new CmisInvalidArgumentException("Content must be set!");
}
@@ -807,13 +835,14 @@ public class ObjectServiceImpl extends A
// send content
Response resp = put(url, contentStream.getMimeType(), headers, new Output() {
+ @Override
public void write(OutputStream out) throws IOException {
IOUtils.copy(stream, out);
}
});
// check response code further
- if ((resp.getResponseCode() != 200) && (resp.getResponseCode() != 201) && (resp.getResponseCode() != 204)) {
+ if (resp.getResponseCode() != 200 && resp.getResponseCode() != 201 && resp.getResponseCode() != 204) {
throw convertStatusCode(resp.getResponseCode(), resp.getResponseMessage(), resp.getErrorContent(), null);
}
Modified: chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/PolicyServiceImpl.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/PolicyServiceImpl.java?rev=1697878&r1=1697877&r2=1697878&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/PolicyServiceImpl.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/PolicyServiceImpl.java Wed Aug 26 10:43:47 2015
@@ -50,6 +50,7 @@ public class PolicyServiceImpl extends A
setSession(session);
}
+ @Override
public void applyPolicy(String repositoryId, String policyId, String objectId, ExtensionsData extension) {
// find the link
String link = loadLink(repositoryId, objectId, Constants.REL_POLICIES, Constants.MEDIATYPE_FEED);
@@ -65,12 +66,14 @@ public class PolicyServiceImpl extends A
// post applyPolicy request
post(url, Constants.MEDIATYPE_ENTRY, new Output() {
+ @Override
public void write(OutputStream out) throws IOException {
entryWriter.write(out);
}
});
}
+ @Override
public List<ObjectData> getAppliedPolicies(String repositoryId, String objectId, String filter,
ExtensionsData extension) {
List<ObjectData> result = new ArrayList<ObjectData>();
@@ -110,6 +113,7 @@ public class PolicyServiceImpl extends A
return result;
}
+ @Override
public void removePolicy(String repositoryId, String policyId, String objectId, ExtensionsData extension) {
// we need a policy id
if (policyId == null) {
Modified: chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/RelationshipServiceImpl.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/RelationshipServiceImpl.java?rev=1697878&r1=1697877&r2=1697878&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/RelationshipServiceImpl.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/RelationshipServiceImpl.java Wed Aug 26 10:43:47 2015
@@ -48,6 +48,7 @@ public class RelationshipServiceImpl ext
setSession(session);
}
+ @Override
public ObjectList getObjectRelationships(String repositoryId, String objectId, Boolean includeSubRelationshipTypes,
RelationshipDirection relationshipDirection, String typeId, String filter, Boolean includeAllowableActions,
BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) {
Modified: 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=1697878&r1=1697877&r2=1697878&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/RepositoryServiceImpl.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/RepositoryServiceImpl.java Wed Aug 26 10:43:47 2015
@@ -59,10 +59,12 @@ public class RepositoryServiceImpl exten
setSession(session);
}
+ @Override
public List<RepositoryInfo> getRepositoryInfos(ExtensionsData extension) {
return getRepositoriesInternal(null);
}
+ @Override
public RepositoryInfo getRepositoryInfo(String repositoryId, ExtensionsData extension) {
List<RepositoryInfo> repositoryInfos = getRepositoriesInternal(repositoryId);
@@ -88,10 +90,12 @@ public class RepositoryServiceImpl exten
throw new CmisObjectNotFoundException("Repository '" + repositoryId + "'not found!");
}
+ @Override
public TypeDefinition getTypeDefinition(String repositoryId, String typeId, ExtensionsData extension) {
return getTypeDefinitionInternal(repositoryId, typeId);
}
+ @Override
public TypeDefinitionList getTypeChildren(String repositoryId, String typeId, Boolean includePropertyDefinitions,
BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) {
TypeDefinitionListImpl result = new TypeDefinitionListImpl();
@@ -158,6 +162,7 @@ public class RepositoryServiceImpl exten
return result;
}
+ @Override
public List<TypeDefinitionContainer> getTypeDescendants(String repositoryId, String typeId, BigInteger depth,
Boolean includePropertyDefinitions, ExtensionsData extension) {
List<TypeDefinitionContainer> result = new ArrayList<TypeDefinitionContainer>();
@@ -192,7 +197,7 @@ public class RepositoryServiceImpl exten
* Adds type descendants level recursively.
*/
private void addTypeDescendantsLevel(String repositoryId, AtomFeed feed, List<TypeDefinitionContainer> containerList) {
- if ((feed == null) || (feed.getEntries().isEmpty())) {
+ if (feed == null || feed.getEntries().isEmpty()) {
return;
}
@@ -224,6 +229,7 @@ public class RepositoryServiceImpl exten
}
}
+ @Override
public TypeDefinition createType(String repositoryId, TypeDefinition type, ExtensionsData extension) {
if (type == null) {
throw new CmisInvalidArgumentException("Type definition must be set!");
@@ -246,6 +252,7 @@ public class RepositoryServiceImpl exten
// post the new type definition
Response resp = post(new UrlBuilder(link), Constants.MEDIATYPE_ENTRY, new Output() {
+ @Override
public void write(OutputStream out) throws IOException {
entryWriter.write(out);
}
@@ -280,6 +287,7 @@ public class RepositoryServiceImpl exten
return result;
}
+ @Override
public TypeDefinition updateType(String repositoryId, TypeDefinition type, ExtensionsData extension) {
if (type == null) {
throw new CmisInvalidArgumentException("Type definition must be set!");
@@ -304,6 +312,7 @@ public class RepositoryServiceImpl exten
// post the new type definition
Response resp = put(new UrlBuilder(link), Constants.MEDIATYPE_ENTRY, new Output() {
+ @Override
public void write(OutputStream out) throws IOException {
entryWriter.write(out);
}
@@ -338,6 +347,7 @@ public class RepositoryServiceImpl exten
return result;
}
+ @Override
public void deleteType(String repositoryId, String typeId, ExtensionsData extension) {
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put(Constants.PARAM_ID, typeId);
Modified: 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=1697878&r1=1697877&r2=1697878&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/VersioningServiceImpl.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/VersioningServiceImpl.java Wed Aug 26 10:43:47 2015
@@ -58,6 +58,7 @@ public class VersioningServiceImpl exten
setSession(session);
}
+ @Override
public void checkOut(String repositoryId, Holder<String> objectId, ExtensionsData extension,
Holder<Boolean> contentCopied) {
if ((objectId == null) || (objectId.getValue() == null) || (objectId.getValue().length() == 0)) {
@@ -79,6 +80,7 @@ public class VersioningServiceImpl exten
// post move request
Response resp = post(url, Constants.MEDIATYPE_ENTRY, new Output() {
+ @Override
public void write(OutputStream out) throws IOException {
entryWriter.write(out);
}
@@ -109,6 +111,7 @@ public class VersioningServiceImpl exten
}
}
+ @Override
public void cancelCheckOut(String repositoryId, String objectId, ExtensionsData extension) {
// find the link
String link = loadLink(repositoryId, objectId, Constants.REL_SELF, Constants.MEDIATYPE_ENTRY);
@@ -127,6 +130,7 @@ public class VersioningServiceImpl exten
delete(new UrlBuilder(link));
}
+ @Override
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) {
@@ -160,6 +164,7 @@ public class VersioningServiceImpl exten
// update
Response resp = put(url, Constants.MEDIATYPE_ENTRY, new Output() {
+ @Override
public void write(OutputStream out) throws IOException {
entryWriter.write(out);
}
@@ -210,6 +215,7 @@ public class VersioningServiceImpl exten
}
}
+ @Override
public List<ObjectData> getAllVersions(String repositoryId, String objectId, String versionSeriesId, String filter,
Boolean includeAllowableActions, ExtensionsData extension) {
List<ObjectData> result = new ArrayList<ObjectData>();
@@ -260,6 +266,7 @@ public class VersioningServiceImpl exten
return result;
}
+ @Override
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) {
@@ -273,6 +280,7 @@ public class VersioningServiceImpl exten
includeAllowableActions, includeRelationships, renditionFilter, includePolicyIds, includeACL, extension);
}
+ @Override
public Properties getPropertiesOfLatestVersion(String repositoryId, String objectId, String versionSeriesId,
Boolean major, String filter, ExtensionsData extension) {
Modified: chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/http/ApacheClientHttpInvoker.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/http/ApacheClientHttpInvoker.java?rev=1697878&r1=1697877&r2=1697878&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/http/ApacheClientHttpInvoker.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/http/ApacheClientHttpInvoker.java Wed Aug 26 10:43:47 2015
@@ -63,6 +63,7 @@ public class ApacheClientHttpInvoker ext
private static final String IGNORE_COOKIES = "ignoreCookies";
+ @Override
protected DefaultHttpClient createHttpClient(UrlBuilder url, BindingSession session) {
// set params
HttpParams params = createDefaultHttpParams(session);
@@ -119,14 +120,17 @@ public class ApacheClientHttpInvoker ext
// build new socket factory
return new LayeredSocketFactory() {
+ @Override
public boolean isSecure(Socket sock) {
return true;
}
+ @Override
public Socket createSocket() throws IOException {
- return (SSLSocket) sf.createSocket();
+ return sf.createSocket();
}
+ @Override
public Socket createSocket(Socket socket, String host, int port, boolean autoClose) throws IOException {
SSLSocket sslSocket = (SSLSocket) sf.createSocket(socket, host, port, autoClose);
verify(hv, host, sslSocket);
@@ -134,6 +138,7 @@ public class ApacheClientHttpInvoker ext
return sslSocket;
}
+ @Override
public Socket connectSocket(Socket sock, String host, int port, InetAddress localAddress, int localPort,
HttpParams params) throws IOException {
SSLSocket sslSocket = (SSLSocket) (sock != null ? sock : createSocket());
@@ -171,20 +176,25 @@ public class ApacheClientHttpInvoker ext
* A cookies spec factory that ignores cookies.
*/
private static class IgnoreSpecFactory implements CookieSpecFactory {
+ @Override
public CookieSpec newInstance(final HttpParams params) {
return new CookieSpecBase() {
+ @Override
public int getVersion() {
return 0;
}
+ @Override
public List<Cookie> parse(Header header, CookieOrigin origin) throws MalformedCookieException {
return Collections.emptyList();
}
+ @Override
public List<Header> formatCookies(List<Cookie> cookies) {
return Collections.emptyList();
}
+ @Override
public Header getVersionHeader() {
return null;
}
Modified: chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/http/DefaultHttpInvoker.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/http/DefaultHttpInvoker.java?rev=1697878&r1=1697877&r2=1697878&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/http/DefaultHttpInvoker.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/http/DefaultHttpInvoker.java Wed Aug 26 10:43:47 2015
@@ -51,23 +51,28 @@ public class DefaultHttpInvoker implemen
public DefaultHttpInvoker() {
}
+ @Override
public Response invokeGET(UrlBuilder url, BindingSession session) {
return invoke(url, "GET", null, null, null, session, null, null);
}
+ @Override
public Response invokeGET(UrlBuilder url, BindingSession session, BigInteger offset, BigInteger length) {
return invoke(url, "GET", null, null, null, session, offset, length);
}
+ @Override
public Response invokePOST(UrlBuilder url, String contentType, Output writer, BindingSession session) {
return invoke(url, "POST", contentType, null, writer, session, null, null);
}
+ @Override
public Response invokePUT(UrlBuilder url, String contentType, Map<String, String> headers, Output writer,
BindingSession session) {
return invoke(url, "PUT", contentType, headers, writer, session, null, null);
}
+ @Override
public Response invokeDELETE(UrlBuilder url, BindingSession session) {
return invoke(url, "DELETE", null, null, null, session, null, null);
}
Modified: chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/commons/impl/XMLConverter.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/impl/XMLConverter.java?rev=1697878&r1=1697877&r2=1697878&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/commons/impl/XMLConverter.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/commons/impl/XMLConverter.java Wed Aug 26 10:43:47 2015
@@ -2059,6 +2059,7 @@ public final class XMLConverter {
target.setValue(addToList(target.getValue(), readText(parser)));
}
+ @Override
protected void addChoice(XmlPullParser parser, ChoiceImpl<String> target) throws XmlPullParserException {
target.setChoice(addToList(target.getChoice(), CHOICE_STRING_PARSER.walk(parser)));
}
@@ -2075,6 +2076,7 @@ public final class XMLConverter {
target.setValue(addToList(target.getValue(), readBoolean(parser)));
}
+ @Override
protected void addChoice(XmlPullParser parser, ChoiceImpl<Boolean> target) throws XmlPullParserException {
target.setChoice(addToList(target.getChoice(), CHOICE_BOOLEAN_PARSER.walk(parser)));
}
@@ -2091,6 +2093,7 @@ public final class XMLConverter {
target.setValue(addToList(target.getValue(), readInteger(parser)));
}
+ @Override
protected void addChoice(XmlPullParser parser, ChoiceImpl<BigInteger> target) throws XmlPullParserException {
target.setChoice(addToList(target.getChoice(), CHOICE_INTEGER_PARSER.walk(parser)));
}
@@ -2108,6 +2111,7 @@ public final class XMLConverter {
target.setValue(addToList(target.getValue(), readDateTime(parser)));
}
+ @Override
protected void addChoice(XmlPullParser parser, ChoiceImpl<GregorianCalendar> target)
throws XmlPullParserException {
target.setChoice(addToList(target.getChoice(), CHOICE_DATETIME_PARSER.walk(parser)));
@@ -2125,6 +2129,7 @@ public final class XMLConverter {
target.setValue(addToList(target.getValue(), readDecimal(parser)));
}
+ @Override
protected void addChoice(XmlPullParser parser, ChoiceImpl<BigDecimal> target) throws XmlPullParserException {
target.setChoice(addToList(target.getChoice(), CHOICE_DECIMAL_PARSER.walk(parser)));
}
Modified: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/cache/impl/AbstractMapCacheLevel.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/cache/impl/AbstractMapCacheLevel.java?rev=1697878&r1=1697877&r2=1697878&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/cache/impl/AbstractMapCacheLevel.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/cache/impl/AbstractMapCacheLevel.java Wed Aug 26 10:43:47 2015
@@ -41,11 +41,11 @@ public abstract class AbstractMapCacheLe
public Object get(String key) {
Object value = fMap.get(key);
- if ((value == null) && fFallbackEnabled) {
+ if (value == null && fFallbackEnabled) {
value = fMap.get(fFallbackKey);
}
- if ((value == null) && fSingleValueEnabled) {
+ if (value == null && fSingleValueEnabled) {
if (fMap.size() == 1) {
value = fMap.values().iterator().next();
}
@@ -123,7 +123,7 @@ public abstract class AbstractMapCacheLe
}
String value = parameters.get(name);
- if ((value == null) || (value.trim().length() == 0)) {
+ if (value == null || value.trim().length() == 0) {
return defValue;
}
@@ -150,7 +150,7 @@ public abstract class AbstractMapCacheLe
}
String value = parameters.get(name);
- if ((value == null) || (value.trim().length() == 0)) {
+ if (value == null || value.trim().length() == 0) {
return defValue;
}
@@ -177,7 +177,7 @@ public abstract class AbstractMapCacheLe
}
String value = parameters.get(name);
- if ((value == null) || (value.trim().length() == 0)) {
+ if (value == null || value.trim().length() == 0) {
return defValue;
}
Modified: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/cache/impl/CacheImpl.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/cache/impl/CacheImpl.java?rev=1697878&r1=1697877&r2=1697878&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/cache/impl/CacheImpl.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/cache/impl/CacheImpl.java Wed Aug 26 10:43:47 2015
@@ -300,7 +300,7 @@ public class CacheImpl implements Cache
* Creates a cache level object.
*/
private CacheLevel createCacheLevel(int level) {
- if ((level < 0) || (level >= levels.size())) {
+ if (level < 0 || level >= levels.size()) {
throw new IllegalArgumentException("Cache level doesn't fit the configuration!");
}
Modified: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/impl/TypeDefinitionCacheImpl.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/impl/TypeDefinitionCacheImpl.java?rev=1697878&r1=1697877&r2=1697878&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/impl/TypeDefinitionCacheImpl.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/impl/TypeDefinitionCacheImpl.java Wed Aug 26 10:43:47 2015
@@ -68,7 +68,7 @@ public class TypeDefinitionCacheImpl imp
@Override
public void put(String repositoryId, TypeDefinition typeDefinition) {
- if ((typeDefinition == null) || (typeDefinition.getId() == null)) {
+ if (typeDefinition == null || typeDefinition.getId() == null) {
return;
}
Modified: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/AbstractFilableCmisObject.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/AbstractFilableCmisObject.java?rev=1697878&r1=1697877&r2=1697878&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/AbstractFilableCmisObject.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/AbstractFilableCmisObject.java Wed Aug 26 10:43:47 2015
@@ -62,7 +62,7 @@ public abstract class AbstractFilableCmi
List<Folder> parents = new ArrayList<Folder>();
for (ObjectParentData p : bindingParents) {
- if ((p == null) || (p.getObject() == null) || (p.getObject().getProperties() == null)) {
+ if (p == null || p.getObject() == null || p.getObject().getProperties() == null) {
// should not happen...
throw new CmisRuntimeException("Repository sent invalid data!");
}
@@ -102,7 +102,7 @@ public abstract class AbstractFilableCmi
List<String> paths = new ArrayList<String>();
for (ObjectParentData p : bindingParents) {
- if ((p == null) || (p.getObject() == null) || (p.getObject().getProperties() == null)) {
+ if (p == null || p.getObject() == null || p.getObject().getProperties() == null) {
// should not happen...
throw new CmisRuntimeException("Repository sent invalid data!");
}
@@ -140,11 +140,11 @@ public abstract class AbstractFilableCmi
String objectId = getObjectId();
Holder<String> objectIdHolder = new Holder<String>(objectId);
- if ((sourceFolderId == null) || (sourceFolderId.getId() == null)) {
+ if (sourceFolderId == null || sourceFolderId.getId() == null) {
throw new IllegalArgumentException("Source folder id must be set!");
}
- if ((targetFolderId == null) || (targetFolderId.getId() == null)) {
+ if (targetFolderId == null || targetFolderId.getId() == null) {
throw new IllegalArgumentException("Target folder id must be set!");
}
@@ -170,7 +170,7 @@ public abstract class AbstractFilableCmi
public void addToFolder(ObjectId folderId, boolean allVersions) {
String objectId = getObjectId();
- if ((folderId == null) || (folderId.getId() == null)) {
+ if (folderId == null || folderId.getId() == null) {
throw new IllegalArgumentException("Folder Id must be set!");
}
Modified: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/FolderImpl.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/FolderImpl.java?rev=1697878&r1=1697877&r2=1697878&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/FolderImpl.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/FolderImpl.java Wed Aug 26 10:43:47 2015
@@ -78,7 +78,7 @@ public class FolderImpl extends Abstract
addAces, removeAces);
// if no context is provided the object will not be fetched
- if ((context == null) || (newId == null)) {
+ if (context == null || newId == null) {
return null;
}
@@ -100,7 +100,7 @@ public class FolderImpl extends Abstract
addAces, removeAces);
// if no context is provided the object will not be fetched
- if ((context == null) || (newId == null)) {
+ if (context == null || newId == null) {
return null;
}
@@ -120,7 +120,7 @@ public class FolderImpl extends Abstract
ObjectId newId = getSession().createFolder(properties, this, policies, addAces, removeAces);
// if no context is provided the object will not be fetched
- if ((context == null) || (newId == null)) {
+ if (context == null || newId == null) {
return null;
}
@@ -140,7 +140,7 @@ public class FolderImpl extends Abstract
ObjectId newId = getSession().createPolicy(properties, this, policies, addAces, removeAces);
// if no context is provided the object will not be fetched
- if ((context == null) || (newId == null)) {
+ if (context == null || newId == null) {
return null;
}
@@ -160,7 +160,7 @@ public class FolderImpl extends Abstract
ObjectId newId = getSession().createItem(properties, this, policies, addAces, removeAces);
// if no context is provided the object will not be fetched
- if ((context == null) || (newId == null)) {
+ if (context == null || newId == null) {
return null;
}
@@ -335,7 +335,7 @@ public class FolderImpl extends Abstract
List<Tree<FileableCmisObject>> result = new ArrayList<Tree<FileableCmisObject>>();
for (ObjectInFolderContainer oifc : bindingContainerList) {
- if ((oifc.getObject() == null) || (oifc.getObject().getObject() == null)) {
+ if (oifc.getObject() == null || oifc.getObject().getObject() == null) {
// shouldn't happen ...
continue;
}
@@ -396,7 +396,7 @@ public class FolderImpl extends Abstract
getPropertyQueryName(PropertyIds.PATH), false, IncludeRelationships.NONE, "cmis:none", false,
false, null);
- if ((objectData.getProperties() != null) && (objectData.getProperties().getProperties() != null)) {
+ if (objectData.getProperties() != null && objectData.getProperties().getProperties() != null) {
PropertyData<?> pathProperty = objectData.getProperties().getProperties().get(PropertyIds.PATH);
if (pathProperty instanceof PropertyString) {
Modified: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/OperationContextImpl.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/OperationContextImpl.java?rev=1697878&r1=1697877&r2=1697878&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/OperationContextImpl.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/OperationContextImpl.java Wed Aug 26 10:43:47 2015
@@ -158,7 +158,7 @@ public class OperationContextImpl implem
@Override
public final void setFilterString(String propertyFilter) {
- if ((propertyFilter == null) || (propertyFilter.trim().length() == 0)) {
+ if (propertyFilter == null || propertyFilter.trim().length() == 0) {
setFilter(null);
return;
}
Modified: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/RelationshipImpl.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/RelationshipImpl.java?rev=1697878&r1=1697877&r2=1697878&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/RelationshipImpl.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/RelationshipImpl.java Wed Aug 26 10:43:47 2015
@@ -60,7 +60,7 @@ public class RelationshipImpl extends Ab
@Override
public ObjectId getSourceId() {
String sourceId = getPropertyValue(PropertyIds.SOURCE_ID);
- if ((sourceId == null) || (sourceId.length() == 0)) {
+ if (sourceId == null || sourceId.length() == 0) {
return null;
}
@@ -90,7 +90,7 @@ public class RelationshipImpl extends Ab
@Override
public ObjectId getTargetId() {
String targetId = getPropertyValue(PropertyIds.TARGET_ID);
- if ((targetId == null) || (targetId.length() == 0)) {
+ if (targetId == null || targetId.length() == 0) {
return null;
}
Modified: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/SessionImpl.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/SessionImpl.java?rev=1697878&r1=1697877&r2=1697878&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/SessionImpl.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/SessionImpl.java Wed Aug 26 10:43:47 2015
@@ -1509,7 +1509,7 @@ public class SessionImpl implements Sess
String[] ids = new String[policyIds.length];
for (int i = 0; i < policyIds.length; i++) {
- if ((policyIds[i] == null) || (policyIds[i].getId() == null)) {
+ if (policyIds[i] == null || policyIds[i].getId() == null) {
throw new IllegalArgumentException("A Policy ID is not set!");
}
@@ -1531,7 +1531,7 @@ public class SessionImpl implements Sess
String[] ids = new String[policyIds.length];
for (int i = 0; i < policyIds.length; i++) {
- if ((policyIds[i] == null) || (policyIds[i].getId() == null)) {
+ if (policyIds[i] == null || policyIds[i].getId() == null) {
throw new IllegalArgumentException("A Policy ID is not set!");
}
Modified: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/SessionParameterDefaults.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/SessionParameterDefaults.java?rev=1697878&r1=1697877&r2=1697878&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/SessionParameterDefaults.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/SessionParameterDefaults.java Wed Aug 26 10:43:47 2015
@@ -20,10 +20,6 @@ package org.apache.chemistry.opencmis.co
public final class SessionParameterDefaults {
- // utility class
- private SessionParameterDefaults() {
- }
-
public static final int CACHE_SIZE_OBJECTS = 1000;
public static final int CACHE_TTL_OBJECTS = 2 * 60 * 60 * 1000;
public static final int CACHE_SIZE_PATHTOID = 1000;
@@ -32,4 +28,8 @@ public final class SessionParameterDefau
public static final int CACHE_SIZE_REPOSITORIES = 10;
public static final int CACHE_SIZE_TYPES = 100;
public static final int CACHE_SIZE_LINKS = 400;
+
+ // utility class
+ private SessionParameterDefaults() {
+ }
}
Modified: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/Base64.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/Base64.java?rev=1697878&r1=1697877&r2=1697878&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/Base64.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/Base64.java Wed Aug 26 10:43:47 2015
@@ -35,7 +35,7 @@ import org.slf4j.LoggerFactory;
*/
public final class Base64 {
- protected static final Logger LOG = LoggerFactory.getLogger(Base64.class);
+ private static final Logger LOG = LoggerFactory.getLogger(Base64.class);
/* ******** P U B L I C F I E L D S ******** */
Modified: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/Constants.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/Constants.java?rev=1697878&r1=1697877&r2=1697878&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/Constants.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/Constants.java Wed Aug 26 10:43:47 2015
@@ -24,12 +24,6 @@ package org.apache.chemistry.opencmis.co
@SuppressWarnings("PMD.AvoidDuplicateLiterals")
public final class Constants {
- /**
- * Private constructor.
- */
- private Constants() {
- }
-
// media types
public static final String MEDIATYPE_SERVICE = "application/atomsvc+xml";
public static final String MEDIATYPE_FEED = "application/atom+xml;type=feed";
@@ -222,4 +216,10 @@ public final class Constants {
// rendition filter
public static final String RENDITION_NONE = "cmis:none";
+
+ /**
+ * Private constructor.
+ */
+ private Constants() {
+ }
}
Modified: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/JSONConverter.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/JSONConverter.java?rev=1697878&r1=1697877&r2=1697878&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/JSONConverter.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/JSONConverter.java Wed Aug 26 10:43:47 2015
@@ -1146,13 +1146,13 @@ public final class JSONConverter {
}
// ACL
- if ((object.getAcl() != null) && (object.getAcl().getAces() != null) && propertyMode != PropertyMode.QUERY) {
+ if (object.getAcl() != null && object.getAcl().getAces() != null && propertyMode != PropertyMode.QUERY) {
result.put(JSON_OBJECT_ACL, convert(object.getAcl()));
}
setIfNotNull(JSON_OBJECT_EXACT_ACL, object.isExactAcl(), result);
// policy ids
- if ((object.getPolicyIds() != null) && (object.getPolicyIds().getPolicyIds() != null)
+ if (object.getPolicyIds() != null && object.getPolicyIds().getPolicyIds() != null
&& propertyMode != PropertyMode.QUERY) {
JSONObject policyIds = new JSONObject();
JSONArray ids = new JSONArray();
@@ -1347,7 +1347,7 @@ public final class JSONConverter {
* Converts an ACL.
*/
public static JSONObject convert(final Acl acl) {
- if ((acl == null) || (acl.getAces() == null)) {
+ if (acl == null || acl.getAces() == null) {
return null;
}
Modified: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/XMLConstants.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/XMLConstants.java?rev=1697878&r1=1697877&r2=1697878&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/XMLConstants.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/XMLConstants.java Wed Aug 26 10:43:47 2015
@@ -21,9 +21,6 @@ package org.apache.chemistry.opencmis.co
@SuppressWarnings("PMD.AvoidDuplicateLiterals")
public final class XMLConstants {
- private XMLConstants() {
- }
-
// namespaces
public static final String NAMESPACE_CMIS = "http://docs.oasis-open.org/ns/cmis/core/200908/";
public static final String NAMESPACE_ATOM = "http://www.w3.org/2005/Atom";
@@ -252,4 +249,7 @@ public final class XMLConstants {
public static final String TAG_IDANDTOKEN_ID = "id";
public static final String TAG_IDANDTOKEN_NEWID = "newId";
public static final String TAG_IDANDTOKEN_CHANGETOKEN = "changeToken";
+
+ private XMLConstants() {
+ }
}
Modified: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/ObjectDataImpl.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/ObjectDataImpl.java?rev=1697878&r1=1697877&r2=1697878&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/ObjectDataImpl.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/ObjectDataImpl.java Wed Aug 26 10:43:47 2015
@@ -168,7 +168,7 @@ public class ObjectDataImpl extends Abst
* property is not set.
*/
private Object getFirstValue(String id) {
- if ((properties == null) || (properties.getProperties() == null)) {
+ if (properties == null || properties.getProperties() == null) {
return null;
}
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/ObjectService.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/ObjectService.java?rev=1697878&r1=1697877&r2=1697878&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/ObjectService.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/ObjectService.java Wed Aug 26 10:43:47 2015
@@ -701,7 +701,7 @@ public class ObjectService {
Holder<String> objectIdHolder = new Holder<String>(objectId);
try {
- if ((checkin != null) && (checkin.booleanValue())) {
+ if (checkin != null && checkin.booleanValue()) {
if (stopBeforeService(service)) {
return;
}
@@ -862,7 +862,7 @@ public class ObjectService {
if (result != null) {
AtomEntry entry = new AtomEntry(feed.getWriter());
for (BulkUpdateObjectIdAndChangeToken idAndToken : result) {
- if ((idAndToken == null) || (idAndToken.getId() == null)) {
+ if (idAndToken == null || idAndToken.getId() == null) {
continue;
}
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/RepositoryService.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/RepositoryService.java?rev=1697878&r1=1697877&r2=1697878&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/RepositoryService.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/RepositoryService.java Wed Aug 26 10:43:47 2015
@@ -327,7 +327,7 @@ public class RepositoryService {
feed.writeCollection(collectionUrl.toString(), null, "Types Collection", "");
// write type entries
- if ((typeList != null) && (typeList.getList() != null)) {
+ if (typeList != null && typeList.getList() != null) {
AtomEntry entry = new AtomEntry(feed.getWriter());
for (TypeDefinition type : typeList.getList()) {
writeTypeEntry(entry, type, null, repositoryId, baseUrl, false, context.getCmisVersion());
@@ -423,7 +423,7 @@ public class RepositoryService {
AtomEntry entry = new AtomEntry(feed.getWriter());
for (TypeDefinitionContainer container : typeTree) {
- if ((container != null) && (container.getTypeDefinition() != null)) {
+ if (container != null && container.getTypeDefinition() != null) {
writeTypeEntry(entry, container.getTypeDefinition(), container.getChildren(), repositoryId,
baseUrl, false, context.getCmisVersion());
}