[ 
https://issues.apache.org/jira/browse/SLING-3901?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14144784#comment-14144784
 ] 

Marius Petria edited comment on SLING-3901 at 9/23/14 1:39 PM:
---------------------------------------------------------------

Removed ReplicationRules and implemented replication triggering with 
ReplicationTriggers. (the patch depends on SLING-3900)

Triggers can be configured 

1. as a standalone component using  
org.apache.sling.replication.agent.impl.DefaultReplicationComponentFactory
{code}
{
    "jcr:primaryType" : "sling:OsgiConfig",
    "name" : "test-scheduled-event",

    "kind" : "trigger",

    "properties" : [
        "type=scheduledEvent",
        "action=poll",
        "seconds=30"
    ]
}
{code}

2. as a subcomponent of an agent using a syntax as follows:
{code}
  "trigger0" : [
        "type=scheduledEvent",
        "action=poll",
        "seconds=30"
    ]
{code}

For remote triggers I have implemented a configuration relying on a 
transportAuthenticationProvider, that does not require the trigger to use an 
explicit username and password.


was (Author: mpetria):
Removed ReplicationRules and implemented replication triggering with 
ReplicationTriggers.

Triggers can be configured 

1. as a standalone component using  
org.apache.sling.replication.agent.impl.DefaultReplicationComponentFactory
{code}
{
    "jcr:primaryType" : "sling:OsgiConfig",
    "name" : "test-scheduled-event",

    "kind" : "trigger",

    "properties" : [
        "type=scheduledEvent",
        "action=poll",
        "seconds=30"
    ]
}
{code}

2. as a subcomponent of an agent using a syntax as follows:
{code}
  "trigger0" : [
        "type=scheduledEvent",
        "action=poll",
        "seconds=30"
    ]
{code}

> Allow configuration of triggers in agent configuration file
> -----------------------------------------------------------
>
>                 Key: SLING-3901
>                 URL: https://issues.apache.org/jira/browse/SLING-3901
>             Project: Sling
>          Issue Type: Improvement
>          Components: Replication
>            Reporter: Marius Petria
>         Attachments: SLING-3901.patch
>
>
> Currently only rules are configurable for an agent. However rules have a 
> verbose configuration scheme that is inappropriate for more complex 
> configuration. We should be able to configure directly triggers on agents 
> with key value pairs configuration. (see SLING-3898 for a similar config 
> style)
> {code}
>  "triggers" : [
>         "trigger0/type=scheduled",
>         "trigger0/action=poll",
>         "trigger0/interval=30",
>         
>         "trigger1/type=remote",
>         
> "trigger1/endpoints[0]=http://localhost:4503/libs/sling/replication/services/triggers/content-event?3600000";,
>         "trigger1/authentication.properties[user]=admin",
>         "trigger1/authentication.properties[password]=admin",
>         
> "trigger1/endpoints[0]=http://localhost:4503/libs/sling/replication/services/exporters/reverse";,
>         "trigger1/authenticationFactory/type=service",
>         "trigger1/authenticationFactory/name=user"
>     ]
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to