cancel
Showing results for 
Search instead for 
Did you mean: 

Get user document version

fracat71
Champ on-the-rise
Champ on-the-rise
Hi all,
it is possible to get with java foundation api (or javascript) all the documents modified by an user.
Must be included version history.

Thanks
12 REPLIES 12

savic_prvoslav
Champ on-the-rise
Champ on-the-rise
yes lucene search with   @cm\Smiley Tongueutpropertywhatyouneed:username

http://wiki.alfresco.com/wiki/Search

you have it all hire.

fracat71
Champ on-the-rise
Champ on-the-rise
Sorry savic.prvoslav,
what do you say?
putpropertywhatyouneed
I know lucene query but how i have to write ?
Do i have to specify store SpaceStore o VersionStore?
Regards

savic_prvoslav
Champ on-the-rise
Champ on-the-rise
Finding nodes by text property values
To find all nodes with the cm:name property containing the word banana:

@cm\:name:"banana"

as hire you are searching name of doucment

http://dev.alfresco.com/resource/docs/java/repository/org/alfresco/model/ContentModel.html#PROP_MODI...

using modifier you will get docs that certan user has modified .

fracat71
Champ on-the-rise
Champ on-the-rise
Ok, but wich store? And if i want to know only a lock is activated on doc (doc not modified).

savic_prvoslav
Champ on-the-rise
Champ on-the-rise
why do not look up on wiki about javascript search api, i beleive that you will find all you need.

fracat71
Champ on-the-rise
Champ on-the-rise
Hi savic.prvoslav,

i used http://alfresco-test:8080/alfresco/service/ui/doclist?q=@cm\\:modifier:user and it doesn't work because it show the last modifier not all version modifiers.

I have configured the version2Store store but the lucene query doesn't return results.

I see on http://wiki.alfresco.com/wiki/3.0_Version_Store this statement Lucene indexing is not configured by default for the version store(s) (for releases 2.1.6, 2.2.2, 3.1.1, 3.2.0 and higher).

Can i chnage it?

Regards

fracat71
Champ on-the-rise
Champ on-the-rise
Hi all,
nobody can help me?
Regards

fracat71
Champ on-the-rise
Champ on-the-rise
Hi all,
i changed the core-services-context.xml and it seems to work
    <bean id="indexerAndSearcherFactory" class="org.alfresco.repo.service.StoreRedirectorProxyFactory">
        <property name="proxyInterface">
            <value>org.alfresco.repo.search.impl.lucene.LuceneIndexerAndSearcher</value>
        </property>
        <property name="defaultBinding">
            <ref bean="admLuceneIndexerAndSearcherFactory"></ref>
        </property>
        <property name="redirectedProtocolBindings">
            <map>
                <entry key="workspace">
                    <ref bean="admLuceneIndexerAndSearcherFactory"></ref>
                </entry>
                <entry key="avm">
                    <ref bean="avmLuceneIndexerAndSearcherFactory"></ref>
                </entry>
            </map>
        </property>
        <property name="redirectedStoreBindings">
            <map>
                <entry key="workspace://lightWeightVersionStore">
                    <ref bean="admLuceneIndexerAndSearcherFactory"></ref>
                </entry>
                <entry key="workspace://version2Store">
                    <ref bean="admLuceneIndexerAndSearcherFactory"></ref>
                </entry>
            </map>
        </property>
    </bean>

fracat71
Champ on-the-rise
Champ on-the-rise
Hi all,
i continue to test and problems :shock: .
Now i want to use this javascript code:
   var l_customerDocs = search.luceneSearch("workspace://version2Store","@cm\\:modifier:"+args.user);
   logger.log("lucene query executed");
   model.m_documents_node=l_customerDocs;
When i execute the code , using the JavascriptDebugger the variable l_customerDocs   contains A valid SecureContext was not provided in the RequestContext but when i evaluate the code (inside JavascriptDebugger ) search.luceneSearch("workspace://version2Store","@cm\\:modifier:"+args.user) i have
Node Type: {http://www.alfresco.org/model/versionstore/2.0}versionHistory, Node Aspects: [{http://www.alfresco.org/model/system/1.0}referenceable, {http://www.alfresco.org/model/content/1.0}auditable],Node Type: {http://www.alfresco.org/model/content/1.0}content, Node Aspects: [{celdra.model}DocumentDetails, {http://www.alfresco.org/model/content/1.0}auditable, {http://www.alfresco.org/model/system/1.0}referenceable, {http://www.alfresco.org/model/content/1.0}titled, {http://www.alfresco.org/model/content/1.0}author, {http://www.alfresco.org/model/versionstore/2.0}version, {http://www.alfresco.org/model/content/1.0}versionable],Node Type: {http://www.alfresco.org/model/content/1.0}content, Node Aspects: [{celdra.model}DocumentDetails, {http://www.alfresco.org/model/content/1.0}auditable, {http://www.alfresco.org/model/system/1.0}referenceable, {http://www.alfresco.org/model/content/1.0}titled, {http://www.alfresco.org/model/content/1.0}author, {http://www.alfresco.org/model/versionstore/2.0}version, {http://www.alfresco.org/model/content/1.0}versionable]

How is it possible?

Regards