org.olat.course.nodes.projectbroker.service
Interface ProjectBrokerManager

All Superinterfaces:
DeletableGroupData
All Known Implementing Classes:
ProjectBrokerManagerImpl

public interface ProjectBrokerManager
extends DeletableGroupData


Field Summary
static java.lang.String CUSTOMFIELD_LIST_DELIMITER
           
 
Method Summary
 boolean canBeCancelEnrollmentBy(Identity identity, Project project, ProjectBrokerModuleConfiguration moduleConfig)
          Return true when the project can be de-selected by an identity.
 boolean canBeProjectSelectedBy(Identity identity, Project project, ProjectBrokerModuleConfiguration moduleConfig, int nbrSelectedProjects, boolean isParticipantInAnyProject)
          Return true when the project can be selected by an identity.
 boolean cancelProjectEnrollmentOf(Identity identity, Project projectAt, ProjectBrokerModuleConfiguration moduleConfig)
          Remove certain identity as participant or candidate of a project (depending on project-broker configuration).
 ProjectBroker createAndSaveProjectBroker()
          Creates a new project-broker and save it.
 Project createAndSaveProjectFor(java.lang.String projectTitle, java.lang.String description, java.lang.Long projectBrokerId, BusinessGroup projectGroup)
          Create and save a new project.
 void deleteProject(Project project, boolean deleteGroup, CourseEnvironment courseEnv, CourseNode cNode)
          Delete a project.
 void deleteProjectBroker(java.lang.Long projectBrokerId, CourseEnvironment courseEnvironment, CourseNode courseNode)
          Delete a project-broker and his projects and groups.
 boolean enrollProjectParticipant(Identity identity, Project projectAt, ProjectBrokerModuleConfiguration moduleConfig, int nbrSelectedProjects, boolean isParticipantInAnyProject)
          Enroll certain identity as participant or candidate of a project (depending on project-broker configuration).
 boolean existProjectName(java.lang.Long projectBrokerId, java.lang.String newProjectTitle)
          Return true when a project with the same title already exist.
 java.lang.String getAttachmentBasePathRelToFolderRoot(CourseEnvironment courseEnvironment, CourseNode courseNode)
          Get attachment-folder relative path (without project-id).
 java.lang.String getAttamchmentRelativeRootPath(Project project, CourseEnvironment courseEnv, CourseNode courseNode)
          Get attachment-file relative path.
 int getNbrSelectedProjects(Identity identity, java.util.List<Project> projectList)
          Get the number of total selected project for certain identity.
 java.lang.Long getProjectBrokerId(CoursePropertyManager cpm, CourseNode courseNode)
          Get saved project-broker-id.
 java.util.List<Project> getProjectListBy(java.lang.Long projectBrokerId)
          Returns a list of projects for certain project-broker.
 int getSelectedPlaces(Project project)
          Get number of selected places for certain project.
 java.lang.String getStateFor(Project project, Identity identity, ProjectBrokerModuleConfiguration moduleConfig)
          Get the state [STATE_ASSIGNED_ACCOUNT_MANAGER | STATE_NOT_ASSIGNED_ACCOUNT_MANAGER | STATE_NOT_ASSIGNED_ACCOUNT_MANAGER_NO_CANDIDATE | STATE_FINAL_ENROLLED | STATE_PROV_ENROLLED | STATE_COMPLETE | STATE_NOT_ASSIGNED | STATE_ENROLLED ] of a project
 boolean isCustomFieldValueValid(java.lang.String value, java.lang.String string)
          Return true when the custom-field value is one of possible-values (drop-down-mode) or when it could be any value (input field).
 boolean isParticipantInAnyProject(Identity identity, java.util.List<Project> projectList)
          Return true when an identity is participant in any project of a project-broker.
 boolean isProjectManager(Identity identity, Project project)
          Check if a certain identity has the role of project-manager for certain project.
 boolean isProjectParticipant(Identity identity, Project project)
          Check if a certain identity is a participant of a project.
 void saveAttachedFile(Project project, java.lang.String fileName, VFSLeaf uploadedItem, CourseEnvironment courseEnv, CourseNode cNode)
          Save attachment file in the attachment-folder of a project.
 void saveProjectBrokerId(java.lang.Long projectBrokerId, CoursePropertyManager cpm, CourseNode courseNode)
          Save project-broker-id.
 void setProjectState(Project project, java.lang.String state)
          Set project-state [STATE_NOT_ASSIGNED | STATE_ASSIGNED].
 void signOutFormAllCandidateList(java.util.List<Identity> chosenIdentities, java.lang.Long projectBrokerId)
          Remove identities from all projects as candidates.
 void updateProject(Project project)
          Update and save an existing project.
 
Methods inherited from interface org.olat.group.DeletableGroupData
checkIfReferenced, deleteGroupDataFor
 

Field Detail

CUSTOMFIELD_LIST_DELIMITER

static final java.lang.String CUSTOMFIELD_LIST_DELIMITER
See Also:
Constant Field Values
Method Detail

getProjectListBy

java.util.List<Project> getProjectListBy(java.lang.Long projectBrokerId)
Returns a list of projects for certain project-broker.

Parameters:
projectBrokerId -
Returns:

getSelectedPlaces

int getSelectedPlaces(Project project)
Get number of selected places for certain project.

Parameters:
project -
Returns:

createAndSaveProjectBroker

ProjectBroker createAndSaveProjectBroker()
Creates a new project-broker and save it.

Returns:

isProjectManager

boolean isProjectManager(Identity identity,
                         Project project)
Check if a certain identity has the role of project-manager for certain project. Project-managers can edit, delete there projects. They can manage participants. They can lock into the drop-boxes and give feedback via return-boxes.

Parameters:
identity -
project -
Returns:

updateProject

void updateProject(Project project)
Update and save an existing project.

Parameters:
project -

createAndSaveProjectFor

Project createAndSaveProjectFor(java.lang.String projectTitle,
                                java.lang.String description,
                                java.lang.Long projectBrokerId,
                                BusinessGroup projectGroup)
Create and save a new project.

Parameters:
projectTitle -
description -
projectBrokerId -
projectGroup -
Returns:

isProjectParticipant

boolean isProjectParticipant(Identity identity,
                             Project project)
Check if a certain identity is a participant of a project.

Parameters:
identity -
project -
Returns:

enrollProjectParticipant

boolean enrollProjectParticipant(Identity identity,
                                 Project projectAt,
                                 ProjectBrokerModuleConfiguration moduleConfig,
                                 int nbrSelectedProjects,
                                 boolean isParticipantInAnyProject)
Enroll certain identity as participant or candidate of a project (depending on project-broker configuration).

Parameters:
identity -
projectAt -
moduleConfig -
nbrSelectedProjects -
isParticipantInAnyProject -
Returns:

cancelProjectEnrollmentOf

boolean cancelProjectEnrollmentOf(Identity identity,
                                  Project projectAt,
                                  ProjectBrokerModuleConfiguration moduleConfig)
Remove certain identity as participant or candidate of a project (depending on project-broker configuration).

Parameters:
identity -
projectAt -
moduleConfig -
Returns:

deleteProject

void deleteProject(Project project,
                   boolean deleteGroup,
                   CourseEnvironment courseEnv,
                   CourseNode cNode)
Delete a project.

Parameters:
project -
deleteGroup - true: project group will be deleted too
courseEnv -
cNode -

getNbrSelectedProjects

int getNbrSelectedProjects(Identity identity,
                           java.util.List<Project> projectList)
Get the number of total selected project for certain identity.

Parameters:
identity -
projectList -
Returns:

canBeProjectSelectedBy

boolean canBeProjectSelectedBy(Identity identity,
                               Project project,
                               ProjectBrokerModuleConfiguration moduleConfig,
                               int nbrSelectedProjects,
                               boolean isParticipantInAnyProject)
Return true when the project can be selected by an identity. Depends on enrollment-date, number of already enrolled projects and project-broker configuration.

Parameters:
identity -
project -
moduleConfig -
nbrSelectedProjects -
isParticipantInAnyProject -
Returns:

canBeCancelEnrollmentBy

boolean canBeCancelEnrollmentBy(Identity identity,
                                Project project,
                                ProjectBrokerModuleConfiguration moduleConfig)
Return true when the project can be de-selected by an identity.

Parameters:
identity -
project -
moduleConfig -
Returns:

signOutFormAllCandidateList

void signOutFormAllCandidateList(java.util.List<Identity> chosenIdentities,
                                 java.lang.Long projectBrokerId)
Remove identities from all projects as candidates.

Parameters:
chosenIdentities -
projectBrokerId -

getStateFor

java.lang.String getStateFor(Project project,
                             Identity identity,
                             ProjectBrokerModuleConfiguration moduleConfig)
Get the state [STATE_ASSIGNED_ACCOUNT_MANAGER | STATE_NOT_ASSIGNED_ACCOUNT_MANAGER | STATE_NOT_ASSIGNED_ACCOUNT_MANAGER_NO_CANDIDATE | STATE_FINAL_ENROLLED | STATE_PROV_ENROLLED | STATE_COMPLETE | STATE_NOT_ASSIGNED | STATE_ENROLLED ] of a project

Parameters:
project -
identity -
moduleConfig -
Returns:

deleteProjectBroker

void deleteProjectBroker(java.lang.Long projectBrokerId,
                         CourseEnvironment courseEnvironment,
                         CourseNode courseNode)
Delete a project-broker and his projects and groups.

Parameters:
projectBrokerId -
courseEnvironment -
courseNode -

saveAttachedFile

void saveAttachedFile(Project project,
                      java.lang.String fileName,
                      VFSLeaf uploadedItem,
                      CourseEnvironment courseEnv,
                      CourseNode cNode)
Save attachment file in the attachment-folder of a project.

Parameters:
project -
fileName -
uploadedItem -
courseEnv -
cNode -

isCustomFieldValueValid

boolean isCustomFieldValueValid(java.lang.String value,
                                java.lang.String string)
Return true when the custom-field value is one of possible-values (drop-down-mode) or when it could be any value (input field).

Parameters:
value -
string -
Returns:

getAttamchmentRelativeRootPath

java.lang.String getAttamchmentRelativeRootPath(Project project,
                                                CourseEnvironment courseEnv,
                                                CourseNode courseNode)
Get attachment-file relative path. E.g. course//projectbroker_attach//

Parameters:
project -
courseEnv -
courseNode -
Returns:

setProjectState

void setProjectState(Project project,
                     java.lang.String state)
Set project-state [STATE_NOT_ASSIGNED | STATE_ASSIGNED].

Parameters:
project -
state -

isParticipantInAnyProject

boolean isParticipantInAnyProject(Identity identity,
                                  java.util.List<Project> projectList)
Return true when an identity is participant in any project of a project-broker.

Parameters:
identity -
projectList -
Returns:

getProjectBrokerId

java.lang.Long getProjectBrokerId(CoursePropertyManager cpm,
                                  CourseNode courseNode)
Get saved project-broker-id.

Parameters:
cpm -
courseNode -
Returns:

saveProjectBrokerId

void saveProjectBrokerId(java.lang.Long projectBrokerId,
                         CoursePropertyManager cpm,
                         CourseNode courseNode)
Save project-broker-id.

Parameters:
projectBrokerId -
cpm -
courseNode -

existProjectName

boolean existProjectName(java.lang.Long projectBrokerId,
                         java.lang.String newProjectTitle)
Return true when a project with the same title already exist.

Parameters:
projectBrokerId -
newProjectTitle -
Returns:

getAttachmentBasePathRelToFolderRoot

java.lang.String getAttachmentBasePathRelToFolderRoot(CourseEnvironment courseEnvironment,
                                                      CourseNode courseNode)
Get attachment-folder relative path (without project-id). THis path can be used to delete all attachment-file for certain project-broker. E.g. course//projectbroker_attach/

Parameters:
courseEnvironment -
courseNode -
Returns: