Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.plumtree.remote.prc.collaboration.tasklist
Interface ITaskList

public interface ITaskList

Interface that represents a container for `ITask`. It handles task creation and removal. To create a subtask, use `ITask.createSubTask`. To create a dependent task, use `ITask.addDependentTask`.

Any task list modifications will not be stored permanently until `store` is called.

Method Summary
`ITask` | `createTask(java.lang.String name, java.lang.String description, java.util.Date startTime, java.util.Date endTime)` Creates and returns a task object.
`AccessLevel` | `getAccessLevel(RoleType roleType)` Returns the task list access level for the given role type.
`IProject` | `getContainingProject()` Returns the project that this task list belongs to.
`java.util.Date` | `getCreatedDate()` Returns the creation date.
`java.lang.String` | `getDescription()` Returns the task list description.
`java.lang.String` | `getDetailsURL()` Returns the URL at which the task list details can be viewed.
`int` | `getID()` Returns the task list ID.
`java.util.Date` | `getLastModifiedDate()` Returns the last modified date.
`java.lang.String` | `getName()` Returns the task list name.
`int` | `getOwnerUserID()` Returns the user ID of the owner of this task list.
`boolean` | `hasCreatedDate()` Returns `true` if the task list created date is available, else `false`.
`boolean` | `hasLastModifiedDate()` Returns `true` if last modified date is available, else `false`.
`boolean` | `isActionAllowed(TaskListPermission permission)` Returns whether a given `TaskListPermission` is allowed for this task list.
`boolean` | `isDefaultSecurity()` Indicates whether this task list uses project-default security.
`void` | `removeTask(ITask task)` Removes a task given the task ID.
`void` | `setAccessLevel(RoleType roleType, AccessLevel accessLevel)` Set task list access level for a given role type.
`void` | `setDefaultSecurity(boolean isDefaultSecurity)` Enables or disables this task list's use of project default security.
`void` | `setDescription(java.lang.String description)` Sets the task list description.
`void` | `setName(java.lang.String name)` Sets the task list name.
`void` | `store()` Stores the task list.

Method Detail

### createTask

    public ITask createTask(java.lang.String name,
                            java.lang.String description,
                            java.util.Date startTime,
                            java.util.Date endTime)

  Creates and returns a task object. The newly created task object will not be stored until `store` is called.

  Note: The value of the start date and end date stored in the database may vary by a few milliseconds from the supplied date. The date in this object will reflect the stored date after a call to `Store`.

  Parameters:
    `name` - the name of the task; cannot be `null`
    `description` - the description of the task; cannot be `null`
    `startTime` - the start time of the task, cannot be `null`
    `endTime` - the end time of the task, cannot be `null`
  Returns:
    an `ITask` object that represents the new task
  Throws:
    `java.lang.IllegalStateException` - if the object has not yet been stored or has already been removed

### getAccessLevel

    public AccessLevel getAccessLevel(RoleType roleType)

  Returns the task list access level for the given role type.

  Parameters:
    `roleType` - the role type; cannot be `null`
  Returns:
    the access level for the given role type
  Throws:
    `java.lang.IllegalStateException` - if the object has already been removed

### getContainingProject

    public IProject getContainingProject()
                                  throws CollaborationException,
                                         java.rmi.RemoteException

  Returns the project that this task list belongs to.

  Returns:
    the project that this task list belongs to
  Throws:
    `CollaborationException` - if the method call resulted in an error
    `java.lang.IllegalStateException` - if the object has already been removed
    `java.rmi.RemoteException` - if there was a communication problem during the execution of the remote method call

### getCreatedDate

    public java.util.Date getCreatedDate()

  Returns the creation date.

  Returns:
    the the creation date
  Throws:
    `java.lang.IllegalStateException` - if the object has not yet been stored or has already been removed

### getDescription

    public java.lang.String getDescription()

  Returns the task list description.

  Returns:
    the task list description
  Throws:
    `java.lang.IllegalStateException` - if the object has already been removed

### getDetailsURL

    public java.lang.String getDetailsURL()

  Returns the URL at which the task list details can be viewed.

  Note: This URL is gatewayed using the Collaboration server's primary portal.

  Returns:
    the task list details URL
  Throws:
    `java.lang.IllegalStateException` - if the object has not yet been stored or has already been removed

### getID

    public int getID()

  Returns the task list ID.

  Returns:
    the task list ID
  Throws:
    `java.lang.IllegalStateException` - if the object has not yet been stored or has already been removed

### getLastModifiedDate

    public java.util.Date getLastModifiedDate()

  Returns the last modified date. The last modified date of a task list will also be updated whenever a new task is created in this task list.

  Returns:
    the task list last modified date
  Throws:
    `java.lang.IllegalStateException` - if the object has not yet been stored or has already been removed

### getName

    public java.lang.String getName()

  Returns the task list name.

  Returns:
    the task list name
  Throws:
    `java.lang.IllegalStateException` - if the object has already been removed

### getOwnerUserID

    public int getOwnerUserID()

  Returns the user ID of the owner of this task list. The owner of an object is the user who creates the object.

  Returns:
    the owner user ID
  Throws:
    `java.lang.IllegalStateException` - if the object has not yet been stored or has already been removed

### hasCreatedDate

    public boolean hasCreatedDate()

  Returns `true` if the task list created date is available, else `false`.

  Returns:
    `true` if the task list created date is available, else `false`
  Throws:
    `java.lang.IllegalStateException` - if the object has already been removed

### hasLastModifiedDate

    public boolean hasLastModifiedDate()

  Returns `true` if last modified date is available, else `false`.

  Returns:
    `true` if the task list last modified date is available, else `false`
  Throws:
    `java.lang.IllegalStateException` - if the object has already been removed

### isActionAllowed

    public boolean isActionAllowed(TaskListPermission permission)
                            throws CollaborationException,
                                   java.rmi.RemoteException

  Returns whether a given `TaskListPermission` is allowed for this task list. This method can be used to determine if a user can perform a given action within the context of a task list such as editing a task list, copying a task list, editing task list security, etc. See the enumeration type `TaskListPermission` for details about specific task list permissions.

  Parameters:
    `permission` - the task list permission
  Returns:
    `true` if the user can perform the given action, else `false`
  Throws:
    `java.lang.IllegalStateException` - if the object has not yet been stored or has already been removed
    `CollaborationException` - if the method call resulted in an error
    `java.rmi.RemoteException` - if there was a communication problem during the execution of the remote method call

### isDefaultSecurity

    public boolean isDefaultSecurity()

  Indicates whether this task list uses project-default security. If `true`, trying to modify security on the current object alone will not have any effect. `setDefaultSecurity` must be set to `false` in order to modify an individual object's security. The default value for default security on a task list is `true`.

  Returns:
    `true` if the object uses project-default security, `false` if the object is enabled to use its own security (if `setDefaultSecurity` has been called with a `false` value)
  Throws:
    `java.lang.IllegalStateException` - if the object has already been removed

### removeTask

    public void removeTask(ITask task)
                    throws CollaborationException,
                           java.rmi.RemoteException

  Removes a task given the task ID.

  Parameters:
    `task` - the task to be removed; cannot be `null`
  Throws:
    `CollaborationException` - if the method call resulted in an error
    `java.lang.IllegalStateException` - if the object has not yet been stored or has already been removed
    `java.lang.IllegalArgumentException` - if the ID of the task is not > 0
    `java.rmi.RemoteException` - if there was a communication problem during the execution of the remote method call

### setAccessLevel

    public void setAccessLevel(RoleType roleType,
                               AccessLevel accessLevel)

  Set task list access level for a given role type. The task list must have its default security disabled prior to this call using `setDefaultSecurity{false}`. Any security change on the task list will be automatically applied to all tasks in this task list after `store` is called. Trying to modify the access level for a Leader role type will throw `CollaborationException` upon `store`.

       //Below sample code shows how to set the access level on a discussion.

       //verify if the current user has the permission to edit security for the discussion
       boolean hasPermission = discussion.isActionAllowed(DiscussionPermission.EDIT_SECURITY);

       //after making sure the current user has permission to edit security, modify the access level
       if (hasPermission)

       {
       //first disable using project default security
       discussion.setDefaultSecurity(false);

       //then change discussion to have the READ access level for member role type
       discussion.setAccessLevel(RoleType.MEMBER, AccessLevels.READ);

       //need to store the discussion to persist the access level change
       discussion.store();
       }

  Parameters:
    `roleType` - the role type for which the access level will be set; cannot be `null`
    `accessLevel` - the access level; cannot be `null`
  Throws:
    `java.lang.IllegalStateException` - if project default security is used (call `setDefaultSecurity(false)` prior to modifying the object access level)

### setDefaultSecurity

    public void setDefaultSecurity(boolean isDefaultSecurity)

  Enables or disables this task list's use of project default security. Calling this method with `true` will enable default security, calling it with `false` will disable default security.

  By default, all objects are created with default security set to `true`. To modify security on an individual object in a project, the object must have default security disabled prior to modification. After this method is called, any project-level security modification will not be applied to the objects, and only the individual object's security will be used.

  This method can be used in conjunction with `isDefaultSecurity`, which indicates if the current object has default security enabled.

  Parameters:
    `isDefaultSecurity` - `true` to use default security, otherwise `false`
  Throws:
    `java.lang.IllegalStateException` - if the object has already been removed

### setDescription

    public void setDescription(java.lang.String description)

  Sets the task list description.

  Parameters:
    `description` - the task list description; cannot be `null`
  Throws:
    `java.lang.IllegalStateException` - if the object has already been removed

### setName

    public void setName(java.lang.String name)

  Sets the task list name.

  Parameters:
    `name` - the task list name; cannot be `null`
  Throws:
    `java.lang.IllegalStateException` - if the object has already been removed

### store

    public void store()
               throws CollaborationException,
                      java.rmi.RemoteException

  Stores the task list. Any modification of the task list will not be stored permanently until this method is called. Can be used to store a newly created task list or edit an existing task list.

  Throws:
    `CollaborationException` - if the method call resulted in an error
    `java.lang.IllegalStateException` - if the object has already been removed
    `java.rmi.RemoteException` - if there was a communication problem during the execution of the remote method call

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

For additional information on the IDK, including tutorials, blogs, code samples and more, see the AquaLogic User Interaction Developer Center on BEA dev2dev.

Copyright ©2007 BEA Systems, Inc. All Rights Reserved.