<?xml version="1.0" encoding="UTF-8"?>

<filterdef>
  <definition>
    <category>department</category>
    <initial>true</initial>
    <default>default</default>
    <scope>auto</scope>
    <attribute>dn</attribute>
    <attribute>objectClass</attribute>
    <attribute>ou</attribute>
    <attribute>description</attribute>
  </definition>

  <search>
    <tag>default</tag>
    <label>Default filter</label>
    <query>
      <backend>DEPARTMENT</backend>
      <filter>(&amp;(objectClass=gosaDepartment)(|(dc=$)(ou=$)(o=$)(l=$)(c=$)))</filter>
    </query>
    <autocomplete>
      <frequency>0.5</frequency>
      <characters>3</characters>
      <attribute>ou</attribute>
      <attribute>dc</attribute>
      <attribute>c</attribute>
      <attribute>l</attribute>
      <attribute>o</attribute>
    </autocomplete>
  </search>

  <search>
    <tag>ou</tag>
    <label>Organizational Unit</label>
    <query>
      <backend>DEPARTMENT</backend>
      <filter>(&amp;(objectClass=gosaDepartment)(objectClass=organizationalUnit)(ou=$))</filter>
    </query>
    <autocomplete>
      <frequency>0.5</frequency>
      <characters>3</characters>
      <attribute>ou</attribute>
    </autocomplete>
  </search>

  <search>
    <tag>c</tag>
    <label>Country</label>
    <query>
      <backend>DEPARTMENT</backend>
      <filter>(&amp;(objectClass=gosaDepartment)(objectClass=country)(c=$))</filter>
    </query>
    <autocomplete>
      <frequency>0.5</frequency>
      <characters>3</characters>
      <attribute>c</attribute>
    </autocomplete>
  </search>

  <search>
    <tag>l</tag>
    <label>Locality</label>
    <query>
      <backend>DEPARTMENT</backend>
      <filter>(&amp;(objectClass=gosaDepartment)(objectClass=locality)(l=$))</filter>
    </query>
    <autocomplete>
      <frequency>0.5</frequency>
      <characters>3</characters>
      <attribute>l</attribute>
    </autocomplete>
  </search>

  <search>
    <tag>dc</tag>
    <label>Domain component</label>
    <query>
      <backend>DEPARTMENT</backend>
      <filter>(&amp;(objectClass=gosaDepartment)(objectClass=dcObject)(dc=$))</filter>
    </query>
    <autocomplete>
      <frequency>0.5</frequency>
      <characters>3</characters>
      <attribute>dc</attribute>
    </autocomplete>
  </search>

  <search>
    <tag>o</tag>
    <label>Organization</label>
    <query>
      <backend>DEPARTMENT</backend>
      <filter>(&amp;(objectClass=gosaDepartment)(objectClass=organization)(o=$))</filter>
    </query>
    <autocomplete>
      <frequency>0.5</frequency>
      <characters>3</characters>
      <attribute>o</attribute>
    </autocomplete>
  </search>

  <search>
    <tag>domain</tag>
    <label>Domain</label>
    <query>
      <backend>DEPARTMENT</backend>
      <filter>(&amp;(objectClass=gosaDepartment)(objectClass=domain)(dc=$))</filter>
    </query>
    <autocomplete>
      <frequency>0.5</frequency>
      <characters>3</characters>
      <attribute>dc</attribute>
    </autocomplete>
  </search>
</filterdef>
