|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ProjectService
A Service for Projects
| Method Summary | |
|---|---|
void |
addBookmarkerToProject(Project project,
User bookmarker)
Adds the given User bookmarker to the Project project |
void |
addSharedTeacherToProject(AddSharedTeacherParameters addSharedTeacherParameters)
|
Long |
addTagToProject(String tag,
Long projectId)
Given a String and a Project adds the
tag to the project. |
Long |
addTagToProject(Tag tag,
Long projectId)
Given a Tag tag and a Long project id
adds the given tag to the project. |
Object |
authorProject(AuthorProjectParameters authorProjectParameters)
Allows users to author a project |
boolean |
canAuthorProject(Project project,
User user)
Given a Project project and User user, returns
boolean true if the user is allowed to author that particular
project, returns false otherwise. |
boolean |
canCreateRun(Project project,
User user)
Given a Project project and User user, returns
boolean true if the user is allowed to create a run from that
project (ie, project is TELS, owner, sharedOwner), returns false otherwise. |
boolean |
canReadProject(Project project,
User user)
Given a Project project and a User user, returns
boolean true if the user has read access to that particular
project, returns false otherwise. |
Project |
createProject(ProjectParameters projectParameters)
Creates a new Project
Also, this creates a "Preview run"- that is, a run that is used
just for the purpose of previewing this project. |
List<Project> |
getAdminProjectList()
Returns a List list of all projects in the data store. |
List<Project> |
getAllProjectsList()
Get a List of Project |
List<Project> |
getBookmarkerProjectList(User bookmarker)
Retrieves a List of Project that
has been bookmarked by the given User |
Project |
getById(Serializable projectId)
Gets a project with the given projectid |
ProjectMetadata |
getMetadata(Long projectId)
Given a Long projectId returns the
ProjectMetadata that is associated with that projectId and versionId, if
one exists, returns null otherwise. |
List<Project> |
getProjectCopies(Long projectId)
Given a project id, returns projects that are copies of the project |
List<Project> |
getProjectList()
Get a List of Project |
List<Project> |
getProjectList(String query)
Given a String query, returns a List of
Project that satisfies the query. |
List<Project> |
getProjectList(User user)
Get a List of Project that the specified
user owns |
List<Project> |
getProjectListByInfo(ProjectInfo info)
Get a List of Project with
matching ProjectInfo |
List<Project> |
getProjectListByTag(FamilyTag tag)
Get a List of Project with
matching FamilyTag |
List<Project> |
getProjectListByTag(String tag)
Get a List of Project with
matching ProjectInfoTag |
List<Project> |
getProjectListByTagName(String tagName)
Given a String tag name, returns a List
list of projects with that tag. |
List<Project> |
getProjectListByTagNames(Set<String> tagNames)
Given a Set set of tag names, returns a
List list of projects with all of the tag names. |
List<Project> |
getSharedProjectList(User user)
Get a List of Project that have
been shared with the specified user. |
String |
getSharedTeacherRole(Project project,
User user)
Returns the permission that the specified user has on the specified project |
Long |
identifyRootProjectId(Project project)
Given a project, gets the project id for the project's root level project |
boolean |
isAuthorizedToCreateTag(User user,
String name)
Given a User user and a String tag name,
returns true if that user is authorized to create a tag with that
name, returns false otherwise. |
Object |
launchProject(LaunchProjectParameters launchProjectParameters)
Launches the project given the launchProjectParameters |
Object |
launchReport(LaunchReportParameters launchReportParameters)
Launches the report given the launchReportParameters |
String |
minifyProject(Project project)
Given a Project project, attempts to minify a file and returns
a String of the final status of the operation. |
Object |
previewProject(PreviewProjectParameters previewProjectParameters)
Launches a Preview of the Project |
boolean |
projectContainsTag(Long projectId,
String name)
Given a Long project id and a String tag
name, returns boolean true if the project contains a
tag with that name, false otherwise. |
void |
removeBookmarkerFromProject(Project project,
User bookmarker)
Removes the given User bookmarker from the Project project |
void |
removeSharedTeacherFromProject(String username,
Project project)
Removes shared user from project. |
void |
removeTagFromProject(Long tagId,
Long projectId)
Given a Tag and a Project, removes the
tag from the project. |
void |
sortProjectsByDateCreated(List<Project> projectList)
Sorts the given List list of projects by the date they were created. |
void |
updateProject(Project project,
User user)
Saves the project |
Long |
updateTag(Long tagId,
Long projectId,
String name)
Given a Long tag id, a Long project id and
a String name, updates that project tag to that name, returning
the resulting Long tag Id. |
| Method Detail |
|---|
@Transactional List<Project> getAllProjectsList()
List of Project
List of Project
@Transactional
@Secured(value={"ROLE_USER","AFTER_ACL_COLLECTION_READ"})
List<Project> getProjectList()
List of Project
List of Project
@Transactional
@Secured(value={"ROLE_USER","AFTER_ACL_COLLECTION_READ"})
List<Project> getProjectList(User user)
List of Project that the specified
user owns
List of Project
@Transactional
@Secured(value={"ROLE_USER","AFTER_ACL_COLLECTION_READ"})
List<Project> getSharedProjectList(User user)
List of Project that have
been shared with the specified user.
List of Project
@Transactional
List<Project> getProjectListByTag(FamilyTag tag)
throws ObjectNotFoundException
List of Project with
matching FamilyTag
List of Project
ObjectNotFoundException
@Transactional
List<Project> getProjectListByTag(String tag)
throws ObjectNotFoundException
List of Project with
matching ProjectInfoTag
List of Project
ObjectNotFoundException
@Transactional
List<Project> getProjectListByInfo(ProjectInfo info)
throws ObjectNotFoundException
List of Project with
matching ProjectInfo
List of Project
ObjectNotFoundException
@Transactional
List<Project> getBookmarkerProjectList(User bookmarker)
throws ObjectNotFoundException
List of Project that
has been bookmarked by the given User
User - bookmarker
List
ObjectNotFoundException
@Transactional
void addBookmarkerToProject(Project project,
User bookmarker)
throws ObjectNotFoundException
User bookmarker to the Project project
Project - projectUser - bookmarker
ObjectNotFoundException
@Transactional
void removeBookmarkerFromProject(Project project,
User bookmarker)
throws ObjectNotFoundException
User bookmarker from the Project project
Project - projectUser - bookmarker
ObjectNotFoundException
@Transactional(readOnly=true)
String getSharedTeacherRole(Project project,
User user)
project - The Project that is shared.user - The User that shares the Project
String containing the permission that
the user has on the project. If the user does not have permission on the project,
null is returned.
@Secured(value="ROLE_TEACHER")
@Transactional
void addSharedTeacherToProject(AddSharedTeacherParameters addSharedTeacherParameters)
throws ObjectNotFoundException
addSharedTeacherParameters -
ObjectNotFoundException
@Secured(value="ROLE_TEACHER")
@Transactional
void removeSharedTeacherFromProject(String username,
Project project)
throws ObjectNotFoundException
ObjectNotFoundException
Project createProject(ProjectParameters projectParameters)
throws ObjectNotFoundException
Project
Also, this creates a "Preview run"- that is, a run that is used
just for the purpose of previewing this project. This is not the ideal
solution to Previewing a Project, but the other solution is too much work
(making a new JNLP project that takes in curniturl and jnlpurl). The author
can also always use the authoring tool to preview the project
ProjectParameters - the project parameters object
Project that was created
ObjectNotFoundException - when projectparameters references
curnitId and jnlpId that do not exist
void updateProject(Project project,
User user)
throws NotAuthorizedException
project - Project contains updated Project.
NotAuthorizedException
Object launchProject(LaunchProjectParameters launchProjectParameters)
throws Exception
launchProjectParameters - parameters needed to launch the project
ExceptionObject launchReport(LaunchReportParameters launchReportParameters)
Object previewProject(PreviewProjectParameters previewProjectParameters)
throws Exception
projectId - the id of the project
ObjectNotFoundException - when the specified projectId
does not exist
IOException - when the url cannot be loaded
Exception
Object authorProject(AuthorProjectParameters authorProjectParameters)
throws Exception
authorProjectParameters -
Exception
Project getById(Serializable projectId)
throws ObjectNotFoundException
projectId - the id of the project
Project with the specified projectId
ObjectNotFoundException - when the specified projectId
does not existList<Project> getProjectList(String query)
String query, returns a List of
Project that satisfies the query.
String - query
ListString minifyProject(Project project)
Project project, attempts to minify a file and returns
a String of the final status of the operation.
project -
ProjectMetadata getMetadata(Long projectId)
Long projectId returns the
ProjectMetadata that is associated with that projectId and versionId, if
one exists, returns null otherwise.
projectId -
boolean canCreateRun(Project project,
User user)
Project project and User user, returns
boolean true if the user is allowed to create a run from that
project (ie, project is TELS, owner, sharedOwner), returns false otherwise.
project - user -
boolean canAuthorProject(Project project,
User user)
Project project and User user, returns
boolean true if the user is allowed to author that particular
project, returns false otherwise.
project - user -
boolean canReadProject(Project project,
User user)
Project project and a User user, returns
boolean true if the user has read access to that particular
project, returns false otherwise.
project - user -
List<Project> getAdminProjectList()
List list of all projects in the data store.
void sortProjectsByDateCreated(List<Project> projectList)
List list of projects by the date they were created.
projectList - @Transactional List<Project> getProjectListByTagName(String tagName)
String tag name, returns a List
list of projects with that tag.
String - - tagName
@Transactional List<Project> getProjectListByTagNames(Set<String> tagNames)
Set set of tag names, returns a
List list of projects with all of the tag names.
Set - - set of tagNames
@Transactional
Long addTagToProject(Tag tag,
Long projectId)
Tag tag and a Long project id
adds the given tag to the project.
Tag - - tagProject - - project
@Transactional
Long addTagToProject(String tag,
Long projectId)
String and a Project adds the
tag to the project.
String - - tagString - - project
@Transactional
void removeTagFromProject(Long tagId,
Long projectId)
Tag and a Project, removes the
tag from the project.
Tag - - tagProject - - project
Long updateTag(Long tagId,
Long projectId,
String name)
Long tag id, a Long project id and
a String name, updates that project tag to that name, returning
the resulting Long tag Id.
Long - - tagIdLong - - projectIdString - - name
boolean projectContainsTag(Long projectId,
String name)
Long project id and a String tag
name, returns boolean true if the project contains a
tag with that name, false otherwise.
Long - - projectIdString - - name
boolean isAuthorizedToCreateTag(User user,
String name)
User user and a String tag name,
returns true if that user is authorized to create a tag with that
name, returns false otherwise.
User - - userString - - name
List<Project> getProjectCopies(Long projectId)
projectId -
Long identifyRootProjectId(Project project)
throws ObjectNotFoundException
project -
ObjectNotFoundException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||