mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
ALF-16201: TransformationOptions Should Be More Easily Extended
- Added copyFrom method which does the work of the copying and is called by clone() for cases where deepCopy() can't be called. - Added javadocs git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@42454 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -111,10 +111,26 @@ public class TransformationOptions implements Cloneable
|
|||||||
{
|
{
|
||||||
TransformationOptions clone = (TransformationOptions) super.clone();
|
TransformationOptions clone = (TransformationOptions) super.clone();
|
||||||
clone.limits = new TransformationOptionLimits();
|
clone.limits = new TransformationOptionLimits();
|
||||||
clone.set(toMap());
|
clone.copyFrom(this);
|
||||||
return clone;
|
return clone;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Does the work of copying the given other TransformationOptions
|
||||||
|
* values to this one
|
||||||
|
*
|
||||||
|
* @param otherOptions the options to copy
|
||||||
|
*/
|
||||||
|
public void copyFrom(TransformationOptions otherOptions)
|
||||||
|
{
|
||||||
|
this.set(otherOptions.toMap());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a clone of the TransformationOptions
|
||||||
|
*
|
||||||
|
* @return a copy of the options
|
||||||
|
*/
|
||||||
public TransformationOptions deepCopy()
|
public TransformationOptions deepCopy()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
Reference in New Issue
Block a user