Improved documentation
authorn.hoffmann <n.hoffmann@localhost>
Thu, 21 Apr 2011 14:05:50 +0000 (14:05 +0000)
committern.hoffmann <n.hoffmann@localhost>
Thu, 21 Apr 2011 14:05:50 +0000 (14:05 +0000)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/operation/IPostOperationEnabled.java

index 53de39b35849440e649fd64da862a4c4ec2e2465..e9bd3b1344af6897ffe22bc2204fbf09a2103a16 100644 (file)
@@ -1,42 +1,47 @@
 /**
-* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
-* http://www.e-taxonomy.eu
-* 
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
+ * Copyright (C) 2007 EDIT
+ * European Distributed Institute of Taxonomy 
+ * http://www.e-taxonomy.eu
+ 
+ * The contents of this file are subject to the Mozilla Public License Version 1.1
+ * See LICENSE.TXT at the top of this package for the full license terms.
+ */
 
 package eu.etaxonomy.taxeditor.operation;
 
-import eu.etaxonomy.cdm.model.common.CdmBase;
-
+import org.eclipse.core.runtime.Status;
 
+import eu.etaxonomy.cdm.model.common.CdmBase;
 
 /**
- * Implementors may register to operations. The postOperation method will
- * get called after any post operation
- *
+ * Implementors may register to operations. The postOperation method will get
+ * called after any post operation
+ * 
  * @author n.hoffmann
  * @created 24.03.2009
  * @version 1.0
  */
 public interface IPostOperationEnabled {
-       
+
        /**
-        * This method will be called after executing an operation.
-        * If operation created a new object and the registrar has to know about the
-        * oBject it should be passed to the registrar
-        *
-        * @param objectAffectedByOperation an occasional newly created object. May be <code>null</code>
-        * @return true the method executed succesfully
+        * <p>
+        * This method will be called after executing an operation. If operation
+        * created a new object and the {@link IPostOperationEnabled} has to know
+        * about the object it should be passed to the {@link IPostOperationEnabled}
+        * </p>
+        * 
+        * @param objectAffectedByOperation
+        *            a newly created object for example. May be <code>null</code>
+        * @return true if the method executed successfully. Returning false will
+        *         set the operations status to {@link Status.CANCEL_STATUS} which
+        *         might not be what you want.
         */
        public boolean postOperation(CdmBase objectAffectedByOperation);
-       
+
        /**
-        * This method will get called after the execution took place and occasional cleanups
-        * were performed. This is typically the last thing to happen.
-        *
+        * This method will get called after the execution took place and occasional
+        * cleanups were performed. This is typically the last thing to happen.
+        * 
         * @return a boolean.
         */
        public boolean onComplete();