星期三, 12月 29, 2010

[Alfresco] TrashcanDialog.java

印出lucene query string的結果,方便追踨。


Print Var.
Repository.getStoreRef():

workspace://SpacesStore

property.getArchiveRootRef():
archive://SpacesStore/20f1f650-07d2-4a93-b464-ac8e9f5ecf59

getArchiveRootRef().getStoreRef()
archive://SpacesStore

private final static String NAME_ATTR = Repository.escapeQName(ContentModel.PROP_NAME);
\{http\://www.alfresco.org/model/content/1.0\}name


private final static String USER_ATTR = Repository.escapeQName(ContentModel.PROP_ARCHIVED_BY);
\{http\://www.alfresco.org/model/system/1.0\}archivedBy


private final static String DATE_ATTR = Repository.escapeQName(ContentModel.PROP_ARCHIVED_DATE);
\{http\://www.alfresco.org/model/system/1.0\}archivedDate


System.out.println(ContentModel.PROP_NAME);
{http://www.alfresco.org/model/content/1.0}name

System.out.println(ContentModel.PROP_ARCHIVED_BY);
{http://www.alfresco.org/model/system/1.0}archivedBy

System.out.println(ContentModel.PROP_ARCHIVED_DATE); 
{http://www.alfresco.org/model/system/1.0}archivedDate

property.getArchiveRootRef():
      archive://SpacesStore/20f1f650-07d2-4a93-b464-ac8e9f5ecf59

Search Filter Rule:

search for ALL items in the archive store:
       PARENT:"archive://SpacesStore/20f1f650-07d2-4a93-b464-ac8e9f5ecf59" AND ASPECT:"{http://www.alfresco.org/model/system/1.0}archived"

search for user 
@\{http\://www.alfresco.org/model/system/1.0\}archivedBy:test1 AND PARENT:"archive://SpacesStore/20f1f650-07d2-4a93-b464-ac8e9f5ecf59" AND ASPECT:"{http://www.alfresco.org/model/system/1.0}archived"

search for user & today
@\{http\://www.alfresco.org/model/system/1.0\}archivedDate:[2010\-12\-30T00\:00\:00 TO 2010\-12\-30T14\:10\:41] AND @\{http\://www.alfresco.org/model/system/1.0\}archivedBy:test1 AND PARENT:"archive://SpacesStore/20f1f650-07d2-4a93-b464-ac8e9f5ecf59" AND ASPECT:"{http://www.alfresco.org/model/system/1.0}archived"

search for user & last 7 today
@\{http\://www.alfresco.org/model/system/1.0\}archivedDate:[2010\-12\-23T14\:12\:13 TO 2010\-12\-30T14\:12\:13] AND @\{http\://www.alfresco.org/model/system/1.0\}archivedBy:test1 AND PARENT:"archive://SpacesStore/20f1f650-07d2-4a93-b464-ac8e9f5ecf59" AND ASPECT:"{http://www.alfresco.org/model/system/1.0}archived"

Reference:
NodeArchiveService
Archive Store Lucene query
Calling Alfresco Web Services from C# 
TrashcanDialog.java  (source code)

沒有留言:

張貼留言

留個話吧:)

其他你感興趣的文章

Related Posts with Thumbnails