public class ProjectManager extends Object implements IProjectManagerSPI
IProjectManagerSPI
implementation.Constructor and Description |
---|
ProjectManager() |
Modifier and Type | Method and Description |
---|---|
void |
addProject(IProject project)
Adds the given project.
|
void |
clearCache()
Clears cache using current transaction..
|
void |
deleteProjects(Collection<String> ids)
Deletes the projects with the given identifiers.
|
void |
disconnectProjectFromChannel(String channelId)
Disconnects the project (if any) of the given channel.
|
Collection<IProject> |
getAllProjects()
Returns all projects.
|
Optional<IProject> |
getLocalProjectByChannelId(String channelId)
Returns an optional project based on the given channel identifier.
|
Optional<IProject> |
getProjectByChannelId(String channelId)
Returns an optional project based on the given channel identifier.
|
Optional<IProject> |
getProjectByWebsiteId(String websiteId)
Returns an optional project based on the given website identifier.
|
void |
updateProject(IProject project)
Updates the given project.
|
public Collection<IProject> getAllProjects() throws PortalException
IProjectManagerSPI
getAllProjects
in interface IProjectManagerSPI
PortalException
- if some error occur.public Optional<IProject> getProjectByWebsiteId(String websiteId) throws PortalException
IProjectManagerSPI
getProjectByWebsiteId
in interface IProjectManagerSPI
websiteId
- the website identifier.PortalException
- if some error occur.public Optional<IProject> getProjectByChannelId(String channelId) throws PortalException
IProjectManagerSPI
getProjectByChannelId
in interface IProjectManagerSPI
channelId
- the channel identifier.PortalException
- if some error occur.public Optional<IProject> getLocalProjectByChannelId(String channelId) throws PortalException
IProjectManagerSPI
getLocalProjectByChannelId
in interface IProjectManagerSPI
channelId
- the channel identifier.PortalException
- if some error occur.public void addProject(IProject project) throws AccessDeniedException, TransactionRequiredException, PortalException
IProjectManagerSPI
addProject
in interface IProjectManagerSPI
project
- the project.AccessDeniedException
- if the current user does not have manage portal permission.TransactionRequiredException
- if there's no current transaction.PortalException
- if there's already a project with the same channel identifier.public void updateProject(IProject project) throws AccessDeniedException, TransactionRequiredException, PortalException
IProjectManagerSPI
updateProject
in interface IProjectManagerSPI
project
- the project.AccessDeniedException
- if the current user does not have manage portal permission.TransactionRequiredException
- if there's no current transaction.PortalException
- if there's already a project with the same channel identifier.ImmutableResourceException
- if the project trying to be updated cannot be updated.public void deleteProjects(Collection<String> ids) throws AccessDeniedException, TransactionRequiredException, PortalException
IProjectManagerSPI
deleteProjects
in interface IProjectManagerSPI
ids
- the identifiers of the projects to be deleted.AccessDeniedException
- if the current user does not have manage portal permission.TransactionRequiredException
- if there's no current transaction.ImmutableResourceException
- if some of the projects trying to be deleted cannot be deleted.PortalException
- if other error occur.public void disconnectProjectFromChannel(String channelId) throws PortalException
IProjectManagerSPI
disconnectProjectFromChannel
in interface IProjectManagerSPI
channelId
- the channel identifier.PortalException
public void clearCache() throws PortalException
IProjectManagerSPI
clearCache
in interface IProjectManagerSPI
PortalException
LumisXP 12.5.0.200928 - Copyright © 2006–2020 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.