resource.getLength(), resource.getDateContent(), resource.getVersion());
resource.getLength(), resource.getDateContent(), resource.getVersion());
document.addSearchField(m_solrFields.get(CmsSearchField.FIELD_VERSION), "" + resource.getVersion());
/** * Enumeration class for the mode parameter in the * {@link CmsDriverManager#readChangedResourcesInsideProject(CmsDbContext, CmsUUID, CmsReadChangedProjectResourceMode)} * method.<p> */ private static class CmsReadChangedProjectResourceMode { /** * Default constructor.<p> */ protected CmsReadChangedProjectResourceMode() { // noop } }
stmt.setString(8, parentId.toString()); stmt.setInt(9, publishTag); stmt.setInt(10, resource.getVersion()); stmt.executeUpdate(); } catch (SQLException e) {
stmt.setString(8, parentId.toString()); stmt.setInt(9, publishTag); stmt.setInt(10, resource.getVersion()); stmt.executeUpdate(); } catch (SQLException e) {
Messages.ERR_READ_FILE_HISTORY_2, context.getSitePath(resource), new Integer(resource.getVersion())), e); } else {
Messages.ERR_READ_FILE_HISTORY_2, context.getSitePath(resource), new Integer(resource.getVersion())), e); } else { dbc.report(null, Messages.get().container(Messages.ERR_READ_FILE_1, context.getSitePath(resource)), e);
/** * Constructor, creates a new CmsFolder Object from the given CmsResource.<p> * * @param resource the base resource object to create a folder from */ public CmsFolder(CmsResource resource) { this( resource.getStructureId(), resource.getResourceId(), resource.getRootPath(), resource.getTypeId(), resource.getFlags(), resource.getProjectLastModified(), resource.getState(), resource.getDateCreated(), resource.getUserCreated(), resource.getDateLastModified(), resource.getUserLastModified(), resource.getDateReleased(), resource.getDateExpired(), resource.getVersion()); }
/** * Returns the virtual resource.<p> * * @return the virtual resource */ public CmsResource getResource() { return new CmsResource( m_base.getStructureId(), m_base.getResourceId(), m_rootPath, m_typeId, m_isFolder, m_base.getFlags(), m_base.getProjectLastModified(), m_base.getState(), m_base.getDateCreated(), m_base.getUserCreated(), m_base.getDateLastModified(), m_base.getUserLastModified(), m_base.getDateReleased(), m_base.getDateExpired(), m_base.getSiblingCount(), m_length, m_base.getDateContent(), m_base.getVersion()); }
source.getLength(), source.getDateContent(), source.getVersion()); // version number does not matter since it will be computed later
result.setVersion( new CmsHistoryVersion( Integer.valueOf(historyRes.getVersion()), maxVersion == version ? OfflineOnline.online : null));
state = CmsResource.STATE_NEW; int newVersion = resource.getVersion(); if (resource.getState().isUnchanged()) { newVersion++;
/** * Constructor, creates a new file Object from the given resource with * an empty byte array as file content, if the resource does not * implement a file.<p> * * @param resource the base resource object to create a file from * @param doc the search document */ public CmsSearchResource(CmsResource resource, I_CmsSearchDocument doc) { this( resource.getStructureId(), resource.getResourceId(), resource.getRootPath(), resource.getTypeId(), resource.getFlags(), resource.getProjectLastModified(), resource.getState(), resource.getDateCreated(), resource.getUserCreated(), resource.getDateLastModified(), resource.getUserLastModified(), resource.getDateReleased(), resource.getDateExpired(), resource.getSiblingCount(), resource.getLength(), resource.getDateContent(), resource.getVersion(), doc); }
/** * Creates a new instance.<p> * * @param cms the current CMS context * @param res the resource to wrap */ public CmsJspResourceWrapper(CmsObject cms, CmsResource res) { super( res.getStructureId(), res.getResourceId(), res.getRootPath(), res.getTypeId(), res.isFolder(), res.getFlags(), res.getProjectLastModified(), res.getState(), res.getDateCreated(), res.getUserCreated(), res.getDateLastModified(), res.getUserLastModified(), res.getDateReleased(), res.getDateExpired(), res.getSiblingCount(), res.getLength(), res.getDateContent(), res.getVersion()); m_cms = cms; }
/** * Constructor, creates a new file Object from the given resource with * an empty byte array as file content, if the resource does not * implement a file.<p> * * @param resource the base resource object to create a file from */ public CmsFile(CmsResource resource) { this( resource.getStructureId(), resource.getResourceId(), resource.getRootPath(), resource.getTypeId(), resource.getFlags(), resource.getProjectLastModified(), resource.getState(), resource.getDateCreated(), resource.getUserCreated(), resource.getDateLastModified(), resource.getUserLastModified(), resource.getDateReleased(), resource.getDateExpired(), resource.getSiblingCount(), resource.getLength(), resource.getDateContent(), resource.getVersion(), // if the resource already is a file, keep contents that might have been already read resource instanceof CmsFile ? ((CmsFile)resource).getContents() : null); }
onlineResource = getCms().readResource(getParamResource(), CmsResourceFilter.IGNORE_EXPIRATION); CmsListItem item = getList().newItem("" + onlineResource.getVersion()); item.set(LIST_COLUMN_VERSION, new CmsVersionWrapper(-1 * onlineResource.getVersion()));
onlineResource = getCms().readResource(getParamResource(), CmsResourceFilter.IGNORE_EXPIRATION); CmsListItem item = getList().newItem("" + onlineResource.getVersion()); item.set(LIST_COLUMN_VERSION, new CmsVersionWrapper(-1 * onlineResource.getVersion()));
state = CmsResource.STATE_NEW; int newVersion = resource.getVersion(); if (resource.getState().isUnchanged()) { newVersion++;
hstr.setParentId(parentId.toString()); hstr.setPublishTag(publishTag); hstr.setVersion(resource.getVersion());