Platform Explorer / CMF 1.8

Contribution com.nuxeo.casemanagement.querymodel--model

This contribution is part of XML component com.nuxeo.casemanagement.querymodel inside nuxeo-case-management-core-1.8.jar

Extension Point

Extension point model of component QueryModelService.

Contributed Items

  • <queryModel name="GET_MAILBOX_FROM_ID">
          <pattern>
            SELECT * FROM Document WHERE mlbx:mailbox_id=? AND
            ecm:currentLifeCycleState != 'deleted' AND ecm:mixinType = 'Mailbox'
          </pattern>
        </queryModel>
  • <queryModel name="GET_ALL_MAILBOX">
          <pattern>
            SELECT * FROM Document WHERE ecm:currentLifeCycleState != 'deleted' AND
            ecm:mixinType = 'Mailbox'
          </pattern>
        </queryModel>
  • <queryModel name="byType">
          <max>10</max>
          <whereClause>
            <predicate operator="STARTSWITH" parameter="cmdoc:type">
              <field name="type" schema="case_item"/>
            </predicate>
            <fixedPart>
              ecm:mixinType != 'HiddenInNavigation' AND ecm:currentLifeCycleState
              !='deleted' AND ecm:mixinType = 'CaseGroupable' AND ecm:mixinType =
              'Distributable'
            </fixedPart>
          </whereClause>
          <sortColumn>
            <field name="sortColumn" schema="advanced_search"/>
          </sortColumn>
          <sortAscending>
            <field name="sortAscending" schema="advanced_search"/>
          </sortAscending>
        </queryModel>
  • <queryModel name="CURRENT_CASE_ITEM_RELATION_SEARCH">
          <pattern>
            SELECT * FROM Document WHERE ecm:mixinType = 'CaseGroupable' AND
            ecm:mixinType = 'Distributable' AND ecm:currentLifeCycleState !=
            'deleted' AND ecm:uuid != ? AND ecm:fulltext LIKE ?
          </pattern>
          <sortable defaultSortAscending="true" defaultSortColumn="dc:title" value="true"/>
          <max>20</max>
        </queryModel>
  • <queryModel name="SIMPLE_SEARCH">
          <pattern>
            SELECT * FROM Document WHERE ecm:fulltext LIKE ? AND ecm:mixinType !=
            'HiddenInNavigation' AND ecm:isCheckedInVersion = 0 AND
            ecm:currentLifeCycleState != 'deleted' AND ecm:mixinType =
            'CaseGroupable' AND ecm:mixinType = 'Distributable'
          </pattern>
          <max>10</max>
          <sortable value="true"/>
        </queryModel>
  • <queryModel name="CURRENT_DOC_ROUTING_SEARCH_ATTACHED_DOC">
          <pattern>
            SELECT * FROM Document WHERE ecm:currentLifeCycleState != 'deleted'
            AND dc:title LIKE ? AND ecm:mixinType != 'CaseGroupable' AND
            ecm:mixinType = 'Distributable'
          </pattern>
          <sortable defaultSortAscending="true" defaultSortColumn="dc:title" value="true"/>
          <max>20</max>
        </queryModel>

XML Source

<extension point="model" target="org.nuxeo.ecm.core.search.api.client.querymodel.QueryModelService">

    <!-- Case Management Default Service -->

    <queryModel name="GET_MAILBOX_FROM_ID">
      <pattern>
        SELECT * FROM Document WHERE mlbx:mailbox_id=? AND
        ecm:currentLifeCycleState != 'deleted' AND ecm:mixinType = 'Mailbox'
      </pattern>
    </queryModel>

    <queryModel name="GET_ALL_MAILBOX">
      <pattern>
        SELECT * FROM Document WHERE ecm:currentLifeCycleState != 'deleted' AND
        ecm:mixinType = 'Mailbox'
      </pattern>
    </queryModel>

    <queryModel name="byType">
      <max>10</max>
      <whereClause>
        <predicate operator="STARTSWITH" parameter="cmdoc:type">
          <field name="type" schema="case_item"/>
        </predicate>
        <fixedPart>
          ecm:mixinType != 'HiddenInNavigation' AND ecm:currentLifeCycleState
          !='deleted' AND ecm:mixinType = 'CaseGroupable' AND ecm:mixinType =
          'Distributable'
        </fixedPart>
      </whereClause>
      <sortColumn>
        <field name="sortColumn" schema="advanced_search"/>
      </sortColumn>
      <sortAscending>
        <field name="sortAscending" schema="advanced_search"/>
      </sortAscending>
    </queryModel>

    <queryModel name="CURRENT_CASE_ITEM_RELATION_SEARCH">
      <pattern>
        SELECT * FROM Document WHERE ecm:mixinType = 'CaseGroupable' AND
        ecm:mixinType = 'Distributable' AND ecm:currentLifeCycleState !=
        'deleted' AND ecm:uuid != ? AND ecm:fulltext LIKE ?
      </pattern>
      <sortable defaultSortAscending="true" defaultSortColumn="dc:title" value="true"/>
      <max>20</max>
    </queryModel>

    <queryModel name="SIMPLE_SEARCH">
      <pattern>
        SELECT * FROM Document WHERE ecm:fulltext LIKE ? AND ecm:mixinType !=
        'HiddenInNavigation' AND ecm:isCheckedInVersion = 0 AND
        ecm:currentLifeCycleState != 'deleted' AND ecm:mixinType =
        'CaseGroupable' AND ecm:mixinType = 'Distributable'
      </pattern>
      <max>10</max>
      <sortable value="true"/>
    </queryModel>

    <!-- we override the contribution to start route on case only -->
    <queryModel name="CURRENT_DOC_ROUTING_SEARCH_ATTACHED_DOC">
      <pattern>
        SELECT * FROM Document WHERE ecm:currentLifeCycleState != 'deleted'
        AND dc:title LIKE ? AND ecm:mixinType != 'CaseGroupable' AND
        ecm:mixinType = 'Distributable'
      </pattern>
      <sortable defaultSortAscending="true" defaultSortColumn="dc:title" value="true"/>
      <max>20</max>
    </queryModel>
  </extension>