Class NoteDbUtil


  • public class NoteDbUtil
    extends Object
    • Method Detail

      • parseIdent

        public Optional<Account.Id> parseIdent​(org.eclipse.jgit.lib.PersonIdent ident)
        Returns an AccountId for the given person's identity and the current serverId. Reverse lookup the AccountId using the ExternalIdCache if the account has a foreign serverId.
        Parameters:
        ident - the accountId@serverId identity
        Returns:
        a defined accountId if the account was found, Account.UNKNOWN_ACCOUNT_ID if the lookup via external-id did not return any account, or an empty value if the identity was malformed.
      • parseIdent

        public Optional<Account.Id> parseIdent​(String email)
        Returns an AccountId for the given email address and the current serverId. Reverse lookup the AccountId using the ExternalIdCache if the account has a foreign serverId.
        Parameters:
        email - the accountId@serverId email identity
        Returns:
        a defined accountId if the account was found, Account.UNKNOWN_ACCOUNT_ID if the lookup via external-id did not return any account, or an empty value if the identity was malformed.
      • extractHostPartFromPersonIdent

        public static String extractHostPartFromPersonIdent​(org.eclipse.jgit.lib.PersonIdent ident)
      • formatTime

        public static String formatTime​(org.eclipse.jgit.lib.PersonIdent ident,
                                        Timestamp t)