Package lumis.portal.project
Class ProjectManager
- java.lang.Object
-
- lumis.portal.project.ProjectManager
-
- All Implemented Interfaces:
IProjectManager
,IProjectManagerSPI
public class ProjectManager extends java.lang.Object implements IProjectManagerSPI
IProjectManagerSPI
implementation.- Since:
- 12.4.0
- Version:
- $Revision$ $Date$
-
-
Constructor Summary
Constructors Constructor Description ProjectManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addProject(IProject project)
Adds the given project.void
clearCache()
Clears cache using current transaction..void
deleteProjects(java.util.Collection<java.lang.String> ids)
Deletes the projects with the given identifiers.void
disconnectProjectFromChannel(java.lang.String channelId)
Disconnects the project (if any) of the given channel.java.util.Collection<IProject>
getAllProjects()
Returns all projects.java.util.Optional<IProject>
getLocalProjectByChannelId(java.lang.String channelId)
Returns an optional project based on the given channel identifier.java.util.Optional<IProject>
getProjectByChannelId(java.lang.String channelId)
Returns an optional project based on the given channel identifier.java.util.Optional<IProject>
getProjectByWebsiteId(java.lang.String websiteId)
Returns an optional project based on the given website identifier.void
updateProject(IProject project)
Updates the given project.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface lumis.portal.project.IProjectManager
getProjectByServiceInstanceId
-
-
-
-
Method Detail
-
getAllProjects
public java.util.Collection<IProject> getAllProjects() throws PortalException
Description copied from interface:IProjectManager
Returns all projects.- Specified by:
getAllProjects
in interfaceIProjectManager
- Returns:
- all projects.
- Throws:
PortalException
- if some error occur.
-
getProjectByWebsiteId
public java.util.Optional<IProject> getProjectByWebsiteId(java.lang.String websiteId) throws PortalException
Description copied from interface:IProjectManager
Returns an optional project based on the given website identifier. The optional will not be present if no such project could be found. This operation tries to find the project recursively among the given website's channel and all its parents.- Specified by:
getProjectByWebsiteId
in interfaceIProjectManager
- Parameters:
websiteId
- the website identifier.- Returns:
- an optional project based on the given website identifier.
- Throws:
PortalException
- if some error occur.
-
getProjectByChannelId
public java.util.Optional<IProject> getProjectByChannelId(java.lang.String channelId) throws PortalException
Description copied from interface:IProjectManager
Returns an optional project based on the given channel identifier. The optional will not be present if no such project could be found. This operation tries to find the project recursively among the given channel and all its parents.- Specified by:
getProjectByChannelId
in interfaceIProjectManager
- Parameters:
channelId
- the channel identifier.- Returns:
- an optional project based on the given channel identifier.
- Throws:
PortalException
- if some error occur.
-
getLocalProjectByChannelId
public java.util.Optional<IProject> getLocalProjectByChannelId(java.lang.String channelId) throws PortalException
Description copied from interface:IProjectManagerSPI
Returns an optional project based on the given channel identifier. The optional will not be present if no such project could be found. Does not consider channel structure inheritance.- Specified by:
getLocalProjectByChannelId
in interfaceIProjectManagerSPI
- Parameters:
channelId
- the channel identifier.- Returns:
- an optional project based on the given channel identifier.
- Throws:
PortalException
- if some error occur.
-
addProject
public void addProject(IProject project) throws AccessDeniedException, TransactionRequiredException, PortalException
Description copied from interface:IProjectManagerSPI
Adds the given project.- Specified by:
addProject
in interfaceIProjectManagerSPI
- Parameters:
project
- the project.- Throws:
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.
-
updateProject
public void updateProject(IProject project) throws AccessDeniedException, TransactionRequiredException, PortalException
Description copied from interface:IProjectManagerSPI
Updates the given project.- Specified by:
updateProject
in interfaceIProjectManagerSPI
- Parameters:
project
- the project.- Throws:
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.
-
deleteProjects
public void deleteProjects(java.util.Collection<java.lang.String> ids) throws AccessDeniedException, TransactionRequiredException, PortalException
Description copied from interface:IProjectManagerSPI
Deletes the projects with the given identifiers. Those identifiers that does not refer to an existent project will be ignored.- Specified by:
deleteProjects
in interfaceIProjectManagerSPI
- Parameters:
ids
- the identifiers of the projects to be deleted.- Throws:
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.
-
disconnectProjectFromChannel
public void disconnectProjectFromChannel(java.lang.String channelId) throws PortalException
Description copied from interface:IProjectManagerSPI
Disconnects the project (if any) of the given channel.- Specified by:
disconnectProjectFromChannel
in interfaceIProjectManagerSPI
- Parameters:
channelId
- the channel identifier.- Throws:
PortalException
-
clearCache
public void clearCache() throws PortalException
Description copied from interface:IProjectManagerSPI
Clears cache using current transaction..- Specified by:
clearCache
in interfaceIProjectManagerSPI
- Throws:
PortalException
-
-