/** * Reads a project.<p> * * Important: Since a project name can be used multiple times, this is NOT the most efficient * way to read the project. This is only a convenience for front end developing. * Reading a project by name will return the first project with that name. * All core classes must use the id version {@link #readProject(CmsDbContext, CmsUUID)} to ensure the right project is read.<p> * * @param dbc the current database context * @param name the name of the project * * @return the project read * * @throws CmsException if something goes wrong */ public CmsProject readProject(CmsDbContext dbc, String name) throws CmsException { CmsProject project = null; project = m_monitor.getCachedProject(name); if (project == null) { project = m_projectDriver.readProject(dbc, name); m_monitor.cacheProject(project); } return project; }
/** * Reads a project given the projects id.<p> * * @param dbc the current database context * @param id the id of the project * * @return the project read * * @throws CmsDataAccessException if something goes wrong */ public CmsProject readProject(CmsDbContext dbc, CmsUUID id) throws CmsDataAccessException { CmsProject project = null; project = m_monitor.getCachedProject(id.toString()); if (project == null) { project = m_projectDriver.readProject(dbc, id); m_monitor.cacheProject(project); } return project; }
/** * Reads a project.<p> * * Important: Since a project name can be used multiple times, this is NOT the most efficient * way to read the project. This is only a convenience for front end developing. * Reading a project by name will return the first project with that name. * All core classes must use the id version {@link #readProject(CmsDbContext, CmsUUID)} to ensure the right project is read.<p> * * @param dbc the current database context * @param name the name of the project * * @return the project read * * @throws CmsException if something goes wrong */ public CmsProject readProject(CmsDbContext dbc, String name) throws CmsException { CmsProject project = null; project = m_monitor.getCachedProject(name); if (project == null) { project = getProjectDriver(dbc).readProject(dbc, name); m_monitor.cacheProject(project); } return project; }
/** * Reads a project given the projects id.<p> * * @param dbc the current database context * @param id the id of the project * * @return the project read * * @throws CmsDataAccessException if something goes wrong */ public CmsProject readProject(CmsDbContext dbc, CmsUUID id) throws CmsDataAccessException { CmsProject project = null; project = m_monitor.getCachedProject(id.toString()); if (project == null) { project = getProjectDriver(dbc).readProject(dbc, id); m_monitor.cacheProject(project); } return project; }