Class AbstractReporter

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected static java.lang.String getAssetLink​(java.lang.String guid)  
      protected java.lang.String getAtlanTags​(com.atlan.model.assets.Asset asset)
      Retrieve a comma-separated list of all Atlan tags assigned to the provided asset, whether directly or through propagation.
      int getBatchSize()  
      java.lang.String getBucket()  
      protected java.lang.String getComplexList​(java.util.Collection<java.lang.String> items)
      Retrieve a list of multiple complex values as a single string, basically JSON-structured.
      protected static int getCount​(java.util.Collection<?> collection)  
      protected java.lang.String getDelimitedList​(java.util.Collection<java.lang.String> items)
      Retrieve a list of multiple values as a single string, separated by the provided delimiter.
      java.lang.String getDelimiter()  
      protected static java.lang.String getDescription​(com.atlan.model.assets.Asset asset)  
      protected java.lang.String getDirectAtlanTags​(com.atlan.model.assets.Asset asset)
      Retrieve a comma-separated list of only the directly-assigned (not propagated) Atlan tags to the provided asset.
      java.lang.String getFilename()  
      protected static java.lang.String getFormattedDateTime​(java.lang.Long ts)  
      protected java.lang.String getGroupOwners​(com.atlan.model.assets.Asset asset)  
      protected static java.lang.String getREADME​(com.atlan.model.assets.Asset asset)  
      software.amazon.awssdk.regions.Region getRegion()  
      protected java.lang.String getStringValueForField​(com.atlan.model.assets.Asset from, com.atlan.model.fields.AtlanField field)
      Translates the provided value for the provided field on the provided asset into a string representation that can be encoded into a single cell of Excel / CSV.
      protected java.lang.String getUserOwners​(com.atlan.model.assets.Asset asset)  
      protected static java.lang.String getValue​(com.atlan.model.enums.AtlanEnum e)  
      protected void parseParametersFromEvent​(java.util.Map<java.lang.String,​java.lang.String> event)
      Extract the configuration parameters to use from the lambda payload (or equivalent).
      protected static java.lang.String protectFromNull​(java.lang.Object o)  
      protected java.lang.String serializeAssetRefToCSV​(com.atlan.model.assets.Asset asset)
      Serialize the provided asset reference into a form that can be stored in a single cell of CSV.
      protected java.lang.String serializeStructToCSV​(com.atlan.model.structs.AtlanStruct struct)
      Serialize the provided struct into a form that can be stored in a single cell of CSV.
      protected java.lang.String serializeValueToCSV​(java.lang.String fromGuid, java.lang.Object value)
      Serialize the provided value into a form that can be stored in a single cell of CSV.
      void setFilename​(java.lang.String _filename)  
      protected void setFilenameWithPrefix​(java.util.Map<java.lang.String,​java.lang.String> event, java.lang.String prefix)  
      protected void setFilenameWithPrefix​(java.util.Map<java.lang.String,​java.lang.String> event, java.lang.String prefix, java.lang.String extension)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AbstractReporter

        public AbstractReporter()
    • Method Detail

      • parseParametersFromEvent

        protected void parseParametersFromEvent​(java.util.Map<java.lang.String,​java.lang.String> event)
        Extract the configuration parameters to use from the lambda payload (or equivalent).
        Parameters:
        event - configuration payload from the lambda function (or equivalent)
      • setFilenameWithPrefix

        protected void setFilenameWithPrefix​(java.util.Map<java.lang.String,​java.lang.String> event,
                                             java.lang.String prefix)
      • setFilenameWithPrefix

        protected void setFilenameWithPrefix​(java.util.Map<java.lang.String,​java.lang.String> event,
                                             java.lang.String prefix,
                                             java.lang.String extension)
      • getFormattedDateTime

        protected static java.lang.String getFormattedDateTime​(java.lang.Long ts)
      • getAssetLink

        protected static java.lang.String getAssetLink​(java.lang.String guid)
      • getDescription

        protected static java.lang.String getDescription​(com.atlan.model.assets.Asset asset)
      • getUserOwners

        protected java.lang.String getUserOwners​(com.atlan.model.assets.Asset asset)
      • getGroupOwners

        protected java.lang.String getGroupOwners​(com.atlan.model.assets.Asset asset)
      • getCount

        protected static int getCount​(java.util.Collection<?> collection)
      • getValue

        protected static java.lang.String getValue​(com.atlan.model.enums.AtlanEnum e)
      • protectFromNull

        protected static java.lang.String protectFromNull​(java.lang.Object o)
      • getREADME

        protected static java.lang.String getREADME​(com.atlan.model.assets.Asset asset)
      • getAtlanTags

        protected java.lang.String getAtlanTags​(com.atlan.model.assets.Asset asset)
        Retrieve a comma-separated list of all Atlan tags assigned to the provided asset, whether directly or through propagation.
        Parameters:
        asset - for which to find Atlan tags
        Returns:
        comma-separated list of the Atlan tags
      • getDirectAtlanTags

        protected java.lang.String getDirectAtlanTags​(com.atlan.model.assets.Asset asset)
        Retrieve a comma-separated list of only the directly-assigned (not propagated) Atlan tags to the provided asset.
        Parameters:
        asset - for which to find direct Atlan tags
        Returns:
        comma-separated list of the direct Atlan tags
      • getDelimitedList

        protected java.lang.String getDelimitedList​(java.util.Collection<java.lang.String> items)
        Retrieve a list of multiple values as a single string, separated by the provided delimiter.
        Parameters:
        items - to combine into a single string
        Returns:
        a single string of all items separated by the delimiter
      • getComplexList

        protected java.lang.String getComplexList​(java.util.Collection<java.lang.String> items)
        Retrieve a list of multiple complex values as a single string, basically JSON-structured.
        Parameters:
        items - to combine into a single string
        Returns:
        a single string of all items
      • getStringValueForField

        protected java.lang.String getStringValueForField​(com.atlan.model.assets.Asset from,
                                                          com.atlan.model.fields.AtlanField field)
        Translates the provided value for the provided field on the provided asset into a string representation that can be encoded into a single cell of Excel / CSV.
        Parameters:
        from - the asset from which to read the value
        field - the attribute rom which to read the value
        Returns:
        the string-encoded form that can be placed in a single cell
      • serializeValueToCSV

        protected java.lang.String serializeValueToCSV​(java.lang.String fromGuid,
                                                       java.lang.Object value)
        Serialize the provided value into a form that can be stored in a single cell of CSV.
        Parameters:
        fromGuid - the GUID of the asset being serialized (needed to determine direct vs propagated Atlan tags)
        value - the value to be serialized
        Returns:
        a String representation of the value that can be stored in a single cell of CSV
      • serializeAssetRefToCSV

        protected java.lang.String serializeAssetRefToCSV​(com.atlan.model.assets.Asset asset)
        Serialize the provided asset reference into a form that can be stored in a single cell of CSV.
        Parameters:
        asset - the related asset to be serialized
        Returns:
        a String representation of the related asset
      • serializeStructToCSV

        protected java.lang.String serializeStructToCSV​(com.atlan.model.structs.AtlanStruct struct)
        Serialize the provided struct into a form that can be stored in a single cell of CSV. Note: this is not yet implemented!
        Parameters:
        struct - the struct instance to be serialized
        Returns:
        a String representation of the struct instance
      • setFilename

        public void setFilename​(java.lang.String _filename)
      • getFilename

        public java.lang.String getFilename()
      • getBucket

        public java.lang.String getBucket()
      • getRegion

        public software.amazon.awssdk.regions.Region getRegion()
      • getBatchSize

        public int getBatchSize()
      • getDelimiter

        public java.lang.String getDelimiter()