PublicAPI.Portal.MessagesELMA API Documentation
Messages
Access path: PublicAPI.Portal.Messages
Methods

  NameDescription
Public methodAddMessageToInfoChannel(String, String, InformationChannel)
Add a message to an information channel
Public methodAddMessageToInfoChannel(String, String, InformationChannel, User)
Add a message to an information channel
Public methodCount 
Returns the total number of objects of this type
Public methodCount(IEntityFilter)
Get Total Number of Objects by Filter
Public methodCreate
Create New Entity (without a Database entry)
Public methodDelete
Delete Object
Public methodFilter
Creates an assistant for working with the "Base message class" object filter
Public methodFind(FetchOptions)
Find objects according to fetch options
Public methodFind(String)
Find objects according to the filter in the EQL language
Public methodFind(IEntityFilter, FetchOptions)
Fing objects according to fetch options and filter
Public methodFindByIdArray
Find All Objects by Array IDs
Public methodFindInformationChannel
Find and infochannel by name
Public methodIsDirty
Check, if there are unsaved changes in the object
Public methodIsNew
Check, if the object is new (not saved in the database)
Public methodLoad(Guid)
Load by UID. If not found, an exception is invoked
Public methodLoad(Int64)
Load by ID. If not found, an exception is invoked
Public methodLoadOrCreate(Guid)
Load by ID. If not found, the new object is returned
Public methodLoadOrCreate(Int64)
Load by ID. If not found, the new object is returned
Public methodLoadOrNull(Guid)
Load by UID. If not found, null is returned
Public methodLoadOrNull(Int64)
Load by ID. If not found, null is returned
Public methodMessageBuilder
Message assistant
Public methodRefresh
Refresh (read over) Object from Database
Public methodSave
Save Object to Database
Public methodSendMessage(String, String, User)
Send a message to the user. Attachments, channels and the message author are not stated
Public methodSendMessage(String, String, IEnumerable User )
Send a message to the users. Channels, attachments and the message author are not stated
Public methodSendMessage(String, String, User, User)
Send a message to the user. Attachments and channels are not stated
Public methodSendMessage(String, String, User, IEnumerable Attachment )
Send a message to the user. Message author and channels are not stated
Public methodSendMessage(String, String, User, IEnumerable InformationChannel )
Send a message to the user. Message author and attachments are not stated
Public methodSendMessage(String, String, IEnumerable User , User)
Send a message to the users. Channels and attachments are not stated
Public methodSendMessage(String, String, IEnumerable User , IEnumerable Attachment )
Send a message to the users. Channels and the message author are not stated
Public methodSendMessage(String, String, IEnumerable User , IEnumerable InformationChannel )
Send a message to the users. Message author and attachments are not stated
Public methodSendMessage(String, String, User, User, IEnumerable Attachment )
Send a message to the user. Channels are not stated
Public methodSendMessage(String, String, User, IEnumerable InformationChannel , User)
Send a message to the user. Attachments are not stated
Public methodSendMessage(String, String, User, IEnumerable InformationChannel , IEnumerable Attachment )
Send a message to the user. Message author is not stated
Public methodSendMessage(String, String, IEnumerable User , User, IEnumerable Attachment )
Send a message to the users. Channels are not stated
Public methodSendMessage(String, String, IEnumerable User , IEnumerable InformationChannel , User)
Send a message to the users. Attachments are not stated
Public methodSendMessage(String, String, IEnumerable User , IEnumerable InformationChannel , IEnumerable Attachment )
Send a message to the users. Message author is not stated
Public methodSendMessage(String, String, User, IEnumerable InformationChannel , User, IEnumerable Attachment )
Send a message to the user. Documents attachments are not stated
Public methodSendMessage(String, String, IEnumerable User , IEnumerable InformationChannel , User, IEnumerable Attachment )
Send a message to the users
Public methodSendMessage(String, String, IEnumerable User , IEnumerable InformationChannel , User, IEnumerable Attachment , IEnumerable DocumentAttachment )
Send a message to the user
Public methodSendMessageBuilderObsolete.
Send message helper
Back to Top
Properties

  NameDescription
Public propertyTypeUid
Returns the unique object identifier "Base message class"
Back to Top
Remarks

Section containing methods for managing messages
Examples

Send a message to a user

//Message author 
var messageAuthor = PublicAPI.Security.User.GetCurrentUser();
//Send the message
PublicAPI.Portal.Messages.SendMessage("Message Subject", "Message Text", context.UserPetrov, messageAuthor);

Search for a public channel by the name

var infoChannel = PublicAPI.Portal.Messages.FindInformationChannel("Public channel name");

Send a message to the public channel

PublicAPI.Portal.Messages.AddMessageToInfoChannel("Public channel is found", "Public channel is found successfully", infoChannel);

See Also