Revision
4823 -
Directory Listing
-
[select for diffs]
Modified
Thu Feb 1 10:57:07 2007 UTC
(15 years, 3 months ago)
by
wgrevink
Diff to
previous 4797
WCL-1
Implemented correct caching for the fetchDocumentById(), fetchMetadataById() and fetchContentById() methods in the WebdavService.
This implementation is much simpler than the proposed implementation using a dedicated ID cache with references to the 'real' cache.
The problem with that solution is that it introduces a new level of complexity (two tightly coupled cache instances) that can
potentially be the source of a whole new category of bugs and instability. Even if the two caches are based on the same instance, it
remains that a new and potentially problematic concept -'reference to a cache entry in a cache entry'- is introduced.
This implementation reuses existing concepts and is based on the following two observations:
1)A fetch..ById() method in the WebdavService allways binds the result of the inbuilt find-by-id dasl in order to retrieve the
DocumentPath to the Document to be fetched. This means that we DO have the DocumentPath at our disposal during the execute of
a fetch..ById() method.
2)We have the NOPCachingService at our disposal which enables us to do anything without the real cache knowing about it.
To cut a long story short, here's the code:
public Document fetchDocumentById(String documentId) throws ClientException {
assertDocumentIdIsEnabled();
WebdavCacheKey key = new WebdavCacheKey(config, documentId, "ID-DOCUMENT");
Object result = cache.get(key);
if (result == null) {
CachingService nullCache = new NOPCachingService();
DocumentPath path = documentFactory.resolvePath(nullCache, documentId);
if (path != null) {
result = documentFactory.fetchDocument(nullCache, path);
store(cache, key, result, path);
}
}
return (Document) result;
}
private void store(CachingService cache, WebdavCacheKey key, Object object, DocumentPath path) throws ClientException {
if (object == null) {
return;
}
try {
EventValidity eventValidity = new EventValidityImpl(path.getDocumentPath());
CachedResponse cr = new CachedResponseImpl(eventValidity, object);
cache.store(key, cr);
} catch (IOException e) {
throw new ClientException("Exception while caching the response", e);
}
}
The JMSEventCacheTest contains some tests to verify that this actually does what we want: Te cache entry is evicted only on a change event
on the Document itself: testFindDocumentById(), testFindMetadataById() and testFindContentById()
Some more refactorings:
*) Removed getPath() method from interface CacheKey, it is webdav-eventcaching specific and doesn't belong in this general interface.
It's webdav-clientlib implementation (WebdavCacheKey) still has it and it is only used inside this lib.
*) Split up huge method in BindingFactory into several smaller methods: no functional change, just cleaning up.
*) Fixed compilation error in JMSEventCacheTest that was introduced by yesterday's change in constructing a JCSDefaultCache()
Revision
4765 -
Directory Listing
-
[select for diffs]
Modified
Mon Jan 29 11:28:06 2007 UTC
(15 years, 3 months ago)
by
wgrevink
Diff to
previous 4758
WCL-1
1)Removed targetPath parameter from fetchDocumentById, fetchMetadataById and fetchContentById in webdav service
=> the fetch...ById methods now allways search the entire repository from the filesPath (preview or live) downwards.
2)Small optimailzation: moved searchbyid dasl template loading to static initializer
Revision
4741 -
Directory Listing
-
[select for diffs]
Modified
Fri Jan 26 09:08:08 2007 UTC
(15 years, 4 months ago)
by
wgrevink
Diff to
previous 4724
WCL-1
Added project.xml.md5 to svn:ignore for cachemanager, repository-client-api and repository-update-notifier
Revision
4724 -
Directory Listing
-
[select for diffs]
Modified
Thu Jan 25 13:29:36 2007 UTC
(15 years, 4 months ago)
by
wgrevink
Diff to
previous 4671
WCL-1
1)Added fetchMetadata(path) to webdav service
2)Renamed executeGet(path) to fetchContent() in webdav service
Revision
4656 -
Directory Listing
-
[select for diffs]
Modified
Tue Jan 23 15:44:23 2007 UTC
(15 years, 4 months ago)
by
wgrevink
Diff to
previous 4638
WCL-1
Added service layer to cachemanager and repository-update-notifier
webdav-clientlib, cachemanager and repository-update-notifier now all implement repository-client-api,
cachemanager-api and repository-update-notifier-api become obsolete.
Revision
4638 -
Directory Listing
-
[select for diffs]
Modified
Mon Jan 22 11:06:14 2007 UTC
(15 years, 4 months ago)
by
wgrevink
Diff to
previous 4594
WCL-1
Implemented new interface/implementation naming convention.
interface -> no pre/postfix
implementation => impl postfix
Revision
4528 -
Directory Listing
-
[select for diffs]
Modified
Fri Jan 12 16:24:55 2007 UTC
(15 years, 4 months ago)
by
wgrevink
Diff to
previous 4520
HIPDOC-21
Bump version of cachemanager-api, cachemanager, repository-client-api, webdav-clientlib and jsf-repository-browser
Revision
4503 -
Directory Listing
-
[select for diffs]
Modified
Fri Jan 12 11:35:32 2007 UTC
(15 years, 4 months ago)
by
wgrevink
Diff to
previous 4465
HIPDOC-21
Added IDocumentPath/DocumentPath with methods:
public String getNamespace();
public String getFilesPath();
public String getRootPath();
public String getRelativePath();
public String getDocumentPath();
IDocument/Document now returns a IDocumentPath iso a String for the Document path
Removed SearchResultFactory, moved fetch.. method to DocumentFactory
Simplified cachekey computing, there is no need for crc calculation on a stream since the dasl is eventually converted to a string anyway
Added SearchPerformanceTest for gaining insight in the speed
Revision
4465 -
Directory Listing
-
[select for diffs]
Modified
Thu Jan 11 12:36:21 2007 UTC
(15 years, 4 months ago)
by
wgrevink
Diff to
previous 4451
HIPDOC-21
Mainly cosmetic changes:
Added dependency to cachemanager-api in cachemanager project.xml
Added dependency to cachemanager-api and cachemanager in webdav-clientlib project.xml
Added .project, .classpath and target to .svnignore for cachemanager and cachemanager-api
Added NOTICE and LICENCE files
Removed unused imports
Removed unused local variables
Added serialversionUID for Serialized classes
Removed accidentally checked in class files
Removed eclipse generated TODO comments
Revision
4347 -
Directory Listing
-
[select for diffs]
Modified
Thu Dec 28 10:12:55 2006 UTC
(15 years, 4 months ago)
by
adouma
Diff to
previous 4345
HIPDOC-21: Release version 1.03.00 of the repository-client-api
- Removed IDocumentFactory and IDocumentCollectionFactory from API, they are too much webdav specific and not really nessessary
- IDocumentMetadata: Replaced method iterator() (returning an iterator of Map.Entry instances) with method propertyNames() (returning a Set of Strings)
- corrected svn:eol-style to native and adding svn:keywords "Id"
- added maven:site generation properties and JavaDocs menu item
Revision
4298 -
Directory Listing
-
[select for diffs]
Modified
Thu Dec 21 15:45:56 2006 UTC
(15 years, 5 months ago)
by
wgrevink
Diff to
previous 4284
HIPDOC-21
API:
1> Removed IDocumentFactory and IDocumentCollectionFactory from API, they are too much webdav specific and not really nessessary.
2> IDocumentMetadata: Replaced method iterator() (returning an iterator of Map.Entry instances) with method propertyNames() (returning a Set of Strings)
JSF sample:
1> Split up monolithic tree.jsp into multiple jsp's
2> Implemented details pane as a TabbedPane
3> now there are two tabs: one for content and one for properties
Revision
4284 -
Directory Listing
-
[select for diffs]
Modified
Tue Dec 19 10:39:17 2006 UTC
(15 years, 5 months ago)
by
wgrevink
Diff to
previous 4279
HIPDOC-21
Set version of repository-client-api, webdav-clientlib and jsf-repository-browser back to -dev on trunk after release.
Revision
4258 -
Directory Listing
-
[select for diffs]
Modified
Mon Dec 18 13:39:26 2006 UTC
(15 years, 5 months ago)
by
wgrevink
Diff to
previous 4253
HIPDOC-21
Set version of repositoy-client-api, webdav-clientlib and jsf-repository-browser back to -dev on trunk after release.
Revision
4192 -
Directory Listing
-
[select for diffs]
Modified
Fri Dec 15 15:42:09 2006 UTC
(15 years, 5 months ago)
by
wgrevink
Diff to
previous 4189
HIPDOC-21
*)Removed getResponseAsJdom, it cannot be exposed in the repository-client-api because that module shouldn't have any dependencies.
As requested by Ard:
*)Added getResponseAsSaxContentHandler to IRawResponse/WebdavResponse
*)Added set/getContent to IResource/WebdavResource so that it becomes possible to construct
an object containing both content (from a Get) and properties (from a Propfind)
Revision
4183 -
Directory Listing
-
[select for diffs]
Added
Fri Dec 15 14:36:50 2006 UTC
(15 years, 5 months ago)
by
wgrevink
HIPDOC-21
New SVN module: repository-client-api
Containing readonly interfaces implemented by webdav-clientlib