/** * Returns the ID of the project where the resource is currently locked.<p> * * @return the ID of the project */ public CmsUUID getProjectId() { return m_project.getUuid(); }
/** * Returns the ID of the project where the resource is currently locked.<p> * * @return the ID of the project */ public CmsUUID getProjectId() { return m_project.getUuid(); }
/** * Returns the id of the temporary file project required by the editors.<p> * * @return the id of the temporary file project required by the editors */ public CmsUUID getTempFileProjectId() { if (m_tempFileProject != null) { return m_tempFileProject.getUuid(); } else { return null; } }
/** * Returns the id of the temporary file project required by the editors.<p> * * @return the id of the temporary file project required by the editors */ public CmsUUID getTempFileProjectId() { if (m_tempFileProject != null) { return m_tempFileProject.getUuid(); } else { return null; } }
/** * Returns the session id.<p> * * @return the session id */ public CmsUUID getId() { return getProject().getUuid(); }
/** * Searches for the SQL query with the specified key and CmsProject.<p> * * @param project the specified CmsProject * @param queryKey the key of the SQL query * @return the the SQL query in this property list with the specified key */ public String readQuery(CmsProject project, String queryKey) { return readQuery(project.getUuid(), queryKey); }
/** * Checks whether there are resources which have last been modified in a given project.<p> * * @param project the project which should be checked * @return true if there are no resources which have been last modified inside the project * * @throws CmsException if something goes wrong */ protected boolean isProjectEmpty(CmsProject project) throws CmsException { List<CmsResource> resources = m_adminCms.readProjectView(project.getUuid(), CmsResourceState.STATE_KEEP); return resources.isEmpty(); }
/** * Searches for the SQL query with the specified key and CmsProject.<p> * * @param project the specified CmsProject * @param queryKey the key of the SQL query * @return the the SQL query in this property list with the specified key */ public String readQuery(CmsProject project, String queryKey) { return readQuery(project.getUuid(), queryKey); }
/** * Searches for the JPQL query with the specified key and CmsProject.<p> * * @param project the specified CmsProject * @param queryKey the key of the JPQL query * @return the the JPQL or JPQL query in this property list with the specified key */ public String readQuery(CmsProject project, String queryKey) { return readQuery(project.getUuid(), queryKey); }
/** * Caches the given project under its id AND the fully qualified name.<p> * * @param project the project to cache */ public void cacheProject(CmsProject project) { if (m_disabled.get(CacheType.PROJECT) != null) { return; } m_cacheProject.put(project.getUuid().toString(), project); m_cacheProject.put(project.getName(), project); }
/** * Caches the given project under its id AND the fully qualified name.<p> * * @param project the project to cache */ public void cacheProject(CmsProject project) { if (m_disabled.get(CacheType.PROJECT) != null) { return; } m_cacheProject.put(project.getUuid().toString(), project); m_cacheProject.put(project.getName(), project); }
/** * Removes the given project from the cache.<p> * * The project is removed by name AND also by uuid.<p> * * @param project the project to remove from cache */ public void uncacheProject(CmsProject project) { m_cacheProject.remove(project.getUuid().toString()); m_cacheProject.remove(project.getName()); }
/** * Tests if a resource with the given resourceId does already exist in the Database.<p> * * @param dbc the current database context * @param resourceId the resource id to test for * @return true if a resource with the given id was found, false otherweise * @throws CmsException if something goes wrong */ public boolean existsResourceId(CmsDbContext dbc, CmsUUID resourceId) throws CmsException { return m_vfsDriver.validateResourceIdExists(dbc, dbc.currentProject().getUuid(), resourceId); }
/** * @see org.opencms.db.I_CmsVfsDriver#writeContent(CmsDbContext, CmsUUID, byte[]) */ @Override public void writeContent(CmsDbContext dbc, CmsUUID resourceId, byte[] content) throws CmsDataAccessException { internalWriteContent(dbc, dbc.currentProject().getUuid(), resourceId, content, -1); }
/** * Deletes a project by name.<p> * * @param name the name of the project to delete * @throws Exception if something goes wrong * * @see CmsObject#deleteProject(CmsUUID) */ public void deleteProject(String name) throws Exception { m_cms.deleteProject(m_cms.readProject(name).getUuid()); }
/** * Deletes a project by name.<p> * * @param name the name of the project to delete * @throws Exception if something goes wrong * * @see CmsObject#deleteProject(CmsUUID) */ public void deleteProject(String name) throws Exception { m_cms.deleteProject(m_cms.readProject(name).getUuid()); }
/** * Unlocks all resources in the given project.<p> * * @param project the project to unlock the resources in */ public void unlockProject(CmsProject project) { // unlock all resources in the project m_lockManager.removeResourcesInProject(project.getUuid(), false); m_monitor.clearResourceCache(); m_monitor.flushCache(CmsMemoryMonitor.CacheType.PROJECT, CmsMemoryMonitor.CacheType.PERMISSION); }
/** * Unlocks the current project, required before publishing.<p> * @throws Exception if something goes wrong */ public void unlockCurrentProject() throws Exception { m_cms.unlockProject(m_cms.getRequestContext().currentProject().getUuid()); }
/** * Updates the session info object with the information from * the given request context.<p> * * @param context the request context to update the session with */ protected void update(CmsRequestContext context) { m_timeUpdated = System.currentTimeMillis(); m_siteRoot = context.getSiteRoot(); setProject(context.getCurrentProject().getUuid()); m_ouFqn = context.getOuFqn(); } }
/** * @see org.opencms.workplace.list.A_CmsListDialog#validateParamaters() */ @Override protected void validateParamaters() throws Exception { try { getCms().readProject(new CmsUUID(getParamProjectid())); } catch (Exception e) { m_paramProjectid = getCms().getRequestContext().getCurrentProject().getUuid().toString(); } } }