Shortcut object

4 views
Skip to first unread message

Thomas Bellos

unread,
Sep 1, 2008, 2:38:14 AM9/1/08
to porcupi...@googlegroups.com
Hi all,
 
I would like to propose the implementation of a Shortcut object.
 
An object that will point to the original one and will be dependent upon
 
the original object, ie if the original object is modified, the modification will be
 
reflected to the shortcut.
 
Thanks
 
 

Pablo Iaria

unread,
Sep 1, 2008, 7:04:52 AM9/1/08
to porcupi...@googlegroups.com
Hi,

I'm new to porcupine. Can you explain why do you need such Shorcut object?

Saludos,
Pablo.-

Thomas Bellos

unread,
Sep 1, 2008, 10:15:55 AM9/1/08
to porcupi...@googlegroups.com
Hi Pablo,

Objects of this kind, I believe are useful in sitiuations where you
build a community and you want to share
A photo for example with some of your friends. In such a case, the
shortcut comes in handy, because you can create a shortcut to the
original
Object, without the need of creating a new one.

Hope this helps clarify things

Thomas

tkouts

unread,
Sep 2, 2008, 4:21:46 AM9/2/08
to porcupine-users
This is something I had in mind, but no time to implement. Anyway now
that you are asking for it I have to give it a higher priority. But
there some issues that need to be addressed before implementing this
(any comments are welcome):

1. The Shortcut content class will act as a proxy to the real object
(with the "__getattr__", "__setattr__" special methods).
2. But the parentid of the Shortcut should contain the folder id that
the Shortcut is contained.
3. Deleting the shortcut should delete the shortcut itself and not the
referenced object.
4. Updating the shortcut only updates the referenced object.
5. The contentclass attribute of the shortcut should point to the
original object's contentclass. This "hides" the Shortcut content
class implementation from the developer, unless the developer uses
"isinstace" (are there any cases where the developer would want to
have access to the Shortcut itself? I don't think so but maybe yes)
6. The security descriptor of the shortcut is the security descriptor
of the referenced object (having always the rolesInherited attribute
set to false)
7. I don't think that we'll have any OQL side effects

Tassos Koutsovassils
Porcupine Core Development
http://www.innoscript.org
Reply all
Reply to author
Forward
0 new messages