|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
An ITaskList is 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.
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 task list access level for a 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 object. |
boolean |
hasCreatedDate()
Returns true if 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 taskID. |
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 |
public ITask createTask(java.lang.String name,
java.lang.String description,
java.util.Date startTime,
java.util.Date endTime)
store is called.
Note that 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.
name - name of the task; cannot be null.description - description of the task; cannot be null.startTime - start time of the task, cannot be null.endTime - end time of the task, cannot be null.
ITask.
java.lang.IllegalStateException - if the object has not yet
been stored or has already been removed.public AccessLevel getAccessLevel(RoleType roleType)
roleType - the role type; cannot be null.
java.lang.IllegalStateException - if the object already been removed.
public IProject getContainingProject()
throws CollaborationException,
java.rmi.RemoteException
CollaborationException - if the method call resulted in an error.
java.lang.IllegalStateException - if the object already been removed.
java.rmi.RemoteException - if there is a communication problem during the execution of the remote method call.public java.util.Date getCreatedDate()
java.lang.IllegalStateException - if the object has not yet
been stored or has already been removed.public java.lang.String getDescription()
java.lang.IllegalStateException - if the object already been removed.public java.lang.String getDetailsURL()
java.lang.IllegalStateException - if the object has not yet
been stored or has already been removed.public int getID()
java.lang.IllegalStateException - if the object has not yet
been stored or has already been removed.public java.util.Date getLastModifiedDate()
java.lang.IllegalStateException - if the object has not yet been stored or has already been removed.public java.lang.String getName()
java.lang.IllegalStateException - if the object already been removed.public int getOwnerUserID()
java.lang.IllegalStateException - if the object has not yet been stored or has already been removed.public boolean hasCreatedDate()
true if created date is available, else false.
true if created date is available, else false.
java.lang.IllegalStateException - if the object has already
been removed.public boolean hasLastModifiedDate()
true if last modified date is available, else false.
true if last modified date is available, else false.
java.lang.IllegalStateException - if the object has already
been removed.
public boolean isActionAllowed(TaskListPermission permission)
throws CollaborationException,
java.rmi.RemoteException
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.
permission - task list permission.
true if the user can perform
the given action, else false.
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 is a communication problem during the execution of the remote method call.public boolean isDefaultSecurity()
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 individual
object's security. Default value for
default security on a task list is true.
true if the object uses
project-default security, false if the
object is enabled to use its own security, i.e.,
setDefaultSecurity has been called with
a false value.
java.lang.IllegalStateException - if the object already been removed.
public void removeTask(ITask task)
throws CollaborationException,
java.rmi.RemoteException
task - task to be removed; cannot be null.
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 id of the task is no > 0.
java.rmi.RemoteException - if there is a communication problem during the execution of the remote method call.
public void setAccessLevel(RoleType roleType,
AccessLevel accessLevel)
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();
}
roleType - the role type for which access level will be set; cannot be null.accessLevel - the access level; cannot be null.
java.lang.IllegalStateException - if project default security is used, call setDefaultSecurity(false) prior
to modify object access level.public void setDefaultSecurity(boolean isDefaultSecurity)
true will
enable defaultSecurity, calling it with false
will disable defaultSecurity.
By default all objects are created with defaultSecurity
set to true. To modify security on individual
objects in a project, the objects must have defaultSecurity
disabled prior to modification. After this method is called,
any project-level security modification will not be applied
to the objects, and only individual object's security
modification will be used.
This method might be used in conjunction with
isDefaultSecurity, which would indicate if
the current object has defaultSecurity enabled.
isDefaultSecurity - true if it uses
default security, otherwise false
java.lang.IllegalStateException - if the object already been removed.public void setDescription(java.lang.String description)
description - the task list description; cannot be null.
java.lang.IllegalStateException - if the object already been removed.public void setName(java.lang.String name)
name - the task list name; cannot be null
java.lang.IllegalStateException - if the object already been removed.
public void store()
throws CollaborationException,
java.rmi.RemoteException
CollaborationException - if the method call resulted in an error.
java.lang.IllegalStateException - if the object already been removed.
java.rmi.RemoteException - if there is a communication problem during the execution of the remote method call.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright ©2007 BEA Systems, Inc. All Rights Reserved.