Class ContentMigrationRecord
java.lang.Object
org.onehippo.forge.content.exim.core.ContentMigrationRecord
- All Implemented Interfaces:
Serializable
Content Migration record which is used to keep execution information of a unit of
content migration work item.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAttribute
(String name) Finds and returns the attribute value by thename
if found.getAttributeAsAtomicInteger
(String name, boolean create) Gets an attribute value asAtomicInteger
object if found.getAttributeAsCollection
(String name, boolean create) Gets an attribute value asCollection
object if found.getAttributeAsString
(String name) Gets an attribute value asString
object if found.Returns an unmodifiable map of extra custom attributes.Returns an unmodifiable set of extra custom attribute names.Returns the content node identifier of the associated subject content processed.Returns the content path of the associated subject content processed.Returns the content primary node type name of the associated subject content processed.Returns the error detail message if the unit of content migration work item in this record failed.boolean
Returns true if the unit of content migration work item in this record was processed.boolean
Returns true if the unit of content migration work item in this record was done successfully.removeAttribute
(String name) Removes an attribute byname
and returns the removed attribute value if found.void
setAttribute
(String name, Object value) Sets an extra custom attribute.void
setContentId
(String contentId) Sets the content node identifier of the associated subject content processing.void
setContentPath
(String contentPath) Sets the content path of the associated subject content processing.void
setContentType
(String contentType) Sets the content primary node type name of the associated subject content processing.void
setErrorMessage
(String errorMessage) Set the error detail message if the unit of content migration work item in this record failed.void
setProcessed
(boolean processed) Sets whether or not the unit of content migration work item in this record was processed.void
setSucceeded
(boolean succeeded) Sets whether or not the unit of content migration work item in this record was done successfully.toString()
-
Constructor Details
-
ContentMigrationRecord
public ContentMigrationRecord()Default constructor.
-
-
Method Details
-
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
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
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
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
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
Returns the content node identifier of the associated subject content processed.- Returns:
- the content primary node identifier of the associated subject content processed
-
setContentId
Sets the content node identifier of the associated subject content processing.- Parameters:
contentId
- the content node identifier of the associated subject content processing
-
getContentPath
Returns the content path of the associated subject content processed.- Returns:
- the content path of the associated subject content processed
-
setContentPath
Sets the content path of the associated subject content processing.- Parameters:
contentPath
- the content path of the associated subject content processing
-
getAttributeMap
Returns an unmodifiable map of extra custom attributes.- Returns:
- an unmodifiable map of extra custom attributes
-
getAttributeNames
Returns an unmodifiable set of extra custom attribute names.- Returns:
- an unmodifiable set of extra custom attribute names
-
setAttribute
Sets an extra custom attribute.- Parameters:
name
- attribute namevalue
- attribute value
-
getAttribute
Finds and returns the attribute value by thename
if found. Otherwise, return null.- Parameters:
name
- attribute name- Returns:
- attribute value if found. Otherwise null.
-
getAttributeAsString
Gets an attribute value asString
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
Gets an attribute value asAtomicInteger
object if found. If not found, returns null whencreate
is false, or sets and returns a newAtomicInteger
object whencreate
is true. This method is useful if you want to record a counter for some reason while processing data.- Parameters:
name
- attribute namecreate
- whether or not to create if attribute not found byname
- Returns:
- an attribute value as
AtomicInteger
object if found. If not found, returns null whencreate
is false, or sets and returns a newAtomicInteger
object whencreate
is true.
-
getAttributeAsCollection
Gets an attribute value asCollection
object if found. If not found, returns null whencreate
is false, or sets and returns a newCollection
object whencreate
is true. This method is useful if you want to add data in the record for some reason while processing data.- Parameters:
name
- attribute namecreate
- whether or not to create if attribute not found byname
- Returns:
- an attribute value as
Collection
object if found. If not found, returns null whencreate
is false, or sets and returns a newCollection
object whencreate
is true.
-
removeAttribute
Removes an attribute byname
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.
-
toString
-