Skip to content

Commit

Permalink
Add target systems (currently as CSV files)
Browse files Browse the repository at this point in the history
  • Loading branch information
mederly committed Apr 2, 2019
1 parent 9a322a6 commit 8fd53e8
Show file tree
Hide file tree
Showing 11 changed files with 400 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,4 @@
<path>assignment</path>
</target>
</mapping>

</objectTemplate>
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,4 @@
<path>assignment</path>
</target>
</mapping>

</objectTemplate>
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,4 @@
<path>assignment</path>
</target>
</mapping>

</objectTemplate>
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,4 @@
<path>assignment</path>
</target>
</mapping>

</objectTemplate>
111 changes: 111 additions & 0 deletions demo/complex/midpoint-objects/resources/target-cs-portal.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
<c:resource oid="a343fc2e-3954-4034-ba1a-2b72c21e577a" xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3" xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:q="http://prism.evolveum.com/xml/ns/public/query-3"
xmlns:t="http://prism.evolveum.com/xml/ns/public/types-3" xmlns:ri="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3" xmlns:my="http://myself.me/schemas/whatever"
xmlns:icfs="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/resource-schema-3" xmlns:icfc="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/connector-schema-3">

<c:name>Target: Computer science portal (CSV)</c:name>

<connectorRef type="ConnectorType">
<filter>
<q:equal>
<q:path>c:connectorType</q:path>
<q:value>com.evolveum.polygon.connector.csv.CsvConnector</q:value>
</q:equal>
</filter>
</connectorRef>

<connectorConfiguration xmlns:icfi="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/bundle/com.evolveum.polygon.connector-csv/com.evolveum.polygon.connector.csv.CsvConnector">

<icfc:configurationProperties>
<icfi:filePath>/opt/midpoint/var/cs-portal.csv</icfi:filePath>
<icfi:encoding>utf-8</icfi:encoding>
<icfi:fieldDelimiter>,</icfi:fieldDelimiter>
<icfi:multivalueDelimiter>;</icfi:multivalueDelimiter>
<icfi:uniqueAttribute>identifier</icfi:uniqueAttribute>
</icfc:configurationProperties>

</connectorConfiguration>

<schemaHandling>
<objectType>
<displayName>Default Account</displayName>
<default>true</default>
<objectClass>ri:AccountObjectClass</objectClass>
<attribute>
<ref>ri:identifier</ref>
<outbound>
<strength>strong</strength>
<source>
<path>name</path>
</source>
</outbound>
</attribute>
<attribute>
<ref>ri:name</ref>
<outbound>
<strength>strong</strength>
<source>
<path>fullName</path>
</source>
</outbound>
</attribute>
<attribute>
<ref>ri:mail</ref>
<outbound>
<strength>strong</strength>
<source>
<path>emailAddress</path>
</source>
</outbound>
</attribute>
<attribute>
<ref>ri:courses</ref>
<limitations>
<maxOccurs>unbounded</maxOccurs>
</limitations>
<tolerant>false</tolerant>
<!-- outbound is in metarole-course -->
</attribute>
</objectType>
</schemaHandling>
<capabilities xmlns:cap="http://midpoint.evolveum.com/xml/ns/public/resource/capabilities-3">
<configured>
</configured>
</capabilities>
<synchronization>
<objectSynchronization>
<enabled>true</enabled>
<correlation>
<q:equal>
<q:path>name</q:path>
<expression>
<path>
$account/attributes/identifier
</path>
</expression>
</q:equal>
</correlation>
<reaction>
<situation>linked</situation>
<action>
<handlerUri>http://midpoint.evolveum.com/xml/ns/public/model/action-3#modifyUser</handlerUri>
</action>
</reaction>
<reaction>
<situation>deleted</situation>
<action>
<handlerUri>http://midpoint.evolveum.com/xml/ns/public/model/action-3#unlinkAccount</handlerUri>
</action>
</reaction>
<reaction>
<situation>unlinked</situation>
<action>
<handlerUri>http://midpoint.evolveum.com/xml/ns/public/model/action-3#linkAccount</handlerUri>
</action>
</reaction>
<reaction>
<situation>unmatched</situation>
</reaction>
</objectSynchronization>
</synchronization>
</c:resource>
120 changes: 120 additions & 0 deletions demo/complex/midpoint-objects/resources/target-faculty-portal.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
<c:resource oid="e417225d-8a08-46f3-9b5d-624990b52386" xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3" xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:q="http://prism.evolveum.com/xml/ns/public/query-3"
xmlns:t="http://prism.evolveum.com/xml/ns/public/types-3" xmlns:ri="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3" xmlns:my="http://myself.me/schemas/whatever"
xmlns:icfs="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/resource-schema-3" xmlns:icfc="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/connector-schema-3">

<c:name>Target: Faculty portal (CSV)</c:name>

<connectorRef type="ConnectorType">
<filter>
<q:equal>
<q:path>c:connectorType</q:path>
<q:value>com.evolveum.polygon.connector.csv.CsvConnector</q:value>
</q:equal>
</filter>
</connectorRef>

<connectorConfiguration xmlns:icfi="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/bundle/com.evolveum.polygon.connector-csv/com.evolveum.polygon.connector.csv.CsvConnector">

<icfc:configurationProperties>
<icfi:filePath>/opt/midpoint/var/faculty-portal.csv</icfi:filePath>
<icfi:encoding>utf-8</icfi:encoding>
<icfi:fieldDelimiter>,</icfi:fieldDelimiter>
<icfi:multivalueDelimiter>;</icfi:multivalueDelimiter>
<icfi:uniqueAttribute>uid</icfi:uniqueAttribute>
</icfc:configurationProperties>

</connectorConfiguration>
<schemaHandling>
<objectType>
<displayName>Default Account</displayName>
<default>true</default>
<objectClass>ri:AccountObjectClass</objectClass>
<attribute>
<ref>ri:uid</ref>
<outbound>
<strength>strong</strength>
<source>
<path>name</path>
</source>
</outbound>
</attribute>
<attribute>
<ref>ri:givenName</ref>
<outbound>
<strength>strong</strength>
<source>
<path>givenName</path>
</source>
</outbound>
</attribute>
<attribute>
<ref>ri:familyName</ref>
<outbound>
<strength>strong</strength>
<source>
<path>familyName</path>
</source>
</outbound>
</attribute>
<attribute>
<ref>ri:fullName</ref>
<outbound>
<strength>strong</strength>
<source>
<path>fullName</path>
</source>
</outbound>
</attribute>
<attribute>
<ref>ri:mail</ref>
<outbound>
<strength>strong</strength>
<source>
<path>emailAddress</path>
</source>
</outbound>
</attribute>
</objectType>
</schemaHandling>
<capabilities xmlns:cap="http://midpoint.evolveum.com/xml/ns/public/resource/capabilities-3">
<configured>
</configured>
</capabilities>
<synchronization>
<objectSynchronization>
<enabled>true</enabled>
<correlation>
<q:equal>
<q:path>name</q:path>
<expression>
<path>
$account/attributes/uid
</path>
</expression>
</q:equal>
</correlation>
<reaction>
<situation>linked</situation>
<action>
<handlerUri>http://midpoint.evolveum.com/xml/ns/public/model/action-3#modifyUser</handlerUri>
</action>
</reaction>
<reaction>
<situation>deleted</situation>
<action>
<handlerUri>http://midpoint.evolveum.com/xml/ns/public/model/action-3#unlinkAccount</handlerUri>
</action>
</reaction>
<reaction>
<situation>unlinked</situation>
<action>
<handlerUri>http://midpoint.evolveum.com/xml/ns/public/model/action-3#linkAccount</handlerUri>
</action>
</reaction>
<reaction>
<situation>unmatched</situation>
</reaction>
</objectSynchronization>
</synchronization>
</c:resource>
101 changes: 101 additions & 0 deletions demo/complex/midpoint-objects/resources/target-mailing-lists.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
<c:resource oid="fe805d13-481b-43ec-97d8-9d2df72cd38e" xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3" xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:q="http://prism.evolveum.com/xml/ns/public/query-3"
xmlns:t="http://prism.evolveum.com/xml/ns/public/types-3" xmlns:ri="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3" xmlns:my="http://myself.me/schemas/whatever"
xmlns:icfs="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/resource-schema-3" xmlns:icfc="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/connector-schema-3">

<c:name>Target: Mailing lists (CSV)</c:name>

<connectorRef type="ConnectorType">
<filter>
<q:equal>
<q:path>c:connectorType</q:path>
<q:value>com.evolveum.polygon.connector.csv.CsvConnector</q:value>
</q:equal>
</filter>
</connectorRef>

<connectorConfiguration xmlns:icfi="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/bundle/com.evolveum.polygon.connector-csv/com.evolveum.polygon.connector.csv.CsvConnector">

<icfc:configurationProperties>
<icfi:filePath>/opt/midpoint/var/mailing-lists.csv</icfi:filePath>
<icfi:encoding>utf-8</icfi:encoding>
<icfi:fieldDelimiter>,</icfi:fieldDelimiter>
<icfi:multivalueDelimiter>;</icfi:multivalueDelimiter>
<icfi:uniqueAttribute>uid</icfi:uniqueAttribute>
</icfc:configurationProperties>

</connectorConfiguration>
<schemaHandling>
<objectType>
<displayName>Default Account</displayName>
<default>true</default>
<objectClass>ri:AccountObjectClass</objectClass>
<attribute>
<ref>ri:uid</ref>
<outbound>
<strength>strong</strength>
<source>
<path>name</path>
</source>
</outbound>
</attribute>
<attribute>
<ref>ri:mail</ref>
<outbound>
<strength>strong</strength>
<source>
<path>emailAddress</path>
</source>
</outbound>
</attribute>
<attribute>
<ref>ri:lists</ref>
<limitations>
<maxOccurs>unbounded</maxOccurs>
</limitations>
<tolerant>false</tolerant>
<!-- outbound is in metarole-mailing-list -->
</attribute>
</objectType>
</schemaHandling>
<capabilities xmlns:cap="http://midpoint.evolveum.com/xml/ns/public/resource/capabilities-3">
<configured>
</configured>
</capabilities>
<synchronization>
<objectSynchronization>
<enabled>true</enabled>
<correlation>
<q:equal>
<q:path>name</q:path>
<expression>
<path>
$account/attributes/uid
</path>
</expression>
</q:equal>
</correlation>
<reaction>
<situation>linked</situation>
<action>
<handlerUri>http://midpoint.evolveum.com/xml/ns/public/model/action-3#modifyUser</handlerUri>
</action>
</reaction>
<reaction>
<situation>deleted</situation>
<action>
<handlerUri>http://midpoint.evolveum.com/xml/ns/public/model/action-3#unlinkAccount</handlerUri>
</action>
</reaction>
<reaction>
<situation>unlinked</situation>
<action>
<handlerUri>http://midpoint.evolveum.com/xml/ns/public/model/action-3#linkAccount</handlerUri>
</action>
</reaction>
<reaction>
<situation>unmatched</situation>
</reaction>
</objectSynchronization>
</synchronization>
</c:resource>
14 changes: 13 additions & 1 deletion demo/complex/midpoint-objects/roles/metarole-affiliation.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,17 @@
</construction>
<order>2</order>
</inducement>

<inducement id="4">
<construction>
<resourceRef oid="e417225d-8a08-46f3-9b5d-624990b52386" relation="org:default" type="c:ResourceType" /> <!-- Faculty CSV -->
</construction>
<order>2</order>
<condition>
<expression>
<script>
<code>assignmentPath[0].target.identifier == 'faculty'</code>
</script>
</expression>
</condition>
</inducement>
</role>
Loading

0 comments on commit 8fd53e8

Please sign in to comment.