]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
DRYD-306: Fixed logic that decided when a vocab/authority term can be deleted if...
authorRichard Millet <remillet@yahoo.com>
Thu, 1 Mar 2018 19:59:25 +0000 (11:59 -0800)
committerRichard Millet <remillet@yahoo.com>
Thu, 1 Mar 2018 19:59:25 +0000 (11:59 -0800)
build.properties
services/collectionobject/service/pom.xml
services/common/src/main/java/org/collectionspace/services/common/context/AbstractServiceContextImpl.java

index b539b0a6050d0e4b66d5ca7cb0193240918a947d..c6fda03a72f17c33bacff2af97809ea055962832 100644 (file)
@@ -18,7 +18,7 @@ domain.nuxeo=nuxeo-server
 
 # CSpace UI
 cspace.ui.dest=
-cspace.ui.version=1.0.0-alpha.2
+cspace.ui.version=1.0.0-alpha.10
 cspace.ui.webapp=cspace#core
 cspace.ui.js=cspaceUI@${cspace.ui.version}.min.js
 
index 17642e89a77a094b756800429903596aedb9287b..13aa932d856e132d9bde3a47a3438b9d66aab925 100644 (file)
     
     <build>
         <finalName>collectionspace-services-collectionobject</finalName>
-        <plugins>
-               <plugin>
-                   <groupId>com.qmino</groupId>
-                   <artifactId>miredot-plugin</artifactId>
-                   <version>2.0.3</version>
-                   <executions>
-                       <execution>
-                           <goals>
-                               <goal>restdoc</goal>
-                           </goals>
-                       </execution>
-                   </executions>
-                   <configuration>
-                       <organizationId>5427820b-5465-4a49-98fb-cb39ff772f23</organizationId>
-                       <restModel>
-                           <restFramework>
-                               <name>jax-rs</name>
-                           </restFramework>
-                       </restModel>
-                       <output>
-                           <html>
-                               <jsonDoc>Hidden</jsonDoc>
-                           </html>
-                       </output>
-                       <!-- insert other configuration here (optional) -->
-                   </configuration>
-         </plugin>
-        </plugins>
-        <pluginManagement>
-               <plugins>
-                       <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
-                       <plugin>
-                               <groupId>org.eclipse.m2e</groupId>
-                               <artifactId>lifecycle-mapping</artifactId>
-                               <version>1.0.0</version>
-                               <configuration>
-                                       <lifecycleMappingMetadata>
-                                               <pluginExecutions>
-                                                       <pluginExecution>
-                                                               <pluginExecutionFilter>
-                                                                       <groupId>com.qmino</groupId>
-                                                                   <artifactId>miredot-plugin</artifactId>
-                                                                   <versionRange>[2.0.3,)</versionRange>
-                                                                       <goals>
-                                                                               <goal>restdoc</goal>
-                                                                       </goals>
-                                                               </pluginExecutionFilter>
-                                                               <action>
-                                                                       <ignore></ignore>
-                                                               </action>
-                                                       </pluginExecution>
-                                               </pluginExecutions>
-                                       </lifecycleMappingMetadata>
-                               </configuration>
-                       </plugin>
-               </plugins>
-        </pluginManagement>
     </build>
-    
-    <pluginRepositories>
-      <pluginRepository>
-         <id>miredot</id>
-         <name>MireDot Releases</name>
-         <url>http://nexus.qmino.com/content/repositories/miredot</url>
-      </pluginRepository>
-   </pluginRepositories>
-    
 </project>
 
index 7fbe3e91ba029a983e989b14c4c5d08a187fcd77..7326e24656bd599e7cef6b56510ebe87e9767cc1 100644 (file)
@@ -569,22 +569,33 @@ public abstract class AbstractServiceContextImpl<IT, OT>
      * @param queryParams
      * @return
      */
-    private static String buildWorkflowWhereClause(MultivaluedMap<String, String> queryParams) {
-       String result = null;
-       
-        String includeDeleted = queryParams.getFirst(WorkflowClient.WORKFLOW_QUERY_NONDELETED);
-        String includeOnlyDeleted = queryParams.getFirst(WorkflowClient.WORKFLOW_QUERY_ONLY_DELETED);
-
-       if (includeDeleted != null && includeDeleted.equalsIgnoreCase(Boolean.FALSE.toString())) {      
-               result = String.format("(ecm:currentLifeCycleState <> '%s' AND ecm:currentLifeCycleState <> '%s' AND ecm:currentLifeCycleState <> '%s')",
-                               WorkflowClient.WORKFLOWSTATE_DELETED, WorkflowClient.WORKFLOWSTATE_LOCKED_DELETED, WorkflowClient.WORKFLOWSTATE_REPLICATED_DELETED);
-       } else if (includeOnlyDeleted != null && includeOnlyDeleted.equalsIgnoreCase(Boolean.TRUE.toString())) {
-               result = String.format("(ecm:currentLifeCycleState <> '%s' AND ecm:currentLifeCycleState <> '%s' AND ecm:currentLifeCycleState <> '%s')",
-                               WorkflowClient.WORKFLOWSTATE_PROJECT, WorkflowClient.WORKFLOWSTATE_LOCKED, WorkflowClient.WORKFLOWSTATE_REPLICATED);
-       }
-       
-       return result;
-    }
+       private static String buildWorkflowWhereClause(MultivaluedMap<String, String> queryParams) {
+               String result = null;
+
+               String includeDeleted = queryParams.getFirst(WorkflowClient.WORKFLOW_QUERY_NONDELETED);
+               String includeOnlyDeleted = queryParams.getFirst(WorkflowClient.WORKFLOW_QUERY_ONLY_DELETED);  // if set to true, it doesn't matter what the value is for 'includeDeleted'
+               
+               if (includeOnlyDeleted != null) {                       
+                       if (Tools.isTrue(includeOnlyDeleted)) {
+                               //
+                               // A value of 'true' for 'includeOnlyDeleted' means we're looking *only* for soft-deleted records/documents.
+                               //
+                               result = String.format("(ecm:currentLifeCycleState = '%s' OR ecm:currentLifeCycleState = '%s' OR ecm:currentLifeCycleState = '%s')",
+                                               WorkflowClient.WORKFLOWSTATE_DELETED, WorkflowClient.WORKFLOWSTATE_LOCKED_DELETED,
+                                               WorkflowClient.WORKFLOWSTATE_REPLICATED_DELETED);
+                       }
+               } else if (!Tools.isTrue(includeDeleted)) {
+                       //
+                       // We can only get here if the 'includeOnlyDeleted' query param is missing altogether.
+                       // Ensure we don't return soft-deleted records
+                       //
+                       result = String.format("(ecm:currentLifeCycleState <> '%s' AND ecm:currentLifeCycleState <> '%s' AND ecm:currentLifeCycleState <> '%s')",
+                                       WorkflowClient.WORKFLOWSTATE_DELETED, WorkflowClient.WORKFLOWSTATE_LOCKED_DELETED,
+                                       WorkflowClient.WORKFLOWSTATE_REPLICATED_DELETED);
+               }
+
+               return result;
+       }
     
     /**
      * Creates the document handler instance.