<configure
    xmlns="http://namespaces.zope.org/zope"
    xmlns:browser="http://namespaces.zope.org/browser"
    xmlns:plone="http://namespaces.plone.org/plone">
              
    <!-- Portal type condition -->
              
    <adapter factory=".portaltype.PortalTypeConditionExecutor" />

    <browser:page 
      for="plone.app.contentrules.browser.interfaces.IRuleConditionAdding"
      name="plone.conditions.PortalType"
      class=".portaltype.PortalTypeAddForm"
      permission="cmf.ManagePortal"
      />

    <browser:page 
      for="plone.app.contentrules.conditions.portaltype.IPortalTypeCondition"
      name="edit"
      class=".portaltype.PortalTypeEditForm"
      permission="cmf.ManagePortal"
      />

    <plone:ruleCondition
        name="plone.conditions.PortalType"
        title="Content type"
        description="Apply only when the current content object is of a particular type"
        for="*"
        event="zope.component.interfaces.IObjectEvent"
        addview="plone.conditions.PortalType"
        editview="edit"
        />
  
    <!-- File extension condition -->

    <adapter factory=".fileextension.FileExtensionConditionExecutor" />

    <browser:page 
      for="plone.app.contentrules.browser.interfaces.IRuleConditionAdding"
      name="plone.conditions.FileExtension"
      class=".fileextension.FileExtensionAddForm"
      permission="cmf.ManagePortal"
      />

    <browser:page 
      for="plone.app.contentrules.conditions.fileextension.IFileExtensionCondition"
      name="edit"
      class=".fileextension.FileExtensionEditForm"
      permission="cmf.ManagePortal"
      />

    <plone:ruleCondition
        name="plone.conditions.FileExtension"
        title="File Extension"
        description="Apply only to a particular file extension"
        for="*"
        event="zope.component.interfaces.IObjectEvent"
        addview="plone.conditions.FileExtension"
        editview="edit"
        />
    
    <!-- Workflow state condition (for any object) -->
    
    <adapter factory=".wfstate.WorkflowStateConditionExecutor" />

    <browser:page 
      for="plone.app.contentrules.browser.interfaces.IRuleConditionAdding"
      name="plone.conditions.WorkflowState"
      class=".wfstate.WorkflowStateAddForm"
      permission="cmf.ManagePortal"
      />

    <browser:page 
      for="plone.app.contentrules.conditions.wfstate.IWorkflowStateCondition"
      name="edit"
      class=".wfstate.WorkflowStateEditForm"
      permission="cmf.ManagePortal"
      />

    <plone:ruleCondition
        name="plone.conditions.WorkflowState"
        title="Workflow state"
        description="Apply only to a objects in a particular workflow state"
        for="*"
        event="zope.component.interfaces.IObjectEvent"
        addview="plone.conditions.WorkflowState"
        editview="edit"
        />
    
    <!-- Workflow transition condition (for any object) -->
    
    <adapter factory=".wftransition.WorkflowTransitionConditionExecutor" />

    <browser:page 
      for="plone.app.contentrules.browser.interfaces.IRuleConditionAdding"
      name="plone.conditions.WorkflowTransition"
      class=".wftransition.WorkflowTransitionAddForm"
      permission="cmf.ManagePortal"
      />

    <browser:page 
      for="plone.app.contentrules.conditions.wftransition.IWorkflowTransitionCondition"
      name="edit"
      class=".wftransition.WorkflowTransitionEditForm"
      permission="cmf.ManagePortal"
      />

    <plone:ruleCondition
        name="plone.conditions.WorkflowTransition"
        title="Workflow transition"
        description="Apply only when the executed transition was as specified"
        for="*"
        event="Products.CMFCore.interfaces.IActionSucceededEvent"
        addview="plone.conditions.WorkflowTransition"
        editview="edit"
        />
    
    <!-- Group condition -->
    <adapter factory=".group.GroupConditionExecutor" />

    <browser:page 
      for="plone.app.contentrules.browser.interfaces.IRuleConditionAdding"
      name="plone.conditions.Group"
      class=".group.GroupAddForm"
      permission="cmf.ManagePortal"
      />

    <browser:page 
      for="plone.app.contentrules.conditions.group.IGroupCondition"
      name="edit"
      class=".group.GroupEditForm"
      permission="cmf.ManagePortal"
      />

    <plone:ruleCondition
        name="plone.conditions.Group"
        title="User's group"
        description="Apply only when the current user is in the given group"
        for="*"
        event="*"
        addview="plone.conditions.Group"
        editview="edit"
        />
    
    <!-- Role condition -->
    <adapter factory=".role.RoleConditionExecutor" />

    <browser:page 
      for="plone.app.contentrules.browser.interfaces.IRuleConditionAdding"
      name="plone.conditions.Role"
      class=".role.RoleAddForm"
      permission="cmf.ManagePortal"
      />

    <browser:page 
      for="plone.app.contentrules.conditions.role.IRoleCondition"
      name="edit"
      class=".role.RoleEditForm"
      permission="cmf.ManagePortal"
      />

    <plone:ruleCondition
        name="plone.conditions.Role"
        title="User's role"
        description="Apply only when the current user has the given role"
        for="*"
        event="*"
        addview="plone.conditions.Role"
        editview="edit"
        />
    
</configure>