
package controls;

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 AppTaskControlBean
extends com.bea.control.TaskControlBean
implements controls.AppTaskControl
{
    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 _Callback_onTaskAbortedEvent;
    static final Method _Callback_onTaskCompletedEvent;
    static final Method _Callback_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 = controls.AppTaskControl.class.getMethod("suspendTask", new Class [] {});
            _methodParamMap.put(_suspendTaskMethod, new String [] {  });
            _setClaimDueBusinessDateSystemCalendarMethod = controls.AppTaskControl.class.getMethod("setClaimDueBusinessDateSystemCalendar", new Class [] {java.lang.String.class});
            _methodParamMap.put(_setClaimDueBusinessDateSystemCalendarMethod, new String [] { "duration" });
            _setCompletionDueBusinessDateSystemCalendarMethod = controls.AppTaskControl.class.getMethod("setCompletionDueBusinessDateSystemCalendar", new Class [] {java.lang.String.class});
            _methodParamMap.put(_setCompletionDueBusinessDateSystemCalendarMethod, new String [] { "duration" });
            _setResponseMethod = controls.AppTaskControl.class.getMethod("setResponse", new Class [] {org.apache.xmlbeans.XmlObject.class});
            _methodParamMap.put(_setResponseMethod, new String [] { "xml" });
            _getResponseMethod = controls.AppTaskControl.class.getMethod("getResponse", new Class [] {});
            _methodParamMap.put(_getResponseMethod, new String [] {  });
            _setOwnerMethod = controls.AppTaskControl.class.getMethod("setOwner", new Class [] {java.lang.String.class});
            _methodParamMap.put(_setOwnerMethod, new String [] { "owner" });
            _setClaimDueBusinessDateMethod = controls.AppTaskControl.class.getMethod("setClaimDueBusinessDate", new Class [] {java.lang.String.class, java.lang.String.class});
            _methodParamMap.put(_setClaimDueBusinessDateMethod, new String [] { "duration", "calendarID" });
            _createMethod = controls.AppTaskControl.class.getMethod("create", new Class [] {});
            _methodParamMap.put(_createMethod, new String [] {  });
            _setPriorityMethod = controls.AppTaskControl.class.getMethod("setPriority", new Class [] {java.lang.Integer.class});
            _methodParamMap.put(_setPriorityMethod, new String [] { "priority" });
            _setClaimDueDateMethod = controls.AppTaskControl.class.getMethod("setClaimDueDate", new Class [] {java.util.Date.class});
            _methodParamMap.put(_setClaimDueDateMethod, new String [] { "date" });
            _setCommentMethod = controls.AppTaskControl.class.getMethod("setComment", new Class [] {java.lang.String.class});
            _methodParamMap.put(_setCommentMethod, new String [] { "comment" });
            _resumeTaskMethod = controls.AppTaskControl.class.getMethod("resumeTask", new Class [] {});
            _methodParamMap.put(_resumeTaskMethod, new String [] {  });
            _getPropertyMethod = controls.AppTaskControl.class.getMethod("getProperty", new Class [] {java.lang.String.class});
            _methodParamMap.put(_getPropertyMethod, new String [] { "name" });
            _setCompletionDueBusinessDateMethod = controls.AppTaskControl.class.getMethod("setCompletionDueBusinessDate", new Class [] {java.lang.String.class, java.lang.String.class});
            _methodParamMap.put(_setCompletionDueBusinessDateMethod, new String [] { "duration", "calendarID" });
            _setPropertyMethod = controls.AppTaskControl.class.getMethod("setProperty", new Class [] {java.lang.String.class, java.lang.String.class});
            _methodParamMap.put(_setPropertyMethod, new String [] { "name", "value" });
            _setCompletionDueDateMethod = controls.AppTaskControl.class.getMethod("setCompletionDueDate", new Class [] {java.util.Date.class});
            _methodParamMap.put(_setCompletionDueDateMethod, new String [] { "date" });
            _assignTaskToUserInGroupMethod = controls.AppTaskControl.class.getMethod("assignTaskToUserInGroup", new Class [] {java.lang.String.class});
            _methodParamMap.put(_assignTaskToUserInGroupMethod, new String [] { "group" });
            _removePropertyMethod = controls.AppTaskControl.class.getMethod("removeProperty", new Class [] {java.lang.String.class});
            _methodParamMap.put(_removePropertyMethod, new String [] { "name" });
            _createTaskByNameMethod = controls.AppTaskControl.class.getMethod("createTaskByName", new Class [] {java.lang.String.class});
            _methodParamMap.put(_createTaskByNameMethod, new String [] { "name" });
            _assignTaskToUserMethod = controls.AppTaskControl.class.getMethod("assignTaskToUser", new Class [] {java.lang.String.class});
            _methodParamMap.put(_assignTaskToUserMethod, new String [] { "user" });
            _abortTaskMethod = controls.AppTaskControl.class.getMethod("abortTask", new Class [] {});
            _methodParamMap.put(_abortTaskMethod, new String [] {  });
            _setRequestMethod = controls.AppTaskControl.class.getMethod("setRequest", new Class [] {org.apache.xmlbeans.XmlObject.class});
            _methodParamMap.put(_setRequestMethod, new String [] { "xml" });
            _setPermissionsMethod = controls.AppTaskControl.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 = controls.AppTaskControl.class.getMethod("assignTaskToUsersAndGroups", new Class [] {java.lang.String[].class, java.lang.String[].class});
            _methodParamMap.put(_assignTaskToUsersAndGroupsMethod, new String [] { "users", "groups" });
            _getRequestMethod = controls.AppTaskControl.class.getMethod("getRequest", new Class [] {});
            _methodParamMap.put(_getRequestMethod, new String [] {  });
            _Callback_onTaskAbortedEvent = controls.AppTaskControl.Callback.class.getMethod("onTaskAborted", new Class [] {org.apache.xmlbeans.XmlObject.class});
            _methodParamMap.put(_Callback_onTaskAbortedEvent, new String [] { "response" });
            _Callback_onTaskCompletedEvent = controls.AppTaskControl.Callback.class.getMethod("onTaskCompleted", new Class [] {org.apache.xmlbeans.XmlObject.class});
            _methodParamMap.put(_Callback_onTaskCompletedEvent, new String [] { "response" });
            _Callback_onTaskOverdueEvent = controls.AppTaskControl.Callback.class.getMethod("onTaskOverdue", new Class [] {java.util.Date.class});
            _methodParamMap.put(_Callback_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 AppTaskControlBean(ControlBeanContext context, String id, PropertyMap props)
    {
        this(context, id, props, controls.AppTaskControl.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 AppTaskControlBean()
    {
        this(null, null, null);
    }
    
    /**
    * This is the protected version that is used by any ControlBean subclass
    */
    protected AppTaskControlBean(ControlBeanContext context, String id, PropertyMap props, Class controlClass)
    {
        super(context, id, props, controlClass);
        
        //
        // Register event notifier instances for any EventSets
        //
        setEventNotifier(controls.AppTaskControl.Callback.class, new CallbackNotifier());
    }
    
    
    /**
    * 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 controls.AppTaskControl.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 controls.AppTaskControl.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 controls.AppTaskControl.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 controls.AppTaskControl.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 controls.AppTaskControl.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 controls.AppTaskControl.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 controls.AppTaskControl.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 controls.AppTaskControl.create
    */
    public  controls.AppTaskControl create() 
    {
        Object [] __bc_argArray = new Object[] {  };
        Throwable __bc_thrown = null;
        Extensible __bc_target = (Extensible)ensureControl();
        controls.AppTaskControl __bc_retval = null;
        
        try
        {
            preInvoke(_createMethod, __bc_argArray);
            
            __bc_retval =
            (controls.AppTaskControl)
            __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 controls.AppTaskControl.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 controls.AppTaskControl.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 controls.AppTaskControl.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 controls.AppTaskControl.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 controls.AppTaskControl.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 controls.AppTaskControl.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 controls.AppTaskControl.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 controls.AppTaskControl.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 controls.AppTaskControl.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 controls.AppTaskControl.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 controls.AppTaskControl.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 controls.AppTaskControl.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 controls.AppTaskControl.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 controls.AppTaskControl.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 controls.AppTaskControl.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 controls.AppTaskControl.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 controls.AppTaskControl.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 Callback events
    * back to a register listener.
    */
    protected class CallbackNotifier
    extends com.bea.control.TaskControlBean.CallbackNotifier
    implements controls.AppTaskControl.Callback, java.io.Serializable
    {
        private static final long serialVersionUID = 1L;
        
        public void onTaskAborted(org.apache.xmlbeans.XmlObject response) 
        {
            Throwable __bc_thrown = null;
            
            CallbackNotifier __bc_notifier = (CallbackNotifier)getEventNotifier(controls.AppTaskControl.Callback.class);
            
            Object [] __bc_argArray = new Object[] {response};
            
            java.util.Iterator __bc_listenerIter = __bc_notifier.listenerIterator();
            
            try
            {
                while (__bc_listenerIter.hasNext())
                {
                    controls.AppTaskControl.Callback __bc_listener = (controls.AppTaskControl.Callback)__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;
            
            CallbackNotifier __bc_notifier = (CallbackNotifier)getEventNotifier(controls.AppTaskControl.Callback.class);
            
            Object [] __bc_argArray = new Object[] {response};
            
            java.util.Iterator __bc_listenerIter = __bc_notifier.listenerIterator();
            
            try
            {
                while (__bc_listenerIter.hasNext())
                {
                    controls.AppTaskControl.Callback __bc_listener = (controls.AppTaskControl.Callback)__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;
            
            CallbackNotifier __bc_notifier = (CallbackNotifier)getEventNotifier(controls.AppTaskControl.Callback.class);
            
            Object [] __bc_argArray = new Object[] {time};
            
            java.util.Iterator __bc_listenerIter = __bc_notifier.listenerIterator();
            
            try
            {
                while (__bc_listenerIter.hasNext())
                {
                    controls.AppTaskControl.Callback __bc_listener = (controls.AppTaskControl.Callback)__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 Callback events on the bean.
    */
    public synchronized void addCallbackListener(controls.AppTaskControl.Callback listener)
    {
        CallbackNotifier __bc_notifier = (CallbackNotifier)getEventNotifier(controls.AppTaskControl.Callback.class);
        __bc_notifier.addListener(listener);
    }
    
    /**
    * Unregisters an existing listener for Callback events on the bean.
    */
    public synchronized void removeCallbackListener(controls.AppTaskControl.Callback listener)
    {
        CallbackNotifier __bc_notifier = (CallbackNotifier)getEventNotifier(controls.AppTaskControl.Callback.class);
        __bc_notifier.removeListener(listener);
    }
    
    /**
    * Returns the  array of registered listeners for Callback events on the bean, or
    * an empty array if no listener has been registered
    */
    public synchronized controls.AppTaskControl.Callback [] getCallbackListeners()
    {
        CallbackNotifier __bc_notifier = (CallbackNotifier)getEventNotifier(controls.AppTaskControl.Callback.class);
        controls.AppTaskControl.Callback [] __bc_listeners = new controls.AppTaskControl.Callback[__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;
}
