Skip to content

Commit

Permalink
Group focusType and archetypeRef to "focus spec"
Browse files Browse the repository at this point in the history
This improves the structure of resource object type definition.
  • Loading branch information
mederly committed Jun 20, 2022
1 parent 1f3cb14 commit f675e40
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -303,12 +303,14 @@ public Boolean isSynchronizationOpportunistic() {

@Override
public QName getFocusTypeName() {
return definitionBean.getFocusType();
ResourceObjectFocusSpecificationType focusSpec = definitionBean.getFocus();
return focusSpec != null ? focusSpec.getType() : null;
}

@Override
public @Nullable ObjectReferenceType getArchetypeRef() {
return definitionBean.getArchetypeRef();
ResourceObjectFocusSpecificationType focusSpec = definitionBean.getFocus();
return focusSpec != null ? focusSpec.getArchetypeRef() : null;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -711,35 +711,14 @@
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="focusType" type="xsd:QName" minOccurs="0">
<xsd:element name="focus" type="tns:ResourceObjectFocusSpecificationType" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
Type of the focus that corresponds to this resource object type.
If not specified (neither here nor in synchronization configuration), the User (c:UserType) is assumed.
</xsd:documentation>
<xsd:appinfo>
<a:since>4.6</a:since>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="archetypeRef" type="tns:ObjectReferenceType" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
Focus archetype corresponding to this resource object type. If specified, the value is used during
correlation (i.e. we look for focus objects having specified archetype), as well as during creation
of new focuses.

Notes:

1. Archetypes of existing users are not changed in relation to this setting.

2. In the future, we may consider allowing multiple archetypes here.
Type and archetype (optional) of the focus objects that correspond to this resource object type.
If not specified (neither here nor in synchronization configuration), the UserType is assumed.
</xsd:documentation>
<xsd:appinfo>
<a:since>4.6</a:since>
<xsd:appinfo>
<a:objectReferenceTargetType>tns:ArchetypeType</a:objectReferenceTargetType>
</xsd:appinfo>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
Expand All @@ -755,8 +734,7 @@
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="attribute" minOccurs="0" maxOccurs="unbounded"
type="tns:ResourceAttributeDefinitionType">
<xsd:element name="attribute" minOccurs="0" maxOccurs="unbounded" type="tns:ResourceAttributeDefinitionType">
<xsd:annotation>
<xsd:documentation>
Specification of handling of an account attribute.
Expand Down Expand Up @@ -933,6 +911,52 @@
<xsd:attribute name="id" type="xsd:long"/>
</xsd:complexType>

<xsd:complexType name="ResourceObjectFocusSpecificationType">
<xsd:annotation>
<xsd:documentation>
Specification of focus objects corresponding to given resource object type.
</xsd:documentation>
<xsd:appinfo>
<a:container/>
<a:since>4.6</a:since>
</xsd:appinfo>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="type" type="xsd:QName" minOccurs="0" default="c:UserType">
<xsd:annotation>
<xsd:documentation>
Type of the focus objects.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="archetypeRef" type="tns:ObjectReferenceType" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
Focus archetype corresponding to this resource object type. If specified, the value is used during
correlation (i.e. we look for focus objects having specified archetype), as well as during creation
of new focuses.

Notes:

1. Archetypes of existing users are checked against this value: If an existing user has no archetype,
it is assigned this one. If it has a different one, an error is reported. This behavior may change in the
future.

2. In the future, we may consider allowing multiple archetypes here.

TODO: implement Note 1.
</xsd:documentation>
<xsd:appinfo>
<xsd:appinfo>
<a:objectReferenceTargetType>tns:ArchetypeType</a:objectReferenceTargetType>
</xsd:appinfo>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="id" type="xsd:long"/>
</xsd:complexType>

<xsd:complexType name="ResourceMappingsEvaluationConfigurationType">
<xsd:annotation>
<xsd:documentation>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,9 @@
<intent>group</intent>
<default>false</default>
<objectClass>ri:GroupObjectClass</objectClass>
<focusType>c:RoleType</focusType>
<focus>
<type>RoleType</type>
</focus>
<attribute>
<ref>icfs:name</ref>
<displayName>Group name</displayName>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,13 @@
<kind>account</kind>
<intent>default</intent>
<displayName>Default Account</displayName>
<objectClass>ri:AccountObjectClass</objectClass>
<focusType>UserType</focusType>
<archetypeRef oid="e3a9a6b9-17f6-4239-b935-6f88a655b9d7" />
<delineation>
<objectClass>ri:AccountObjectClass</objectClass>
</delineation>
<focus>
<type>UserType</type>
<archetypeRef oid="e3a9a6b9-17f6-4239-b935-6f88a655b9d7" />
</focus>
<attribute>
<ref>icfs:name</ref>
<inbound>
Expand Down

0 comments on commit f675e40

Please sign in to comment.