region MessageStore
977064
@Override
	public synchronized void addOrUpdateMessages(ApptentiveMessage... apptentiveMessages) {
		fetchEntries();

		for (ApptentiveMessage apptentiveMessage : apptentiveMessages) {
			MessageEntry existing = findMessageEntry(apptentiveMessage);
			if (existing != null) {
				// Update
				existing.id = apptentiveMessage.getId();
				existing.state = apptentiveMessage.getState().name();
				if (apptentiveMessage.isRead()) { // A message can't be unread after being read.
					existing.isRead = true;
				}
				existing.json = apptentiveMessage.getJsonObject().toString();
			} else {
				// Insert
				MessageEntry entry = new MessageEntry();
				entry.id = apptentiveMessage.getId();
				entry.clientCreatedAt = apptentiveMessage.getClientCreatedAt();
				entry.nonce = apptentiveMessage.getNonce();
				entry.state = apptentiveMessage.getState().name();
				entry.isRead = apptentiveMessage.isRead();
				entry.json = apptentiveMessage.getJsonObject().toString();
				messageEntries.add(entry);
			}
		}

		writeToFile();
	}
403511
protected List<LaApplicationMessage> toApplicationMessageList(UserMessages messages) {
        final List<LaApplicationMessage> convertedList = new ArrayList<LaApplicationMessage>(messages.size());
        for (String property : messages.toPropertySet()) {
            for (Iterator<UserMessage> ite = messages.accessByIteratorOf(property); ite.hasNext();) {
                final UserMessage message = ite.next();
                verifyResourceMessage(messages, message);
                convertedList.add(toApplicationMessage(property, message));
            }
        }
        return convertedList;
    }
419741
private String messageResourceNotFound(Locale locale) {

        return Messages.get().getBundle(locale).key(Messages.ERR_ALIAS_RESOURCE_NOT_FOUND_0);

    }
403556
private SystemMessages createSystemMessages(Locale locale) {

        CmsMessages messages = Messages.get().getBundle(locale);
        CustomizedSystemMessages systemMessages = new CustomizedSystemMessages();
        systemMessages.setCommunicationErrorCaption(messages.key(Messages.GUI_SYSTEM_COMMUNICATION_ERROR_CAPTION_0));
        systemMessages.setCommunicationErrorMessage(messages.key(Messages.GUI_SYSTEM_COMMUNICATION_ERROR_MESSAGE_0));
        systemMessages.setCommunicationErrorNotificationEnabled(true);
        systemMessages.setAuthenticationErrorCaption(messages.key(Messages.GUI_SYSTEM_AUTHENTICATION_ERROR_CAPTION_0));
        systemMessages.setAuthenticationErrorMessage(messages.key(Messages.GUI_SYSTEM_AUTHENTICATION_ERROR_MESSAGE_0));
        systemMessages.setAuthenticationErrorNotificationEnabled(true);
        systemMessages.setSessionExpiredCaption(messages.key(Messages.GUI_SYSTEM_SESSION_EXPIRED_ERROR_CAPTION_0));
        systemMessages.setSessionExpiredMessage(messages.key(Messages.GUI_SYSTEM_SESSION_EXPIRED_ERROR_MESSAGE_0));
        systemMessages.setSessionExpiredNotificationEnabled(true);
        systemMessages.setInternalErrorCaption(messages.key(Messages.GUI_SYSTEM_INTERNAL_ERROR_CAPTION_0));
        systemMessages.setInternalErrorMessage(messages.key(Messages.GUI_SYSTEM_INTERNAL_ERROR_MESSAGE_0));
        systemMessages.setInternalErrorNotificationEnabled(true);
        return systemMessages;
    }
904611
public AbstractMessage get( LocalSession localSession , 
				    			TransactionSet transactionSet , 
                                MessageSelector selector ) throws JMSException
    {
    	if (closed)
    		return null;
    	
    	this.lastActivity = System.currentTimeMillis();
    	
    	AbstractMessage msg = null;
    	
        // Search in volatile store first
        if (volatileStore != null)
        {
            msg = getFromStore(localSession, volatileStore, transactionSet, selector);
            
            // Then in persistent store
	        if (msg == null && persistentStore != null)
	        	msg = getFromStore(localSession, persistentStore, transactionSet, selector);
        }
        else
        if (persistentStore != null)
	        msg = getFromStore(localSession, persistentStore, transactionSet, selector);
        
        return msg;
    }
764405
function getMessage(sKey, aParameters) {
		return sap.ui.getCore().getLibraryResourceBundle().getText(sKey, aParameters);
	}
566658
def get_messages(self, locale=None):
        
        if locale is None:
            locale = self.locale

        if locale not in self.catalogues:
            self._load_catalogue(locale)

        catalogues = [self.catalogues[locale]]
        catalogue = catalogues[0]
        while True:
            catalogue = catalogue.fallback_catalogue
            if catalogue is None:
                break
            catalogues.append(catalogue)

        messages = {}
        for catalogue in catalogues[::-1]:
            recursive_update(messages, catalogue.all())

        return messages
1052280
private Observable<Boolean> upsertTempMessage(ChatMessage message) {
        return persistenceController.updateStoreWithNewMessage(message, noConversationListener)
                .doOnError(t -> log.e("Error saving temp message " + t.getLocalizedMessage()))
                .onErrorReturn(t -> false);
    }
1362250
def messages(which = "ALL")
      # read message from all storage in the mobile phone (sim+mem)
      cmd('AT+CPMS="MT"')
      # get message list
      sms = cmd('AT+CMGL="%s"' % which )
      # collect messages
      msgs = sms.scan(/\+CMGL\:\s*?(\d+)\,.*?\,\"(.+?)\"\,.*?\,\"(.+?)\".*?\n(.*)/)
      return nil unless msgs
      msgs.collect!{ |msg| Biju::Sms.new(:id => msg[0], :phone_number => msg[1], :datetime => msg[2], :message => msg[3].chomp) }
    end
1287473
public List<String> getMessageList() {
        return messages.map(er -> {
            return requestManager.getMessageManager().toMessageList(requestManager.getUserLocale(), er);
        }).orElse(Collections.emptyList());
    }
1171849
public ConfigurableMessages getConfigurableMessages(CmsMessages defaultMessages, Locale locale) {

        return new ConfigurableMessages(defaultMessages, locale, m_configuredBundle);

    }
1078986
private static SchemaStoreItemStream getSchemaStore(MessageStore msgStore) throws MessageStoreException {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "getSchemaStore");

    // Check the local cache first.
    SchemaStoreItemStream store = schemaStores.get(msgStore);

    // Not in the local cache, so try to find it in the MessageStore
    if (store == null) {
      Filter filter = new Filter() {
        public boolean filterMatches(AbstractItem item) {
          return (item instanceof SchemaStoreItemStream);
        }
      };
      store = (SchemaStoreItemStream)msgStore.findFirstMatching(filter);
      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled() && store != null) SibTr.debug(tc, "Schema store found in message store");

      // Not in the MessageStore, so try to create a new one
      if (store == null) {
        store = new SchemaStoreItemStream();
        msgStore.add(store, msgStore.getTransactionFactory().createAutoCommitTransaction());
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(tc, "New schema store created");
      }

      schemaStores.put(msgStore, store);

    }

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "getSchemaStore");
    return store;
  }
350402
function( locale, messages ) {
			if ( !this.messages[locale] ) {
				this.messages[locale] = messages;
			} else {
				this.messages[locale] = $.extend( this.messages[locale], messages );
			}
		}
138290
String messageFromFile(Locale locale, String filename, String relatedProperty) {
    String result = null;
    String bundleBase = propertyToBundles.get(relatedProperty);
    if (bundleBase == null) {
      // this property has no translation
      return null;
    }

    String filePath = bundleBase.replace('.', '/');
    if (!"en".equals(locale.getLanguage())) {
      filePath += "_" + locale.getLanguage();
    }
    filePath += "/" + filename;
    InputStream input = classloader.getResourceAsStream(filePath);
    if (input != null) {
      result = readInputStream(filePath, input);
    }
    return result;
  }
1329122
def get_messages(self, *args, **kwargs):
        
        return self.get_content(self.config['messages'], *args, **kwargs)
506728
public static String getMessageText(I_CmsMessageBundle messages, String key, Object... args) {

        return messages.getBundle(A_CmsUI.get().getLocale()).key(key, args);
    }
11421
@Override
    public String getMessage(String code, Object[] args, String defaultMessage, Locale locale) {
        return activity.getActivityContext().getMessageSource().getMessage(code, args, defaultMessage, locale);
    }