Class ContentMigrationRecord

  • All Implemented Interfaces:
    Serializable

    public class ContentMigrationRecord
    extends Object
    implements Serializable
    Content Migration record which is used to keep execution information of a unit of content migration work item.
    See Also:
    Serialized Form
    • Constructor Detail

      • ContentMigrationRecord

        public ContentMigrationRecord()
        Default constructor.
    • Method Detail

      • isProcessed

        public boolean isProcessed()
        Returns true if the unit of content migration work item in this record was processed.
        Returns:
        true if the unit of content migration work item in this record was processed
      • setProcessed

        public void setProcessed​(boolean processed)
        Sets whether or not the unit of content migration work item in this record was processed.
        Parameters:
        processed - whether or not the unit of content migration work item in this record was processed
      • isSucceeded

        public boolean isSucceeded()
        Returns true if the unit of content migration work item in this record was done successfully.
        Returns:
        true if the unit of content migration work item in this record was done successfully
      • setSucceeded

        public void setSucceeded​(boolean succeeded)
        Sets whether or not the unit of content migration work item in this record was done successfully.
        Parameters:
        succeeded - whether or not the unit of content migration work item in this record was done successfully
      • getErrorMessage

        public String getErrorMessage()
        Returns the error detail message if the unit of content migration work item in this record failed.
        Returns:
        the error detail message if the unit of content migration work item in this record failed
      • setErrorMessage

        public void setErrorMessage​(String errorMessage)
        Set the error detail message if the unit of content migration work item in this record failed.
        Parameters:
        errorMessage - the error detail message if the unit of content migration work item in this record failed
      • getContentType

        public String getContentType()
        Returns the content primary node type name of the associated subject content processed.
        Returns:
        the content primary node type name of the associated subject content processed
      • setContentType

        public void setContentType​(String contentType)
        Sets the content primary node type name of the associated subject content processing.
        Parameters:
        contentType - the content primary node type name of the associated subject content processing
      • getContentId

        public String getContentId()
        Returns the content node identifier of the associated subject content processed.
        Returns:
        the content primary node identifier of the associated subject content processed
      • setContentId

        public void setContentId​(String contentId)
        Sets the content node identifier of the associated subject content processing.
        Parameters:
        contentId - the content node identifier of the associated subject content processing
      • getContentPath

        public String getContentPath()
        Returns the content path of the associated subject content processed.
        Returns:
        the content path of the associated subject content processed
      • setContentPath

        public void setContentPath​(String contentPath)
        Sets the content path of the associated subject content processing.
        Parameters:
        contentPath - the content path of the associated subject content processing
      • getAttributeMap

        public Map<String,​Object> getAttributeMap()
        Returns an unmodifiable map of extra custom attributes.
        Returns:
        an unmodifiable map of extra custom attributes
      • getAttributeNames

        public Set<String> getAttributeNames()
        Returns an unmodifiable set of extra custom attribute names.
        Returns:
        an unmodifiable set of extra custom attribute names
      • setAttribute

        public void setAttribute​(String name,
                                 Object value)
        Sets an extra custom attribute.
        Parameters:
        name - attribute name
        value - attribute value
      • getAttribute

        public Object getAttribute​(String name)
        Finds and returns the attribute value by the name if found. Otherwise, return null.
        Parameters:
        name - attribute name
        Returns:
        attribute value if found. Otherwise null.
      • getAttributeAsString

        public String getAttributeAsString​(String name)
        Gets an attribute value as String object if found. If not found, returns an empty string instead. This method is useful if you want to retrieve an attribute always as string or empty string value when it is null.
        Parameters:
        name - attribute name
        Returns:
        an attribute value as String object if found. If not found, returns an empty string instead
      • getAttributeAsAtomicInteger

        public AtomicInteger getAttributeAsAtomicInteger​(String name,
                                                         boolean create)
        Gets an attribute value as AtomicInteger object if found. If not found, returns null when create is false, or sets and returns a new AtomicInteger object when create is true. This method is useful if you want to record a counter for some reason while processing data.
        Parameters:
        name - attribute name
        create - whether or not to create if attribute not found by name
        Returns:
        an attribute value as AtomicInteger object if found. If not found, returns null when create is false, or sets and returns a new AtomicInteger object when create is true.
      • getAttributeAsCollection

        public Collection<Object> getAttributeAsCollection​(String name,
                                                           boolean create)
        Gets an attribute value as Collection object if found. If not found, returns null when create is false, or sets and returns a new Collection object when create is true. This method is useful if you want to add data in the record for some reason while processing data.
        Parameters:
        name - attribute name
        create - whether or not to create if attribute not found by name
        Returns:
        an attribute value as Collection object if found. If not found, returns null when create is false, or sets and returns a new Collection object when create is true.
      • removeAttribute

        public Object removeAttribute​(String name)
        Removes an attribute by name and returns the removed attribute value if found. If not found, returns null.
        Parameters:
        name - attribute name
        Returns:
        removed attribute value if found. If not found, returns null.