Skip to content

Commit

Permalink
Generalize async update data structure naming
Browse files Browse the repository at this point in the history
  • Loading branch information
mederly committed Mar 7, 2019
1 parent 19837d9 commit 597c3ea
Show file tree
Hide file tree
Showing 19 changed files with 1,616 additions and 506 deletions.
2 changes: 1 addition & 1 deletion infra/schema-pure-jaxb/src/compile/resources/catalog.xml
Expand Up @@ -32,7 +32,7 @@ Used when building via xjc.
<system systemId="http://midpoint.evolveum.com/xml/ns/public/common/common-core-3" uri="../../../target/midpoint-schema/xml/ns/public/common/common-core-3.xsd" />
<system systemId="http://midpoint.evolveum.com/xml/ns/public/common/common-model-context-3" uri="../../../target/midpoint-schema/xml/ns/public/common/common-model-context-3.xsd" />
<system systemId="http://midpoint.evolveum.com/xml/ns/public/common/common-notifications-3" uri="../../../target/midpoint-schema/xml/ns/public/common/common-notifications-3.xsd" />
<system systemId="http://midpoint.evolveum.com/xml/ns/public/common/common-messaging-3" uri="../../../target/midpoint-schema/xml/ns/public/common/common-messaging-3.xsd" />
<system systemId="http://midpoint.evolveum.com/xml/ns/public/common/common-asynchronous-3" uri="../../../target/midpoint-schema/xml/ns/public/common/common-asynchronous-3.xsd" />
<system systemId="http://midpoint.evolveum.com/xml/ns/public/common/common-workflows-3" uri="../../../target/midpoint-schema/xml/ns/public/common/common-workflows-3.xsd" />
<system systemId="http://midpoint.evolveum.com/xml/ns/public/common/common-policy-3" uri="../../../target/midpoint-schema/xml/ns/public/common/common-policy-3.xsd" />
<system systemId="http://midpoint.evolveum.com/xml/ns/public/common/common-case-management-3" uri="../../../target/midpoint-schema/xml/ns/public/common/common-case-management-3.xsd" />
Expand Down
Expand Up @@ -49,7 +49,7 @@ Notes:
<system systemId="http://midpoint.evolveum.com/xml/ns/public/common/common-core-3" uri="../xml/ns/public/common/common-core-3.xsd" />
<system systemId="http://midpoint.evolveum.com/xml/ns/public/common/common-model-context-3" uri="../xml/ns/public/common/common-model-context-3.xsd" />
<system systemId="http://midpoint.evolveum.com/xml/ns/public/common/common-notifications-3" uri="../xml/ns/public/common/common-notifications-3.xsd" />
<system systemId="http://midpoint.evolveum.com/xml/ns/public/common/common-messaging-3" uri="../xml/ns/public/common/common-messaging-3.xsd" />
<system systemId="http://midpoint.evolveum.com/xml/ns/public/common/common-asynchronous-3" uri="../xml/ns/public/common/common-asynchronous-3.xsd" />
<system systemId="http://midpoint.evolveum.com/xml/ns/public/common/common-workflows-3" uri="../xml/ns/public/common/common-workflows-3.xsd" />
<system systemId="http://midpoint.evolveum.com/xml/ns/public/common/common-policy-3" uri="../xml/ns/public/common/common-policy-3.xsd" />
<system systemId="http://midpoint.evolveum.com/xml/ns/public/common/common-case-management-3" uri="../xml/ns/public/common/common-case-management-3.xsd" />
Expand Down
Expand Up @@ -100,7 +100,7 @@
<xsd:include schemaLocation="http://midpoint.evolveum.com/xml/ns/public/common/common-certification-3"/>
<xsd:include schemaLocation="http://midpoint.evolveum.com/xml/ns/public/common/common-model-context-3"/>
<xsd:include schemaLocation="http://midpoint.evolveum.com/xml/ns/public/common/common-notifications-3"/>
<xsd:include schemaLocation="http://midpoint.evolveum.com/xml/ns/public/common/common-messaging-3"/>
<xsd:include schemaLocation="http://midpoint.evolveum.com/xml/ns/public/common/common-asynchronous-3"/>
<xsd:include schemaLocation="http://midpoint.evolveum.com/xml/ns/public/common/common-workflows-3"/>
<xsd:include schemaLocation="http://midpoint.evolveum.com/xml/ns/public/common/common-policy-3"/>
<xsd:include schemaLocation="http://midpoint.evolveum.com/xml/ns/public/common/common-case-management-3"/>
Expand Down
Expand Up @@ -40,42 +40,22 @@

<xsd:include schemaLocation="http://midpoint.evolveum.com/xml/ns/public/common/common-core-3" />

<xsd:complexType name="MessageSourceConfigurationType">
<xsd:complexType name="AsyncUpdateSourceType">
<xsd:annotation>
<xsd:documentation>
Messaging client configuration
Source of asynchronous updates.
</xsd:documentation>
<xsd:appinfo>
<a:since>4.0</a:since>
</xsd:appinfo>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="uri" type="xsd:anyURI" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
Connection URI.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="username" type="xsd:string" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
User name used to authenticate to AMQP server.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="password" type="t:ProtectedStringType" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
Password used to authenticate to AMQP server.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<!-- nothing here now -->
</xsd:sequence>
</xsd:complexType>
<xsd:element name="messageSourceConfigurationType" type="tns:MessageSourceConfigurationType"/>
<xsd:element name="asyncUpdateSource" type="tns:AsyncUpdateSourceType"/>

<xsd:complexType name="Amqp091SourceConfigurationType">
<xsd:complexType name="Amqp091SourceType">
<xsd:annotation>
<xsd:documentation>
AMQP client configuration
Expand All @@ -85,8 +65,29 @@
</xsd:appinfo>
</xsd:annotation>
<xsd:complexContent>
<xsd:extension base="tns:MessageSourceConfigurationType">
<xsd:extension base="tns:AsyncUpdateSourceType">
<xsd:sequence>
<xsd:element name="uri" type="xsd:anyURI" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
Connection URI.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="username" type="xsd:string" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
User name used to authenticate to AMQP server.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="password" type="t:ProtectedStringType" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
Password used to authenticate to AMQP server.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="virtualHost" type="xsd:string" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
Expand All @@ -105,51 +106,37 @@
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:element name="amqp091SourceConfigurationType" type="tns:Amqp091SourceConfigurationType"/>
<xsd:element name="amqp091SourceType" type="tns:Amqp091SourceType"/>

<xsd:complexType name="MessageProcessingConfigurationType">
<xsd:complexType name="CustomAsyncUpdateSourceType">
<xsd:annotation>
<xsd:documentation>
Message processing configuration.
Custom message source provided by a Java class.
</xsd:documentation>
<xsd:appinfo>
<a:since>4.0</a:since>
</xsd:appinfo>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="source" type="tns:MessageSourceConfigurationType" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
Source of messages.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="consumerExpression" type="tns:ExpressionType" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
Expression that receives a message and consumes it. Returns true if the message is to be acknowledged;
null, false or exception otherwise.
Mutually exclusive with transformerExpression.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="transformerExpression" type="tns:ExpressionType" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
Expression that transforms a message into a set of ResourceObjectShadowChangeDescriptionType,
to be processed as a change. Returns null or an empty set if the message is to be simply discarded.
Mutually exclusive with consumerExpression.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
<xsd:complexContent>
<xsd:extension base="tns:AsyncUpdateSourceType">
<xsd:sequence>
<xsd:element name="className" type="xsd:string" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
Java class name implementing CustomAsyncUpdateSource interface.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:element name="messageProcessingConfiguration" type="tns:MessageProcessingConfigurationType"/>
<xsd:element name="customAsyncUpdateSource" type="tns:CustomAsyncUpdateSourceType"/>

<xsd:complexType name="DataMessageType">
<xsd:complexType name="AsyncUpdateMessageType">
<xsd:annotation>
<xsd:documentation>
Representation of JMS/AMQP message.
Representation of an async update message.
</xsd:documentation>
<xsd:appinfo>
<a:since>4.0</a:since>
Expand All @@ -159,7 +146,7 @@
<!-- currently there are no common attributes now -->
</xsd:sequence>
</xsd:complexType>
<xsd:element name="dataMessage" type="tns:DataMessageType"/>
<xsd:element name="asyncUpdateMessage" type="tns:AsyncUpdateMessageType"/>

<xsd:complexType name="Amqp091MessageType">
<xsd:annotation>
Expand All @@ -171,7 +158,7 @@
</xsd:appinfo>
</xsd:annotation>
<xsd:complexContent>
<xsd:extension base="tns:DataMessageType">
<xsd:extension base="tns:AsyncUpdateMessageType">
<xsd:sequence>
<xsd:element name="attributes" type="tns:Amqp091MessageAttributesType" minOccurs="0">
<xsd:annotation>
Expand Down Expand Up @@ -206,7 +193,7 @@
<xsd:element name="contentType" type="xsd:string" minOccurs="0" />
<xsd:element name="contentEncoding" type="xsd:string" minOccurs="0" />
<xsd:element name="routingKey" type="xsd:string" minOccurs="0" />
<xsd:element name="deliveryMode" type="tns:DataMessageDeliveryMode" minOccurs="0"/>
<xsd:element name="deliveryMode" type="tns:MessageDeliveryMode" minOccurs="0"/>
<xsd:element name="priority" type="xsd:int" minOccurs="0"/>
<xsd:element name="correlationId" type="xsd:string" minOccurs="0" />
<xsd:element name="replyTo" type="xsd:string" minOccurs="0" />
Expand All @@ -217,7 +204,7 @@
<xsd:element name="userId" type="xsd:string" minOccurs="0"/>
<xsd:element name="appId" type="xsd:string" minOccurs="0"/>

<xsd:element name="other" type="tns:DataMessagePropertyType" minOccurs="0" maxOccurs="unbounded">
<xsd:element name="other" type="tns:MessagePropertyType" minOccurs="0" maxOccurs="unbounded">
<xsd:annotation>
<xsd:documentation>
Message attributes (key-value pairs), other than the standard ones.
Expand All @@ -227,7 +214,7 @@
</xsd:sequence>
</xsd:complexType>

<xsd:complexType name="DataMessagePropertyType">
<xsd:complexType name="MessagePropertyType">
<xsd:annotation>
<xsd:documentation>
Message property (key-value pair).
Expand Down Expand Up @@ -257,7 +244,7 @@
</xsd:sequence>
</xsd:complexType>

<xsd:simpleType name="DataMessageDeliveryMode">
<xsd:simpleType name="MessageDeliveryMode">
<xsd:annotation>
<xsd:documentation>
Delivery mode. Not all modes are applicable to all message types (JMS, AMQP 0-9-1, AMQP 1.0, etc).
Expand Down
Expand Up @@ -38,7 +38,7 @@
<xsd:include schemaLocation="http://midpoint.evolveum.com/xml/ns/public/common/common-model-context-3" />
<xsd:include schemaLocation="http://midpoint.evolveum.com/xml/ns/public/common/common-certification-3" />
<xsd:include schemaLocation="http://midpoint.evolveum.com/xml/ns/public/common/common-notifications-3" />
<xsd:include schemaLocation="http://midpoint.evolveum.com/xml/ns/public/common/common-messaging-3" />
<xsd:include schemaLocation="http://midpoint.evolveum.com/xml/ns/public/common/common-asynchronous-3" />
<xsd:include schemaLocation="http://midpoint.evolveum.com/xml/ns/public/common/common-workflows-3" />
<xsd:include schemaLocation="http://midpoint.evolveum.com/xml/ns/public/common/common-policy-3" />
<xsd:include schemaLocation="http://midpoint.evolveum.com/xml/ns/public/common/common-case-management-3" />
Expand Down
Expand Up @@ -727,11 +727,11 @@ void notifyChange(ResourceObjectShadowChangeDescriptionType changeDescription, T
ObjectNotFoundException, ObjectAlreadyExistsException, ExpressionEvaluationException, PolicyViolationException,
PreconditionViolationException;

void notifyChange(DataMessageType message, MessageProcessingConfigurationType processing,
ResourceType resourceType, Task task, OperationResult parentResult)
throws SchemaException, CommunicationException, ConfigurationException, SecurityViolationException,
ObjectNotFoundException, ObjectAlreadyExistsException, ExpressionEvaluationException, PolicyViolationException,
PreconditionViolationException;
// void notifyChange(AsyncUpdateMessageType message, MessageProcessingConfigurationType processing,
// ResourceType resourceType, Task task, OperationResult parentResult)
// throws SchemaException, CommunicationException, ConfigurationException, SecurityViolationException,
// ObjectNotFoundException, ObjectAlreadyExistsException, ExpressionEvaluationException, PolicyViolationException,
// PreconditionViolationException;

@NotNull
PrismContext getPrismContext();
Expand Down
Expand Up @@ -32,7 +32,7 @@ Used when building via xjc.
<system systemId="http://midpoint.evolveum.com/xml/ns/public/common/common-core-3" uri="../../../target/midpoint-schema/xml/ns/public/common/common-core-3.xsd" />
<system systemId="http://midpoint.evolveum.com/xml/ns/public/common/common-model-context-3" uri="../../../target/midpoint-schema/xml/ns/public/common/common-model-context-3.xsd" />
<system systemId="http://midpoint.evolveum.com/xml/ns/public/common/common-notifications-3" uri="../../../target/midpoint-schema/xml/ns/public/common/common-notifications-3.xsd" />
<system systemId="http://midpoint.evolveum.com/xml/ns/public/common/common-messaging-3" uri="../../../target/midpoint-schema/xml/ns/public/common/common-messaging-3.xsd" />
<system systemId="http://midpoint.evolveum.com/xml/ns/public/common/common-asynchronous-3" uri="../../../target/midpoint-schema/xml/ns/public/common/common-asynchronous-3.xsd" />
<system systemId="http://midpoint.evolveum.com/xml/ns/public/common/common-workflows-3" uri="../../../target/midpoint-schema/xml/ns/public/common/common-workflows-3.xsd" />
<system systemId="http://midpoint.evolveum.com/xml/ns/public/common/common-policy-3" uri="../../../target/midpoint-schema/xml/ns/public/common/common-policy-3.xsd" />
<system systemId="http://midpoint.evolveum.com/xml/ns/public/common/common-case-management-3" uri="../../../target/midpoint-schema/xml/ns/public/common/common-case-management-3.xsd" />
Expand Down
Expand Up @@ -32,7 +32,7 @@ Used at run time by SOAP clients.
<system systemId="http://midpoint.evolveum.com/xml/ns/public/common/common-core-3" uri="../xml/ns/public/common/common-core-3.xsd" />
<system systemId="http://midpoint.evolveum.com/xml/ns/public/common/common-model-context-3" uri="../xml/ns/public/common/common-model-context-3.xsd" />
<system systemId="http://midpoint.evolveum.com/xml/ns/public/common/common-notifications-3" uri="../xml/ns/public/common/common-notifications-3.xsd" />
<system systemId="http://midpoint.evolveum.com/xml/ns/public/common/common-messaging-3" uri="../xml/ns/public/common/common-messaging-3.xsd" />
<system systemId="http://midpoint.evolveum.com/xml/ns/public/common/common-asynchronous-3" uri="../xml/ns/public/common/common-asynchronous-3.xsd" />
<system systemId="http://midpoint.evolveum.com/xml/ns/public/common/common-workflows-3" uri="../xml/ns/public/common/common-workflows-3.xsd" />
<system systemId="http://midpoint.evolveum.com/xml/ns/public/common/common-policy-3" uri="../xml/ns/public/common/common-policy-3.xsd" />
<system systemId="http://midpoint.evolveum.com/xml/ns/public/common/common-case-management-3" uri="../xml/ns/public/common/common-case-management-3.xsd" />
Expand Down
Expand Up @@ -2391,11 +2391,11 @@ public void notifyChange(ResourceObjectShadowChangeDescriptionType changeDescrip
task.setResult(parentResult);
}

@Override
public void notifyChange(DataMessageType message, MessageProcessingConfigurationType processing, ResourceType resource, Task task,
OperationResult parentResult) throws SchemaException, CommunicationException, ConfigurationException, SecurityViolationException,
ObjectNotFoundException, ObjectAlreadyExistsException, ExpressionEvaluationException, PolicyViolationException,
PreconditionViolationException {
messageProcessor.processMessage(message, processing, resource, task, parentResult);
}
// @Override
// public void notifyChange(DataMessageType message, MessageProcessingConfigurationType processing, ResourceType resource, Task task,
// OperationResult parentResult) throws SchemaException, CommunicationException, ConfigurationException, SecurityViolationException,
// ObjectNotFoundException, ObjectAlreadyExistsException, ExpressionEvaluationException, PolicyViolationException,
// PreconditionViolationException {
// messageProcessor.processMessage(message, processing, resource, task, parentResult);
// }
}

0 comments on commit 597c3ea

Please sign in to comment.