cancel
Showing results for 
Search instead for 
Did you mean: 

Can the same document be stored in more than one Space?

theorbix
Confirmed Champ
Confirmed Champ
In Alfresco, each new document stored in the repository is located in a Space.

Questions:

1) Is it possible to store the same document in more than one space (I don't mean the concept of document shortcuts, I really mean that the same document should be accessible in two or more spaces)?

2) Is it possible, via API, to store a document in the repository without assigning it to a Space?

Thanks….
14 REPLIES 14

mrogers
Star Contributor
Star Contributor
A document belongs to one space only.   

You can however have zero, one or more associations between documents.

theorbix
Confirmed Champ
Confirmed Champ
Thanks Mrogers,

So is there NO way at all to reference the same document in more than one Space?

I understand that a document must be assigned to one Space, but I thought that it was possible to referece it also from other Spaces.

It's a common feature in many other document management systems…

pmonks
Star Contributor
Star Contributor
You can create a link to a given document in any space you wish.  In the Alfresco Explorer UI this is done by copying the document to the clipboard then pasting it as a link in some other space.

Links act just like symlinks in Unix and a little like shortcuts in Windows.

Cheers,
Peter

theorbix
Confirmed Champ
Confirmed Champ
Thanks Pmonks,

When you talk about a link you mean the "Copy / Paste Shortcut" feature exposed in the Web Client, right?

Ok I know this feature, but I've noticed that Shortcuts (pointing to a Document or to a Space) pasted in a Space are not shown via CIFS… I wonder if this is just a small bug of CIFS or if is an inherent limitation of the Shurtcut.

I've opened a new post on this subject, since I'm designing a system in which Shortcuts (or links, as you called them ) should be used quite extensively, and I want to be sure that there are no drawbacks in using this type of relationships between objects.

Last question: Mrogers talks about Associations, and I've just read some documentation in the Wiki about the concept of Associations in the Alfresco content model.

Can you confirm that the Shortcuts actually a type of Association between a document (or a space) and another document (or a pace)?

norgan
Champ in-the-making
Champ in-the-making
Hi,
can you give us an update, of what you found out ?

One thing, for instance, have you found a way to make sure, that the original isnt deleted until all links are deleted ?

theorbix
Confirmed Champ
Confirmed Champ
Hi Norgan,

I didn't investigate further.

It seems that links (shortcuts) are a good way of referencing the same document in more than one Space, but only in a web-based interface (CIFS does not show shortcuts).

When a document is deleted, all its shortcuts are automatically deleted, so the repository integrity is maintained automatically.

With the standard user interface (Web Client or Share) there is no way to automatically disable the deletion of a document if the document has one or more links, but implementing this check would be fairly easy in a custom web based user interface.

Hope this helps.

Dario

jayjayecl
Confirmed Champ
Confirmed Champ
A document belongs to one space only.   

You can however have zero, one or more associations between documents.

Are you sure of that ?
I think a document can belong to several spaces, according to cm:folder definition :


<type name="cm:folder">
         <title>Folder</title>
         <parent>cm:cmobject</parent>
         <archive>true</archive>
         <associations>
            <child-association name="cm:contains">
               [b]<source>
                  <mandatory>false</mandatory>
                  <many>true</many>
               </source>[/b]
               <target>
                  <class>sys:base</class>
                  <mandatory>false</mandatory>
                  <many>true</many>
               </target>
               <duplicate>false</duplicate>
               <propagateTimestamps>true</propagateTimestamps>
            </child-association>
         </associations>
      </type>

You can even see that the "topology" of this association is the same as the association between Groups and members (and a user can belong to several groups) :

<type name="usr:authorityContainer">
         <title>Alfresco Authority Type</title>
         <parent>usr:authority</parent>
         <properties>
         <!– The tokenisation set here is ignored - it is fixed for this type –>
         <!– This is so you can not break group lookup –>
            <property name="usr:authorityName">
               <type>d:text</type>
            <constraints>
                  <constraint ref="usr:authorityNameConstraint" />
               </constraints>
            </property>
            <property name="usr:members">
               <type>d:text</type>
               <multiple>true</multiple>  
            </property>
         <property name="usr:authorityDisplayName">
               <type>d:text</type>
            </property>
         </properties>
         <associations>
            <child-association name="usr:member">
               [b]<source>
                  <mandatory>false</mandatory>
                  <many>true</many>
               </source>[/b]
               <target>
                  <class>usr:authority</class>
                  <mandatory>false</mandatory>
                  <many>true</many>
               </target>
               <duplicate>false</duplicate>
            </child-association>
         </associations>
      </type> 

At last, it seems that one of my colleague ran some tests and managed to make a content a child of different spaces

mikeh
Star Contributor
Star Contributor
Yes, it is possible for content to have multiple parents. In fact, this is being actively used for the ongoing Records Management development on HEAD.

Thanks,
Mike

sselvan
Champ in-the-making
Champ in-the-making
I know it is possible to have a same document uploaded to two or more different spaces.

I have a question here -
If I have a same document in two or more spaces - does the repository have references to these documents in two different spaces OR does it use extra storage for the second document?

Thank you