Skip to content

Commit

Permalink
Persona schema
Browse files Browse the repository at this point in the history
  • Loading branch information
semancik committed Apr 28, 2017
1 parent 076a0a6 commit aae5732
Show file tree
Hide file tree
Showing 2 changed files with 102 additions and 4 deletions.
104 changes: 101 additions & 3 deletions infra/schema/src/main/resources/xml/ns/public/common/common-core-3.xsd
Expand Up @@ -2131,15 +2131,16 @@
<xsd:annotation>
<xsd:documentation>
<p>
Set of shadows linked to this focal object.
Set of shadows (projections) linked to this focal object.
E.g. a set of accounts linked to a user. This is the set of
shadows that belongs to the focal object in a sense
that these shadows represents the focal object on the resource.
E.g. The set of accounts that represent the same midPoint user (the
same physical person, they are "analogous").
</p>
<p>
Links define what the object HAS. The links reflect real state of things (cf. assignment).
Links define what the object HAS. The links reflect real state of things
(cf. assignment).
</p>
</xsd:documentation>
<xsd:appinfo>
Expand All @@ -2148,6 +2149,33 @@
</xsd:annotation>
</xsd:element>

<xsd:element name="personaRef" type="c:ObjectReferenceType" minOccurs="0" maxOccurs="unbounded">
<xsd:annotation>
<xsd:documentation>
<p>
Set of personas linked to this focal object.
E.g. a set of virtual identities linked to a user. This is the set of
"secondary" focal objects that belongs to this focal object in a sense
that the currect focal object is in control over the linked focal objects.
E.g. this reference can be used to link user object which specified a physical
person with his virtual identities (personas) that specify his identity as an
employee, system administrator, customer, etc.
The deafalt meaning is that the personas are ""analogous", i.e. the represent
different facets of the same physical person. However, this meaning may be
theoretically overridden by using various relation parameters in this reference.
</p>
<p>
This reference define what the object HAS. The links reflect real state of
things (cf. assignment).
</p>
</xsd:documentation>
<xsd:appinfo>
<a:objectReferenceTargetType>tns:FocusType</a:objectReferenceTargetType>
<a:since>3.6</a:since>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>

<xsd:element name="assignment" type="tns:AssignmentType" minOccurs="0" maxOccurs="unbounded">
<xsd:annotation>
<xsd:documentation>
Expand Down Expand Up @@ -3202,14 +3230,28 @@
<xsd:element name="construction" type="tns:ConstructionType" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
TODO
Projection construction. This structure defines how a projection
(e.g. account) should be constructed.
</xsd:documentation>
<xsd:appinfo>
<a:displayName>AssignmentType.construction</a:displayName>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>

<xsd:element name="personaConstruction" type="tns:PersonaConstructionType" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
Persona construction. This structure defines how a persona
(e.g. virtual identity) should be constructed.
</xsd:documentation>
<xsd:appinfo>
<a:displayName>AssignmentType.personaConstruction</a:displayName>
<a:since>3.6</a:since>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>

<xsd:element name="focusMappings" type="tns:MappingsType" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
Expand Down Expand Up @@ -9083,6 +9125,10 @@

<xsd:complexType name="ConstructionType">
<xsd:annotation>
<xsd:documentation>
Projection construction. This structure defines how a projection
(e.g. account) should be constructed.
</xsd:documentation>
<xsd:appinfo>
<a:container/>
</xsd:appinfo>
Expand Down Expand Up @@ -9227,6 +9273,58 @@
</xsd:restriction>
</xsd:simpleType>

<xsd:complexType name="PersonaConstructionType">
<xsd:annotation>
<xsd:documentation>
Persona construction. This structure defines how a persona
(e.g. virtual identity) should be constructed.
</xsd:documentation>
<xsd:appinfo>
<a:container/>
<a:since>3.6</a:since>
</xsd:appinfo>
</xsd:annotation>
<xsd:sequence>
<xsd:element ref="tns:description" minOccurs="0" maxOccurs="1"/>
<xsd:element name="targetType" type="xsd:QName" minOccurs="1">
<xsd:annotation>
<xsd:documentation>
Object type of the target persona (e.g. UserType).
</xsd:documentation>
<xsd:appinfo>
<a:since>3.6</a:since>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="targetSubtype" type="xsd:string" minOccurs="1">
<xsd:annotation>
<xsd:documentation>
Object subtype of the target persona.
Constructions with the same type and substype configuraton are
interpretes as if they describe the same persona.
</xsd:documentation>
<xsd:appinfo>
<a:since>3.6</a:since>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="objectMappingRef" type="c:ObjectReferenceType" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
Reference to the object template that will be used to map values
from the source object (e.g. physical user) to the persona
(e.g. virtual identity user).
Unlike ordinary object template that has the same object as input and
output, this object mapping will have one object as an input and the
other as an output.
</xsd:documentation>
<xsd:appinfo>
<a:objectReferenceTargetType>tns:ObjectTemplateType</a:objectReferenceTargetType>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>

<xsd:complexType name="ObjectTemplateType">
<xsd:annotation>
Expand Down
Expand Up @@ -86,7 +86,7 @@ public static void assertFocusDefinition(ComplexTypeDefinition complexTypeDefini
PrismContainerDefinition<AssignmentType> assignmentContainer = complexTypeDefinition.findContainerDefinition(UserType.F_ASSIGNMENT);
PrismAsserts.assertDefinition(assignmentContainer, UserType.F_ASSIGNMENT, AssignmentType.COMPLEX_TYPE, 0, -1);
assertFalse("Assignment is runtime", assignmentContainer.isRuntimeSchema());
assertEquals("Assignment definition size", 20, assignmentContainer.getDefinitions().size());
assertEquals("Assignment definition size", 21, assignmentContainer.getDefinitions().size());

PrismContainerDefinition<ConstructionType> constructionContainer = assignmentContainer.findContainerDefinition(AssignmentType.F_CONSTRUCTION);
PrismAsserts.assertDefinition(constructionContainer, AssignmentType.F_CONSTRUCTION, ConstructionType.COMPLEX_TYPE, 0, 1);
Expand Down

0 comments on commit aae5732

Please sign in to comment.