Platform Explorer / Nuxeo Platform LTS 2019 10.10

Contribution org.nuxeo.ecm.multi.tenant.content.views.es--contentViews

This contribution is part of XML component org.nuxeo.ecm.multi.tenant.content.views.es inside nuxeo-multi-tenant-jsf-10.10-HF21.jar /OSGI-INF/contentviews-es-contrib.xml

Extension Point

Extension point contentViews of component ContentViewService.

Registration Order

2
The registration order represents the order in which this contribution was registered on its target extention point. This will impact the override/merge behaviour when it is implemented on the target service, and is useful for proper customization of existing contributions.
You can influence this order by adding "require" tags in the containing component declaration, to make sure it is resolved after another component (see "Resolution Order" on components).

Contributed Items

  • <contentView name="TENANT_HISTORY">
    
          <title>label.contentview.document.history</title>
          <translateTitle>true</translateTitle>
          <showTitle>true</showTitle>
    
          <genericPageProvider class="org.nuxeo.elasticsearch.audit.pageprovider.ESAuditPageProvider" name="EVENTS_VIEW">
            <property name="coreSession">#{documentManager}</property>
            <property name="generateUIComments">false</property>
            <whereClause docType="BasicAuditSearch">
              <fixedPart>
                {
                  "bool": {
                    "must": {
                      "prefix": {
                        "docPath.children": {
                          "value": "?"
                        }
                      }
                    }
                  }
                }
              </fixedPart>
    
              <predicate operator="BETWEEN" parameter="eventDate">
                <field name="startDate" schema="basicauditsearch"/>
                <field name="endDate" schema="basicauditsearch"/>
              </predicate>
              <predicate operator="=" parameter="category">
                <field name="eventCategory" schema="basicauditsearch"/>
              </predicate>
              <predicate operator="IN" parameter="eventId">
                <field name="eventIds" schema="basicauditsearch"/>
              </predicate>
              <predicate operator="=" parameter="principalName">
                <field name="principalName" schema="basicauditsearch"/>
              </predicate>
            </whereClause>
            <parameter>#{currentDocument.path}</parameter>
            <sort ascending="false" column="eventDate"/>
            <pageSize>10</pageSize>
            <maxPageSize>1000</maxPageSize>
          </genericPageProvider>
    
          <searchLayout filterDisplayType="quick" name="basicauditsearch"/>
          <showFilterForm>true</showFilterForm>
    
          <showPageSizeSelector>true</showPageSizeSelector>
          <useGlobalPageSize>true</useGlobalPageSize>
          <refresh>
            <event>documentChanged</event>
            <event>documentCreated</event>
            <event>documentChildrenChanged</event>
          </refresh>
          <cacheSize>10</cacheSize>
          <cacheKey>#{currentDocument.repositoryName}_#{currentDocument.id}</cacheKey>
    
          <resultLayouts>
            <layout iconPath="/icons/document_listing_icon.png" name="tenant_event_listing" showCSVExport="true" showPDFExport="false" title="history_listing" translateTitle="true"/>
          </resultLayouts>
    
        </contentView>

XML Source

<extension point="contentViews" target="org.nuxeo.ecm.platform.ui.web.ContentViewService">

    <contentView name="TENANT_HISTORY">

      <title>label.contentview.document.history</title>
      <translateTitle>true</translateTitle>
      <showTitle>true</showTitle>

      <genericPageProvider class="org.nuxeo.elasticsearch.audit.pageprovider.ESAuditPageProvider" name="EVENTS_VIEW">
        <property name="coreSession">#{documentManager}</property>
        <property name="generateUIComments">false</property>
        <whereClause docType="BasicAuditSearch">
          <fixedPart>
            {
              "bool": {
                "must": {
                  "prefix": {
                    "docPath.children": {
                      "value": "?"
                    }
                  }
                }
              }
            }
          </fixedPart>

          <predicate operator="BETWEEN" parameter="eventDate">
            <field name="startDate" schema="basicauditsearch"/>
            <field name="endDate" schema="basicauditsearch"/>
          </predicate>
          <predicate operator="=" parameter="category">
            <field name="eventCategory" schema="basicauditsearch"/>
          </predicate>
          <predicate operator="IN" parameter="eventId">
            <field name="eventIds" schema="basicauditsearch"/>
          </predicate>
          <predicate operator="=" parameter="principalName">
            <field name="principalName" schema="basicauditsearch"/>
          </predicate>
        </whereClause>
        <parameter>#{currentDocument.path}</parameter>
        <sort ascending="false" column="eventDate"/>
        <pageSize>10</pageSize>
        <maxPageSize>1000</maxPageSize>
      </genericPageProvider>

      <searchLayout filterDisplayType="quick" name="basicauditsearch"/>
      <showFilterForm>true</showFilterForm>

      <showPageSizeSelector>true</showPageSizeSelector>
      <useGlobalPageSize>true</useGlobalPageSize>
      <refresh>
        <event>documentChanged</event>
        <event>documentCreated</event>
        <event>documentChildrenChanged</event>
      </refresh>
      <cacheSize>10</cacheSize>
      <cacheKey>#{currentDocument.repositoryName}_#{currentDocument.id}</cacheKey>

      <resultLayouts>
        <layout iconPath="/icons/document_listing_icon.png" name="tenant_event_listing" showCSVExport="true" showPDFExport="false" title="history_listing" translateTitle="true"/>
      </resultLayouts>

    </contentView>

  </extension>