Commit f7a7eef2 authored by Marco Descher's avatar Marco Descher 🏔

[16515] Remove message parties

parent b433214a
Pipeline #11264 failed with stages
in 47 seconds
......@@ -28,8 +28,6 @@ import org.slf4j.LoggerFactory;
import ch.elexis.core.model.IMessage;
import ch.elexis.core.model.IUser;
import ch.elexis.core.model.message.MessageCode;
import ch.elexis.core.model.message.MessageParty;
import ch.elexis.core.model.message.MessageParty.MessagePartyType;
import ch.elexis.core.model.tasks.IIdentifiedRunnable;
import ch.elexis.core.model.tasks.IIdentifiedRunnable.ReturnParameter;
import ch.elexis.core.model.tasks.IIdentifiedRunnableFactory;
......@@ -277,8 +275,7 @@ public class TaskServiceImpl implements ITaskService {
private void sendMessageToOwner(ITask task, IUser owner, TaskState state){
IMessage message = messageService
.prepare(new MessageParty(contextService.getRootContext().getStationIdentifier(),
MessagePartyType.STATION), new MessageParty(owner.getId()));
.prepare(contextService.getRootContext().getStationIdentifier(), owner.getId());
message.addMessageCode(MessageCode.Key.SenderSubId, "tasks.taskservice");
message.setSenderAcceptsAnswer(false);
......
......@@ -899,26 +899,34 @@
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="IMessage" abstract="true" interface="true"
eSuperTypes="#//Identifiable #//Deleteable">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="A message sent between the involved message parties (see IMessageParty)"/>
</eAnnotations>
<eOperations name="setSender">
<eParameters name="user" eType="#//IUser"/>
</eOperations>
<eOperations name="addReceiver">
<eParameters name="addReceiver" eType="#//IMessageParty"/>
</eOperations>
<eOperations name="addMessageCode">
<eParameters name="key" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eParameters name="value" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eOperations>
<eStructuralFeatures xsi:type="ecore:EReference" name="sender" lowerBound="1"
eType="#//IMessageParty"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="receiver" lowerBound="1"
upperBound="-1" eType="#//IMessageParty"/>
<eOperations name="addReceiver">
<eParameters name="receiver" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eOperations>
<eOperations name="addReceiver">
<eParameters name="receiver" eType="#//IUser"/>
</eOperations>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="sender" lowerBound="1"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="The sender of the message. Possibly a userid that may be resolved to an IUser or another identifier (e.g. a station or system name)."/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="receiver" upperBound="-1"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="The list of receivers. If empty, send message to everybody."/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="senderAcceptsAnswer" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="wether the sender of this message will accept or handle answer (e.g. a message sent by the system to an IUser will not necessarily be handled)"/>
<details key="documentation" value="wether the sender of this message will accept or handle an answer, i.e. unidirectional communication."/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="createDateTime" eType="ecore:EDataType types.ecore#//LocalDateTime"/>
......@@ -939,17 +947,4 @@
<eStructuralFeatures xsi:type="ecore:EAttribute" name="messagePriority" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"
defaultValueLiteral="0"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="IMessageParty" abstract="true" interface="true">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="A station, user or other type if message party."/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="identifier" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
changeable="false"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="type" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"
changeable="false" defaultValueLiteral="0">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="The message party type: 0=user (default), 1=station; more to follow on requirement"/>
</eAnnotations>
</eStructuralFeatures>
</eClassifiers>
</ecore:EPackage>
......@@ -611,8 +611,8 @@
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute model.ecore#//IAccount/numeric"/>
</genClasses>
<genClasses image="false" ecoreClass="model.ecore#//IMessage">
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference model.ecore#//IMessage/sender"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference model.ecore#//IMessage/receiver"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EAttribute model.ecore#//IMessage/sender"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EAttribute model.ecore#//IMessage/receiver"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute model.ecore#//IMessage/senderAcceptsAnswer"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute model.ecore#//IMessage/createDateTime"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute model.ecore#//IMessage/messageText"/>
......@@ -621,17 +621,16 @@
<genOperations ecoreOperation="model.ecore#//IMessage/setSender">
<genParameters ecoreParameter="model.ecore#//IMessage/setSender/user"/>
</genOperations>
<genOperations ecoreOperation="model.ecore#//IMessage/addReceiver">
<genParameters ecoreParameter="model.ecore#//IMessage/addReceiver/addReceiver"/>
</genOperations>
<genOperations ecoreOperation="model.ecore#//IMessage/addMessageCode">
<genParameters ecoreParameter="model.ecore#//IMessage/addMessageCode/key"/>
<genParameters ecoreParameter="model.ecore#//IMessage/addMessageCode/value"/>
</genOperations>
</genClasses>
<genClasses image="false" ecoreClass="model.ecore#//IMessageParty">
<genFeatures property="Readonly" createChild="false" ecoreFeature="ecore:EAttribute model.ecore#//IMessageParty/identifier"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute model.ecore#//IMessageParty/type"/>
<genOperations ecoreOperation="model.ecore#//IMessage/addReceiver">
<genParameters ecoreParameter="model.ecore#//IMessage/addReceiver/receiver"/>
</genOperations>
<genOperations ecoreOperation="model.ecore#//IMessage/addReceiver.1">
<genParameters ecoreParameter="model.ecore#//IMessage/addReceiver.1/receiver"/>
</genOperations>
</genClasses>
</genPackages>
</genmodel:GenModel>
......@@ -20,10 +20,6 @@ import java.util.Map;
* A representation of the model object '<em><b>IMessage</b></em>'.
* <!-- end-user-doc -->
*
* <!-- begin-model-doc -->
* A message sent between the involved message parties (see IMessageParty)
* <!-- end-model-doc -->
*
* <p>
* The following features are supported:
* </p>
......@@ -43,53 +39,59 @@ import java.util.Map;
*/
public interface IMessage extends Identifiable, Deleteable {
/**
* Returns the value of the '<em><b>Sender</b></em>' reference.
* Returns the value of the '<em><b>Sender</b></em>' attribute.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Sender</em>' reference isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Sender</em>' reference.
* @see #setSender(IMessageParty)
* <!-- begin-model-doc -->
* The sender of the message. Possibly a userid that may be resolved to an IUser or another identifier (e.g. a station or system name).
* <!-- end-model-doc -->
* @return the value of the '<em>Sender</em>' attribute.
* @see #setSender(String)
* @see ch.elexis.core.model.ModelPackage#getIMessage_Sender()
* @model required="true"
* @generated
*/
IMessageParty getSender();
String getSender();
/**
* Sets the value of the '{@link ch.elexis.core.model.IMessage#getSender <em>Sender</em>}' reference.
* Sets the value of the '{@link ch.elexis.core.model.IMessage#getSender <em>Sender</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Sender</em>' reference.
* @param value the new value of the '<em>Sender</em>' attribute.
* @see #getSender()
* @generated
*/
void setSender(IMessageParty value);
void setSender(String value);
/**
* Returns the value of the '<em><b>Receiver</b></em>' reference list.
* The list contents are of type {@link ch.elexis.core.model.IMessageParty}.
* Returns the value of the '<em><b>Receiver</b></em>' attribute list.
* The list contents are of type {@link java.lang.String}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Receiver</em>' reference list isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Receiver</em>' reference list.
* <!-- begin-model-doc -->
* The list of receivers. If empty, send message to everybody.
* <!-- end-model-doc -->
* @return the value of the '<em>Receiver</em>' attribute list.
* @see ch.elexis.core.model.ModelPackage#getIMessage_Receiver()
* @model required="true"
* @model
* @generated
*/
List<IMessageParty> getReceiver();
List<String> getReceiver();
/**
* Returns the value of the '<em><b>Sender Accepts Answer</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* wether the sender of this message will accept or handle answer (e.g. a message sent by the system to an IUser will not necessarily be handled)
* wether the sender of this message will accept or handle an answer, i.e. unidirectional communication.
* <!-- end-model-doc -->
* @return the value of the '<em>Sender Accepts Answer</em>' attribute.
* @see #setSenderAcceptsAnswer(boolean)
......@@ -226,7 +228,15 @@ public interface IMessage extends Identifiable, Deleteable {
* @model
* @generated
*/
void addReceiver(IMessageParty addReceiver);
void addMessageCode(String key, String value);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @model
* @generated
*/
void addReceiver(String receiver);
/**
* <!-- begin-user-doc -->
......@@ -234,6 +244,6 @@ public interface IMessage extends Identifiable, Deleteable {
* @model
* @generated
*/
void addMessageCode(String key, String value);
void addReceiver(IUser receiver);
} // IMessage
/**
* Copyright (c) 2019 MEDEVIT <office@medevit.at>.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* MEDEVIT <office@medevit.at> - initial API and implementation
*/
package ch.elexis.core.model;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>IMessage Party</b></em>'.
* <!-- end-user-doc -->
*
* <!-- begin-model-doc -->
* A station, user or other type if message party.
* <!-- end-model-doc -->
*
* <p>
* The following features are supported:
* </p>
* <ul>
* <li>{@link ch.elexis.core.model.IMessageParty#getIdentifier <em>Identifier</em>}</li>
* <li>{@link ch.elexis.core.model.IMessageParty#getType <em>Type</em>}</li>
* </ul>
*
* @see ch.elexis.core.model.ModelPackage#getIMessageParty()
* @model interface="true" abstract="true"
* @generated
*/
public interface IMessageParty {
/**
* Returns the value of the '<em><b>Identifier</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>Identifier</em>' attribute.
* @see ch.elexis.core.model.ModelPackage#getIMessageParty_Identifier()
* @model changeable="false"
* @generated
*/
String getIdentifier();
/**
* Returns the value of the '<em><b>Type</b></em>' attribute.
* The default value is <code>"0"</code>.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* The message party type: 0=user (default), 1=station; more to follow on requirement
* <!-- end-model-doc -->
* @return the value of the '<em>Type</em>' attribute.
* @see ch.elexis.core.model.ModelPackage#getIMessageParty_Type()
* @model default="0" required="true" changeable="false"
* @generated
*/
int getType();
} // IMessageParty
......@@ -6233,7 +6233,7 @@ public interface ModelPackage extends EPackage {
int IMESSAGE__DELETED = IDENTIFIABLE_FEATURE_COUNT + 0;
/**
* The feature id for the '<em><b>Sender</b></em>' reference.
* The feature id for the '<em><b>Sender</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
......@@ -6242,7 +6242,7 @@ public interface ModelPackage extends EPackage {
int IMESSAGE__SENDER = IDENTIFIABLE_FEATURE_COUNT + 1;
/**
* The feature id for the '<em><b>Receiver</b></em>' reference list.
* The feature id for the '<em><b>Receiver</b></em>' attribute list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
......@@ -6304,43 +6304,6 @@ public interface ModelPackage extends EPackage {
*/
int IMESSAGE_FEATURE_COUNT = IDENTIFIABLE_FEATURE_COUNT + 8;
/**
* The meta object id for the '{@link ch.elexis.core.model.IMessageParty <em>IMessage Party</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see ch.elexis.core.model.IMessageParty
* @see ch.elexis.core.model.impl.ModelPackageImpl#getIMessageParty()
* @generated
*/
int IMESSAGE_PARTY = 63;
/**
* The feature id for the '<em><b>Identifier</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int IMESSAGE_PARTY__IDENTIFIER = 0;
/**
* The feature id for the '<em><b>Type</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int IMESSAGE_PARTY__TYPE = 1;
/**
* The number of structural features of the '<em>IMessage Party</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int IMESSAGE_PARTY_FEATURE_COUNT = 2;
/**
* Returns the meta object for class '{@link ch.elexis.core.model.Identifiable <em>Identifiable</em>}'.
* <!-- begin-user-doc -->
......@@ -10218,26 +10181,26 @@ public interface ModelPackage extends EPackage {
EClass getIMessage();
/**
* Returns the meta object for the reference '{@link ch.elexis.core.model.IMessage#getSender <em>Sender</em>}'.
* Returns the meta object for the attribute '{@link ch.elexis.core.model.IMessage#getSender <em>Sender</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>Sender</em>'.
* @return the meta object for the attribute '<em>Sender</em>'.
* @see ch.elexis.core.model.IMessage#getSender()
* @see #getIMessage()
* @generated
*/
EReference getIMessage_Sender();
EAttribute getIMessage_Sender();
/**
* Returns the meta object for the reference list '{@link ch.elexis.core.model.IMessage#getReceiver <em>Receiver</em>}'.
* Returns the meta object for the attribute list '{@link ch.elexis.core.model.IMessage#getReceiver <em>Receiver</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Receiver</em>'.
* @return the meta object for the attribute list '<em>Receiver</em>'.
* @see ch.elexis.core.model.IMessage#getReceiver()
* @see #getIMessage()
* @generated
*/
EReference getIMessage_Receiver();
EAttribute getIMessage_Receiver();
/**
* Returns the meta object for the attribute '{@link ch.elexis.core.model.IMessage#isSenderAcceptsAnswer <em>Sender Accepts Answer</em>}'.
......@@ -10294,38 +10257,6 @@ public interface ModelPackage extends EPackage {
*/
EAttribute getIMessage_MessagePriority();
/**
* Returns the meta object for class '{@link ch.elexis.core.model.IMessageParty <em>IMessage Party</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>IMessage Party</em>'.
* @see ch.elexis.core.model.IMessageParty
* @generated
*/
EClass getIMessageParty();
/**
* Returns the meta object for the attribute '{@link ch.elexis.core.model.IMessageParty#getIdentifier <em>Identifier</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Identifier</em>'.
* @see ch.elexis.core.model.IMessageParty#getIdentifier()
* @see #getIMessageParty()
* @generated
*/
EAttribute getIMessageParty_Identifier();
/**
* Returns the meta object for the attribute '{@link ch.elexis.core.model.IMessageParty#getType <em>Type</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Type</em>'.
* @see ch.elexis.core.model.IMessageParty#getType()
* @see #getIMessageParty()
* @generated
*/
EAttribute getIMessageParty_Type();
/**
* Returns the meta object for class '{@link ch.elexis.core.model.IAppointment <em>IAppointment</em>}'.
* <!-- begin-user-doc -->
......@@ -13501,20 +13432,20 @@ public interface ModelPackage extends EPackage {
EClass IMESSAGE = eINSTANCE.getIMessage();
/**
* The meta object literal for the '<em><b>Sender</b></em>' reference feature.
* The meta object literal for the '<em><b>Sender</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference IMESSAGE__SENDER = eINSTANCE.getIMessage_Sender();
EAttribute IMESSAGE__SENDER = eINSTANCE.getIMessage_Sender();
/**
* The meta object literal for the '<em><b>Receiver</b></em>' reference list feature.
* The meta object literal for the '<em><b>Receiver</b></em>' attribute list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference IMESSAGE__RECEIVER = eINSTANCE.getIMessage_Receiver();
EAttribute IMESSAGE__RECEIVER = eINSTANCE.getIMessage_Receiver();
/**
* The meta object literal for the '<em><b>Sender Accepts Answer</b></em>' attribute feature.
......@@ -13556,32 +13487,6 @@ public interface ModelPackage extends EPackage {
*/
EAttribute IMESSAGE__MESSAGE_PRIORITY = eINSTANCE.getIMessage_MessagePriority();
/**
* The meta object literal for the '{@link ch.elexis.core.model.IMessageParty <em>IMessage Party</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see ch.elexis.core.model.IMessageParty
* @see ch.elexis.core.model.impl.ModelPackageImpl#getIMessageParty()
* @generated
*/
EClass IMESSAGE_PARTY = eINSTANCE.getIMessageParty();
/**
* The meta object literal for the '<em><b>Identifier</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute IMESSAGE_PARTY__IDENTIFIER = eINSTANCE.getIMessageParty_Identifier();
/**
* The meta object literal for the '<em><b>Type</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute IMESSAGE_PARTY__TYPE = eINSTANCE.getIMessageParty_Type();
/**
* The meta object literal for the '{@link ch.elexis.core.model.IAppointment <em>IAppointment</em>}' class.
* <!-- begin-user-doc -->
......
......@@ -10,6 +10,15 @@
*/
package ch.elexis.core.model.impl;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EGenericType;
import org.eclipse.emf.ecore.EOperation;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.ETypeParameter;
import org.eclipse.emf.ecore.impl.EPackageImpl;
import ch.elexis.core.model.Deleteable;
import ch.elexis.core.model.IAccount;
import ch.elexis.core.model.IAccountTransaction;
......@@ -51,7 +60,6 @@ import ch.elexis.core.model.ILabResult;
import ch.elexis.core.model.ILaboratory;
import ch.elexis.core.model.IMandator;
import ch.elexis.core.model.IMessage;
import ch.elexis.core.model.IMessageParty;
import ch.elexis.core.model.IOrder;
import ch.elexis.core.model.IOrderEntry;
import ch.elexis.core.model.IOrganization;
......@@ -76,19 +84,8 @@ import ch.elexis.core.model.ModelFactory;
import ch.elexis.core.model.ModelPackage;
import ch.elexis.core.model.WithAssignableId;
import ch.elexis.core.model.WithExtInfo;
import ch.elexis.core.types.TypesPackage;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EGenericType;
import org.eclipse.emf.ecore.EOperation;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.ETypeParameter;
import org.eclipse.emf.ecore.impl.EPackageImpl;
/**
* <!-- begin-user-doc -->
* An implementation of the model <b>Package</b>.
......@@ -537,13 +534,6 @@ public class ModelPackageImpl extends EPackageImpl implements ModelPackage {
*/
private EClass iMessageEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass iMessagePartyEClass = null;
/**
* Creates an instance of the model <b>Package</b>, registered with
* {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
......@@ -4344,8 +4334,8 @@ public class ModelPackageImpl extends EPackageImpl implements ModelPackage {
* @generated
*/
@Override
public EReference getIMessage_Sender() {
return (EReference)iMessageEClass.getEStructuralFeatures().get(0);
public EAttribute getIMessage_Sender() {
return (EAttribute)iMessageEClass.getEStructuralFeatures().get(0);
}
/**
......@@ -4354,8 +4344,8 @@ public class ModelPackageImpl extends EPackageImpl implements ModelPackage {
* @generated
*/
@Override
public EReference getIMessage_Receiver() {
return (EReference)iMessageEClass.getEStructuralFeatures().get(1);
public EAttribute getIMessage_Receiver() {
return (EAttribute)iMessageEClass.getEStructuralFeatures().get(1);
}
/**
......@@ -4408,36 +4398,6 @@ public class ModelPackageImpl extends EPackageImpl implements ModelPackage {
return (EAttribute)iMessageEClass.getEStructuralFeatures().get(6);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EClass getIMessageParty() {
return iMessagePartyEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EAttribute getIMessageParty_Identifier() {
return (EAttribute)iMessagePartyEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EAttribute getIMessageParty_Type() {
return (EAttribute)iMessagePartyEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
......@@ -4902,17 +4862,13 @@ public class ModelPackageImpl extends EPackageImpl implements ModelPackage {
createEAttribute(iAccountEClass, IACCOUNT__NUMERIC);
iMessageEClass = createEClass(IMESSAGE);
createEReference(iMessageEClass, IMESSAGE__SENDER);
createEReference(iMessageEClass, IMESSAGE__RECEIVER);
createEAttribute(iMessageEClass, IMESSAGE__SENDER);
createEAttribute(iMessageEClass, IMESSAGE__RECEIVER);
createEAttribute(iMessageEClass, IMESSAGE__SENDER_ACCEPTS_ANSWER);
createEAttribute(iMessageEClass, IMESSAGE__CREATE_DATE_TIME);
createEAttribute(iMessageEClass, IMESSAGE__MESSAGE_TEXT);
createEAttribute(iMessageEClass, IMESSAGE__MESSAGE_CODES);
createEAttribute(iMessageEClass, IMESSAGE__MESSAGE_PRIORITY);
iMessagePartyEClass = createEClass(IMESSAGE_PARTY);
createEAttribute(iMessagePartyEClass, IMESSAGE_PARTY__IDENTIFIER);
createEAttribute(iMessagePartyEClass, IMESSAGE_PARTY__TYPE);
}
/**
......@@ -5744,8 +5700,8 @@ public class ModelPackageImpl extends EPackageImpl implements ModelPackage {
initEAttribute(getIAccount_Numeric(), ecorePackage.getEInt(), "numeric", null, 0, 1, IAccount.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(iMessageEClass, IMessage.class, "IMessage", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getIMessage_Sender(), this.getIMessageParty(), null, "sender", null, 1, 1, IMessage.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getIMessage_Receiver(), this.getIMessageParty(), null, "receiver", null, 1, -1, IMessage.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getIMessage_Sender(), ecorePackage.getEString(), "sender", null, 1, 1, IMessage.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getIMessage_Receiver(), ecorePackage.getEString(), "receiver", null, 0, -1, IMessage.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getIMessage_SenderAcceptsAnswer(), ecorePackage.getEBoolean(), "senderAcceptsAnswer", null, 0, 1, IMessage.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getIMessage_CreateDateTime(), theTypesPackage.getLocalDateTime(), "createDateTime", null, 0, 1, IMessage.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getIMessage_MessageText(), ecorePackage.getEString(), "messageText", null, 0, 1, IMessage.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
......@@ -5760,16 +5716,15 @@ public class ModelPackageImpl extends EPackageImpl implements ModelPackage {
op = addEOperation(iMessageEClass, null, "setSender", 0, 1, IS_UNIQUE, IS_ORDERED);
addEParameter(op, this.getIUser(), "user", 0, 1, IS_UNIQUE, IS_ORDERED);
op = addEOperation(iMessageEClass, null, "addReceiver", 0, 1, IS_UNIQUE, IS_ORDERED);
addEParameter(op, this.getIMessageParty(), "addReceiver", 0, 1, IS_UNIQUE, IS_ORDERED);
op = addEOperation(iMessageEClass, null, "addMessageCode", 0, 1, IS_UNIQUE, IS_ORDERED);
addEParameter(op, ecorePackage.getEString(), "key", 0, 1, IS_UNIQUE, IS_ORDERED);
addEParameter(op, ecorePackage.getEString(), "value", 0, 1, IS_UNIQUE, IS_ORDERED);
initEClass(iMessagePartyEClass, IMessageParty.class, "IMessageParty", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getIMessageParty_Identifier(), ecorePackage.getEString(), "identifier", null, 0, 1, IMessageParty.class, !IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getIMessageParty_Type(), ecorePackage.getEInt(), "type", "0", 1, 1, IMessageParty.class, !IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
op = addEOperation(iMessageEClass, null, "addReceiver", 0, 1, IS_UNIQUE, IS_ORDERED);
addEParameter(op, ecorePackage.getEString(), "receiver", 0, 1, IS_UNIQUE, IS_ORDERED);
op = addEOperation(iMessageEClass, null, "addReceiver", 0, 1, IS_UNIQUE, IS_ORDERED);
addEParameter(op, this.getIUser(), "receiver", 0, 1, IS_UNIQUE, IS_ORDERED);
// Create resource
createResource(eNS_URI);
......
......@@ -328,10 +328,6 @@ public class ModelAdapterFactory extends AdapterFactoryImpl {
return createIMessageAdapter();
}
@Override
public Adapter caseIMessageParty(IMessageParty object) {
return createIMessagePartyAdapter();
}
@Override
public <T> Adapter caseComparable(Comparable<T> object) {
return createComparableAdapter();
}
......@@ -1223,20 +1219,6 @@ public class ModelAdapterFactory extends AdapterFactoryImpl {
return null;
}
/**
* Creates a new adapter for an object of class '{@link ch.elexis.core.model.IMessageParty <em>IMessage Party</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
* @see ch.elexis.core.model.IMessageParty
* @generated
*/
public Adapter createIMessagePartyAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link ch.elexis.core.model.IAppointment <em>IAppointment</em>}'.
* <!-- begin-user-doc -->
......
......@@ -597,12 +597,6 @@ public class ModelSwitch<T1> extends Switch<T1> {
if (result == null) result = defaultCase(theEObject);
return result;
}
case ModelPackage.IMESSAGE_PARTY: {
IMessageParty iMessageParty = (IMessageParty)theEObject;
T1 result = caseIMessageParty(iMessageParty);
if (result == null) result = defaultCase(theEObject);
return result;
}
default: return defaultCa