Class ErrorAttachmentLog

  • All Implemented Interfaces:
    com.microsoft.appcenter.ingestion.models.Log, com.microsoft.appcenter.ingestion.models.Model

    public class ErrorAttachmentLog
    extends com.microsoft.appcenter.ingestion.models.AbstractLog
    Error attachment log.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String CONTENT_TYPE_TEXT_PLAIN
      Plain text mime type.
      static java.lang.String TYPE  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static ErrorAttachmentLog attachmentWithBinary​(byte[] data, java.lang.String fileName, java.lang.String contentType)
      Build an error attachment log with binary suitable for using in {link CrashesListener#getErrorAttachments(ErrorReport)}.
      static ErrorAttachmentLog attachmentWithText​(java.lang.String text, java.lang.String fileName)
      Build an error attachment log with text suitable for using in {link CrashesListener#getErrorAttachments(ErrorReport)}.
      boolean equals​(java.lang.Object o)  
      java.lang.String getContentType()
      Get the contentType value.
      byte[] getData()
      Get the data value.
      java.util.UUID getErrorId()
      Get the errorId value.
      java.lang.String getFileName()
      Get the fileName value.
      java.util.UUID getId()
      Get the id value.
      java.lang.String getType()  
      int hashCode()  
      boolean isValid()
      Checks if the log's values are valid.
      void read​(org.json.JSONObject object)  
      void setContentType​(java.lang.String contentType)
      Set the contentType value.
      void setData​(byte[] data)
      Set the data value.
      void setErrorId​(java.util.UUID errorId)
      Set the errorId value.
      void setFileName​(java.lang.String fileName)
      Set the fileName value.
      void setId​(java.util.UUID id)
      Set the id value.
      void write​(org.json.JSONStringer writer)  
      • Methods inherited from class com.microsoft.appcenter.ingestion.models.AbstractLog

        addTransmissionTarget, getDevice, getDistributionGroupId, getSid, getTag, getTimestamp, getTransmissionTargetTokens, getUserId, setDevice, setDistributionGroupId, setSid, setTag, setTimestamp, setUserId
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • CONTENT_TYPE_TEXT_PLAIN

        public static final java.lang.String CONTENT_TYPE_TEXT_PLAIN
        Plain text mime type.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ErrorAttachmentLog

        public ErrorAttachmentLog()
    • Method Detail

      • attachmentWithText

        public static ErrorAttachmentLog attachmentWithText​(java.lang.String text,
                                                            java.lang.String fileName)
        Build an error attachment log with text suitable for using in {link CrashesListener#getErrorAttachments(ErrorReport)}.
        Parameters:
        text - text to attach to attachment log.
        fileName - file name to use in error attachment log.
        Returns:
        ErrorAttachmentLog built attachment.
      • attachmentWithBinary

        public static ErrorAttachmentLog attachmentWithBinary​(byte[] data,
                                                              java.lang.String fileName,
                                                              java.lang.String contentType)
        Build an error attachment log with binary suitable for using in {link CrashesListener#getErrorAttachments(ErrorReport)}.
        Parameters:
        data - binary data.
        fileName - file name to use in error attachment log.
        contentType - binary data MIME type.
        Returns:
        ErrorAttachmentLog built attachment.
      • getType

        public java.lang.String getType()
      • getId

        public java.util.UUID getId()
        Get the id value.
        Returns:
        the id value
      • setId

        public void setId​(java.util.UUID id)
        Set the id value.
        Parameters:
        id - the id value to set
      • getErrorId

        public java.util.UUID getErrorId()
        Get the errorId value.
        Returns:
        the errorId value
      • setErrorId

        public void setErrorId​(java.util.UUID errorId)
        Set the errorId value.
        Parameters:
        errorId - the errorId value to set
      • getContentType

        public java.lang.String getContentType()
        Get the contentType value.
        Returns:
        the contentType value
      • setContentType

        public void setContentType​(java.lang.String contentType)
        Set the contentType value.
        Parameters:
        contentType - the contentType value to set
      • getFileName

        public java.lang.String getFileName()
        Get the fileName value.
        Returns:
        the fileName value
      • setFileName

        public void setFileName​(java.lang.String fileName)
        Set the fileName value.
        Parameters:
        fileName - the fileName value to set
      • getData

        public byte[] getData()
        Get the data value.
        Returns:
        the data value
      • setData

        public void setData​(byte[] data)
        Set the data value.
        Parameters:
        data - the data value to set
      • isValid

        public boolean isValid()
        Checks if the log's values are valid.
        Returns:
        true if validation succeeded, otherwise false.
      • read

        public void read​(org.json.JSONObject object)
                  throws org.json.JSONException
        Specified by:
        read in interface com.microsoft.appcenter.ingestion.models.Model
        Overrides:
        read in class com.microsoft.appcenter.ingestion.models.AbstractLog
        Throws:
        org.json.JSONException
      • write

        public void write​(org.json.JSONStringer writer)
                   throws org.json.JSONException
        Specified by:
        write in interface com.microsoft.appcenter.ingestion.models.Model
        Overrides:
        write in class com.microsoft.appcenter.ingestion.models.AbstractLog
        Throws:
        org.json.JSONException
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class com.microsoft.appcenter.ingestion.models.AbstractLog
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class com.microsoft.appcenter.ingestion.models.AbstractLog