Clearspace API (2.5.29) Core Javadocs

com.jivesoftware.community.project
Interface ProjectManager

All Superinterfaces:
JiveManager

public interface ProjectManager
extends JiveManager

This manager provides methods to load tasks by ID and to retrieve lists of projects. Once a handle on a project is obtained one can use the methods in this interface to update or delete a project or otherwise modify the project.

See Also:
Project

Method Summary
 Project create(JiveContainer container, String name, String description, User user, List<CheckPoint> checkPoints, Date dueDate)
          Creates a new project as a child of the parent container
 com.jivesoftware.community.project.ProjectStatus createStatus(Project project, User user, com.jivesoftware.community.project.ProjectStatus.Type type, String description)
          Creates a project status for the given project.
 void createTrackedProject(User user, Project project)
          Creates a new tracked project.
 void delete(Project project)
          Deletes a project and all of its content.
 Project getProject(long projectID)
          Returns the project with the given projectID
 int getProjectCount()
          Returns a count of all the projects in the system
 int getProjectCount(com.jivesoftware.community.project.ProjectResultFilter resultFilter)
          Returns a count of all the projects in the system, according to the work space result filter
 int getProjectCountFromTaskList(User owner)
          Returns the count of unique projects that the user is assigned one or more tasks
 JiveIterator<Project> getProjects()
          Returns an Iterable for all the projects in the container
 JiveIterator<Project> getProjects(com.jivesoftware.community.project.ProjectResultFilter resultFilter)
          Returns an Iterable for all the visible projects in the system, according to the work space result filter
 JiveIterator<Project> getProjectsFromTaskList(User owner)
          Returns an iterator of unique projects that the user is assigned one or more tasks
 com.jivesoftware.community.project.ProjectStatus getStatus(long statusID)
          Returns the project status for the given status ID.
 com.jivesoftware.community.project.ProjectStatus getStatus(Project project)
          Returns the current project status for the given project.
 int getTrackedProjectCount(User user)
          Returns the number of projects the user is tracking.
 List<Project> getTrackedProjects(User user)
          Returns all tracked projects for the given user.
 int getUserCount(Project project)
          Returns the count of unique users that own tasks in the specified project
 JiveIterator<User> getUsers(Project project)
          Returns an iterator of unique users that own tasks in the specified project
 boolean isProjectsEnabled()
          Returns true if Projects is enabled and false if it is not.
 boolean isTrackedProject(User user, Project project)
          Returns if the project is currently tracked by the user.
 void removeTrackedProject(User user, Project project)
          Removes a tracked project for the user.
 void setProjectsEnabled(boolean isProjectsEnabled)
          Enables or disables Projects.
 void update(Project project)
          Persists project changes, and broadcasts changes across the cluster.
 
Methods inherited from interface com.jivesoftware.community.JiveManager
destroy
 

Method Detail

isProjectsEnabled

boolean isProjectsEnabled()
Returns true if Projects is enabled and false if it is not.

Returns:
true if Projects is enabled and false if it is not.

setProjectsEnabled

void setProjectsEnabled(boolean isProjectsEnabled)
Enables or disables Projects.

Parameters:
isProjectsEnabled - true to enabled Projects and false to disable it.

create

Project create(JiveContainer container,
               String name,
               String description,
               User user,
               List<CheckPoint> checkPoints,
               Date dueDate)
               throws UnauthorizedException
Creates a new project as a child of the parent container

Parameters:
container - the container to create the project within
name - the name for the new project
description - the description for the new project
checkPoints - a list of checkpoints for the new project
dueDate - the due date for the new project
Returns:
a new Project object
Throws:
UnauthorizedException - if not authorized to create a project in the given container
NameAlreadyExistsException - if the project name already exists in the parent container

getProject

Project getProject(long projectID)
                   throws NotFoundException,
                          UnauthorizedException
Returns the project with the given projectID

Parameters:
projectID - the id of the project to return
Returns:
the project with the given projectID
Throws:
NotFoundException - if no project exists for that ID
UnauthorizedException - if not allowed to view the project

getProjectCount

int getProjectCount()
Returns a count of all the projects in the system

Returns:
a count of all the projects in the system

getProjectCount

int getProjectCount(com.jivesoftware.community.project.ProjectResultFilter resultFilter)
Returns a count of all the projects in the system, according to the work space result filter

Parameters:
resultFilter - the work space result filter
Returns:
a count of all the projects in the system, according to the work space result filter

getProjects

JiveIterator<Project> getProjects()
Returns an Iterable for all the projects in the container

Returns:
an Iterable for all the projects in the container

getProjects

JiveIterator<Project> getProjects(com.jivesoftware.community.project.ProjectResultFilter resultFilter)
Returns an Iterable for all the visible projects in the system, according to the work space result filter

Parameters:
resultFilter - the work space result filter
Returns:
an Iterable for all the visible projects in the system, according to the work space result filter

getProjectCountFromTaskList

int getProjectCountFromTaskList(User owner)
Returns the count of unique projects that the user is assigned one or more tasks

Parameters:
owner - the specified user
Returns:
the count of unique projects that the user is assigned one or more tasks

getProjectsFromTaskList

JiveIterator<Project> getProjectsFromTaskList(User owner)
Returns an iterator of unique projects that the user is assigned one or more tasks

Parameters:
owner - the specified user
Returns:
an iterator of unique projects that the user is assigned one or more tasks

getUserCount

int getUserCount(Project project)
Returns the count of unique users that own tasks in the specified project

Parameters:
project - the specified project
Returns:
the count of unique users that own tasks in the specified project

getUsers

JiveIterator<User> getUsers(Project project)
Returns an iterator of unique users that own tasks in the specified project

Parameters:
project - the specified project
Returns:
an iterator of unique users that own tasks in the specified project

update

void update(Project project)
            throws UnauthorizedException
Persists project changes, and broadcasts changes across the cluster. When any field that bears the RequiresUpdate annotation change this method should be called to save the changes.

Parameters:
project - The project to save updates for.
Throws:
UnauthorizedException - if not allowed to modify the project

delete

void delete(Project project)
            throws UnauthorizedException
Deletes a project and all of its content. Once a project is deleted, the project object should no longer be used. The search index and other resources that referenced content in the project will also be updated appropriately.

Parameters:
project - the thread to delete.
Throws:
UnauthorizedException - if not allowed to delete the project

createStatus

com.jivesoftware.community.project.ProjectStatus createStatus(Project project,
                                                              User user,
                                                              com.jivesoftware.community.project.ProjectStatus.Type type,
                                                              String description)
Creates a project status for the given project.

Parameters:
project - the project to create the status for.
user - the user creating the status.
type - the type of status.
description - the description describing the status.
Returns:
the project status

getStatus

com.jivesoftware.community.project.ProjectStatus getStatus(Project project)
Returns the current project status for the given project.

Parameters:
project - the project for obtaining the status.
Returns:
the current project status.

getStatus

com.jivesoftware.community.project.ProjectStatus getStatus(long statusID)
Returns the project status for the given status ID.

Parameters:
statusID - the ID of the project status.
Returns:
the project status for the given status ID.

createTrackedProject

void createTrackedProject(User user,
                          Project project)
Creates a new tracked project. This will be done automatically if a user creates a project or a task within a project. Users can also track a project explicitely.

Parameters:
user - the user tracking the project.
project - the project to track.

isTrackedProject

boolean isTrackedProject(User user,
                         Project project)
Returns if the project is currently tracked by the user.

Parameters:
user - the user tracking the project.
project - the project being tracked.

getTrackedProjects

List<Project> getTrackedProjects(User user)
Returns all tracked projects for the given user.

Parameters:
user - the user tracking projects
Returns:
all tracked projects for the given user.

removeTrackedProject

void removeTrackedProject(User user,
                          Project project)
Removes a tracked project for the user.

Parameters:
user - the user removing the tracked project.
project - the project to remove from tracking.

getTrackedProjectCount

int getTrackedProjectCount(User user)
Returns the number of projects the user is tracking.

Parameters:
user - the user tracking projects
Returns:
the number of projects the user is tracking.

Clearspace Project Page

Copyright © 1999-2007 Jive Software.