|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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
.
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. |
IObjectReference[] |
getObjectReferences()
Returns an array of IObjectReference . |
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 |
public ITask createTask(java.lang.String name, java.lang.String description, java.util.Date startTime, java.util.Date endTime)
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
.
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
ITask
object that represents the new task
java.lang.IllegalStateException
- if the object has not yet
been stored or has already been removedpublic AccessLevel getAccessLevel(RoleType roleType)
roleType
- the role type; cannot be null
java.lang.IllegalStateException
- if the object has already been removedpublic IProject getContainingProject() throws CollaborationException, java.rmi.RemoteException
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 callpublic java.util.Date getCreatedDate()
java.lang.IllegalStateException
- if the object has not yet
been stored or has already been removedpublic java.lang.String getDescription()
java.lang.IllegalStateException
- if the object has already been removedpublic java.lang.String getDetailsURL()
java.lang.IllegalStateException
- if the object has not yet
been stored or has already been removedpublic int getID()
java.lang.IllegalStateException
- if the object has not yet
been stored or has already been removedpublic java.util.Date getLastModifiedDate()
java.lang.IllegalStateException
- if the object has not yet
been stored or has already been removedpublic java.lang.String getName()
java.lang.IllegalStateException
- if the object has already been removedpublic IObjectReference[] getObjectReferences() throws CollaborationException, java.rmi.RemoteException
IObjectReference
.
For tasklists, object references include attached documents and discussions.
IObjectReference
for the current task list
CollaborationException
- if the method call resulted in an error
java.lang.IllegalStateException
- if the document has not yet been inserted or has already been removed, or if the version number does not exist.
java.rmi.RemoteException
- if there was a communication problem during the execution of the remote method callpublic int getOwnerUserID()
java.lang.IllegalStateException
- if the object has not yet
been stored or has already been removedpublic boolean hasCreatedDate()
true
if the task list created date is available, else false
.
true
if the task list created date is available, else false
java.lang.IllegalStateException
- if the object has already been removedpublic boolean hasLastModifiedDate()
true
if last modified date is available, else false
.
true
if the task list last modified date is available, else false
java.lang.IllegalStateException
- if the object has already been removedpublic 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
- the 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 was a communication problem during the execution of the remote method callpublic 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 an individual
object's security. The 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
(if setDefaultSecurity
has been called with
a false
value)
java.lang.IllegalStateException
- if the object has already been removedpublic void removeTask(ITask task) throws CollaborationException, java.rmi.RemoteException
task
- the 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 the ID of the task is not > 0
java.rmi.RemoteException
- if there was a communication problem during the execution of the remote method callpublic 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 the 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 modifying the object access level)public void setDefaultSecurity(boolean isDefaultSecurity)
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.
isDefaultSecurity
- true
to use
default security, otherwise false
java.lang.IllegalStateException
- if the object has already been removedpublic void setDescription(java.lang.String description)
description
- the task list description; cannot be null
java.lang.IllegalStateException
- if the object has already been removedpublic void setName(java.lang.String name)
name
- the task list name; cannot be null
java.lang.IllegalStateException
- if the object has already been removedpublic void store() throws CollaborationException, java.rmi.RemoteException
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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright ©2010 Oracle® Corporation. All Rights Reserved.