Jive API (3.0.13) 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
 ProjectStatus createStatus(Project project, User user, ProjectStatus.Type type, String description)
          Creates a project status for the given 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(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(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
 ProjectStatus getStatus(long statusID)
          Returns the project status for the given status ID.
 ProjectStatus getStatus(Project project)
          Returns the current project status for the given project.
 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.
 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(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(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

ProjectStatus createStatus(Project project,
                           User user,
                           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

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

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.

Jive Product Page

Copyright © 1999-2007 Jive Software.