public DocumentBean(Document document) { super(document); version = document.getVersion(); dirty = document.isDirty(); }
document.setPath(path); AbstractBaseElement documentImpl = (AbstractBaseElement)document; documentImpl.setHandlerFactory(handlerFactory); documentImpl.setConstraintsEnabled(handlerFactory.getConstraintsEnabled()); boolean dirty = documentImpl.unmarshalled(generator); if (dirty || document.isDirty()){ updateDocument(document, true); document.setDirty(false);
return; String path = document.getPath(); if (path == null) path = document.getId(); if (path == null) return; document.setPath(path); document.checkAccess(JetspeedActions.EDIT);
/** * <p> * refresh * </p> * * @see org.apache.jetspeed.cache.file.FileCacheEventListener#refresh(org.apache.jetspeed.cache.file.FileCacheEntry) * @param entry * @throws Exception */ public void refresh( FileCacheEntry entry ) throws Exception { log.debug("Entry is refreshing: " + entry.getFile().getName()); if (entry.getDocument() instanceof Document && ((Document) entry.getDocument()).getPath().endsWith(documentType)) { Document document = (Document) entry.getDocument(); Node parent = ((AbstractNode)document).getParent(false); if (parent instanceof FolderImpl) { Document freshDoc = getDocument(document.getPath(), false); freshDoc.setParent(parent); ((FolderImpl)parent).getAllNodes().add(freshDoc); freshDoc.setPath(document.getPath()); entry.setDocument(freshDoc); } } }
if (!version.equals(((Document) node).getVersion())) ((Document) node).setVersion(version); changed = true;
if (doc.getType().equals(FolderMetaDataImpl.DOCUMENT_TYPE))