http://git-wip-us.apache.org/repos/asf/syncope/blob/61a7fdd3/core/persistence-jpa/src/test/resources/domains/MasterContent.xml
----------------------------------------------------------------------
diff --git a/core/persistence-jpa/src/test/resources/domains/MasterContent.xml 
b/core/persistence-jpa/src/test/resources/domains/MasterContent.xml
index 02f9529..805bc4c 100644
--- a/core/persistence-jpa/src/test/resources/domains/MasterContent.xml
+++ b/core/persistence-jpa/src/test/resources/domains/MasterContent.xml
@@ -106,13 +106,13 @@ under the License.
                mandatoryCondition="false" multivalue="1" uniqueConstraint="0" 
readonly="0"/>
   
   <!-- sample policies -->
-  <SyncPolicy id="1" description="a sync policy" type="SYNC" 
+  <PullPolicy id="1" description="a pull policy" type="PULL" 
               specification='{"conflictResolutionAction":"IGNORE"'/>
   <PasswordPolicy id="2" description="a password policy" type="PASSWORD" 
                   historyLength="1" allowNullPassword="1"/> 
   <PasswordRuleConfInstance id="2" passwordPolicy_id="2"
                             
serializedInstance='{"@class":"org.apache.syncope.common.lib.policy.DefaultPasswordRuleConf","maxLength":0,"minLength":8,"nonAlphanumericRequired":false,"alphanumericRequired":false,"digitRequired":false,"lowercaseRequired":false,"uppercaseRequired":false,"mustStartWithDigit":false,"mustntStartWithDigit":false,"mustEndWithDigit":false,"mustntEndWithDigit":false,"mustStartWithNonAlpha":false,"mustStartWithAlpha":false,"mustntStartWithNonAlpha":false,"mustntStartWithAlpha":false,"mustEndWithNonAlpha":false,"mustEndWithAlpha":false,"mustntEndWithNonAlpha":false,"mustntEndWithAlpha":false,"wordsNotPermitted":[],"schemasNotPermitted":[],"prefixesNotPermitted":["notpermitted1","notpermitted2"],"suffixesNotPermitted":[]}'/>
-  <SyncPolicy id="3" description="sync policy 2" type="SYNC" 
+  <PullPolicy id="3" description="pull policy 2" type="PULL" 
               
specification='{"conflictResolutionAction":"ALL","correlationRules":{"USER":"[\"username\",\"firstname\"]"}}'/>
   <PasswordPolicy id="4" description="sample password policy" type="PASSWORD"
                   historyLength="0"  allowNullPassword="1"/> 
@@ -126,13 +126,13 @@ under the License.
                  propagateSuspension="0" maxAuthenticationAttempts="3"/>
   <AccountRuleConfInstance id="6" accountPolicy_id="6"
                            
serializedInstance='{"@class":"org.apache.syncope.common.lib.policy.DefaultAccountRuleConf","maxLength":0,"minLength":4,"pattern":null,"allUpperCase":false,"allLowerCase":false,"wordsNotPermitted":[],"schemasNotPermitted":[],"prefixesNotPermitted":["notpermitted1","notpermitted2"],"suffixesNotPermitted":[]}'/>
-  <SyncPolicy id="7" description="sync policy 1" type="SYNC" 
+  <PullPolicy id="7" description="pull policy 1" type="PULL" 
               specification='{"conflictResolutionAction":"IGNORE"}'/>
   <PasswordPolicy id="8" description="sample password policy" type="PASSWORD"
                   historyLength="0" allowNullPassword="0"/> 
   <PasswordRuleConfInstance id="8" passwordPolicy_id="8"
                             
serializedInstance='{"@class":"org.apache.syncope.common.lib.policy.DefaultPasswordRuleConf","maxLength":0,"minLength":10,"nonAlphanumericRequired":true,"alphanumericRequired":false,"digitRequired":true,"lowercaseRequired":true,"uppercaseRequired":true,"mustStartWithDigit":true,"mustntStartWithDigit":false,"mustEndWithDigit":true,"mustntEndWithDigit":false,"mustStartWithNonAlpha":false,"mustStartWithAlpha":false,"mustntStartWithNonAlpha":false,"mustntStartWithAlpha":false,"mustEndWithNonAlpha":false,"mustEndWithAlpha":false,"mustntEndWithNonAlpha":false,"mustntEndWithAlpha":false,"wordsNotPermitted":[],"schemasNotPermitted":[],"prefixesNotPermitted":["notpermitted1","notpermitted2"],"suffixesNotPermitted":[]}'/>
-  <SyncPolicy id="9" description="sync policy for java rule" type="SYNC" 
+  <PullPolicy id="9" description="pull policy for java rule" type="PULL" 
               specification='{"conflictResolutionAction":"IGNORE"}'/>
 
   <RelationshipType name="inclusion" description="Models the act that an 
object is included in another"/>
@@ -565,8 +565,8 @@ under the License.
   <ConnInstance id="107" bundleName="net.tirasa.connid.bundles.db.table" 
                 
location="connid://${testconnectorserver.key}@localhost:${testconnectorserver.port}"
                 
connectorName="net.tirasa.connid.bundles.db.table.DatabaseTableConnector" 
-                displayName="H2-testsync" version="${connid.database.version}"
-                
jsonConf='[{"schema":{"name":"changeLogColumn","displayName":"Change Log Column 
(Sync)","helpMessage":"=&lt;b&gt;Change Log Column&lt;/b&gt;&lt;br&gt;The 
change log column store the latest change time. Providing this value the Sync 
capabilities are 
activated.","type":"java.lang.String","required":false,"order":21,"confidential":false,"defaultValues":null},"overridable":false,"values":[]},{"schema":{"name":"nativeTimestamps","displayName":"Native
 Timestamps ","helpMessage":"&lt;b&gt;Native 
Timestamps&lt;/b&gt;&lt;br&gt;Select to retrieve Timestamp data type of the 
columns in java.sql.Timestamp format from the database 
table.","type":"boolean","required":false,"order":18,"confidential":false,"defaultValues":null},"overridable":false,"values":["false"]},{"schema":{"name":"cipherAlgorithm","displayName":"Password
 cipher algorithm (defaults to CLEARTEXT)","helpMessage":"Cipher algorithm used 
to encode password before to store it onto the database table.\nSpecify one of 
th
 e values among CLEARTEXT,AES, MD5, SHA1, SHA256 or a custom implementation 
identified by its class 
name.","type":"java.lang.String","required":false,"order":24,"confidential":false,"defaultValues":null},"overridable":false,"values":[]},{"schema":{"name":"enabledStatusValue","displayName":"Enabled
 Status Value","helpMessage":"&lt;b&gt;Enabled Status 
Value&lt;/b&gt;&lt;br&gt;Enter the value for enabled 
status.","type":"java.lang.String","required":false,"order":12,"confidential":false,"defaultValues":null},"overridable":false,"values":[]},{"schema":{"name":"retrievePassword","displayName":"Retrieve
 password","helpMessage":"Specify if password must be retrieved by 
default.","type":"boolean","required":true,"order":27,"confidential":false,"defaultValues":null},"overridable":false,"values":["false"]},{"schema":{"name":"datasource","displayName":"Datasource
 Path","helpMessage":"&lt;b&gt;JDBC Data Source 
Name/Path&lt;/b&gt;&lt;br&gt;Enter the JDBC Data Source Name/Path to connect to 
the Or
 acle server. If specified, connector will only try to connect using Datasource 
and ignore other resource parameters specified.&lt;br&gt;the example value is: 
&lt;CODE&gt;jdbc/SampleDataSourceName&lt;/CODE&gt;","type":"java.lang.String","required":false,"order":22,"confidential":false,"defaultValues":null},"overridable":false,"values":[]},{"schema":{"name":"allNative","displayName":"All
 native","helpMessage":"&lt;b&gt;All native&lt;/b&gt;&lt;br&gt;Select to 
retrieve all data type of the columns in a native format from the database 
table.","type":"boolean","required":false,"order":19,"confidential":false,"defaultValues":null},"overridable":false,"values":["false"]},{"schema":{"name":"user","displayName":"User","helpMessage":"&lt;b&gt;User&lt;/b&gt;&lt;br&gt;Enter
 the name of the mandatory Database user with permission to account 
table.","type":"java.lang.String","required":false,"order":4,"confidential":false,"defaultValues":null},"overridable":false,"values":["sa"]},{"schema":{"name"
 :"pwdEncodeToLowerCase","displayName":"Force password encoding to lower 
case","helpMessage":"Force password encoding to lower 
case.","type":"boolean","required":false,"order":26,"confidential":false,"defaultValues":null},"overridable":false,"values":["false"]},{"schema":{"name":"jdbcUrlTemplate","displayName":"JDBC
 Connection URL","helpMessage":"&lt;b&gt;JDBC Connection 
URL&lt;/b&gt;&lt;br&gt;Specify the JDBC Driver Connection URL.&lt;br&gt; Oracle 
template is jdbc:oracle:thin:@[host]:[port(1521)]:[DB].&lt;br&gt;  MySQL 
template is jdbc:mysql://[host]:[port(3306)]/[db], for more info, read the JDBC 
driver documentation.&lt;br&gt;Could be empty if datasource is 
provided.","type":"java.lang.String","required":false,"order":15,"confidential":false,"defaultValues":null},"overridable":false,"values":["${testdb.url}"]},{"schema":{"name":"keyColumn","displayName":"Key
 Column","helpMessage":"&lt;b&gt;Key Column&lt;/b&gt;&lt;br&gt;This mandatory 
column value will be used as the unique identi
 fier for rows in the 
table.&lt;br&gt;","type":"java.lang.String","required":true,"order":8,"confidential":false,"defaultValues":null},"overridable":false,"values":["id"]},{"schema":{"name":"validConnectionQuery","displayName":"Validate
 Connection Query","helpMessage":"&lt;b&gt;Validate Connection 
Query&lt;/b&gt;&lt;br&gt;There can be specified the check connection alive 
query. If empty, default implementation will test it using the switch on/off 
the autocommit. Some select 1 from dummy table could be more 
efficient.","type":"java.lang.String","required":false,"order":20,"confidential":false,"defaultValues":null},"overridable":false,"values":[]},{"schema":{"name":"rethrowAllSQLExceptions","displayName":"Rethrow
 all SQLExceptions","helpMessage":"If this is not checked, SQL statements which 
throw SQLExceptions with a 0 ErrorCode will be have the exception caught and 
suppressed. Check it to have exceptions with 0 ErrorCodes 
rethrown.","type":"boolean","required":false,"order":17,"confid
 
ential":false,"defaultValues":null},"overridable":false,"values":["false"]},{"schema":{"name":"passwordColumn","displayName":"Password
 Column","helpMessage":"&lt;b&gt;Password Column&lt;/b&gt;&lt;br&gt;Enter the 
name of the column in the table that will hold the password values. If empty, 
no validation on resource and passwords are 
activated.","type":"java.lang.String","required":false,"order":9,"confidential":false,"defaultValues":null},"overridable":false,"values":[]},{"schema":{"name":"jndiProperties","displayName":"Initial
 JNDI Properties","helpMessage":"&lt;b&gt;Initial JNDI 
Properties&lt;/b&gt;&lt;br&gt;Could be empty or enter the JDBC JNDI Initial 
context factory, context provider in a format: key = 
value.","type":"[Ljava.lang.String;","required":false,"order":23,"confidential":false,"defaultValues":null},"overridable":false,"values":[]},{"schema":{"name":"password","displayName":"User
 Password","helpMessage":"&lt;b&gt;User Password&lt;/b&gt;&lt;br&gt;Enter a 
user account tha
 t has permission to access accounts 
table.","type":"org.identityconnectors.common.security.GuardedString","required":false,"order":5,"confidential":true,"defaultValues":null},"overridable":false,"values":["sa"]},{"schema":{"name":"host","displayName":"Host","helpMessage":"&lt;b&gt;Host&lt;/b&gt;&lt;br&gt;Enter
 the name of the host where the database is 
running.","type":"java.lang.String","required":false,"order":2,"confidential":false,"defaultValues":null},"overridable":false,"values":[]},{"schema":{"name":"port","displayName":"Port","helpMessage":"&lt;b&gt;TCP
 Port&lt;/b&gt;&lt;br&gt;Enter the port number the database server is listening 
on.","type":"java.lang.String","required":false,"order":3,"confidential":false,"defaultValues":null},"overridable":false,"values":[]},{"schema":{"name":"statusColumn","displayName":"Status
 Column","helpMessage":"&lt;b&gt;Status Column&lt;/b&gt;&lt;br&gt;Enter the 
name of the column in the table that will hold the status values. If empty 
enabled and
  disabled operation wont be 
performed.","type":"java.lang.String","required":false,"order":10,"confidential":false,"defaultValues":null},"overridable":false,"values":[]},{"schema":{"name":"pwdEncodeToUpperCase","displayName":"Force
 password encoding to upper case","helpMessage":"Force password encoding to 
upper 
case.","type":"boolean","required":false,"order":25,"confidential":false,"defaultValues":null},"overridable":false,"values":["false"]},{"schema":{"name":"enableEmptyString","displayName":"Enable
 writing empty string","helpMessage":"&lt;b&gt;Enable writing empty 
string&lt;/b&gt;&lt;br&gt;Select to enable support for writing an empty 
strings, instead of a NULL value, in character based columns defined as 
not-null in the table schema. This option does not influence the way strings 
are written for Oracle based tables. By default empty strings are written as a 
NULL 
value.","type":"boolean","required":false,"order":16,"confidential":false,"defaultValues":null},"overridable":false,"
 
values":["false"]},{"schema":{"name":"database","displayName":"Database","helpMessage":"&lt;b&gt;Database&lt;/b&gt;&lt;br&gt;Enter
 the name of the database on the database server that contains the 
table.","type":"java.lang.String","required":false,"order":6,"confidential":false,"defaultValues":null},"overridable":false,"values":[]},{"schema":{"name":"defaultStatusValue","displayName":"Default
 Status Value","helpMessage":"&lt;b&gt;Default Status 
Value&lt;/b&gt;&lt;br&gt;Enter the value for status in case of status not 
specified.","type":"java.lang.String","required":false,"order":13,"confidential":false,"defaultValues":null},"overridable":false,"values":[]},{"schema":{"name":"table","displayName":"Table","helpMessage":"&lt;b&gt;Table&lt;/b&gt;&lt;br&gt;Enter
 the name of the table in the database that contains the 
accounts.","type":"java.lang.String","required":true,"order":7,"confidential":false,"defaultValues":null},"overridable":false,"values":["testsync"]},{"schema":{"name":"disab
 ledStatusValue","displayName":"Disabled Status 
Value","helpMessage":"&lt;b&gt;Disabled Status Value&lt;/b&gt;&lt;br&gt;Enter 
the value for disabled 
status.","type":"java.lang.String","required":false,"order":11,"confidential":false,"defaultValues":null},"overridable":false,"values":[]},{"schema":{"name":"jdbcDriver","displayName":"JDBC
 Driver","helpMessage":"&lt;b&gt;JDBC Driver&lt;/b&gt;&lt;br&gt;Specify the 
JDBC Driver class name. Oracle is oracle.jdbc.driver.OracleDriver. MySQL is 
org.gjt.mm.mysql.Driver.&lt;br&gt;Could be empty if datasource is 
provided.","type":"java.lang.String","required":false,"order":14,"confidential":false,"defaultValues":null},"overridable":false,"values":["org.h2.Driver"]},{"schema":{"name":"quoting","displayName":"Name
 Quoting","helpMessage":"&lt;b&gt;Name Quoting&lt;/b&gt;&lt;br&gt;Select 
whether database column names for this resource should be quoted, and the 
quoting characters. By default, database column names are not quoted (None). 
For other selec
 tions (Single, Double, Back, or Brackets), column names will appear between 
single quotes, double quotes, back quotes, or brackets in the SQL generated to 
access the 
database.","type":"java.lang.String","required":false,"order":1,"confidential":false,"defaultValues":null},"overridable":false,"values":[]},{"schema":{"name":"cipherKey","displayName":"Password
 cipher key","helpMessage":"Specify key in case of reversible 
algorithm.","type":"java.lang.String","required":false,"order":25,"confidential":false,"defaultValues":null},"overridable":false,"values":[]}]'/>
+                displayName="H2-testpull" version="${connid.database.version}"
+                
jsonConf='[{"schema":{"name":"changeLogColumn","displayName":"Change Log Column 
(Sync)","helpMessage":"=&lt;b&gt;Change Log Column&lt;/b&gt;&lt;br&gt;The 
change log column store the latest change time. Providing this value the Pull 
capabilities are 
activated.","type":"java.lang.String","required":false,"order":21,"confidential":false,"defaultValues":null},"overridable":false,"values":[]},{"schema":{"name":"nativeTimestamps","displayName":"Native
 Timestamps ","helpMessage":"&lt;b&gt;Native 
Timestamps&lt;/b&gt;&lt;br&gt;Select to retrieve Timestamp data type of the 
columns in java.sql.Timestamp format from the database 
table.","type":"boolean","required":false,"order":18,"confidential":false,"defaultValues":null},"overridable":false,"values":["false"]},{"schema":{"name":"cipherAlgorithm","displayName":"Password
 cipher algorithm (defaults to CLEARTEXT)","helpMessage":"Cipher algorithm used 
to encode password before to store it onto the database table.\nSpecify one of 
th
 e values among CLEARTEXT,AES, MD5, SHA1, SHA256 or a custom implementation 
identified by its class 
name.","type":"java.lang.String","required":false,"order":24,"confidential":false,"defaultValues":null},"overridable":false,"values":[]},{"schema":{"name":"enabledStatusValue","displayName":"Enabled
 Status Value","helpMessage":"&lt;b&gt;Enabled Status 
Value&lt;/b&gt;&lt;br&gt;Enter the value for enabled 
status.","type":"java.lang.String","required":false,"order":12,"confidential":false,"defaultValues":null},"overridable":false,"values":[]},{"schema":{"name":"retrievePassword","displayName":"Retrieve
 password","helpMessage":"Specify if password must be retrieved by 
default.","type":"boolean","required":true,"order":27,"confidential":false,"defaultValues":null},"overridable":false,"values":["false"]},{"schema":{"name":"datasource","displayName":"Datasource
 Path","helpMessage":"&lt;b&gt;JDBC Data Source 
Name/Path&lt;/b&gt;&lt;br&gt;Enter the JDBC Data Source Name/Path to connect to 
the Or
 acle server. If specified, connector will only try to connect using Datasource 
and ignore other resource parameters specified.&lt;br&gt;the example value is: 
&lt;CODE&gt;jdbc/SampleDataSourceName&lt;/CODE&gt;","type":"java.lang.String","required":false,"order":22,"confidential":false,"defaultValues":null},"overridable":false,"values":[]},{"schema":{"name":"allNative","displayName":"All
 native","helpMessage":"&lt;b&gt;All native&lt;/b&gt;&lt;br&gt;Select to 
retrieve all data type of the columns in a native format from the database 
table.","type":"boolean","required":false,"order":19,"confidential":false,"defaultValues":null},"overridable":false,"values":["false"]},{"schema":{"name":"user","displayName":"User","helpMessage":"&lt;b&gt;User&lt;/b&gt;&lt;br&gt;Enter
 the name of the mandatory Database user with permission to account 
table.","type":"java.lang.String","required":false,"order":4,"confidential":false,"defaultValues":null},"overridable":false,"values":["sa"]},{"schema":{"name"
 :"pwdEncodeToLowerCase","displayName":"Force password encoding to lower 
case","helpMessage":"Force password encoding to lower 
case.","type":"boolean","required":false,"order":26,"confidential":false,"defaultValues":null},"overridable":false,"values":["false"]},{"schema":{"name":"jdbcUrlTemplate","displayName":"JDBC
 Connection URL","helpMessage":"&lt;b&gt;JDBC Connection 
URL&lt;/b&gt;&lt;br&gt;Specify the JDBC Driver Connection URL.&lt;br&gt; Oracle 
template is jdbc:oracle:thin:@[host]:[port(1521)]:[DB].&lt;br&gt;  MySQL 
template is jdbc:mysql://[host]:[port(3306)]/[db], for more info, read the JDBC 
driver documentation.&lt;br&gt;Could be empty if datasource is 
provided.","type":"java.lang.String","required":false,"order":15,"confidential":false,"defaultValues":null},"overridable":false,"values":["${testdb.url}"]},{"schema":{"name":"keyColumn","displayName":"Key
 Column","helpMessage":"&lt;b&gt;Key Column&lt;/b&gt;&lt;br&gt;This mandatory 
column value will be used as the unique identi
 fier for rows in the 
table.&lt;br&gt;","type":"java.lang.String","required":true,"order":8,"confidential":false,"defaultValues":null},"overridable":false,"values":["id"]},{"schema":{"name":"validConnectionQuery","displayName":"Validate
 Connection Query","helpMessage":"&lt;b&gt;Validate Connection 
Query&lt;/b&gt;&lt;br&gt;There can be specified the check connection alive 
query. If empty, default implementation will test it using the switch on/off 
the autocommit. Some select 1 from dummy table could be more 
efficient.","type":"java.lang.String","required":false,"order":20,"confidential":false,"defaultValues":null},"overridable":false,"values":[]},{"schema":{"name":"rethrowAllSQLExceptions","displayName":"Rethrow
 all SQLExceptions","helpMessage":"If this is not checked, SQL statements which 
throw SQLExceptions with a 0 ErrorCode will be have the exception caught and 
suppressed. Check it to have exceptions with 0 ErrorCodes 
rethrown.","type":"boolean","required":false,"order":17,"confid
 
ential":false,"defaultValues":null},"overridable":false,"values":["false"]},{"schema":{"name":"passwordColumn","displayName":"Password
 Column","helpMessage":"&lt;b&gt;Password Column&lt;/b&gt;&lt;br&gt;Enter the 
name of the column in the table that will hold the password values. If empty, 
no validation on resource and passwords are 
activated.","type":"java.lang.String","required":false,"order":9,"confidential":false,"defaultValues":null},"overridable":false,"values":[]},{"schema":{"name":"jndiProperties","displayName":"Initial
 JNDI Properties","helpMessage":"&lt;b&gt;Initial JNDI 
Properties&lt;/b&gt;&lt;br&gt;Could be empty or enter the JDBC JNDI Initial 
context factory, context provider in a format: key = 
value.","type":"[Ljava.lang.String;","required":false,"order":23,"confidential":false,"defaultValues":null},"overridable":false,"values":[]},{"schema":{"name":"password","displayName":"User
 Password","helpMessage":"&lt;b&gt;User Password&lt;/b&gt;&lt;br&gt;Enter a 
user account tha
 t has permission to access accounts 
table.","type":"org.identityconnectors.common.security.GuardedString","required":false,"order":5,"confidential":true,"defaultValues":null},"overridable":false,"values":["sa"]},{"schema":{"name":"host","displayName":"Host","helpMessage":"&lt;b&gt;Host&lt;/b&gt;&lt;br&gt;Enter
 the name of the host where the database is 
running.","type":"java.lang.String","required":false,"order":2,"confidential":false,"defaultValues":null},"overridable":false,"values":[]},{"schema":{"name":"port","displayName":"Port","helpMessage":"&lt;b&gt;TCP
 Port&lt;/b&gt;&lt;br&gt;Enter the port number the database server is listening 
on.","type":"java.lang.String","required":false,"order":3,"confidential":false,"defaultValues":null},"overridable":false,"values":[]},{"schema":{"name":"statusColumn","displayName":"Status
 Column","helpMessage":"&lt;b&gt;Status Column&lt;/b&gt;&lt;br&gt;Enter the 
name of the column in the table that will hold the status values. If empty 
enabled and
  disabled operation wont be 
performed.","type":"java.lang.String","required":false,"order":10,"confidential":false,"defaultValues":null},"overridable":false,"values":[]},{"schema":{"name":"pwdEncodeToUpperCase","displayName":"Force
 password encoding to upper case","helpMessage":"Force password encoding to 
upper 
case.","type":"boolean","required":false,"order":25,"confidential":false,"defaultValues":null},"overridable":false,"values":["false"]},{"schema":{"name":"enableEmptyString","displayName":"Enable
 writing empty string","helpMessage":"&lt;b&gt;Enable writing empty 
string&lt;/b&gt;&lt;br&gt;Select to enable support for writing an empty 
strings, instead of a NULL value, in character based columns defined as 
not-null in the table schema. This option does not influence the way strings 
are written for Oracle based tables. By default empty strings are written as a 
NULL 
value.","type":"boolean","required":false,"order":16,"confidential":false,"defaultValues":null},"overridable":false,"
 
values":["false"]},{"schema":{"name":"database","displayName":"Database","helpMessage":"&lt;b&gt;Database&lt;/b&gt;&lt;br&gt;Enter
 the name of the database on the database server that contains the 
table.","type":"java.lang.String","required":false,"order":6,"confidential":false,"defaultValues":null},"overridable":false,"values":[]},{"schema":{"name":"defaultStatusValue","displayName":"Default
 Status Value","helpMessage":"&lt;b&gt;Default Status 
Value&lt;/b&gt;&lt;br&gt;Enter the value for status in case of status not 
specified.","type":"java.lang.String","required":false,"order":13,"confidential":false,"defaultValues":null},"overridable":false,"values":[]},{"schema":{"name":"table","displayName":"Table","helpMessage":"&lt;b&gt;Table&lt;/b&gt;&lt;br&gt;Enter
 the name of the table in the database that contains the 
accounts.","type":"java.lang.String","required":true,"order":7,"confidential":false,"defaultValues":null},"overridable":false,"values":["testpull"]},{"schema":{"name":"disab
 ledStatusValue","displayName":"Disabled Status 
Value","helpMessage":"&lt;b&gt;Disabled Status Value&lt;/b&gt;&lt;br&gt;Enter 
the value for disabled 
status.","type":"java.lang.String","required":false,"order":11,"confidential":false,"defaultValues":null},"overridable":false,"values":[]},{"schema":{"name":"jdbcDriver","displayName":"JDBC
 Driver","helpMessage":"&lt;b&gt;JDBC Driver&lt;/b&gt;&lt;br&gt;Specify the 
JDBC Driver class name. Oracle is oracle.jdbc.driver.OracleDriver. MySQL is 
org.gjt.mm.mysql.Driver.&lt;br&gt;Could be empty if datasource is 
provided.","type":"java.lang.String","required":false,"order":14,"confidential":false,"defaultValues":null},"overridable":false,"values":["org.h2.Driver"]},{"schema":{"name":"quoting","displayName":"Name
 Quoting","helpMessage":"&lt;b&gt;Name Quoting&lt;/b&gt;&lt;br&gt;Select 
whether database column names for this resource should be quoted, and the 
quoting characters. By default, database column names are not quoted (None). 
For other selec
 tions (Single, Double, Back, or Brackets), column names will appear between 
single quotes, double quotes, back quotes, or brackets in the SQL generated to 
access the 
database.","type":"java.lang.String","required":false,"order":1,"confidential":false,"defaultValues":null},"overridable":false,"values":[]},{"schema":{"name":"cipherKey","displayName":"Password
 cipher key","helpMessage":"Specify key in case of reversible 
algorithm.","type":"java.lang.String","required":false,"order":25,"confidential":false,"defaultValues":null},"overridable":false,"values":[]}]'/>
   <ConnInstance_capabilities ConnInstance_id="107" capability="CREATE"/>
   <ConnInstance_capabilities ConnInstance_id="107" capability="UPDATE"/>
   <ConnInstance_capabilities ConnInstance_id="107" capability="DELETE"/>
@@ -585,117 +585,117 @@ under the License.
   
   <ExternalResource name="ws-target-resource-1" connector_id="100"
                     randomPwdIfNotProvided="0" enforceMandatoryCondition="0" 
overrideCapabilities="0"
-                    propagationPriority="1" createTraceLevel="ALL" 
deleteTraceLevel="ALL" updateTraceLevel="ALL" syncTraceLevel="ALL"
+                    propagationPriority="1" createTraceLevel="ALL" 
deleteTraceLevel="ALL" updateTraceLevel="ALL" pullTraceLevel="ALL"
                     creator="admin" lastModifier="admin"
                     creationDate="2010-10-20 11:00:00" 
lastChangeDate="2010-10-20 11:00:00"/>
   <ExternalResource name="ws-target-resource-2" connector_id="100"
                     randomPwdIfNotProvided="0" enforceMandatoryCondition="1" 
overrideCapabilities="0"
-                    createTraceLevel="FAILURES" deleteTraceLevel="NONE" 
updateTraceLevel="ALL" syncTraceLevel="ALL"
-                    syncPolicy_id="9"
+                    createTraceLevel="FAILURES" deleteTraceLevel="NONE" 
updateTraceLevel="ALL" pullTraceLevel="ALL"
+                    pullPolicy_id="9"
                     creator="admin" lastModifier="admin" 
                     creationDate="2010-10-20 11:00:00" 
lastChangeDate="2010-10-20 11:00:00"/>
   <ExternalResource name="ws-target-resource-timeout" connector_id="102"
                     randomPwdIfNotProvided="0" enforceMandatoryCondition="1" 
overrideCapabilities="0"
-                    propagationPriority="1" createTraceLevel="FAILURES" 
deleteTraceLevel="NONE" updateTraceLevel="ALL" syncTraceLevel="ALL"
+                    propagationPriority="1" createTraceLevel="FAILURES" 
deleteTraceLevel="NONE" updateTraceLevel="ALL" pullTraceLevel="ALL"
                     
jsonConf='[{"schema":{"name":"endpoint","displayName":null,"helpMessage":null,"type":"java.lang.String","required":true,"order":0,"confidential":false,"defaultValues":null},"overridable":true,"values":["http://localhost:${cargo.servlet.port}/syncope-fit-build-tools/services/provisioning"]}]'
                     creator="admin" lastModifier="admin" 
                     creationDate="2010-10-20 11:00:00" 
lastChangeDate="2010-10-20 11:00:00"/>
   <ExternalResource name="ws-target-resource-list-mappings-1" 
connector_id="100"
                     randomPwdIfNotProvided="0" enforceMandatoryCondition="0" 
overrideCapabilities="0"
-                    createTraceLevel="ALL" deleteTraceLevel="ALL" 
updateTraceLevel="ALL" syncTraceLevel="ALL"
+                    createTraceLevel="ALL" deleteTraceLevel="ALL" 
updateTraceLevel="ALL" pullTraceLevel="ALL"
                     creator="admin" lastModifier="admin" 
                     creationDate="2010-10-20 11:00:00" 
lastChangeDate="2010-10-20 11:00:00"/>
   <ExternalResource name="ws-target-resource-list-mappings-2" 
connector_id="100"
                     randomPwdIfNotProvided="0" enforceMandatoryCondition="1" 
overrideCapabilities="0"
-                    createTraceLevel="ALL" deleteTraceLevel="ALL" 
updateTraceLevel="ALL" syncTraceLevel="ALL"
+                    createTraceLevel="ALL" deleteTraceLevel="ALL" 
updateTraceLevel="ALL" pullTraceLevel="ALL"
                     creator="admin" lastModifier="admin" 
                     creationDate="2010-10-20 11:00:00" 
lastChangeDate="2010-10-20 11:00:00"/>
   <ExternalResource name="ws-target-resource-delete" connector_id="102"
                     randomPwdIfNotProvided="0" enforceMandatoryCondition="0" 
overrideCapabilities="0"
-                    propagationPriority="2" createTraceLevel="ALL" 
deleteTraceLevel="ALL" updateTraceLevel="ALL" syncTraceLevel="ALL"
+                    propagationPriority="2" createTraceLevel="ALL" 
deleteTraceLevel="ALL" updateTraceLevel="ALL" pullTraceLevel="ALL"
                     creator="admin" lastModifier="admin" 
                     creationDate="2010-10-20 11:00:00" 
lastChangeDate="2010-10-20 11:00:00"/>
   <ExternalResource name="ws-target-resource-update" connector_id="100"
                     randomPwdIfNotProvided="0" enforceMandatoryCondition="1" 
overrideCapabilities="0"
-                    createTraceLevel="ALL" deleteTraceLevel="ALL" 
updateTraceLevel="ALL" syncTraceLevel="ALL"
+                    createTraceLevel="ALL" deleteTraceLevel="ALL" 
updateTraceLevel="ALL" pullTraceLevel="ALL"
                     creator="admin" lastModifier="admin" 
                     creationDate="2010-10-20 11:00:00" 
lastChangeDate="2010-10-20 11:00:00"/>
   <ExternalResource name="resource-testdb" connector_id="101"
                     randomPwdIfNotProvided="0" enforceMandatoryCondition="1" 
overrideCapabilities="0"
-                    createTraceLevel="ALL" deleteTraceLevel="ALL" 
updateTraceLevel="ALL" syncTraceLevel="ALL"
+                    createTraceLevel="ALL" deleteTraceLevel="ALL" 
updateTraceLevel="ALL" pullTraceLevel="ALL"
                     creator="admin" lastModifier="admin" 
                     creationDate="2010-10-20 11:00:00" 
lastChangeDate="2010-10-20 11:00:00"/>
   <ExternalResource name="resource-testdb2" connector_id="106"
                     randomPwdIfNotProvided="1" enforceMandatoryCondition="1" 
overrideCapabilities="0"
-                    createTraceLevel="ALL" deleteTraceLevel="ALL" 
updateTraceLevel="ALL" syncTraceLevel="ALL"
+                    createTraceLevel="ALL" deleteTraceLevel="ALL" 
updateTraceLevel="ALL" pullTraceLevel="ALL"
                     creator="admin" lastModifier="admin" 
                     creationDate="2010-10-20 11:00:00" 
lastChangeDate="2010-10-20 11:00:00"/>
   <ExternalResource name="resource-csv" connector_id="104"
                     randomPwdIfNotProvided="0" enforceMandatoryCondition="0" 
overrideCapabilities="0"
-                    syncPolicy_id="3"
-                    createTraceLevel="ALL" deleteTraceLevel="ALL" 
updateTraceLevel="ALL" syncTraceLevel="ALL"
+                    pullPolicy_id="3"
+                    createTraceLevel="ALL" deleteTraceLevel="ALL" 
updateTraceLevel="ALL" pullTraceLevel="ALL"
                     creator="admin" lastModifier="admin" 
                     creationDate="2010-10-20 11:00:00" 
lastChangeDate="2010-10-20 11:00:00"/>
   <ExternalResource name="ws-target-resource-update-resetsynctoken" 
connector_id="100" enforceMandatoryCondition="1"
-                    randomPwdIfNotProvided="0" createTraceLevel="ALL" 
deleteTraceLevel="ALL" updateTraceLevel="ALL" syncTraceLevel="ALL"
+                    randomPwdIfNotProvided="0" createTraceLevel="ALL" 
deleteTraceLevel="ALL" updateTraceLevel="ALL" pullTraceLevel="ALL"
                     creator="admin" lastModifier="admin" 
                     creationDate="2010-10-20 11:00:00" 
lastChangeDate="2010-10-20 11:00:00"/>
   <ExternalResource name="resource-ldap" connector_id="105"
                     randomPwdIfNotProvided="1" enforceMandatoryCondition="1" 
overrideCapabilities="0"
                     propagationPriority="1"
-                    createTraceLevel="ALL" deleteTraceLevel="ALL" 
updateTraceLevel="ALL" syncTraceLevel="ALL"
+                    createTraceLevel="ALL" deleteTraceLevel="ALL" 
updateTraceLevel="ALL" pullTraceLevel="ALL"
                     creator="admin" lastModifier="admin" 
                     creationDate="2010-10-20 11:00:00" 
lastChangeDate="2010-10-20 11:00:00"/>
   <ExternalResource_PropActions resource_name="resource-ldap"
                                 
actionClassName="org.apache.syncope.core.provisioning.java.propagation.LDAPMembershipPropagationActions"/>
   <ExternalResource name="ws-target-resource-nopropagation" connector_id="103"
                     randomPwdIfNotProvided="0" enforceMandatoryCondition="1" 
overrideCapabilities="0"
-                    createTraceLevel="ALL" deleteTraceLevel="ALL" 
updateTraceLevel="ALL" syncTraceLevel="ALL" 
+                    createTraceLevel="ALL" deleteTraceLevel="ALL" 
updateTraceLevel="ALL" pullTraceLevel="ALL" 
                     passwordPolicy_id="4"
                     creator="admin" lastModifier="admin" 
                     creationDate="2010-10-20 11:00:00" 
lastChangeDate="2010-10-20 11:00:00"/>
   
-  <!-- The following three resources have been added to verify the issue 
SYNCOPE-68 -->
+  <!-- The following three resources have been added to verify the issue 
PULLOPE-68 -->
   <ExternalResource name="ws-target-resource-nopropagation2" 
connector_id="103" 
                     enforceMandatoryCondition="1" overrideCapabilities="0"
-                    randomPwdIfNotProvided="0" createTraceLevel="ALL" 
deleteTraceLevel="ALL" updateTraceLevel="ALL" syncTraceLevel="ALL"
+                    randomPwdIfNotProvided="0" createTraceLevel="ALL" 
deleteTraceLevel="ALL" updateTraceLevel="ALL" pullTraceLevel="ALL"
                     creator="admin" lastModifier="admin" 
                     creationDate="2010-10-20 11:00:00" 
lastChangeDate="2010-10-20 11:00:00"/>
   <ExternalResource name="ws-target-resource-nopropagation3" 
connector_id="103" 
                     enforceMandatoryCondition="1" overrideCapabilities="0"
-                    randomPwdIfNotProvided="0" createTraceLevel="ALL" 
deleteTraceLevel="ALL" updateTraceLevel="ALL" syncTraceLevel="ALL"
+                    randomPwdIfNotProvided="0" createTraceLevel="ALL" 
deleteTraceLevel="ALL" updateTraceLevel="ALL" pullTraceLevel="ALL"
                     creator="admin" lastModifier="admin" 
                     creationDate="2010-10-20 11:00:00" 
lastChangeDate="2010-10-20 11:00:00"/>
   <ExternalResource name="ws-target-resource-nopropagation4" 
connector_id="103" 
                     enforceMandatoryCondition="1" overrideCapabilities="0"
-                    randomPwdIfNotProvided="0" createTraceLevel="ALL" 
deleteTraceLevel="ALL" updateTraceLevel="ALL" syncTraceLevel="ALL"
+                    randomPwdIfNotProvided="0" createTraceLevel="ALL" 
deleteTraceLevel="ALL" updateTraceLevel="ALL" pullTraceLevel="ALL"
                     creator="admin" lastModifier="admin" 
                     creationDate="2010-10-20 11:00:00" 
lastChangeDate="2010-10-20 11:00:00"/>
                     
-  <!-- External resource for issue SYNCOPE-230 -->
-  <ExternalResource name="resource-db-sync" connector_id="107"
-                    randomPwdIfNotProvided="0" createTraceLevel="ALL" 
deleteTraceLevel="ALL" syncTraceLevel="ALL" updateTraceLevel="ALL"
+  <!-- External resource for issue PULLOPE-230 -->
+  <ExternalResource name="resource-db-pull" connector_id="107"
+                    randomPwdIfNotProvided="0" createTraceLevel="ALL" 
deleteTraceLevel="ALL" pullTraceLevel="ALL" updateTraceLevel="ALL"
                     enforceMandatoryCondition="0" 
                     overrideCapabilities="0"
                     creator="admin" lastModifier="admin" 
                     creationDate="2010-10-20 11:00:00" 
lastChangeDate="2010-10-20 11:00:00"/>
                     
-  <!-- External resource for issue SYNCOPE-267 -->
+  <!-- External resource for issue PULLOPE-267 -->
   <ExternalResource name="resource-db-virattr" connector_id="107"
-                    randomPwdIfNotProvided="0" createTraceLevel="ALL" 
deleteTraceLevel="ALL" syncTraceLevel="ALL" updateTraceLevel="ALL"
+                    randomPwdIfNotProvided="0" createTraceLevel="ALL" 
deleteTraceLevel="ALL" pullTraceLevel="ALL" updateTraceLevel="ALL"
                     enforceMandatoryCondition="0" 
                     overrideCapabilities="0"
                     creator="admin" lastModifier="admin" 
                     creationDate="2010-10-20 11:00:00" 
lastChangeDate="2010-10-20 11:00:00"/>
 
   <ExternalResource name="resource-db-scripted" connector_id="108"
-                    randomPwdIfNotProvided="0" createTraceLevel="ALL" 
deleteTraceLevel="ALL" syncTraceLevel="ALL" updateTraceLevel="ALL"
+                    randomPwdIfNotProvided="0" createTraceLevel="ALL" 
deleteTraceLevel="ALL" pullTraceLevel="ALL" updateTraceLevel="ALL"
                     enforceMandatoryCondition="0"
                     overrideCapabilities="0"
                     creator="admin" lastModifier="admin" 
                     creationDate="2010-10-20 11:00:00" 
lastChangeDate="2010-10-20 11:00:00"/>
 
-  <!-- Use resource-testdb for passthrough authentication (SYNCOPE-164) -->
+  <!-- Use resource-testdb for passthrough authentication (PULLOPE-164) -->
   <AccountPolicy_ExternalResource accountPolicy_id="5" 
resource_name="resource-testdb"/>
     
   <SyncopeUser_ExternalResource user_id="1" resource_name="resource-testdb2"/>
@@ -844,10 +844,10 @@ under the License.
                connObjectKey="0" password="0" purpose="BOTH"/>
   <MappingItem id="205" extAttrName="email" mapping_id="9"
                intAttrName="userId" intMappingType="UserPlainSchema" 
mandatoryCondition="true"
-               connObjectKey="0" password="0" purpose="SYNCHRONIZATION"/>
+               connObjectKey="0" password="0" purpose="PULL"/>
   <MappingItem id="206" extAttrName="email" mapping_id="9"
                intAttrName="email" intMappingType="UserPlainSchema" 
mandatoryCondition="true"
-               connObjectKey="0" password="0" purpose="SYNCHRONIZATION"/>
+               connObjectKey="0" password="0" purpose="PULL"/>
   <MappingItem id="207" extAttrName="__NAME__" mapping_id="9"
                intAttrName="csvuserid" intMappingType="UserDerivedSchema" 
mandatoryCondition="true"
                connObjectKey="1" password="0" purpose="PROPAGATION"/>
@@ -920,7 +920,7 @@ under the License.
   
   <VirSchema name="rvirtualdata" anyTypeClass_name="minimal group" 
provision_id="20" extAttrName="businessCategory"/>
 
-  <Provision id="16" resource_name="resource-db-sync" anyType_name="USER" 
objectClass="__ACCOUNT__"/>
+  <Provision id="16" resource_name="resource-db-pull" anyType_name="USER" 
objectClass="__ACCOUNT__"/>
   <Mapping id="16" provision_id="16"/>
   <MappingItem id="322" connObjectKey="0" mapping_id="16"
                extAttrName="EMAIL" intAttrName="email" 
intMappingType="UserPlainSchema" 
@@ -980,12 +980,12 @@ under the License.
   <Task DTYPE="PropagationTask" type="PROPAGATION" id="3" operation="DELETE"
         objectClassName="__ACCOUNT__" resource_name="ws-target-resource-2" 
anyTypeKind="USER" anyKey="1"
         
attributes='[{"name":"__PASSWORD__","value":[{"readOnly":false,"disposed":false,"encryptedBytes":"m9nh2US0Sa6m+cXccCq0Xw==","base64SHA1Hash":"GFJ69qfjxEOdrmt+9q+0Cw2uz60="}]},{"name":"__NAME__","value":["userId"],"nameValue":"userId"},{"name":"type","value":["type"]}]'/>
-  <Task DTYPE="SyncTask" type="SYNCHRONIZATION" id="4" name="CSV (update 
matching; assign unmatching)" resource_name="resource-csv"
-        destinationRealm_id="1" performCreate="1" performUpdate="1" 
performDelete="1" syncStatus="1"
-        syncMode="INCREMENTAL" unmatchingRule="ASSIGN" matchingRule="UPDATE" 
active="1"/>
-  <AnyTemplateSyncTask id="41" syncTask_id="4" anyType_name="USER"
+  <Task DTYPE="PullTask" type="PULL" id="4" name="CSV (update matching; assign 
unmatching)" resource_name="resource-csv"
+        destinationRealm_id="1" performCreate="1" performUpdate="1" 
performDelete="1" pullStatus="1"
+        pullMode="INCREMENTAL" unmatchingRule="ASSIGN" matchingRule="UPDATE" 
active="1"/>
+  <AnyTemplatePullTask id="41" pullTask_id="4" anyType_name="USER"
                        
template='{"@class":"org.apache.syncope.common.lib.to.UserTO","creator":null,"creationDate":null,"lastModifier":null,"lastChangeDate":null,"key":0,"type":"USER","realm":null,"status":null,"password":null,"token":null,"tokenExpireTime":null,"username":null,"lastLoginDate":null,"changePwdDate":null,"failedLogins":null,"securityQuestion":null,"securityAnswer":null,"auxClasses":["csv"],"derAttrs":[{"schema":"cn","readonly":false,"values":[""]}],"virAttrs":[],"resources":["resource-testdb"],"relationships":[],"memberships":[{"leftType":null,"leftKey":0,"rightType":"GROUP","rightKey":8,"groupName":null}],"dynGroups":[],"roles":[],"dynRoles":[],"plainAttrs":[{"schema":"ctype","readonly":false,"values":["email
 == &apos;[email protected]&apos;? &apos;TYPE_8&apos;: 
&apos;TYPE_OTHER&apos;"]}]}'/>
-  <AnyTemplateSyncTask id="42" syncTask_id="4" anyType_name="GROUP"
+  <AnyTemplatePullTask id="42" pullTask_id="4" anyType_name="GROUP"
                        
template='{"@class":"org.apache.syncope.common.lib.to.GroupTO","creator":null,"creationDate":null,"lastModifier":null,"lastChangeDate":null,"key":0,"type":"GROUP","realm":null,"status":null,"name":null,"userOwner":null,"groupOwner":null,"udynMembershipCond":null,"auxClasses":[],"derAttrs":[],"virAttrs":[],"resources":[],"plainAttrs":[]}'/>
   <Task DTYPE="SchedTask" type="SCHEDULED" id="5" name="SampleJob Task"  
active="1"
         
jobDelegateClassName="org.apache.syncope.fit.core.reference.TestSampleJobDelegate"
 cronExpression="0 0 0 1 * ?"/>
@@ -993,105 +993,105 @@ under the License.
         objectClassName="__ACCOUNT__" 
resource_name="ws-target-resource-nopropagation" anyTypeKind="USER" anyKey="1"
         
attributes='[{"name":"__PASSWORD__","value":[{"readOnly":false,"disposed":false,"encryptedBytes":"m9nh2US0Sa6m+cXccCq0Xw==","base64SHA1Hash":"GFJ69qfjxEOdrmt+9q+0Cw2uz60="}]},{"name":"__NAME__","value":["userId"],"nameValue":"userId"},{"name":"fullname","value":["fullname"]},{"name":"type","value":["type"]}]'/>
   <TaskExec id="6" task_id="6" start="2015-12-17 09:40:00.506" end="2015-12-17 
09:42:00.506" status="SUCCESS"/>
-  <Task DTYPE="SyncTask" type="SYNCHRONIZATION" id="7" name="TestDB Task" 
resource_name="resource-testdb"
-        destinationRealm_id="1" performCreate="1" performUpdate="1" 
performDelete="0" syncStatus="1" syncMode="FULL_RECONCILIATION"
+  <Task DTYPE="PullTask" type="PULL" id="7" name="TestDB Task" 
resource_name="resource-testdb"
+        destinationRealm_id="1" performCreate="1" performUpdate="1" 
performDelete="0" pullStatus="1" pullMode="FULL_RECONCILIATION"
         unmatchingRule="PROVISION" matchingRule="UPDATE" active="1"/>
-  <AnyTemplateSyncTask id="71" syncTask_id="7" anyType_name="USER"
+  <AnyTemplatePullTask id="71" pullTask_id="7" anyType_name="USER"
                        
template='{"@class":"org.apache.syncope.common.lib.to.UserTO","creator":null,"creationDate":null,"lastModifier":null,"lastChangeDate":null,"key":0,"type":"USER","realm":null,"status":null,"password":null,"token":null,"tokenExpireTime":null,"username":null,"lastLoginDate":null,"changePwdDate":null,"failedLogins":null,"securityQuestion":null,"securityAnswer":null,"auxClasses":[],"derAttrs":[],"virAttrs":[],"resources":[],"relationships":[],"memberships":[],"dynGroups":[],"roles":[],"dynRoles":[],"plainAttrs":[{"schema":"ctype","readonly":false,"values":["&apos;type
 
a&apos;"]},{"schema":"userId","readonly":false,"values":["&apos;[email protected]&apos;"]},{"schema":"fullname","readonly":false,"values":["&apos;reconciled
 
fullname&apos;"]},{"schema":"surname","readonly":false,"values":["&apos;surname&apos;"]}]}'/>
-  <AnyTemplateSyncTask id="72" syncTask_id="7" anyType_name="GROUP"
+  <AnyTemplatePullTask id="72" pullTask_id="7" anyType_name="GROUP"
                        
template='{"@class":"org.apache.syncope.common.lib.to.GroupTO","creator":null,"creationDate":null,"lastModifier":null,"lastChangeDate":null,"key":0,"type":"GROUP","realm":null,"status":null,"name":null,"userOwner":null,"groupOwner":null,"udynMembershipCond":null,"auxClasses":[],"derAttrs":[],"virAttrs":[],"resources":[],"plainAttrs":[]}'/>
-  <Task DTYPE="NotificationTask" type="NOTIFICATION" id="8" 
sender="[email protected]" subject="Notification for SYNCOPE-81" 
+  <Task DTYPE="NotificationTask" type="NOTIFICATION" id="8" 
sender="[email protected]" subject="Notification for PULLOPE-81" 
         textBody="NOTIFICATION-81" htmlBody="NOTIFICATION-81" 
traceLevel="ALL"/>
-  <Task DTYPE="SyncTask" type="SYNCHRONIZATION" id="9" name="TestDB2 Task" 
resource_name="resource-testdb2"
-        destinationRealm_id="1" performCreate="1" performUpdate="1" 
performDelete="0" syncStatus="1" syncMode="FULL_RECONCILIATION"
+  <Task DTYPE="PullTask" type="PULL" id="9" name="TestDB2 Task" 
resource_name="resource-testdb2"
+        destinationRealm_id="1" performCreate="1" performUpdate="1" 
performDelete="0" pullStatus="1" pullMode="FULL_RECONCILIATION"
         unmatchingRule="PROVISION" matchingRule="UPDATE" active="1"/>
-  <Task DTYPE="SyncTask" type="SYNCHRONIZATION" id="10" name="TestDB Sync 
Task" resource_name="resource-db-sync"
-        destinationRealm_id="1" syncMode="FULL_RECONCILIATION" 
performCreate="1" performDelete="1" performUpdate="1" syncStatus="0"
+  <Task DTYPE="PullTask" type="PULL" id="10" name="TestDB Pull Task" 
resource_name="resource-db-pull"
+        destinationRealm_id="1" pullMode="FULL_RECONCILIATION" 
performCreate="1" performDelete="1" performUpdate="1" pullStatus="0"
         unmatchingRule="PROVISION" matchingRule="UPDATE" active="1"/>
-  <Task DTYPE="SyncTask" type="SYNCHRONIZATION" id="11" name="LDAP Sync Task" 
resource_name="resource-ldap"
-        destinationRealm_id="1" syncMode="FULL_RECONCILIATION" 
performCreate="1" performDelete="1" performUpdate="1" syncStatus="0"
+  <Task DTYPE="PullTask" type="PULL" id="11" name="LDAP Pull Task" 
resource_name="resource-ldap"
+        destinationRealm_id="1" pullMode="FULL_RECONCILIATION" 
performCreate="1" performDelete="1" performUpdate="1" pullStatus="0"
         unmatchingRule="PROVISION" matchingRule="UPDATE" active="1"/>
-  <AnyTemplateSyncTask id="1" syncTask_id="11" anyType_name="USER"
+  <AnyTemplatePullTask id="1" pullTask_id="11" anyType_name="USER"
                        
template='{"@class":"org.apache.syncope.common.lib.to.UserTO","creator":null,"creationDate":null,"lastModifier":null,"lastChangeDate":null,"key":0,"type":"USER","realm":null,"status":null,"password":null,"token":null,"tokenExpireTime":null,"username":null,"lastLoginDate":null,"changePwdDate":null,"failedLogins":null,"securityQuestion":null,"securityAnswer":null,"auxClasses":[],"derAttrs":[],"virAttrs":[{"schema":"virtualReadOnly","readonly":true,"values":[""]}],"resources":["resource-ldap"],"roles":[],"dynRoles":[],"relationships":[],"memberships":[],"dynGroups":[],"plainAttrs":[]}'/>
-  <AnyTemplateSyncTask id="2" syncTask_id="11" anyType_name="GROUP"
+  <AnyTemplatePullTask id="2" pullTask_id="11" anyType_name="GROUP"
                        
template='{"@class":"org.apache.syncope.common.lib.to.GroupTO","creator":null,"creationDate":null,"lastModifier":null,"lastChangeDate":null,"key":0,"type":"GROUP","realm":null,"status":null,"name":null,"userOwner":null,"groupOwner":null,"udynMembershipCond":null,"auxClasses":[],"derAttrs":[],"virAttrs":[],"resources":[],"plainAttrs":[{"schema":"show","readonly":false,"values":["true"]}]}'/>
-  <SyncTask_actionsClassNames SyncTask_id="11" 
actionClassName="org.apache.syncope.core.provisioning.java.syncpull.LDAPMembershipSyncActions"/>
-  <Task DTYPE="SyncTask" type="SYNCHRONIZATION" id="12" name="VirAttrCache 
test" resource_name="resource-csv"
-        destinationRealm_id="1" performCreate="0" performUpdate="1" 
performDelete="0" syncStatus="0" syncMode="FULL_RECONCILIATION"
+  <PullTask_actionsClassNames PullTask_id="11" 
actionClassName="org.apache.syncope.core.provisioning.java.pushpull.LDAPMembershipPullActions"/>
+  <Task DTYPE="PullTask" type="PULL" id="12" name="VirAttrCache test" 
resource_name="resource-csv"
+        destinationRealm_id="1" performCreate="0" performUpdate="1" 
performDelete="0" pullStatus="0" pullMode="FULL_RECONCILIATION"
         unmatchingRule="PROVISION" matchingRule="UPDATE" active="1"/>
   <Task DTYPE="PushTask" type="PUSH" id="13" name="Export on resource-testdb2" 
resource_name="resource-testdb2"
-        performCreate="1" performUpdate="1" performDelete="1" syncStatus="1"   
      
+        performCreate="1" performUpdate="1" performDelete="1" pullStatus="1"   
      
         unmatchingRule="ASSIGN" matchingRule="IGNORE" active="1"/>  
   <PushTaskAnyFilter id="131" anyType_name="USER" pushTask_id="13" 
fiql="surname==Vivaldi"/>
   <PushTaskAnyFilter id="132" anyType_name="GROUP" pushTask_id="13" 
fiql="name==_NO_ONE_"/>
   <Task DTYPE="PushTask" type="PUSH" id="14" name="Export on resource-testdb2" 
resource_name="resource-testdb2"
-        performCreate="1" performUpdate="1" performDelete="1" syncStatus="1"   
      
+        performCreate="1" performUpdate="1" performDelete="1" pullStatus="1"   
      
         unmatchingRule="PROVISION" matchingRule="IGNORE" active="1"/>
   <PushTaskAnyFilter id="141" anyType_name="USER" pushTask_id="14" 
fiql="surname==Bellini"/>
   <PushTaskAnyFilter id="142" anyType_name="GROUP" pushTask_id="14" 
fiql="name==_NO_ONE_"/>
   <Task DTYPE="PushTask" type="PUSH" id="15" name="Export on resource-testdb2" 
resource_name="resource-testdb2"
-        performCreate="1" performUpdate="1" performDelete="1" syncStatus="1"   
     
+        performCreate="1" performUpdate="1" performDelete="1" pullStatus="1"   
     
         unmatchingRule="UNLINK" matchingRule="IGNORE" active="1"/>
   <PushTaskAnyFilter id="151" anyType_name="USER" pushTask_id="15" 
fiql="surname==Puccini"/>
   <PushTaskAnyFilter id="152" anyType_name="GROUP" pushTask_id="15" 
fiql="name==_NO_ONE_"/>
   <Task DTYPE="PushTask" type="PUSH" id="16" name="Export on resource-testdb2" 
resource_name="resource-testdb2"
-        performCreate="1" performUpdate="1" performDelete="1" syncStatus="1"   
      
+        performCreate="1" performUpdate="1" performDelete="1" pullStatus="1"   
      
         unmatchingRule="IGNORE" matchingRule="IGNORE" active="1"/>
   <PushTaskAnyFilter id="161" anyType_name="USER" pushTask_id="16" 
fiql="surname==Verdi"/>
   <PushTaskAnyFilter id="162" anyType_name="GROUP" pushTask_id="16" 
fiql="name==_NO_ONE_"/>
   <Task DTYPE="PushTask" type="PUSH" id="17" name="Export on resource-testdb2" 
resource_name="resource-testdb2"
-        performCreate="1" performUpdate="1" performDelete="1" syncStatus="1"   
     
+        performCreate="1" performUpdate="1" performDelete="1" pullStatus="1"   
     
         unmatchingRule="ASSIGN" matchingRule="UPDATE" active="1"/>
   <PushTaskAnyFilter id="171" anyType_name="USER" pushTask_id="17" 
fiql="username==_NO_ONE_"/>
   <PushTaskAnyFilter id="172" anyType_name="GROUP" pushTask_id="17" 
fiql="name==_NO_ONE_"/>
   <Task DTYPE="PushTask" type="PUSH" id="18" name="Export on resource-testdb2" 
resource_name="resource-testdb2"
-        performCreate="1" performUpdate="1" performDelete="1" syncStatus="1"   
     
+        performCreate="1" performUpdate="1" performDelete="1" pullStatus="1"   
     
         unmatchingRule="IGNORE" matchingRule="DEPROVISION" active="1"/>
   <PushTaskAnyFilter id="181" anyType_name="USER" pushTask_id="18" 
fiql="surname==Verdi"/>
   <PushTaskAnyFilter id="182" anyType_name="GROUP" pushTask_id="18" 
fiql="name==_NO_ONE_"/>
   <Task DTYPE="PushTask" type="PUSH" id="19" name="Export on resource-testdb2" 
resource_name="resource-testdb2"
-        performCreate="1" performUpdate="1" performDelete="1" syncStatus="1"   
     
+        performCreate="1" performUpdate="1" performDelete="1" pullStatus="1"   
     
         unmatchingRule="IGNORE" matchingRule="UNASSIGN" active="1"/>
   <PushTaskAnyFilter id="191" anyType_name="USER" pushTask_id="19" 
fiql="surname==Rossini"/>
   <PushTaskAnyFilter id="192" anyType_name="GROUP" pushTask_id="19" 
fiql="name==_NO_ONE_"/>
   <Task DTYPE="PushTask" type="PUSH" id="20" name="Export on resource-testdb2" 
resource_name="resource-testdb2"
-        performCreate="1" performUpdate="1" performDelete="1" syncStatus="1"   
     
+        performCreate="1" performUpdate="1" performDelete="1" pullStatus="1"   
     
         unmatchingRule="IGNORE" matchingRule="LINK" active="1"/>
   <PushTaskAnyFilter id="201" anyType_name="USER" pushTask_id="20" 
fiql="surname==Verdi"/>
   <PushTaskAnyFilter id="202" anyType_name="GROUP" pushTask_id="20" 
fiql="name==_NO_ONE_"/>
   <Task DTYPE="PushTask" type="PUSH" id="21" name="Export on resource-testdb2" 
resource_name="resource-testdb2"
-        performCreate="1" performUpdate="1" performDelete="1" syncStatus="1"   
     
+        performCreate="1" performUpdate="1" performDelete="1" pullStatus="1"   
     
         unmatchingRule="IGNORE" matchingRule="UNLINK" active="1"/>
   <PushTaskAnyFilter id="211" anyType_name="USER" pushTask_id="21" 
fiql="surname==Verdi"/>
   <PushTaskAnyFilter id="212" anyType_name="GROUP" pushTask_id="21" 
fiql="name==_NO_ONE_"/>
   <Task DTYPE="PushTask" type="PUSH" id="22" name="Export on resource-testdb2" 
resource_name="resource-testdb2"
-        performCreate="1" performUpdate="1" performDelete="1" syncStatus="1"   
     
+        performCreate="1" performUpdate="1" performDelete="1" pullStatus="1"   
     
         unmatchingRule="IGNORE" matchingRule="UPDATE"  active="1"/>
   <PushTaskAnyFilter id="221" anyType_name="USER" pushTask_id="22" 
fiql="surname==Verdi"/>
   <PushTaskAnyFilter id="222" anyType_name="GROUP" pushTask_id="22" 
fiql="name==_NO_ONE_"/>
   <Task DTYPE="PushTask" type="PUSH" id="23" name="Export on resource-ldap" 
resource_name="resource-ldap"
-        performCreate="1" performUpdate="1" performDelete="1" syncStatus="1"   
     
+        performCreate="1" performUpdate="1" performDelete="1" pullStatus="1"   
     
         unmatchingRule="ASSIGN" matchingRule="UNLINK" active="1"/>
   <PushTaskAnyFilter id="231" anyType_name="USER" pushTask_id="23" 
fiql="username==_NO_ONE_"/>
   <PushTaskAnyFilter id="232" anyType_name="GROUP" pushTask_id="23" 
fiql="name==citizen"/>
-  <Task DTYPE="SyncTask" type="SYNCHRONIZATION" id="24" name="CSV Task (update 
matching; provision unmatching)" resource_name="resource-csv"
-        destinationRealm_id="1" performCreate="1" performUpdate="1" 
performDelete="1" syncStatus="1" syncMode="INCREMENTAL"
+  <Task DTYPE="PullTask" type="PULL" id="24" name="CSV Task (update matching; 
provision unmatching)" resource_name="resource-csv"
+        destinationRealm_id="1" performCreate="1" performUpdate="1" 
performDelete="1" pullStatus="1" pullMode="INCREMENTAL"
         unmatchingRule="PROVISION" matchingRule="UPDATE" active="1"/>
-  <AnyTemplateSyncTask id="3" syncTask_id="24" anyType_name="USER"
+  <AnyTemplatePullTask id="3" pullTask_id="24" anyType_name="USER"
                        
template='{"@class":"org.apache.syncope.common.lib.to.UserTO","creator":null,"creationDate":null,"lastModifier":null,"lastChangeDate":null,"key":0,"type":"USER","realm":null,"status":null,"password":null,"token":null,"tokenExpireTime":null,"username":null,"lastLoginDate":null,"changePwdDate":null,"failedLogins":null,"securityQuestion":null,"securityAnswer":null,"auxClasses":[],"derAttrs":[],"virAttrs":[],"resources":["resource-testdb"],"roles":[],"dynRoles":[],"relationships":[],"memberships":[],"dynGroups":[],"plainAttrs":[{"schema":"firstname","readonly":false,"values":[""]},{"schema":"userId","readonly":false,"values":["&apos;test&apos;"]},{"schema":"fullname","readonly":false,"values":["&apos;test&apos;"]},{"schema":"surname","readonly":false,"values":["&apos;test&apos;"]}]}'/>
-  <AnyTemplateSyncTask id="4" syncTask_id="24" anyType_name="GROUP"
+  <AnyTemplatePullTask id="4" pullTask_id="24" anyType_name="GROUP"
                        
template='{"@class":"org.apache.syncope.common.lib.to.GroupTO","creator":null,"creationDate":null,"lastModifier":null,"lastChangeDate":null,"key":0,"type":"GROUP","realm":null,"status":null,"name":null,"userOwner":null,"groupOwner":null,"udynMembershipCond":null,"auxClasses":[],"derAttrs":[],"virAttrs":[],"resources":[],"plainAttrs":[]}'/>
-  <Task DTYPE="SyncTask" type="SYNCHRONIZATION" id="25" name="CSV (unlink 
matching; ignore unmatching)" resource_name="resource-csv"
-        destinationRealm_id="1" performCreate="1" performUpdate="1" 
performDelete="1" syncStatus="1" syncMode="INCREMENTAL"
+  <Task DTYPE="PullTask" type="PULL" id="25" name="CSV (unlink matching; 
ignore unmatching)" resource_name="resource-csv"
+        destinationRealm_id="1" performCreate="1" performUpdate="1" 
performDelete="1" pullStatus="1" pullMode="INCREMENTAL"
         unmatchingRule="IGNORE" matchingRule="UNLINK" active="1"/>
-  <Task DTYPE="SyncTask" type="SYNCHRONIZATION" id="26" name="CSV (ignore 
matching; assign unmatching)" resource_name="resource-csv"
-        destinationRealm_id="1" performCreate="1" performUpdate="1" 
performDelete="1" syncStatus="1" syncMode="INCREMENTAL"
+  <Task DTYPE="PullTask" type="PULL" id="26" name="CSV (ignore matching; 
assign unmatching)" resource_name="resource-csv"
+        destinationRealm_id="1" performCreate="1" performUpdate="1" 
performDelete="1" pullStatus="1" pullMode="INCREMENTAL"
         unmatchingRule="ASSIGN" matchingRule="IGNORE" active="1"/>
   <Task DTYPE="PropagationTask" type="PROPAGATION" id="27" operation="CREATE"
         objectClassName="__ACCOUNT__" resource_name="resource-testdb" 
anyTypeKind="USER" anyKey="1"
         
attributes='[{"name":"__PASSWORD__","value":[{"readOnly":false,"disposed":false,"encryptedBytes":"m9nh2US0Sa6m+cXccCq0Xw==","base64SHA1Hash":"GFJ69qfjxEOdrmt+9q+0Cw2uz60="}]},{"name":"__NAME__","value":["userId"],"nameValue":"userId"},{"name":"fullname","value":["fullname"]},{"name":"type","value":["type"]}]'/>
-  <Task DTYPE="SyncTask" type="SYNCHRONIZATION" id="28" name="Scripted SQL" 
resource_name="resource-db-scripted"
-        destinationRealm_id="1" performCreate="1" performUpdate="1" 
performDelete="1" syncStatus="0" syncMode="INCREMENTAL"
+  <Task DTYPE="PullTask" type="PULL" id="28" name="Scripted SQL" 
resource_name="resource-db-scripted"
+        destinationRealm_id="1" performCreate="1" performUpdate="1" 
performDelete="1" pullStatus="0" pullMode="INCREMENTAL"
         unmatchingRule="PROVISION" matchingRule="UPDATE" active="1"/>
 
   <MailTemplate name="requestPasswordReset"

http://git-wip-us.apache.org/repos/asf/syncope/blob/61a7fdd3/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/Connector.java
----------------------------------------------------------------------
diff --git 
a/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/Connector.java
 
b/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/Connector.java
index b637508..c54cf71 100644
--- 
a/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/Connector.java
+++ 
b/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/Connector.java
@@ -34,7 +34,7 @@ import 
org.identityconnectors.framework.common.objects.SyncResultsHandler;
 import org.identityconnectors.framework.common.objects.SyncToken;
 import org.identityconnectors.framework.common.objects.Uid;
 import org.identityconnectors.framework.common.objects.filter.Filter;
-import 
org.apache.syncope.core.provisioning.api.syncpull.ReconciliationFilterBuilder;
+import 
org.apache.syncope.core.provisioning.api.pushpull.ReconciliationFilterBuilder;
 
 /**
  * Entry point for making requests on underlying connector bundles.

http://git-wip-us.apache.org/repos/asf/syncope/blob/61a7fdd3/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/UserProvisioningManager.java
----------------------------------------------------------------------
diff --git 
a/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/UserProvisioningManager.java
 
b/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/UserProvisioningManager.java
index cf198fe..37db510 100644
--- 
a/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/UserProvisioningManager.java
+++ 
b/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/UserProvisioningManager.java
@@ -26,7 +26,7 @@ import org.apache.syncope.common.lib.patch.StatusPatch;
 import org.apache.syncope.common.lib.patch.UserPatch;
 import org.apache.syncope.common.lib.to.PropagationStatus;
 import org.apache.syncope.common.lib.to.UserTO;
-import org.apache.syncope.core.provisioning.api.syncpull.ProvisioningReport;
+import org.apache.syncope.core.provisioning.api.pushpull.ProvisioningReport;
 
 public interface UserProvisioningManager extends ProvisioningManager<UserTO, 
UserPatch> {
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/61a7fdd3/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/MappingItemTransformer.java
----------------------------------------------------------------------
diff --git 
a/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/MappingItemTransformer.java
 
b/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/MappingItemTransformer.java
index ae11199..18d998b 100644
--- 
a/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/MappingItemTransformer.java
+++ 
b/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/MappingItemTransformer.java
@@ -22,7 +22,7 @@ import java.util.List;
 import org.apache.syncope.core.persistence.api.entity.PlainAttrValue;
 
 /**
- * Transforms values to be propagated to (or synchronizing from) external 
resources right before they leave (or enter)
+ * Transforms values to be propagated to (or pulling from) external resources 
right before they leave (or enter)
  * the Syncope internal storage.
  *
  * These transformations are not applied to virtual attribute values.
@@ -38,10 +38,10 @@ public interface MappingItemTransformer {
     List<PlainAttrValue> beforePropagation(List<PlainAttrValue> values);
 
     /**
-     * Invoked while reading attribute values from external resource during 
synchronization.
+     * Invoked while reading attribute values from external resource during 
pull.
      *
      * @param values original values
      * @return transformed values
      */
-    List<Object> beforeSync(List<Object> values);
+    List<Object> beforePull(List<Object> values);
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/61a7fdd3/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/AnyObjectPullResultHandler.java
----------------------------------------------------------------------
diff --git 
a/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/AnyObjectPullResultHandler.java
 
b/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/AnyObjectPullResultHandler.java
new file mode 100644
index 0000000..db7eb81
--- /dev/null
+++ 
b/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/AnyObjectPullResultHandler.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.core.provisioning.api.pushpull;
+
+public interface AnyObjectPullResultHandler extends SyncopePullResultHandler {
+
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/61a7fdd3/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/AnyObjectPushResultHandler.java
----------------------------------------------------------------------
diff --git 
a/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/AnyObjectPushResultHandler.java
 
b/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/AnyObjectPushResultHandler.java
new file mode 100644
index 0000000..8775e7e
--- /dev/null
+++ 
b/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/AnyObjectPushResultHandler.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.core.provisioning.api.pushpull;
+
+public interface AnyObjectPushResultHandler extends SyncopePushResultHandler {
+
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/61a7fdd3/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/GroupPullResultHandler.java
----------------------------------------------------------------------
diff --git 
a/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/GroupPullResultHandler.java
 
b/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/GroupPullResultHandler.java
new file mode 100644
index 0000000..247c583
--- /dev/null
+++ 
b/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/GroupPullResultHandler.java
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.core.provisioning.api.pushpull;
+
+import java.util.Map;
+
+public interface GroupPullResultHandler extends SyncopePullResultHandler {
+
+    Map<Long, String> getGroupOwnerMap();
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/61a7fdd3/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/GroupPushResultHandler.java
----------------------------------------------------------------------
diff --git 
a/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/GroupPushResultHandler.java
 
b/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/GroupPushResultHandler.java
new file mode 100644
index 0000000..a080022
--- /dev/null
+++ 
b/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/GroupPushResultHandler.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.core.provisioning.api.pushpull;
+
+public interface GroupPushResultHandler extends SyncopePushResultHandler {
+
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/61a7fdd3/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/IgnoreProvisionException.java
----------------------------------------------------------------------
diff --git 
a/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/IgnoreProvisionException.java
 
b/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/IgnoreProvisionException.java
new file mode 100644
index 0000000..bf56246
--- /dev/null
+++ 
b/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/IgnoreProvisionException.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.core.provisioning.api.pushpull;
+
+/**
+ * Raised by {@link PullActions} or {@link PushActions} methods when the given 
any object is to be ignored for
+ * pull / push.
+ */
+public class IgnoreProvisionException extends RuntimeException {
+
+    private static final long serialVersionUID = -8803817097998786364L;
+
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/61a7fdd3/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/ProvisioningActions.java
----------------------------------------------------------------------
diff --git 
a/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/ProvisioningActions.java
 
b/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/ProvisioningActions.java
new file mode 100644
index 0000000..1470ac1
--- /dev/null
+++ 
b/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/ProvisioningActions.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.core.provisioning.api.pushpull;
+
+import org.quartz.JobExecutionException;
+
+public interface ProvisioningActions {
+
+    /**
+     * Action to be executed before to start the provisioning (push / pull) 
task execution.
+     *
+     * @param profile provisioning profile
+     * @throws JobExecutionException in case of generic failure
+     */
+    void beforeAll(final ProvisioningProfile<?, ?> profile) throws 
JobExecutionException;
+
+    /**
+     * Action to be executed after the provisioning (push / pull) task 
completion.
+     *
+     * @param profile provisioning profile
+     * @throws JobExecutionException in case of generic failure
+     */
+    void afterAll(final ProvisioningProfile<?, ?> profile) throws 
JobExecutionException;
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/61a7fdd3/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/ProvisioningProfile.java
----------------------------------------------------------------------
diff --git 
a/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/ProvisioningProfile.java
 
b/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/ProvisioningProfile.java
new file mode 100644
index 0000000..517908d
--- /dev/null
+++ 
b/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/ProvisioningProfile.java
@@ -0,0 +1,81 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.core.provisioning.api.pushpull;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+import org.apache.syncope.common.lib.types.ConflictResolutionAction;
+import org.apache.syncope.core.persistence.api.entity.task.ProvisioningTask;
+import org.apache.syncope.core.provisioning.api.Connector;
+
+public class ProvisioningProfile<T extends ProvisioningTask, A extends 
ProvisioningActions> {
+
+    /**
+     * Syncing connector.
+     */
+    private final Connector connector;
+
+    private final T task;
+
+    private final List<ProvisioningReport> results = new ArrayList<>();
+
+    private boolean dryRun;
+
+    private ConflictResolutionAction resAct;
+
+    private final List<A> actions = new ArrayList<>();
+
+    public ProvisioningProfile(final Connector connector, final T task) {
+        this.connector = connector;
+        this.task = task;
+    }
+
+    public Connector getConnector() {
+        return connector;
+    }
+
+    public T getTask() {
+        return task;
+    }
+
+    public Collection<ProvisioningReport> getResults() {
+        return results;
+    }
+
+    public boolean isDryRun() {
+        return dryRun;
+    }
+
+    public void setDryRun(final boolean dryRun) {
+        this.dryRun = dryRun;
+    }
+
+    public ConflictResolutionAction getResAct() {
+        return resAct;
+    }
+
+    public void setResAct(final ConflictResolutionAction resAct) {
+        this.resAct = resAct;
+    }
+
+    public List<A> getActions() {
+        return actions;
+    }
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/61a7fdd3/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/ProvisioningReport.java
----------------------------------------------------------------------
diff --git 
a/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/ProvisioningReport.java
 
b/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/ProvisioningReport.java
new file mode 100644
index 0000000..7fa0366
--- /dev/null
+++ 
b/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/ProvisioningReport.java
@@ -0,0 +1,140 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.core.provisioning.api.pushpull;
+
+import java.util.Collection;
+
+import org.apache.commons.lang3.StringUtils;
+import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import org.apache.syncope.common.lib.types.ResourceOperation;
+import org.apache.syncope.common.lib.types.TraceLevel;
+
+public class ProvisioningReport {
+
+    public enum Status {
+
+        SUCCESS,
+        IGNORE,
+        FAILURE
+
+    }
+
+    private String message;
+
+    private Status status;
+
+    private String anyType;
+
+    private ResourceOperation operation;
+
+    private Long key;
+
+    private String name;
+
+    public String getMessage() {
+        return message;
+    }
+
+    public void setMessage(final String message) {
+        this.message = message;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(final String name) {
+        this.name = name;
+    }
+
+    public Long getKey() {
+        return key;
+    }
+
+    public void setKey(final Long key) {
+        this.key = key;
+    }
+
+    public Status getStatus() {
+        return status;
+    }
+
+    public void setStatus(final Status status) {
+        this.status = status;
+    }
+
+    public String getAnyType() {
+        return anyType;
+    }
+
+    public void setAnyType(final String anyType) {
+        this.anyType = anyType;
+    }
+
+    public ResourceOperation getOperation() {
+        return operation;
+    }
+
+    public void setOperation(final ResourceOperation operation) {
+        this.operation = operation;
+    }
+
+    @Override
+    public String toString() {
+        return new ReflectionToStringBuilder(this, 
ToStringStyle.SHORT_PREFIX_STYLE).toString();
+    }
+
+    /**
+     * Human readable report string, using the given trace level.
+     *
+     * @param level trace level
+     * @return String for certain levels, null for level NONE
+     */
+    public String getReportString(final TraceLevel level) {
+        if (level == TraceLevel.SUMMARY) {
+            // No per entry log in this case.
+            return null;
+        } else if (level == TraceLevel.FAILURES && status == Status.FAILURE) {
+            // only report failures
+            return String.format("Failed %s (id/name): %d/%s with message: 
%s", operation, key, name, message);
+        } else {
+            // All
+            return String.format("%s %s (id/name): %d/%s %s", operation, 
status, key, name,
+                    StringUtils.isBlank(message)
+                    ? ""
+                    : "with message: " + message);
+        }
+    }
+
+    /**
+     * Helper method to invoke logging per provisioning result, for the given 
trace level.
+     *
+     * @param results provisioning results
+     * @param level trace level
+     * @return report as string
+     */
+    public static String produceReport(final Collection<ProvisioningReport> 
results, final TraceLevel level) {
+        StringBuilder sb = new StringBuilder();
+        for (ProvisioningReport result : results) {
+            sb.append(result.getReportString(level)).append('\n');
+        }
+        return sb.toString();
+    }
+}

Reply via email to