
package processes;

import java.beans.*;

import java.lang.reflect.Method;
import java.lang.reflect.UndeclaredThrowableException;
import java.util.HashMap;
import java.util.Map;

import org.apache.beehive.controls.api.bean.*;
import org.apache.beehive.controls.api.context.ControlBeanContext;
import org.apache.beehive.controls.api.properties.PropertyKey;
import org.apache.beehive.controls.api.properties.PropertyMap;
import org.apache.beehive.controls.api.versioning.*;

@SuppressWarnings("all")
public class MyTaskCtrlBean
extends com.bea.control.TaskControlBean
implements processes.MyTaskCtrl
{
    static final Method _suspendTaskMethod;
    static final Method _setClaimDueBusinessDateSystemCalendarMethod;
    static final Method _setCompletionDueBusinessDateSystemCalendarMethod;
    static final Method _setResponseMethod;
    static final Method _getResponseMethod;
    static final Method _setOwnerMethod;
    static final Method _setClaimDueBusinessDateMethod;
    static final Method _createMethod;
    static final Method _setPriorityMethod;
    static final Method _setClaimDueDateMethod;
    static final Method _setCommentMethod;
    static final Method _resumeTaskMethod;
    static final Method _getPropertyMethod;
    static final Method _setCompletionDueBusinessDateMethod;
    static final Method _setPropertyMethod;
    static final Method _setCompletionDueDateMethod;
    static final Method _assignTaskToUserInGroupMethod;
    static final Method _removePropertyMethod;
    static final Method _createTaskByNameMethod;
    static final Method _assignTaskToUserMethod;
    static final Method _abortTaskMethod;
    static final Method _setRequestMethod;
    static final Method _setPermissionsMethod;
    static final Method _assignTaskToUsersAndGroupsMethod;
    static final Method _getRequestMethod;
    static final Method _CallbackIntf_onTaskAbortedEvent;
    static final Method _CallbackIntf_onTaskCompletedEvent;
    static final Method _CallbackIntf_onTaskOverdueEvent;
    
    //
    // This HashMap will map from a Method to the array of names for parameters of the
    // method.  This is necessary because parameter name data isn't carried along in the
    // class file, but if available can enable ease of use by referencing parameters by
    // the declared name (vs. by index).
    //
    // This map should be read-only after its initialization in the static block, hence
    // using a plain HashMap is thread-safe.
    //
    static HashMap<Method, String []> _methodParamMap = new HashMap<Method, String []>();
    
    static
    {
        
        
        try
        {
            _suspendTaskMethod = processes.MyTaskCtrl.class.getMethod("suspendTask", new Class [] {});
            _methodParamMap.put(_suspendTaskMethod, new String [] {  });
            _setClaimDueBusinessDateSystemCalendarMethod = processes.MyTaskCtrl.class.getMethod("setClaimDueBusinessDateSystemCalendar", new Class [] {java.lang.String.class});
            _methodParamMap.put(_setClaimDueBusinessDateSystemCalendarMethod, new String [] { "duration" });
            _setCompletionDueBusinessDateSystemCalendarMethod = processes.MyTaskCtrl.class.getMethod("setCompletionDueBusinessDateSystemCalendar", new Class [] {java.lang.String.class});
            _methodParamMap.put(_setCompletionDueBusinessDateSystemCalendarMethod, new String [] { "duration" });
            _setResponseMethod = processes.MyTaskCtrl.class.getMethod("setResponse", new Class [] {org.apache.xmlbeans.XmlObject.class});
            _methodParamMap.put(_setResponseMethod, new String [] { "xml" });
            _getResponseMethod = processes.MyTaskCtrl.class.getMethod("getResponse", new Class [] {});
            _methodParamMap.put(_getResponseMethod, new String [] {  });
            _setOwnerMethod = processes.MyTaskCtrl.class.getMethod("setOwner", new Class [] {java.lang.String.class});
            _methodParamMap.put(_setOwnerMethod, new String [] { "owner" });
            _setClaimDueBusinessDateMethod = processes.MyTaskCtrl.class.getMethod("setClaimDueBusinessDate", new Class [] {java.lang.String.class, java.lang.String.class});
            _methodParamMap.put(_setClaimDueBusinessDateMethod, new String [] { "duration", "calendarID" });
            _createMethod = processes.MyTaskCtrl.class.getMethod("create", new Class [] {});
            _methodParamMap.put(_createMethod, new String [] {  });
            _setPriorityMethod = processes.MyTaskCtrl.class.getMethod("setPriority", new Class [] {java.lang.Integer.class});
            _methodParamMap.put(_setPriorityMethod, new String [] { "priority" });
            _setClaimDueDateMethod = processes.MyTaskCtrl.class.getMethod("setClaimDueDate", new Class [] {java.util.Date.class});
            _methodParamMap.put(_setClaimDueDateMethod, new String [] { "date" });
            _setCommentMethod = processes.MyTaskCtrl.class.getMethod("setComment", new Class [] {java.lang.String.class});
            _methodParamMap.put(_setCommentMethod, new String [] { "comment" });
            _resumeTaskMethod = processes.MyTaskCtrl.class.getMethod("resumeTask", new Class [] {});
            _methodParamMap.put(_resumeTaskMethod, new String [] {  });
            _getPropertyMethod = processes.MyTaskCtrl.class.getMethod("getProperty", new Class [] {java.lang.String.class});
            _methodParamMap.put(_getPropertyMethod, new String [] { "name" });
            _setCompletionDueBusinessDateMethod = processes.MyTaskCtrl.class.getMethod("setCompletionDueBusinessDate", new Class [] {java.lang.String.class, java.lang.String.class});
            _methodParamMap.put(_setCompletionDueBusinessDateMethod, new String [] { "duration", "calendarID" });
            _setPropertyMethod = processes.MyTaskCtrl.class.getMethod("setProperty", new Class [] {java.lang.String.class, java.lang.String.class});
            _methodParamMap.put(_setPropertyMethod, new String [] { "name", "value" });
            _setCompletionDueDateMethod = processes.MyTaskCtrl.class.getMethod("setCompletionDueDate", new Class [] {java.util.Date.class});
            _methodParamMap.put(_setCompletionDueDateMethod, new String [] { "date" });
            _assignTaskToUserInGroupMethod = processes.MyTaskCtrl.class.getMethod("assignTaskToUserInGroup", new Class [] {java.lang.String.class});
            _methodParamMap.put(_assignTaskToUserInGroupMethod, new String [] { "group" });
            _removePropertyMethod = processes.MyTaskCtrl.class.getMethod("removeProperty", new Class [] {java.lang.String.class});
            _methodParamMap.put(_removePropertyMethod, new String [] { "name" });
            _createTaskByNameMethod = processes.MyTaskCtrl.class.getMethod("createTaskByName", new Class [] {java.lang.String.class});
            _methodParamMap.put(_createTaskByNameMethod, new String [] { "name" });
            _assignTaskToUserMethod = processes.MyTaskCtrl.class.getMethod("assignTaskToUser", new Class [] {java.lang.String.class});
            _methodParamMap.put(_assignTaskToUserMethod, new String [] { "user" });
            _abortTaskMethod = processes.MyTaskCtrl.class.getMethod("abortTask", new Class [] {});
            _methodParamMap.put(_abortTaskMethod, new String [] {  });
            _setRequestMethod = processes.MyTaskCtrl.class.getMethod("setRequest", new Class [] {org.apache.xmlbeans.XmlObject.class});
            _methodParamMap.put(_setRequestMethod, new String [] { "xml" });
            _setPermissionsMethod = processes.MyTaskCtrl.class.getMethod("setPermissions", new Class [] {java.lang.Boolean.class, java.lang.Boolean.class, java.lang.Boolean.class});
            _methodParamMap.put(_setPermissionsMethod, new String [] { "aborted", "returned", "reassigned" });
            _assignTaskToUsersAndGroupsMethod = processes.MyTaskCtrl.class.getMethod("assignTaskToUsersAndGroups", new Class [] {java.lang.String[].class, java.lang.String[].class});
            _methodParamMap.put(_assignTaskToUsersAndGroupsMethod, new String [] { "users", "groups" });
            _getRequestMethod = processes.MyTaskCtrl.class.getMethod("getRequest", new Class [] {});
            _methodParamMap.put(_getRequestMethod, new String [] {  });
            _CallbackIntf_onTaskAbortedEvent = processes.MyTaskCtrl.CallbackIntf.class.getMethod("onTaskAborted", new Class [] {org.apache.xmlbeans.XmlObject.class});
            _methodParamMap.put(_CallbackIntf_onTaskAbortedEvent, new String [] { "response" });
            _CallbackIntf_onTaskCompletedEvent = processes.MyTaskCtrl.CallbackIntf.class.getMethod("onTaskCompleted", new Class [] {org.apache.xmlbeans.XmlObject.class});
            _methodParamMap.put(_CallbackIntf_onTaskCompletedEvent, new String [] { "response" });
            _CallbackIntf_onTaskOverdueEvent = processes.MyTaskCtrl.CallbackIntf.class.getMethod("onTaskOverdue", new Class [] {java.util.Date.class});
            _methodParamMap.put(_CallbackIntf_onTaskOverdueEvent, new String [] { "time" });
        }
        catch (NoSuchMethodException __bc_nsme)
        {
            throw new ExceptionInInitializerError(__bc_nsme);
        }
    }
    
    
    
    static
    {
        
    }
    
    
    
    /**
    * This is the public constructor for the class.  A client-defined control ID may
    * be provided.  This ID must be unique within the nesting ControlBeanContext.
    * @param context The containing ControlBeanContext
    * @param id The control identifier (or null to autogenerate a unique value)
    * @param props The initialization Properties for the new instance (or null for defaults)
    */
    public MyTaskCtrlBean(ControlBeanContext context, String id, PropertyMap props)
    {
        this(context, id, props, processes.MyTaskCtrl.class);
    }
    
    /**
    * This is the public null-arg constructor for this ControlBean.  If a control id
    * is not provided, a unique value will be auto-generated.
    */
    public MyTaskCtrlBean()
    {
        this(null, null, null);
    }
    
    /**
    * This is the protected version that is used by any ControlBean subclass
    */
    protected MyTaskCtrlBean(ControlBeanContext context, String id, PropertyMap props, Class controlClass)
    {
        super(context, id, props, controlClass);
        
        //
        // Register event notifier instances for any EventSets
        //
        setEventNotifier(processes.MyTaskCtrl.CallbackIntf.class, new CallbackIntfNotifier());
    }
    
    
    /**
    * Returns an array of parameter names for the request method, or null if no parameter
    * data is available.
    */
    protected String [] getParameterNames(Method m)
    {
        // Check the local map for operations on this bean type
        if (_methodParamMap.containsKey(m))
        {
            return _methodParamMap.get(m);
        }
        
        // Delegate up if not found locally
        return super.getParameterNames(m);
    }
    
    /**
    * Implements processes.MyTaskCtrl.suspendTask
    */
    public  void suspendTask() 
    {
        Object [] __bc_argArray = new Object[] {  };
        Throwable __bc_thrown = null;
        Extensible __bc_target = (Extensible)ensureControl();
        
        try
        {
            preInvoke(_suspendTaskMethod, __bc_argArray);
            
            __bc_target.invoke(_suspendTaskMethod, __bc_argArray)
            ;
        }
        catch (Throwable __bc_t)
        {
            //
            // All exceptions are caught here, so postInvoke processing has visibility into
            // the exception status.  Errors, RuntimExceptions, or declared checked exceptions will
            // be rethrown.
            //
            __bc_thrown = __bc_t;
            
            if (__bc_t instanceof Error) throw (Error)__bc_t;
            else if (__bc_t instanceof RuntimeException) throw (RuntimeException)__bc_t;
            
            throw new UndeclaredThrowableException(__bc_t);
        }
        finally
        {
            Object __bc_rv = null;
            postInvoke(_suspendTaskMethod, __bc_argArray, __bc_rv, __bc_thrown);
        }
    }
    
    /**
    * Implements processes.MyTaskCtrl.setClaimDueBusinessDateSystemCalendar
    */
    public  void setClaimDueBusinessDateSystemCalendar(java.lang.String duration) 
    {
        Object [] __bc_argArray = new Object[] { duration };
        Throwable __bc_thrown = null;
        Extensible __bc_target = (Extensible)ensureControl();
        
        try
        {
            preInvoke(_setClaimDueBusinessDateSystemCalendarMethod, __bc_argArray);
            
            __bc_target.invoke(_setClaimDueBusinessDateSystemCalendarMethod, __bc_argArray)
            ;
        }
        catch (Throwable __bc_t)
        {
            //
            // All exceptions are caught here, so postInvoke processing has visibility into
            // the exception status.  Errors, RuntimExceptions, or declared checked exceptions will
            // be rethrown.
            //
            __bc_thrown = __bc_t;
            
            if (__bc_t instanceof Error) throw (Error)__bc_t;
            else if (__bc_t instanceof RuntimeException) throw (RuntimeException)__bc_t;
            
            throw new UndeclaredThrowableException(__bc_t);
        }
        finally
        {
            Object __bc_rv = null;
            postInvoke(_setClaimDueBusinessDateSystemCalendarMethod, __bc_argArray, __bc_rv, __bc_thrown);
        }
    }
    
    /**
    * Implements processes.MyTaskCtrl.setCompletionDueBusinessDateSystemCalendar
    */
    public  void setCompletionDueBusinessDateSystemCalendar(java.lang.String duration) 
    {
        Object [] __bc_argArray = new Object[] { duration };
        Throwable __bc_thrown = null;
        Extensible __bc_target = (Extensible)ensureControl();
        
        try
        {
            preInvoke(_setCompletionDueBusinessDateSystemCalendarMethod, __bc_argArray);
            
            __bc_target.invoke(_setCompletionDueBusinessDateSystemCalendarMethod, __bc_argArray)
            ;
        }
        catch (Throwable __bc_t)
        {
            //
            // All exceptions are caught here, so postInvoke processing has visibility into
            // the exception status.  Errors, RuntimExceptions, or declared checked exceptions will
            // be rethrown.
            //
            __bc_thrown = __bc_t;
            
            if (__bc_t instanceof Error) throw (Error)__bc_t;
            else if (__bc_t instanceof RuntimeException) throw (RuntimeException)__bc_t;
            
            throw new UndeclaredThrowableException(__bc_t);
        }
        finally
        {
            Object __bc_rv = null;
            postInvoke(_setCompletionDueBusinessDateSystemCalendarMethod, __bc_argArray, __bc_rv, __bc_thrown);
        }
    }
    
    /**
    * Implements processes.MyTaskCtrl.setResponse
    */
    public  void setResponse(org.apache.xmlbeans.XmlObject xml) 
    {
        Object [] __bc_argArray = new Object[] { xml };
        Throwable __bc_thrown = null;
        Extensible __bc_target = (Extensible)ensureControl();
        
        try
        {
            preInvoke(_setResponseMethod, __bc_argArray);
            
            __bc_target.invoke(_setResponseMethod, __bc_argArray)
            ;
        }
        catch (Throwable __bc_t)
        {
            //
            // All exceptions are caught here, so postInvoke processing has visibility into
            // the exception status.  Errors, RuntimExceptions, or declared checked exceptions will
            // be rethrown.
            //
            __bc_thrown = __bc_t;
            
            if (__bc_t instanceof Error) throw (Error)__bc_t;
            else if (__bc_t instanceof RuntimeException) throw (RuntimeException)__bc_t;
            
            throw new UndeclaredThrowableException(__bc_t);
        }
        finally
        {
            Object __bc_rv = null;
            postInvoke(_setResponseMethod, __bc_argArray, __bc_rv, __bc_thrown);
        }
    }
    
    /**
    * Implements processes.MyTaskCtrl.getResponse
    */
    public  org.apache.xmlbeans.XmlObject getResponse() 
    {
        Object [] __bc_argArray = new Object[] {  };
        Throwable __bc_thrown = null;
        Extensible __bc_target = (Extensible)ensureControl();
        org.apache.xmlbeans.XmlObject __bc_retval = null;
        
        try
        {
            preInvoke(_getResponseMethod, __bc_argArray);
            
            __bc_retval =
            (org.apache.xmlbeans.XmlObject)
            __bc_target.invoke(_getResponseMethod, __bc_argArray)
            ;
        }
        catch (Throwable __bc_t)
        {
            //
            // All exceptions are caught here, so postInvoke processing has visibility into
            // the exception status.  Errors, RuntimExceptions, or declared checked exceptions will
            // be rethrown.
            //
            __bc_thrown = __bc_t;
            
            if (__bc_t instanceof Error) throw (Error)__bc_t;
            else if (__bc_t instanceof RuntimeException) throw (RuntimeException)__bc_t;
            
            throw new UndeclaredThrowableException(__bc_t);
        }
        finally
        {
            Object __bc_rv = __bc_retval;
            postInvoke(_getResponseMethod, __bc_argArray, __bc_rv, __bc_thrown);
        }
        return __bc_retval;
    }
    
    /**
    * Implements processes.MyTaskCtrl.setOwner
    */
    public  void setOwner(java.lang.String owner) 
    {
        Object [] __bc_argArray = new Object[] { owner };
        Throwable __bc_thrown = null;
        Extensible __bc_target = (Extensible)ensureControl();
        
        try
        {
            preInvoke(_setOwnerMethod, __bc_argArray);
            
            __bc_target.invoke(_setOwnerMethod, __bc_argArray)
            ;
        }
        catch (Throwable __bc_t)
        {
            //
            // All exceptions are caught here, so postInvoke processing has visibility into
            // the exception status.  Errors, RuntimExceptions, or declared checked exceptions will
            // be rethrown.
            //
            __bc_thrown = __bc_t;
            
            if (__bc_t instanceof Error) throw (Error)__bc_t;
            else if (__bc_t instanceof RuntimeException) throw (RuntimeException)__bc_t;
            
            throw new UndeclaredThrowableException(__bc_t);
        }
        finally
        {
            Object __bc_rv = null;
            postInvoke(_setOwnerMethod, __bc_argArray, __bc_rv, __bc_thrown);
        }
    }
    
    /**
    * Implements processes.MyTaskCtrl.setClaimDueBusinessDate
    */
    public  void setClaimDueBusinessDate(java.lang.String duration, java.lang.String calendarID) 
    {
        Object [] __bc_argArray = new Object[] { duration, calendarID };
        Throwable __bc_thrown = null;
        Extensible __bc_target = (Extensible)ensureControl();
        
        try
        {
            preInvoke(_setClaimDueBusinessDateMethod, __bc_argArray);
            
            __bc_target.invoke(_setClaimDueBusinessDateMethod, __bc_argArray)
            ;
        }
        catch (Throwable __bc_t)
        {
            //
            // All exceptions are caught here, so postInvoke processing has visibility into
            // the exception status.  Errors, RuntimExceptions, or declared checked exceptions will
            // be rethrown.
            //
            __bc_thrown = __bc_t;
            
            if (__bc_t instanceof Error) throw (Error)__bc_t;
            else if (__bc_t instanceof RuntimeException) throw (RuntimeException)__bc_t;
            
            throw new UndeclaredThrowableException(__bc_t);
        }
        finally
        {
            Object __bc_rv = null;
            postInvoke(_setClaimDueBusinessDateMethod, __bc_argArray, __bc_rv, __bc_thrown);
        }
    }
    
    /**
    * Implements processes.MyTaskCtrl.create
    */
    public  processes.MyTaskCtrl create() 
    {
        Object [] __bc_argArray = new Object[] {  };
        Throwable __bc_thrown = null;
        Extensible __bc_target = (Extensible)ensureControl();
        processes.MyTaskCtrl __bc_retval = null;
        
        try
        {
            preInvoke(_createMethod, __bc_argArray);
            
            __bc_retval =
            (processes.MyTaskCtrl)
            __bc_target.invoke(_createMethod, __bc_argArray)
            ;
        }
        catch (Throwable __bc_t)
        {
            //
            // All exceptions are caught here, so postInvoke processing has visibility into
            // the exception status.  Errors, RuntimExceptions, or declared checked exceptions will
            // be rethrown.
            //
            __bc_thrown = __bc_t;
            
            if (__bc_t instanceof Error) throw (Error)__bc_t;
            else if (__bc_t instanceof RuntimeException) throw (RuntimeException)__bc_t;
            
            throw new UndeclaredThrowableException(__bc_t);
        }
        finally
        {
            Object __bc_rv = __bc_retval;
            postInvoke(_createMethod, __bc_argArray, __bc_rv, __bc_thrown);
        }
        return __bc_retval;
    }
    
    /**
    * Implements processes.MyTaskCtrl.setPriority
    */
    public  void setPriority(java.lang.Integer priority) 
    {
        Object [] __bc_argArray = new Object[] { priority };
        Throwable __bc_thrown = null;
        Extensible __bc_target = (Extensible)ensureControl();
        
        try
        {
            preInvoke(_setPriorityMethod, __bc_argArray);
            
            __bc_target.invoke(_setPriorityMethod, __bc_argArray)
            ;
        }
        catch (Throwable __bc_t)
        {
            //
            // All exceptions are caught here, so postInvoke processing has visibility into
            // the exception status.  Errors, RuntimExceptions, or declared checked exceptions will
            // be rethrown.
            //
            __bc_thrown = __bc_t;
            
            if (__bc_t instanceof Error) throw (Error)__bc_t;
            else if (__bc_t instanceof RuntimeException) throw (RuntimeException)__bc_t;
            
            throw new UndeclaredThrowableException(__bc_t);
        }
        finally
        {
            Object __bc_rv = null;
            postInvoke(_setPriorityMethod, __bc_argArray, __bc_rv, __bc_thrown);
        }
    }
    
    /**
    * Implements processes.MyTaskCtrl.setClaimDueDate
    */
    public  void setClaimDueDate(java.util.Date date) 
    {
        Object [] __bc_argArray = new Object[] { date };
        Throwable __bc_thrown = null;
        Extensible __bc_target = (Extensible)ensureControl();
        
        try
        {
            preInvoke(_setClaimDueDateMethod, __bc_argArray);
            
            __bc_target.invoke(_setClaimDueDateMethod, __bc_argArray)
            ;
        }
        catch (Throwable __bc_t)
        {
            //
            // All exceptions are caught here, so postInvoke processing has visibility into
            // the exception status.  Errors, RuntimExceptions, or declared checked exceptions will
            // be rethrown.
            //
            __bc_thrown = __bc_t;
            
            if (__bc_t instanceof Error) throw (Error)__bc_t;
            else if (__bc_t instanceof RuntimeException) throw (RuntimeException)__bc_t;
            
            throw new UndeclaredThrowableException(__bc_t);
        }
        finally
        {
            Object __bc_rv = null;
            postInvoke(_setClaimDueDateMethod, __bc_argArray, __bc_rv, __bc_thrown);
        }
    }
    
    /**
    * Implements processes.MyTaskCtrl.setComment
    */
    public  void setComment(java.lang.String comment) 
    {
        Object [] __bc_argArray = new Object[] { comment };
        Throwable __bc_thrown = null;
        Extensible __bc_target = (Extensible)ensureControl();
        
        try
        {
            preInvoke(_setCommentMethod, __bc_argArray);
            
            __bc_target.invoke(_setCommentMethod, __bc_argArray)
            ;
        }
        catch (Throwable __bc_t)
        {
            //
            // All exceptions are caught here, so postInvoke processing has visibility into
            // the exception status.  Errors, RuntimExceptions, or declared checked exceptions will
            // be rethrown.
            //
            __bc_thrown = __bc_t;
            
            if (__bc_t instanceof Error) throw (Error)__bc_t;
            else if (__bc_t instanceof RuntimeException) throw (RuntimeException)__bc_t;
            
            throw new UndeclaredThrowableException(__bc_t);
        }
        finally
        {
            Object __bc_rv = null;
            postInvoke(_setCommentMethod, __bc_argArray, __bc_rv, __bc_thrown);
        }
    }
    
    /**
    * Implements processes.MyTaskCtrl.resumeTask
    */
    public  void resumeTask() 
    {
        Object [] __bc_argArray = new Object[] {  };
        Throwable __bc_thrown = null;
        Extensible __bc_target = (Extensible)ensureControl();
        
        try
        {
            preInvoke(_resumeTaskMethod, __bc_argArray);
            
            __bc_target.invoke(_resumeTaskMethod, __bc_argArray)
            ;
        }
        catch (Throwable __bc_t)
        {
            //
            // All exceptions are caught here, so postInvoke processing has visibility into
            // the exception status.  Errors, RuntimExceptions, or declared checked exceptions will
            // be rethrown.
            //
            __bc_thrown = __bc_t;
            
            if (__bc_t instanceof Error) throw (Error)__bc_t;
            else if (__bc_t instanceof RuntimeException) throw (RuntimeException)__bc_t;
            
            throw new UndeclaredThrowableException(__bc_t);
        }
        finally
        {
            Object __bc_rv = null;
            postInvoke(_resumeTaskMethod, __bc_argArray, __bc_rv, __bc_thrown);
        }
    }
    
    /**
    * Implements processes.MyTaskCtrl.getProperty
    */
    public  java.lang.String getProperty(java.lang.String name) 
    {
        Object [] __bc_argArray = new Object[] { name };
        Throwable __bc_thrown = null;
        Extensible __bc_target = (Extensible)ensureControl();
        java.lang.String __bc_retval = null;
        
        try
        {
            preInvoke(_getPropertyMethod, __bc_argArray);
            
            __bc_retval =
            (java.lang.String)
            __bc_target.invoke(_getPropertyMethod, __bc_argArray)
            ;
        }
        catch (Throwable __bc_t)
        {
            //
            // All exceptions are caught here, so postInvoke processing has visibility into
            // the exception status.  Errors, RuntimExceptions, or declared checked exceptions will
            // be rethrown.
            //
            __bc_thrown = __bc_t;
            
            if (__bc_t instanceof Error) throw (Error)__bc_t;
            else if (__bc_t instanceof RuntimeException) throw (RuntimeException)__bc_t;
            
            throw new UndeclaredThrowableException(__bc_t);
        }
        finally
        {
            Object __bc_rv = __bc_retval;
            postInvoke(_getPropertyMethod, __bc_argArray, __bc_rv, __bc_thrown);
        }
        return __bc_retval;
    }
    
    /**
    * Implements processes.MyTaskCtrl.setCompletionDueBusinessDate
    */
    public  void setCompletionDueBusinessDate(java.lang.String duration, java.lang.String calendarID) 
    {
        Object [] __bc_argArray = new Object[] { duration, calendarID };
        Throwable __bc_thrown = null;
        Extensible __bc_target = (Extensible)ensureControl();
        
        try
        {
            preInvoke(_setCompletionDueBusinessDateMethod, __bc_argArray);
            
            __bc_target.invoke(_setCompletionDueBusinessDateMethod, __bc_argArray)
            ;
        }
        catch (Throwable __bc_t)
        {
            //
            // All exceptions are caught here, so postInvoke processing has visibility into
            // the exception status.  Errors, RuntimExceptions, or declared checked exceptions will
            // be rethrown.
            //
            __bc_thrown = __bc_t;
            
            if (__bc_t instanceof Error) throw (Error)__bc_t;
            else if (__bc_t instanceof RuntimeException) throw (RuntimeException)__bc_t;
            
            throw new UndeclaredThrowableException(__bc_t);
        }
        finally
        {
            Object __bc_rv = null;
            postInvoke(_setCompletionDueBusinessDateMethod, __bc_argArray, __bc_rv, __bc_thrown);
        }
    }
    
    /**
    * Implements processes.MyTaskCtrl.setProperty
    */
    public  void setProperty(java.lang.String name, java.lang.String value) 
    {
        Object [] __bc_argArray = new Object[] { name, value };
        Throwable __bc_thrown = null;
        Extensible __bc_target = (Extensible)ensureControl();
        
        try
        {
            preInvoke(_setPropertyMethod, __bc_argArray);
            
            __bc_target.invoke(_setPropertyMethod, __bc_argArray)
            ;
        }
        catch (Throwable __bc_t)
        {
            //
            // All exceptions are caught here, so postInvoke processing has visibility into
            // the exception status.  Errors, RuntimExceptions, or declared checked exceptions will
            // be rethrown.
            //
            __bc_thrown = __bc_t;
            
            if (__bc_t instanceof Error) throw (Error)__bc_t;
            else if (__bc_t instanceof RuntimeException) throw (RuntimeException)__bc_t;
            
            throw new UndeclaredThrowableException(__bc_t);
        }
        finally
        {
            Object __bc_rv = null;
            postInvoke(_setPropertyMethod, __bc_argArray, __bc_rv, __bc_thrown);
        }
    }
    
    /**
    * Implements processes.MyTaskCtrl.setCompletionDueDate
    */
    public  void setCompletionDueDate(java.util.Date date) 
    {
        Object [] __bc_argArray = new Object[] { date };
        Throwable __bc_thrown = null;
        Extensible __bc_target = (Extensible)ensureControl();
        
        try
        {
            preInvoke(_setCompletionDueDateMethod, __bc_argArray);
            
            __bc_target.invoke(_setCompletionDueDateMethod, __bc_argArray)
            ;
        }
        catch (Throwable __bc_t)
        {
            //
            // All exceptions are caught here, so postInvoke processing has visibility into
            // the exception status.  Errors, RuntimExceptions, or declared checked exceptions will
            // be rethrown.
            //
            __bc_thrown = __bc_t;
            
            if (__bc_t instanceof Error) throw (Error)__bc_t;
            else if (__bc_t instanceof RuntimeException) throw (RuntimeException)__bc_t;
            
            throw new UndeclaredThrowableException(__bc_t);
        }
        finally
        {
            Object __bc_rv = null;
            postInvoke(_setCompletionDueDateMethod, __bc_argArray, __bc_rv, __bc_thrown);
        }
    }
    
    /**
    * Implements processes.MyTaskCtrl.assignTaskToUserInGroup
    */
    public  void assignTaskToUserInGroup(java.lang.String group) 
    {
        Object [] __bc_argArray = new Object[] { group };
        Throwable __bc_thrown = null;
        Extensible __bc_target = (Extensible)ensureControl();
        
        try
        {
            preInvoke(_assignTaskToUserInGroupMethod, __bc_argArray);
            
            __bc_target.invoke(_assignTaskToUserInGroupMethod, __bc_argArray)
            ;
        }
        catch (Throwable __bc_t)
        {
            //
            // All exceptions are caught here, so postInvoke processing has visibility into
            // the exception status.  Errors, RuntimExceptions, or declared checked exceptions will
            // be rethrown.
            //
            __bc_thrown = __bc_t;
            
            if (__bc_t instanceof Error) throw (Error)__bc_t;
            else if (__bc_t instanceof RuntimeException) throw (RuntimeException)__bc_t;
            
            throw new UndeclaredThrowableException(__bc_t);
        }
        finally
        {
            Object __bc_rv = null;
            postInvoke(_assignTaskToUserInGroupMethod, __bc_argArray, __bc_rv, __bc_thrown);
        }
    }
    
    /**
    * Implements processes.MyTaskCtrl.removeProperty
    */
    public  void removeProperty(java.lang.String name) 
    {
        Object [] __bc_argArray = new Object[] { name };
        Throwable __bc_thrown = null;
        Extensible __bc_target = (Extensible)ensureControl();
        
        try
        {
            preInvoke(_removePropertyMethod, __bc_argArray);
            
            __bc_target.invoke(_removePropertyMethod, __bc_argArray)
            ;
        }
        catch (Throwable __bc_t)
        {
            //
            // All exceptions are caught here, so postInvoke processing has visibility into
            // the exception status.  Errors, RuntimExceptions, or declared checked exceptions will
            // be rethrown.
            //
            __bc_thrown = __bc_t;
            
            if (__bc_t instanceof Error) throw (Error)__bc_t;
            else if (__bc_t instanceof RuntimeException) throw (RuntimeException)__bc_t;
            
            throw new UndeclaredThrowableException(__bc_t);
        }
        finally
        {
            Object __bc_rv = null;
            postInvoke(_removePropertyMethod, __bc_argArray, __bc_rv, __bc_thrown);
        }
    }
    
    /**
    * Implements processes.MyTaskCtrl.createTaskByName
    */
    public  java.lang.String createTaskByName(java.lang.String name) 
    {
        Object [] __bc_argArray = new Object[] { name };
        Throwable __bc_thrown = null;
        Extensible __bc_target = (Extensible)ensureControl();
        java.lang.String __bc_retval = null;
        
        try
        {
            preInvoke(_createTaskByNameMethod, __bc_argArray);
            
            __bc_retval =
            (java.lang.String)
            __bc_target.invoke(_createTaskByNameMethod, __bc_argArray)
            ;
        }
        catch (Throwable __bc_t)
        {
            //
            // All exceptions are caught here, so postInvoke processing has visibility into
            // the exception status.  Errors, RuntimExceptions, or declared checked exceptions will
            // be rethrown.
            //
            __bc_thrown = __bc_t;
            
            if (__bc_t instanceof Error) throw (Error)__bc_t;
            else if (__bc_t instanceof RuntimeException) throw (RuntimeException)__bc_t;
            
            throw new UndeclaredThrowableException(__bc_t);
        }
        finally
        {
            Object __bc_rv = __bc_retval;
            postInvoke(_createTaskByNameMethod, __bc_argArray, __bc_rv, __bc_thrown);
        }
        return __bc_retval;
    }
    
    /**
    * Implements processes.MyTaskCtrl.assignTaskToUser
    */
    public  void assignTaskToUser(java.lang.String user) 
    {
        Object [] __bc_argArray = new Object[] { user };
        Throwable __bc_thrown = null;
        Extensible __bc_target = (Extensible)ensureControl();
        
        try
        {
            preInvoke(_assignTaskToUserMethod, __bc_argArray);
            
            __bc_target.invoke(_assignTaskToUserMethod, __bc_argArray)
            ;
        }
        catch (Throwable __bc_t)
        {
            //
            // All exceptions are caught here, so postInvoke processing has visibility into
            // the exception status.  Errors, RuntimExceptions, or declared checked exceptions will
            // be rethrown.
            //
            __bc_thrown = __bc_t;
            
            if (__bc_t instanceof Error) throw (Error)__bc_t;
            else if (__bc_t instanceof RuntimeException) throw (RuntimeException)__bc_t;
            
            throw new UndeclaredThrowableException(__bc_t);
        }
        finally
        {
            Object __bc_rv = null;
            postInvoke(_assignTaskToUserMethod, __bc_argArray, __bc_rv, __bc_thrown);
        }
    }
    
    /**
    * Implements processes.MyTaskCtrl.abortTask
    */
    public  void abortTask() 
    {
        Object [] __bc_argArray = new Object[] {  };
        Throwable __bc_thrown = null;
        Extensible __bc_target = (Extensible)ensureControl();
        
        try
        {
            preInvoke(_abortTaskMethod, __bc_argArray);
            
            __bc_target.invoke(_abortTaskMethod, __bc_argArray)
            ;
        }
        catch (Throwable __bc_t)
        {
            //
            // All exceptions are caught here, so postInvoke processing has visibility into
            // the exception status.  Errors, RuntimExceptions, or declared checked exceptions will
            // be rethrown.
            //
            __bc_thrown = __bc_t;
            
            if (__bc_t instanceof Error) throw (Error)__bc_t;
            else if (__bc_t instanceof RuntimeException) throw (RuntimeException)__bc_t;
            
            throw new UndeclaredThrowableException(__bc_t);
        }
        finally
        {
            Object __bc_rv = null;
            postInvoke(_abortTaskMethod, __bc_argArray, __bc_rv, __bc_thrown);
        }
    }
    
    /**
    * Implements processes.MyTaskCtrl.setRequest
    */
    public  void setRequest(org.apache.xmlbeans.XmlObject xml) 
    {
        Object [] __bc_argArray = new Object[] { xml };
        Throwable __bc_thrown = null;
        Extensible __bc_target = (Extensible)ensureControl();
        
        try
        {
            preInvoke(_setRequestMethod, __bc_argArray);
            
            __bc_target.invoke(_setRequestMethod, __bc_argArray)
            ;
        }
        catch (Throwable __bc_t)
        {
            //
            // All exceptions are caught here, so postInvoke processing has visibility into
            // the exception status.  Errors, RuntimExceptions, or declared checked exceptions will
            // be rethrown.
            //
            __bc_thrown = __bc_t;
            
            if (__bc_t instanceof Error) throw (Error)__bc_t;
            else if (__bc_t instanceof RuntimeException) throw (RuntimeException)__bc_t;
            
            throw new UndeclaredThrowableException(__bc_t);
        }
        finally
        {
            Object __bc_rv = null;
            postInvoke(_setRequestMethod, __bc_argArray, __bc_rv, __bc_thrown);
        }
    }
    
    /**
    * Implements processes.MyTaskCtrl.setPermissions
    */
    public  void setPermissions(java.lang.Boolean aborted, java.lang.Boolean returned, java.lang.Boolean reassigned) 
    {
        Object [] __bc_argArray = new Object[] { aborted, returned, reassigned };
        Throwable __bc_thrown = null;
        Extensible __bc_target = (Extensible)ensureControl();
        
        try
        {
            preInvoke(_setPermissionsMethod, __bc_argArray);
            
            __bc_target.invoke(_setPermissionsMethod, __bc_argArray)
            ;
        }
        catch (Throwable __bc_t)
        {
            //
            // All exceptions are caught here, so postInvoke processing has visibility into
            // the exception status.  Errors, RuntimExceptions, or declared checked exceptions will
            // be rethrown.
            //
            __bc_thrown = __bc_t;
            
            if (__bc_t instanceof Error) throw (Error)__bc_t;
            else if (__bc_t instanceof RuntimeException) throw (RuntimeException)__bc_t;
            
            throw new UndeclaredThrowableException(__bc_t);
        }
        finally
        {
            Object __bc_rv = null;
            postInvoke(_setPermissionsMethod, __bc_argArray, __bc_rv, __bc_thrown);
        }
    }
    
    /**
    * Implements processes.MyTaskCtrl.assignTaskToUsersAndGroups
    */
    public  void assignTaskToUsersAndGroups(java.lang.String[] users, java.lang.String[] groups) 
    {
        Object [] __bc_argArray = new Object[] { users, groups };
        Throwable __bc_thrown = null;
        Extensible __bc_target = (Extensible)ensureControl();
        
        try
        {
            preInvoke(_assignTaskToUsersAndGroupsMethod, __bc_argArray);
            
            __bc_target.invoke(_assignTaskToUsersAndGroupsMethod, __bc_argArray)
            ;
        }
        catch (Throwable __bc_t)
        {
            //
            // All exceptions are caught here, so postInvoke processing has visibility into
            // the exception status.  Errors, RuntimExceptions, or declared checked exceptions will
            // be rethrown.
            //
            __bc_thrown = __bc_t;
            
            if (__bc_t instanceof Error) throw (Error)__bc_t;
            else if (__bc_t instanceof RuntimeException) throw (RuntimeException)__bc_t;
            
            throw new UndeclaredThrowableException(__bc_t);
        }
        finally
        {
            Object __bc_rv = null;
            postInvoke(_assignTaskToUsersAndGroupsMethod, __bc_argArray, __bc_rv, __bc_thrown);
        }
    }
    
    /**
    * Implements processes.MyTaskCtrl.getRequest
    */
    public  org.apache.xmlbeans.XmlObject getRequest() 
    {
        Object [] __bc_argArray = new Object[] {  };
        Throwable __bc_thrown = null;
        Extensible __bc_target = (Extensible)ensureControl();
        org.apache.xmlbeans.XmlObject __bc_retval = null;
        
        try
        {
            preInvoke(_getRequestMethod, __bc_argArray);
            
            __bc_retval =
            (org.apache.xmlbeans.XmlObject)
            __bc_target.invoke(_getRequestMethod, __bc_argArray)
            ;
        }
        catch (Throwable __bc_t)
        {
            //
            // All exceptions are caught here, so postInvoke processing has visibility into
            // the exception status.  Errors, RuntimExceptions, or declared checked exceptions will
            // be rethrown.
            //
            __bc_thrown = __bc_t;
            
            if (__bc_t instanceof Error) throw (Error)__bc_t;
            else if (__bc_t instanceof RuntimeException) throw (RuntimeException)__bc_t;
            
            throw new UndeclaredThrowableException(__bc_t);
        }
        finally
        {
            Object __bc_rv = __bc_retval;
            postInvoke(_getRequestMethod, __bc_argArray, __bc_rv, __bc_thrown);
        }
        return __bc_retval;
    }
    
    
    /**
    * A PropertyKey that can be used to access the controlImplementation property of the
    * BaseProperties PropertySet
    */
    public static final PropertyKey ControlImplementationKey = new PropertyKey(org.apache.beehive.controls.api.properties.BaseProperties.class, "controlImplementation");
    
    public synchronized void setControlImplementation(java.lang.String value)
    {
        
        setControlProperty(ControlImplementationKey, value);
    }
    
    public java.lang.String getControlImplementation()
    {
        return (java.lang.String)getControlProperty(ControlImplementationKey);
    }
    
    
    
    
    /**
    * This inner class implements a simple proxy to deliver CallbackIntf events
    * back to a register listener.
    */
    protected class CallbackIntfNotifier
    extends com.bea.control.TaskControlBean.CallbackNotifier
    implements processes.MyTaskCtrl.CallbackIntf, java.io.Serializable
    {
        private static final long serialVersionUID = 1L;
        
        public void onTaskAborted(org.apache.xmlbeans.XmlObject response) 
        {
            Throwable __bc_thrown = null;
            
            CallbackIntfNotifier __bc_notifier = (CallbackIntfNotifier)getEventNotifier(processes.MyTaskCtrl.CallbackIntf.class);
            
            Object [] __bc_argArray = new Object[] {response};
            
            java.util.Iterator __bc_listenerIter = __bc_notifier.listenerIterator();
            
            try
            {
                while (__bc_listenerIter.hasNext())
                {
                    processes.MyTaskCtrl.CallbackIntf __bc_listener = (processes.MyTaskCtrl.CallbackIntf)__bc_listenerIter.next();
                    __bc_listener.onTaskAborted(response);
                }
            }
            catch (Throwable __bc_t)
            {
                //
                // All exceptions are caught here, so postEvent processing has visibility into
                // the exception status.  Errors, RuntimExceptions, or declared checked exceptions will
                // be rethrown.
                //
                __bc_thrown = __bc_t;
                
                if (__bc_t instanceof Error) throw (Error)__bc_t;
                else if (__bc_t instanceof RuntimeException) throw (RuntimeException)__bc_t;
                
                throw new UndeclaredThrowableException(__bc_t);
            }
        }
        
        public void onTaskCompleted(org.apache.xmlbeans.XmlObject response) 
        {
            Throwable __bc_thrown = null;
            
            CallbackIntfNotifier __bc_notifier = (CallbackIntfNotifier)getEventNotifier(processes.MyTaskCtrl.CallbackIntf.class);
            
            Object [] __bc_argArray = new Object[] {response};
            
            java.util.Iterator __bc_listenerIter = __bc_notifier.listenerIterator();
            
            try
            {
                while (__bc_listenerIter.hasNext())
                {
                    processes.MyTaskCtrl.CallbackIntf __bc_listener = (processes.MyTaskCtrl.CallbackIntf)__bc_listenerIter.next();
                    __bc_listener.onTaskCompleted(response);
                }
            }
            catch (Throwable __bc_t)
            {
                //
                // All exceptions are caught here, so postEvent processing has visibility into
                // the exception status.  Errors, RuntimExceptions, or declared checked exceptions will
                // be rethrown.
                //
                __bc_thrown = __bc_t;
                
                if (__bc_t instanceof Error) throw (Error)__bc_t;
                else if (__bc_t instanceof RuntimeException) throw (RuntimeException)__bc_t;
                
                throw new UndeclaredThrowableException(__bc_t);
            }
        }
        
        public void onTaskOverdue(java.util.Date time) 
        {
            Throwable __bc_thrown = null;
            
            CallbackIntfNotifier __bc_notifier = (CallbackIntfNotifier)getEventNotifier(processes.MyTaskCtrl.CallbackIntf.class);
            
            Object [] __bc_argArray = new Object[] {time};
            
            java.util.Iterator __bc_listenerIter = __bc_notifier.listenerIterator();
            
            try
            {
                while (__bc_listenerIter.hasNext())
                {
                    processes.MyTaskCtrl.CallbackIntf __bc_listener = (processes.MyTaskCtrl.CallbackIntf)__bc_listenerIter.next();
                    __bc_listener.onTaskOverdue(time);
                }
            }
            catch (Throwable __bc_t)
            {
                //
                // All exceptions are caught here, so postEvent processing has visibility into
                // the exception status.  Errors, RuntimExceptions, or declared checked exceptions will
                // be rethrown.
                //
                __bc_thrown = __bc_t;
                
                if (__bc_t instanceof Error) throw (Error)__bc_t;
                else if (__bc_t instanceof RuntimeException) throw (RuntimeException)__bc_t;
                
                throw new UndeclaredThrowableException(__bc_t);
            }
        }
        
    }
    
    /**
    * Registers a new listener for CallbackIntf events on the bean.
    */
    public synchronized void addCallbackIntfListener(processes.MyTaskCtrl.CallbackIntf listener)
    {
        CallbackIntfNotifier __bc_notifier = (CallbackIntfNotifier)getEventNotifier(processes.MyTaskCtrl.CallbackIntf.class);
        __bc_notifier.addListener(listener);
    }
    
    /**
    * Unregisters an existing listener for CallbackIntf events on the bean.
    */
    public synchronized void removeCallbackIntfListener(processes.MyTaskCtrl.CallbackIntf listener)
    {
        CallbackIntfNotifier __bc_notifier = (CallbackIntfNotifier)getEventNotifier(processes.MyTaskCtrl.CallbackIntf.class);
        __bc_notifier.removeListener(listener);
    }
    
    /**
    * Returns the  array of registered listeners for CallbackIntf events on the bean, or
    * an empty array if no listener has been registered
    */
    public synchronized Object [] getCallbackIntfListeners()
    {
        CallbackIntfNotifier __bc_notifier = (CallbackIntfNotifier)getEventNotifier(processes.MyTaskCtrl.CallbackIntf.class);
        processes.MyTaskCtrl.CallbackIntf [] __bc_listeners = new processes.MyTaskCtrl.CallbackIntf[__bc_notifier.getListenerCount()];
        __bc_notifier.getListeners(__bc_listeners);
        return __bc_listeners;
    }
    
    /**
    * The _annotCache maintains a lookup cache from AnnotatedElements to an associated
    * PropertyMap.  This enables these maps to be shared across multiple beans.
    */
    static private HashMap __bc_annotCache = new HashMap();
    
    protected Map getPropertyMapCache() { return __bc_annotCache; }
    
    private static final long serialVersionUID = 1L;
}
