syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache Syncope > SynchronizationActionsClass
Date Tue, 23 Oct 2012 11:40:00 GMT
<html>
<head>
    <base href="https://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/2042/9/3/_/styles/combined.css?spaceKey=SYNCOPE&amp;forWysiwyg=true"
type="text/css">
    </head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="https://cwiki.apache.org/confluence/display/SYNCOPE/SynchronizationActionsClass">SynchronizationActionsClass</a></h2>
    <h4>Page <b>edited</b> by             <a href="https://cwiki.apache.org/confluence/display/~ilgrosso">Francesco
Chicchiricco</a>
    </h4>
        <br/>
                         <h4>Changes (1)</h4>
                                 
    
<div id="page-diffs">
                    <table class="diff" cellpadding="0" cellspacing="0">
    
            <tr><td class="diff-added-lines" style="background-color: #dfd;">{note:title=Version
warning}Content of this page applies to Apache Syncope Espressivo (1.0.X){note} <br></td></tr>
            <tr><td class="diff-unchanged" >h1. Introduction <br> <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
    
            </table>
    </div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <div class='panelMacro'><table class='noteMacro'><colgroup><col
width='24'><col></colgroup><tr><td valign='top'><img src="/confluence/images/icons/emoticons/warning.gif"
width="16" height="16" align="absmiddle" alt="" border="0"></td><td><b>Version
warning</b><br />Content of this page applies to Apache Syncope Espressivo (1.0.X)</td></tr></table></div>
<h1><a name="SynchronizationActionsClass-Introduction"></a>Introduction</h1>

<p>A synchronization action class is a Java class that implements some specific actions
to be performed before and after synchronization.</p>

<h1><a name="SynchronizationActionsClass-Implementation"></a>Implementation</h1>

<p>A synchronization action class is a Java implementation of the <em>SyncJobActions</em>
interface provided below.</p>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
<span class="code-keyword">package</span> org.apache.syncope.core.scheduling;

<span class="code-keyword">import</span> java.util.List;
<span class="code-keyword">import</span> org.identityconnectors.framework.common.objects.SyncDelta;
<span class="code-keyword">import</span> org.quartz.JobExecutionException;
<span class="code-keyword">import</span> org.apache.syncope.client.mod.UserMod;
<span class="code-keyword">import</span> org.apache.syncope.client.to.UserTO;

/**
 * Interface <span class="code-keyword">for</span> actions to be performed during
SyncJob execution.
 */
<span class="code-keyword">public</span> <span class="code-keyword">interface</span>
SyncJobActions {

    void beforeAll(List&lt;SyncDelta&gt; deltas)
            <span class="code-keyword">throws</span> JobExecutionException;

    void beforeCreate(SyncDelta delta, UserTO user)
            <span class="code-keyword">throws</span> JobExecutionException;

    void beforeUpdate(SyncDelta delta, UserTO user, UserMod userMod)
            <span class="code-keyword">throws</span> JobExecutionException;

    void beforeDelete(SyncDelta delta, UserTO user)
            <span class="code-keyword">throws</span> JobExecutionException;

    void after(SyncDelta delta, UserTO user, SyncResult result)
            <span class="code-keyword">throws</span> JobExecutionException;

    void afterAll(List&lt;SyncDelta&gt; deltas, List&lt;SyncResult&gt; results)
            <span class="code-keyword">throws</span> JobExecutionException;
}
</pre>
</div></div>

<p>If a <em>Synchronization Actions Class</em> has been specified for a
certain <a href="/confluence/display/SYNCOPE/Tasks#Tasks-SynchronizationTask">Synchronization
Task</a>, <em>SyncJobActions</em>'s implemented methods will be executed
during synchronization:</p>

<ul>
	<li><em>beforeAll(...)</em> will be executed before to start synchronization;</li>
	<li><em>beforeCreate(...)</em> will be executed before each local create
of a new user retrieved during synchronization;</li>
	<li><em>beforeUpdate(...)</em> will be executed before each local update
of an existing user retrieved during synchronization;</li>
	<li><em>beforeDelete(...)</em> will be executed before each local delete
of a user removed from synchronized external resource;</li>
	<li><em>after(...)</em> will be executed after each single user synchronization;</li>
	<li><em>afterAll(...)</em> will be executed after synchronization process
completion.</li>
</ul>


<h1><a name="SynchronizationActionsClass-Deploy"></a>Deploy</h1>

<p>A synchronization actions class can be deployed:</p>

<ul>
	<li>at project definition time
	<ul>
		<li>by adding own implementation into the <a href="/confluence/display/SYNCOPE/Create+a+new+Syncope+project#CreateanewSyncopeproject-Createnewproject">overlay
project</a>, before to build Syncope.</li>
	</ul>
	</li>
	<li>at run-time
	<ul>
		<li>by adding into the container classpath own implementation (container must be re-started
to reload the classpath).</li>
	</ul>
	</li>
</ul>

    </div>
        <div id="commentsSection" class="wiki-content pageSection">
        <div style="float: right;">
            <a href="https://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey">Change Notification Preferences</a>
        </div>
        <a href="https://cwiki.apache.org/confluence/display/SYNCOPE/SynchronizationActionsClass">View
Online</a>
        |
        <a href="https://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=27841556&revisedVersion=7&originalVersion=6">View
Changes</a>
                |
        <a href="https://cwiki.apache.org/confluence/display/SYNCOPE/SynchronizationActionsClass?showComments=true&amp;showCommentArea=true#addcomment">Add
Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message