/** * @see org.opencms.file.wrapper.A_CmsResourceWrapper#createResource(org.opencms.file.CmsObject, java.lang.String, int, byte[], java.util.List) */ @Override public CmsResource createResource( CmsObject cms, String resourcename, int type, byte[] content, List<CmsProperty> properties) throws CmsException, CmsIllegalArgumentException { if (matchParentPath(IMPORT_PATH, resourcename)) { CmsResource res = createFakeBinaryFile(resourcename, 0); CmsFile file = new CmsFile(res); file.setContents(content); OpenCms.getModuleManager().getImportExportRepository().importModule( CmsResource.getName(resourcename), content); m_importFileUpdateCache.put(resourcename, Long.valueOf(System.currentTimeMillis())); return file; } else { return super.createResource(cms, resourcename, type, content, properties); } }
CmsFile fileElem = new CmsFile(resElem);
return new CmsFile( structureId, resourceId,
/** * Returns the virtual resource as a file.<p> * * @return the virtual resource as a file */ public CmsFile getFile() { if (m_base instanceof CmsFile) { CmsFile file = (CmsFile)m_base; return new CmsFile( file.getStructureId(), file.getResourceId(), m_rootPath, m_typeId, file.getFlags(), file.getProjectLastModified(), file.getState(), file.getDateCreated(), file.getUserCreated(), file.getDateLastModified(), file.getUserLastModified(), file.getDateReleased(), file.getDateExpired(), file.getSiblingCount(), file.getLength(), file.getDateContent(), file.getVersion(), file.getContents()); } return new CmsFile(getResource()); }
int newState = (structureState > resourceState) ? structureState : resourceState; return new CmsFile( structureId, resourceId,
int newState = (structureState > resourceState) ? structureState : resourceState; return new CmsFile( structureId, resourceId,
return new CmsFile( structureId, resourceId,
CmsFile fileElem = new CmsFile(resElem);
return importData; return new CmsFile(createFakeBinaryFile(resourcepath)); CmsFile resultFile = new CmsFile(createFakeBinaryFile(resourcepath)); if (cms.getRequestContext().getAttribute(CmsJlanDiskInterface.NO_FILESIZE_REQUIRED) == null) { CmsFile resultFile = new CmsFile(createFakeBinaryFile(resourcepath));
resource = new CmsFile(readResource(dbc, resource.getStructureId(), CmsResourceFilter.ALL)); resource.setContents(contents);
System.arraycopy(getContents(), 0, newContent, 0, getContents().length); CmsFile clone = new CmsFile( getStructureId(), getResourceId(),
resource = new CmsFile(readResource(dbc, resource.getStructureId(), CmsResourceFilter.ALL)); resource.setContents(contents);
} else { file = new CmsFile(resource);
} else { file = new CmsFile(resource);
/** * Returns the virtual resource as a file.<p> * * @return the virtual resource as a file */ public CmsFile getFile() { if (m_base instanceof CmsFile) { CmsFile file = (CmsFile)m_base; return new CmsFile( file.getStructureId(), file.getResourceId(), m_rootPath, m_typeId, file.getFlags(), file.getProjectLastModified(), file.getState(), file.getDateCreated(), file.getUserCreated(), file.getDateLastModified(), file.getUserLastModified(), file.getDateReleased(), file.getDateExpired(), file.getSiblingCount(), file.getLength(), file.getDateContent(), file.getVersion(), file.getContents()); } return new CmsFile(getResource()); }
((I_CmsHistoryResource)resource).getPublishTag())); } else { file = new CmsFile(resource); file.setContents(m_vfsDriver.readContent(dbc, projectId, resource.getResourceId()));
CmsFile file = new CmsFile( CmsUUID.getNullUUID(), CmsUUID.getNullUUID(),
((I_CmsHistoryResource)resource).getPublishTag())); } else { file = new CmsFile(resource); file.setContents(getVfsDriver(dbc).readContent(dbc, projectId, resource.getResourceId()));
int newState = (structureState > resourceState) ? structureState : resourceState; return new CmsFile( structureId, resourceId,