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 2013/08/14 23:45:03 UTC
svn commit: r1514061 [2/2] - in /chemistry/opencmis/trunk:
chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/cache/impl/
chemistry-opencmis-client/chemistry-opencmis-client-bindings...
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/NavigationService.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/NavigationService.java?rev=1514061&r1=1514060&r2=1514061&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/NavigationService.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/NavigationService.java Wed Aug 14 21:45:01 2013
@@ -52,6 +52,12 @@ public class NavigationService {
public static class GetChildren extends AbstractAtomPubServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
String folderId = getStringParameter(request, Constants.PARAM_ID);
String filter = getStringParameter(request, Constants.PARAM_FILTER);
@@ -183,6 +189,12 @@ public class NavigationService {
public static class GetDescendants extends AbstractAtomPubServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
String folderId = getStringParameter(request, Constants.PARAM_ID);
BigInteger depth = getBigIntegerParameter(request, Constants.PARAM_DEPTH);
@@ -269,6 +281,12 @@ public class NavigationService {
public static class GetFolderTree extends AbstractAtomPubServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
String folderId = getStringParameter(request, Constants.PARAM_ID);
BigInteger depth = getBigIntegerParameter(request, Constants.PARAM_DEPTH);
@@ -356,6 +374,12 @@ public class NavigationService {
public static class GetObjectParents extends AbstractAtomPubServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
String objectId = getStringParameter(request, Constants.PARAM_ID);
String filter = getStringParameter(request, Constants.PARAM_FILTER);
@@ -426,6 +450,12 @@ public class NavigationService {
public static class GetCheckedOutDocs extends AbstractAtomPubServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
String folderId = getStringParameter(request, Constants.PARAM_FOLDER_ID);
String filter = getStringParameter(request, Constants.PARAM_FILTER);
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=1514061&r1=1514060&r2=1514061&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 14 21:45:01 2013
@@ -78,6 +78,12 @@ public class ObjectService {
public static class Create extends AbstractAtomPubServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
String folderId = getStringParameter(request, Constants.PARAM_ID);
String sourceFolderId = getStringParameter(request, Constants.PARAM_SOURCE_FOLDER_ID);
@@ -149,6 +155,12 @@ public class ObjectService {
public static class CreateRelationship extends AbstractAtomPubServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
ThresholdOutputStreamFactory streamFactory = (ThresholdOutputStreamFactory) context
.get(CallContext.STREAM_FACTORY);
@@ -190,6 +202,12 @@ public class ObjectService {
public static class DeleteObject extends AbstractAtomPubServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
String objectId = getStringParameter(request, Constants.PARAM_ID);
Boolean allVersions = getBooleanParameter(request, Constants.PARAM_ALL_VERSIONS);
@@ -208,6 +226,12 @@ public class ObjectService {
public static class DeleteContentStream extends AbstractAtomPubServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
String objectId = getStringParameter(request, Constants.PARAM_ID);
String changeToken = getStringParameter(request, Constants.PARAM_CHANGE_TOKEN);
@@ -227,6 +251,12 @@ public class ObjectService {
public static class SetOrAppendContentStream extends AbstractAtomPubServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
String objectId = getStringParameter(request, Constants.PARAM_ID);
String changeToken = getStringParameter(request, Constants.PARAM_CHANGE_TOKEN);
@@ -276,6 +306,12 @@ public class ObjectService {
public static class DeleteTree extends AbstractAtomPubServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
String folderId = getStringParameter(request, Constants.PARAM_ID);
Boolean allVersions = getBooleanParameter(request, Constants.PARAM_ALL_VERSIONS);
@@ -314,6 +350,12 @@ public class ObjectService {
public static class GetObject extends AbstractAtomPubServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
String objectId = getStringParameter(request, Constants.PARAM_ID);
ReturnVersion returnVersion = getEnumParameter(request, Constants.PARAM_RETURN_VERSION, ReturnVersion.class);
@@ -367,6 +409,12 @@ public class ObjectService {
public static class GetObjectByPath extends AbstractAtomPubServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
String path = getStringParameter(request, Constants.PARAM_PATH);
String filter = getStringParameter(request, Constants.PARAM_FILTER);
@@ -411,6 +459,12 @@ public class ObjectService {
public static class GetAllowableActions extends AbstractAtomPubServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
String objectId = getStringParameter(request, Constants.PARAM_ID);
@@ -439,6 +493,12 @@ public class ObjectService {
public static class GetContentStream extends AbstractAtomPubServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
String objectId = getStringParameter(request, Constants.PARAM_ID);
String streamId = getStringParameter(request, Constants.PARAM_STREAM_ID);
@@ -497,6 +557,12 @@ public class ObjectService {
public static class UpdateProperties extends AbstractAtomPubServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
String objectId = getStringParameter(request, Constants.PARAM_ID);
Boolean checkin = getBooleanParameter(request, Constants.PARAM_CHECK_IN);
@@ -529,12 +595,13 @@ public class ObjectService {
}
}
- if(changeToken == null) {
+ if (changeToken == null) {
// not required by the CMIS specification
- // -> keep for backwards compatibility with older OpenCMIS clients
+ // -> keep for backwards compatibility with older OpenCMIS
+ // clients
changeToken = getStringParameter(request, Constants.PARAM_CHANGE_TOKEN);
}
-
+
service.updateProperties(repositoryId, objectIdHolder, changeToken == null ? null : new Holder<String>(
changeToken), properties, null);
}
@@ -594,6 +661,12 @@ public class ObjectService {
public static class BulkUpdateProperties extends AbstractAtomPubServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
ThresholdOutputStreamFactory streamFactory = (ThresholdOutputStreamFactory) context
.get(CallContext.STREAM_FACTORY);
AtomEntryParser parser = new AtomEntryParser(streamFactory);
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/PolicyService.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/PolicyService.java?rev=1514061&r1=1514060&r2=1514061&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/PolicyService.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/PolicyService.java Wed Aug 14 21:45:01 2013
@@ -71,6 +71,12 @@ public class PolicyService {
public static class GetAppliedPolicies extends AbstractPoliciesServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
String objectId = getStringParameter(request, Constants.PARAM_ID);
String filter = getStringParameter(request, Constants.PARAM_FILTER);
@@ -131,6 +137,12 @@ public class PolicyService {
public static class ApplyPolicy extends AbstractPoliciesServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
String objectId = getStringParameter(request, Constants.PARAM_ID);
@@ -175,6 +187,12 @@ public class PolicyService {
public static class RemovePolicy extends AbstractAtomPubServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
String objectId = getStringParameter(request, Constants.PARAM_ID);
String policyId = getStringParameter(request, Constants.PARAM_POLICY_ID);
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/RelationshipService.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/RelationshipService.java?rev=1514061&r1=1514060&r2=1514061&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/RelationshipService.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/RelationshipService.java Wed Aug 14 21:45:01 2013
@@ -44,6 +44,12 @@ public class RelationshipService {
public static class GetObjectRelationships extends AbstractAtomPubServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
String objectId = getStringParameter(request, Constants.PARAM_ID);
Boolean includeSubRelationshipTypes = getBooleanParameter(request, Constants.PARAM_SUB_RELATIONSHIP_TYPES);
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=1514061&r1=1514060&r2=1514061&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 14 21:45:01 2013
@@ -52,6 +52,12 @@ public class RepositoryService {
public static class GetRepositories extends AbstractAtomPubServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
repositoryId = getStringParameter(request, Constants.PARAM_REPOSITORY_ID);
@@ -222,6 +228,12 @@ public class RepositoryService {
public static class GetTypeChildren extends AbstractAtomPubServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
String typeId = getStringParameter(request, Constants.PARAM_TYPE_ID);
boolean includePropertyDefinitions = getBooleanParameter(request, Constants.PARAM_PROPERTY_DEFINITIONS,
@@ -312,6 +324,12 @@ public class RepositoryService {
public static class GetTypeDescendants extends AbstractAtomPubServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
String typeId = getStringParameter(request, Constants.PARAM_TYPE_ID);
BigInteger depth = getBigIntegerParameter(request, Constants.PARAM_DEPTH);
@@ -390,6 +408,12 @@ public class RepositoryService {
public static class GetTypeDefinition extends AbstractAtomPubServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
String typeId = getStringParameter(request, Constants.PARAM_ID);
@@ -414,6 +438,12 @@ public class RepositoryService {
public static class CreateType extends AbstractAtomPubServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// parse entry
ThresholdOutputStreamFactory streamFactory = (ThresholdOutputStreamFactory) context
.get(CallContext.STREAM_FACTORY);
@@ -445,6 +475,12 @@ public class RepositoryService {
public static class UpdateType extends AbstractAtomPubServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// parse entry
ThresholdOutputStreamFactory streamFactory = (ThresholdOutputStreamFactory) context
.get(CallContext.STREAM_FACTORY);
@@ -476,6 +512,12 @@ public class RepositoryService {
public static class DeleteType extends AbstractAtomPubServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
String typeId = getStringParameter(request, Constants.PARAM_ID);
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/VersioningService.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/VersioningService.java?rev=1514061&r1=1514060&r2=1514061&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/VersioningService.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/VersioningService.java Wed Aug 14 21:45:01 2013
@@ -44,6 +44,12 @@ public class VersioningService {
public static class CheckOut extends AbstractAtomPubServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
ThresholdOutputStreamFactory streamFactory = (ThresholdOutputStreamFactory) context
.get(CallContext.STREAM_FACTORY);
@@ -93,6 +99,12 @@ public class VersioningService {
public static class GetAllVersions extends AbstractAtomPubServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
String objectId = getStringParameter(request, Constants.PARAM_ID);
String versionSeriesId = getStringParameter(request, Constants.PARAM_VERSION_SERIES_ID);
@@ -154,6 +166,12 @@ public class VersioningService {
public static class DeleteAllVersions extends AbstractAtomPubServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
String objectId = getStringParameter(request, Constants.PARAM_ID);
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/AclService.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/browser/AclService.java?rev=1514061&r1=1514060&r2=1514061&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/AclService.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/AclService.java Wed Aug 14 21:45:01 2013
@@ -40,6 +40,12 @@ public class AclService {
public static class GetACL extends AbstractBrowserServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
String objectId = ((BrowserCallContextImpl) context).getObjectId();
Boolean onlyBasicPermissions = getBooleanParameter(request, Constants.PARAM_ONLY_BASIC_PERMISSIONS);
@@ -65,6 +71,12 @@ public class AclService {
public static class ApplyACL extends AbstractBrowserServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
String objectId = ((BrowserCallContextImpl) context).getObjectId();
AclPropagation aclPropagation = getEnumParameter(request, Constants.PARAM_ACL_PROPAGATION,
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/DiscoveryService.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/browser/DiscoveryService.java?rev=1514061&r1=1514060&r2=1514061&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/DiscoveryService.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/DiscoveryService.java Wed Aug 14 21:45:01 2013
@@ -52,6 +52,12 @@ public class DiscoveryService {
public static class Query extends AbstractBrowserServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
String statement = getStringParameter(request, Constants.PARAM_STATEMENT);
if (statement == null || statement.length() == 0) {
@@ -89,6 +95,12 @@ public class DiscoveryService {
public static class GetContentChanges extends AbstractBrowserServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
String changeLogToken = getStringParameter(request, PARAM_CHANGE_LOG_TOKEN);
Boolean includeProperties = getBooleanParameter(request, PARAM_PROPERTIES);
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/MultiFilingService.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/browser/MultiFilingService.java?rev=1514061&r1=1514060&r2=1514061&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/MultiFilingService.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/MultiFilingService.java Wed Aug 14 21:45:01 2013
@@ -44,6 +44,12 @@ public class MultiFilingService {
public static class AddObjectToFolder extends AbstractBrowserServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
String objectId = ((BrowserCallContextImpl) context).getObjectId();
String folderId = getStringParameter(request, PARAM_FOLDER_ID);
@@ -80,6 +86,12 @@ public class MultiFilingService {
public static class RemoveObjectFromFolder extends AbstractBrowserServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
String objectId = ((BrowserCallContextImpl) context).getObjectId();
String folderId = getStringParameter(request, PARAM_FOLDER_ID);
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/NavigationService.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/browser/NavigationService.java?rev=1514061&r1=1514060&r2=1514061&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/NavigationService.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/NavigationService.java Wed Aug 14 21:45:01 2013
@@ -61,6 +61,12 @@ public class NavigationService {
public static class GetChildren extends AbstractBrowserServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
String folderId = ((BrowserCallContextImpl) context).getObjectId();
String filter = getStringParameter(request, PARAM_FILTER);
@@ -97,6 +103,12 @@ public class NavigationService {
public static class GetDescendants extends AbstractBrowserServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
String folderId = ((BrowserCallContextImpl) context).getObjectId();
BigInteger depth = getBigIntegerParameter(request, PARAM_DEPTH);
@@ -133,6 +145,12 @@ public class NavigationService {
public static class GetFolderTree extends AbstractBrowserServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
String folderId = ((BrowserCallContextImpl) context).getObjectId();
BigInteger depth = getBigIntegerParameter(request, PARAM_DEPTH);
@@ -169,6 +187,12 @@ public class NavigationService {
public static class GetFolderParent extends AbstractBrowserServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
String objectId = ((BrowserCallContextImpl) context).getObjectId();
String filter = getStringParameter(request, PARAM_FILTER);
@@ -196,6 +220,12 @@ public class NavigationService {
public static class GetObjectParents extends AbstractBrowserServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
String objectId = ((BrowserCallContextImpl) context).getObjectId();
String filter = getStringParameter(request, PARAM_FILTER);
@@ -231,6 +261,12 @@ public class NavigationService {
public static class GetCheckedOutDocs extends AbstractBrowserServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
String folderId = ((BrowserCallContextImpl) context).getObjectId();
String filter = getStringParameter(request, PARAM_FILTER);
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/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/browser/ObjectService.java?rev=1514061&r1=1514060&r2=1514061&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/ObjectService.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/ObjectService.java Wed Aug 14 21:45:01 2013
@@ -85,6 +85,12 @@ public class ObjectService {
public static class CreateDocument extends AbstractBrowserServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
String folderId = ((BrowserCallContextImpl) context).getObjectId();
VersioningState versioningState = getEnumParameter(request, PARAM_VERSIONIG_STATE, VersioningState.class);
@@ -129,6 +135,12 @@ public class ObjectService {
public static class CreateDocumentFromSource extends AbstractBrowserServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
String folderId = ((BrowserCallContextImpl) context).getObjectId();
String sourceId = getStringParameter(request, PARAM_SOURCE_ID);
@@ -176,6 +188,12 @@ public class ObjectService {
public static class CreateFolder extends AbstractBrowserServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
String folderId = ((BrowserCallContextImpl) context).getObjectId();
String token = getStringParameter(request, PARAM_TOKEN);
@@ -211,6 +229,12 @@ public class ObjectService {
public static class CreatePolicy extends AbstractBrowserServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
String folderId = ((BrowserCallContextImpl) context).getObjectId();
String token = getStringParameter(request, PARAM_TOKEN);
@@ -246,6 +270,12 @@ public class ObjectService {
public static class CreateItem extends AbstractBrowserServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
String folderId = ((BrowserCallContextImpl) context).getObjectId();
String token = getStringParameter(request, PARAM_TOKEN);
@@ -281,6 +311,12 @@ public class ObjectService {
public static class CreateRelationship extends AbstractBrowserServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
String token = getStringParameter(request, PARAM_TOKEN);
boolean succinct = getBooleanParameter(request, Constants.CONTROL_SUCCINCT, false);
@@ -315,6 +351,12 @@ public class ObjectService {
public static class UpdateProperties extends AbstractBrowserServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
String objectId = ((BrowserCallContextImpl) context).getObjectId();
String typeId = ((BrowserCallContextImpl) context).getTypeId();
@@ -360,6 +402,12 @@ public class ObjectService {
public static class BulkUpdateProperties extends AbstractBrowserServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
ControlParser cp = new ControlParser(request);
// get object ids and change tokens
@@ -413,6 +461,12 @@ public class ObjectService {
public static class GetProperties extends AbstractBrowserServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
String objectId = ((BrowserCallContextImpl) context).getObjectId();
ReturnVersion returnVersion = getEnumParameter(request, PARAM_RETURN_VERSION, ReturnVersion.class);
@@ -449,6 +503,12 @@ public class ObjectService {
public static class GetObject extends AbstractBrowserServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
String objectId = ((BrowserCallContextImpl) context).getObjectId();
ReturnVersion returnVersion = getEnumParameter(request, PARAM_RETURN_VERSION, ReturnVersion.class);
@@ -493,6 +553,12 @@ public class ObjectService {
public static class GetAllowableActions extends AbstractBrowserServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
String objectId = ((BrowserCallContextImpl) context).getObjectId();
@@ -511,6 +577,12 @@ public class ObjectService {
public static class GetRenditions extends AbstractBrowserServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
String objectId = ((BrowserCallContextImpl) context).getObjectId();
String renditionFilter = getStringParameter(request, PARAM_RENDITION_FILTER);
@@ -539,6 +611,12 @@ public class ObjectService {
public static class GetContentStream extends AbstractBrowserServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
String objectId = ((BrowserCallContextImpl) context).getObjectId();
String streamId = getStringParameter(request, PARAM_STREAM_ID);
@@ -606,6 +684,12 @@ public class ObjectService {
public static class DeleteObject extends AbstractBrowserServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
String objectId = ((BrowserCallContextImpl) context).getObjectId();
Boolean allVersions = getBooleanParameter(request, Constants.PARAM_ALL_VERSIONS);
@@ -623,6 +707,12 @@ public class ObjectService {
public static class DeleteTree extends AbstractBrowserServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
String objectId = ((BrowserCallContextImpl) context).getObjectId();
Boolean allVersions = getBooleanParameter(request, Constants.PARAM_ALL_VERSIONS);
@@ -651,6 +741,12 @@ public class ObjectService {
public static class DeleteContentStream extends AbstractBrowserServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
String objectId = ((BrowserCallContextImpl) context).getObjectId();
String changeToken = getStringParameter(request, Constants.PARAM_CHANGE_TOKEN);
@@ -685,6 +781,12 @@ public class ObjectService {
public static class SetContentStream extends AbstractBrowserServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
String objectId = ((BrowserCallContextImpl) context).getObjectId();
String changeToken = getStringParameter(request, Constants.PARAM_CHANGE_TOKEN);
@@ -729,6 +831,12 @@ public class ObjectService {
public static class AppendContentStream extends AbstractBrowserServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
String objectId = ((BrowserCallContextImpl) context).getObjectId();
boolean isLastChunk = getBooleanParameter(request, Constants.CONTROL_IS_LAST_CHUNK, false);
@@ -773,6 +881,12 @@ public class ObjectService {
public static class MoveObject extends AbstractBrowserServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
String objectId = ((BrowserCallContextImpl) context).getObjectId();
String targetFolderId = getStringParameter(request, PARAM_TARGET_FOLDER_ID);
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/PolicyService.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/browser/PolicyService.java?rev=1514061&r1=1514060&r2=1514061&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/PolicyService.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/PolicyService.java Wed Aug 14 21:45:01 2013
@@ -47,6 +47,12 @@ public class PolicyService {
public static class GetAppliedPolicies extends AbstractBrowserServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
String objectId = ((BrowserCallContextImpl) context).getObjectId();
String filter = getStringParameter(request, PARAM_FILTER);
@@ -75,6 +81,12 @@ public class PolicyService {
public static class ApplyPolicy extends AbstractBrowserServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
String objectId = ((BrowserCallContextImpl) context).getObjectId();
String policyId = getStringParameter(request, PARAM_POLICY_ID);
@@ -105,6 +117,12 @@ public class PolicyService {
public static class RemovePolicy extends AbstractBrowserServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
String objectId = ((BrowserCallContextImpl) context).getObjectId();
String policyId = getStringParameter(request, PARAM_POLICY_ID);
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/RelationshipService.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/browser/RelationshipService.java?rev=1514061&r1=1514060&r2=1514061&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/RelationshipService.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/RelationshipService.java Wed Aug 14 21:45:01 2013
@@ -49,6 +49,12 @@ public class RelationshipService {
public static class GetObjectRelationships extends AbstractBrowserServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
String objectId = ((BrowserCallContextImpl) context).getObjectId();
Boolean includeSubRelationshipTypes = getBooleanParameter(request, PARAM_SUB_RELATIONSHIP_TYPES);
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/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/browser/RepositoryService.java?rev=1514061&r1=1514060&r2=1514061&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/RepositoryService.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/RepositoryService.java Wed Aug 14 21:45:01 2013
@@ -61,6 +61,12 @@ public class RepositoryService {
public static class GetRepositories extends AbstractBrowserServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// execute
List<RepositoryInfo> infoDataList = service.getRepositoryInfos(null);
@@ -83,6 +89,12 @@ public class RepositoryService {
public static class GetRepositoryInfo extends AbstractBrowserServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// execute
RepositoryInfo ri = service.getRepositoryInfo(repositoryId, null);
@@ -103,6 +115,12 @@ public class RepositoryService {
public static class GetLastResult extends AbstractBrowserServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
String token = getStringParameter(request, PARAM_TOKEN);
String cookieName = getCookieName(token);
String cookieValue = null;
@@ -140,6 +158,12 @@ public class RepositoryService {
public static class GetTypeChildren extends AbstractBrowserServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
String typeId = getStringParameter(request, PARAM_TYPE_ID);
boolean includePropertyDefinitions = getBooleanParameter(request, PARAM_PROPERTY_DEFINITIONS, false);
@@ -159,6 +183,12 @@ public class RepositoryService {
public static class GetTypeDescendants extends AbstractBrowserServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
String typeId = getStringParameter(request, PARAM_TYPE_ID);
BigInteger depth = getBigIntegerParameter(request, PARAM_DEPTH);
@@ -188,6 +218,12 @@ public class RepositoryService {
public static class GetTypeDefinition extends AbstractBrowserServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
String typeId = getStringParameter(request, PARAM_TYPE_ID);
@@ -206,6 +242,12 @@ public class RepositoryService {
public static class CreateType extends AbstractBrowserServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
String typeStr = getStringParameter(request, CONTROL_TYPE);
if (typeStr == null) {
@@ -240,6 +282,12 @@ public class RepositoryService {
public static class UpdateType extends AbstractBrowserServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
String typeStr = getStringParameter(request, CONTROL_TYPE);
if (typeStr == null) {
@@ -271,6 +319,12 @@ public class RepositoryService {
public static class DeleteType extends AbstractBrowserServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
String typeId = getStringParameter(request, CONTROL_TYPE_ID);
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/VersioningService.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/browser/VersioningService.java?rev=1514061&r1=1514060&r2=1514061&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/VersioningService.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/VersioningService.java Wed Aug 14 21:45:01 2013
@@ -53,6 +53,12 @@ public class VersioningService {
public static class CheckOut extends AbstractBrowserServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
String objectId = ((BrowserCallContextImpl) context).getObjectId();
String token = getStringParameter(request, PARAM_TOKEN);
@@ -89,6 +95,12 @@ public class VersioningService {
public static class CancelCheckOut extends AbstractBrowserServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
String objectId = ((BrowserCallContextImpl) context).getObjectId();
@@ -106,6 +118,12 @@ public class VersioningService {
public static class CheckIn extends AbstractBrowserServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
String objectId = ((BrowserCallContextImpl) context).getObjectId();
String typeId = ((BrowserCallContextImpl) context).getTypeId();
@@ -156,6 +174,12 @@ public class VersioningService {
public static class GetAllVersions extends AbstractBrowserServiceCall {
public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
HttpServletResponse response) throws Exception {
+ assert context != null;
+ assert service != null;
+ assert repositoryId != null;
+ assert request != null;
+ assert response != null;
+
// get parameters
String objectId = ((BrowserCallContextImpl) context).getObjectId();
String filter = getStringParameter(request, PARAM_FILTER);
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/shared/AbstractServiceCall.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/shared/AbstractServiceCall.java?rev=1514061&r1=1514060&r2=1514061&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/shared/AbstractServiceCall.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/shared/AbstractServiceCall.java Wed Aug 14 21:45:01 2013
@@ -119,6 +119,8 @@ public abstract class AbstractServiceCal
*/
public boolean sendContentStreamHeaders(ContentStream content, HttpServletRequest request,
HttpServletResponse response) throws IOException {
+ assert request != null;
+ assert response != null;
// check if Last-Modified header should be set
if (content instanceof LastModifiedContentStream) {
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/shared/BasicAuthCallContextHandler.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/shared/BasicAuthCallContextHandler.java?rev=1514061&r1=1514060&r2=1514061&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/shared/BasicAuthCallContextHandler.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/shared/BasicAuthCallContextHandler.java Wed Aug 14 21:45:01 2013
@@ -42,6 +42,8 @@ public class BasicAuthCallContextHandler
}
public Map<String, String> getCallContextMap(HttpServletRequest request) {
+ assert request != null;
+
Map<String, String> result = null;
String authHeader = request.getHeader("Authorization");
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/shared/HttpUtils.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/shared/HttpUtils.java?rev=1514061&r1=1514060&r2=1514061&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/shared/HttpUtils.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/shared/HttpUtils.java Wed Aug 14 21:45:01 2013
@@ -32,6 +32,8 @@ public class HttpUtils {
* Extracts a string parameter.
*/
public static String getStringParameter(final HttpServletRequest request, final String name) {
+ assert request != null;
+
if (name == null) {
return null;
}
@@ -54,6 +56,8 @@ public class HttpUtils {
* Splits the path into its fragments.
*/
public static String[] splitPath(final HttpServletRequest request) {
+ assert request != null;
+
int prefixLength = request.getContextPath().length() + request.getServletPath().length();
String p = request.getRequestURI().substring(prefixLength);
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/CmisServiceWrapper.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/CmisServiceWrapper.java?rev=1514061&r1=1514060&r2=1514061&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/CmisServiceWrapper.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/CmisServiceWrapper.java Wed Aug 14 21:45:01 2013
@@ -84,10 +84,10 @@ public class CmisServiceWrapper<T extend
this.service = service;
- setDefaultTypesMaxItems(defaultTypesMaxItems);
- setDefaultTypesDepth(defaultTypesDepth);
- setDefaultMaxItems(defaultMaxItems);
- setDefaultDepth(defaultDepth);
+ this.defaultTypesMaxItems = defaultTypesMaxItems;
+ this.defaultTypesDepth = defaultTypesDepth;
+ this.defaultMaxItems = defaultMaxItems;
+ this.defaultDepth = defaultDepth;
}
// --- wrapper operations ---
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/TypeDefinitionFactory.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/TypeDefinitionFactory.java?rev=1514061&r1=1514060&r2=1514061&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/TypeDefinitionFactory.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/TypeDefinitionFactory.java Wed Aug 14 21:45:01 2013
@@ -90,7 +90,7 @@ import org.apache.chemistry.opencmis.com
/**
* Type definition factory.
*/
-public class TypeDefinitionFactory {
+public final class TypeDefinitionFactory {
private static final Set<String> NEW_CMIS11_PROPERTIES = new HashSet<String>();
static {
Modified: chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-browser/src/main/java/org/apache/chemistry/opencmis/browser/BrowseServlet.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-browser/src/main/java/org/apache/chemistry/opencmis/browser/BrowseServlet.java?rev=1514061&r1=1514060&r2=1514061&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-browser/src/main/java/org/apache/chemistry/opencmis/browser/BrowseServlet.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-browser/src/main/java/org/apache/chemistry/opencmis/browser/BrowseServlet.java Wed Aug 14 21:45:01 2013
@@ -57,7 +57,7 @@ public class BrowseServlet extends HttpS
private static final long serialVersionUID = 1L;
- private static final Logger log = LoggerFactory.getLogger(BrowseServlet.class);
+ private static final Logger LOG = LoggerFactory.getLogger(BrowseServlet.class);
private static final String CONTEXT_PREFIX = "{ctx}";
private static final String PARAM_URL = "url";
@@ -116,7 +116,7 @@ public class BrowseServlet extends HttpS
Document xslDoc = builder.parse(stream);
addStylesheet(stylesheetKey, new DOMSource(xslDoc), isOverride);
- log.info("Stylesheet: '" + stylesheetKey + "' -> '" + stylesheetFileName + "'");
+ LOG.info("Stylesheet: '" + stylesheetKey + "' -> '" + stylesheetFileName + "'");
} catch (Exception e) {
e.printStackTrace();
}
@@ -127,13 +127,13 @@ public class BrowseServlet extends HttpS
String initAuxRoot = config.getInitParameter(INIT_PARAM_AUXROOT);
if (initAuxRoot != null) {
fAuxRoot = initAuxRoot;
- log.info("Auxiliary root: " + fAuxRoot);
+ LOG.info("Auxiliary root: " + fAuxRoot);
}
String initAllow = config.getInitParameter(INIT_PARAM_ALLOW);
if (initAllow != null) {
fAllow = initAllow;
- log.info("Allow pattern: " + fAllow);
+ LOG.info("Allow pattern: " + fAllow);
}
}
@@ -211,8 +211,8 @@ public class BrowseServlet extends HttpS
}
// debug messages
- if (log.isDebugEnabled()) {
- log.debug("'" + browseUrl + "' -> '" + conn.getContentType() + "'");
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("'" + browseUrl + "' -> '" + conn.getContentType() + "'");
}
// find stylesheet
Modified: chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/pom.xml
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/pom.xml?rev=1514061&r1=1514060&r2=1514061&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/pom.xml (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/pom.xml Wed Aug 14 21:45:01 2013
@@ -84,7 +84,7 @@
<encoding>UTF-8</encoding>
<reuseForks>true</reuseForks>
<forkedProcessTimeoutInSeconds>1800</forkedProcessTimeoutInSeconds>
- <argLine>-Xmx512m</argLine>
+ <argLine>-Xmx512m -ea:org.apache.chemistry</argLine>
</configuration>
<executions>
<execution>