public void AddGroupNotice(UUID requestingAgentID, UUID groupID, UUID noticeID, string fromName, string subject, string message, byte[] binaryBucket)
        {
            m_log.DebugFormat(
                "[MOCK GROUPS SERVICES CONNECTOR]: AddGroupNotice, requestingAgentID {0}, groupID {1}, noticeID {2}, fromName {3}, subject {4}, message {5}, binaryBucket.Length {6}",
                requestingAgentID, groupID, noticeID, fromName, subject, message, binaryBucket.Length);

            XGroup group = GetXGroup(groupID, null);

            if (group == null)
            {
                return;
            }

            XGroupNotice groupNotice = new XGroupNotice()
            {
                groupID       = groupID,
                noticeID      = noticeID,
                fromName      = fromName,
                subject       = subject,
                message       = message,
                timestamp     = (uint)Util.UnixTimeSinceEpoch(),
                hasAttachment = false,
                assetType     = 0,
                binaryBucket  = binaryBucket
            };

            group.notices[noticeID] = groupNotice;

            m_data.StoreGroup(group);
        }
        public GroupNoticeInfo GetGroupNotice(UUID requestingAgentID, UUID noticeID)
        {
            m_log.DebugFormat(
                "[MOCK GROUPS SERVICES CONNECTOR]: GetGroupNotices, requestingAgentID {0}, noticeID {1}",
                requestingAgentID, noticeID);

            // Yes, not an efficient way to do it.
            Dictionary <UUID, XGroup> groups = m_data.GetGroups();

            foreach (XGroup group in groups.Values)
            {
                if (group.notices.ContainsKey(noticeID))
                {
                    XGroupNotice n = group.notices[noticeID];

                    GroupNoticeInfo gni = new GroupNoticeInfo();
                    gni.GroupID                  = n.groupID;
                    gni.Message                  = n.message;
                    gni.BinaryBucket             = n.binaryBucket;
                    gni.noticeData.NoticeID      = n.noticeID;
                    gni.noticeData.Timestamp     = n.timestamp;
                    gni.noticeData.FromName      = n.fromName;
                    gni.noticeData.Subject       = n.subject;
                    gni.noticeData.HasAttachment = n.hasAttachment;
                    gni.noticeData.AssetType     = (byte)n.assetType;

                    return(gni);
                }
            }

            return(null);
        }