[xwiki-devs] [Proposal] Rename Application Manager's SuperClass/SuperDocument tool
Hi all, I made a tool to easily manage wiki class and wiki class's objets bundled in application manager some times ago. Problem is theses tools changed since it's creation and new has very wrong names and I would like to rename it. There is two java classes : - SuperClass : manage wiki class with it's attached document/sheet/template (assume the wiki class exist in the wiki we working on) and give methods to search, etc. in documents containing objects of this class - SuperDocument : the default implementation overload Document and manage one object of a particular wiki class in its document (to be able to save or delete it), this class is generally overloaded to add some acces methods like getDocuments() in Application java class. These tools are also usable from Velocity. For some examples you can view Application Manager plugin (Application and ApplicationClass classes) and Wiki Manager plugin (XWikiServer and XWikiServerClass classes). I propose : - SuperClass -> ClassManager - SuperDocument -> ObjectDocument (or ObjectManager but i don't like it because it does not imply object in a document) -- Thomas Mortagne
2007/12/12, Thomas Mortagne <thomas.mortagne@xwiki.com>:
Hi all,
I made a tool to easily manage wiki class and wiki class's objets bundled in application manager some times ago. Problem is theses tools changed since it's creation and new has very wrong names and I would like to rename it.
There is two java classes :
- SuperClass : manage wiki class with it's attached document/sheet/template (assume the wiki class exist in the wiki we working on) and give methods to search, etc. in documents containing objects of this class - SuperDocument : the default implementation overload Document and manage one object of a particular wiki class in its document (to be able to save or delete it), this class is generally overloaded to add some acces methods like getDocuments() in Application java class.
These tools are also usable from Velocity.
For some examples you can view Application Manager plugin (Application and ApplicationClass classes) and Wiki Manager plugin (XWikiServer and XWikiServerClass classes).
It's XWikiApplication and XWikiApplicationClass not Application and ApplicationClass. I propose :
- SuperClass -> ClassManager - SuperDocument -> ObjectDocument (or ObjectManager but i don't like it because it does not imply object in a document)
-- Thomas Mortagne
-- Thomas Mortagne
Do we agree SuperDocument should extend com.xpn.xwiki.api.Document ? or is it XWikiDocument ? If I understand correctly it is a Document with helper functions to manage the data of one specific class ? I'm wondering if this should not be part of Document itself (with a setting deciding with class is the "main" object of that Document). We already have a value in the document which forces XWiki to instanciate the Document as a specific class (we are using this in Curriki with AssetDocument or in the new space manager). In any case I'm pro XObjectDocument is we really need an interface for that. I'm +1 to rename Document to XDocument also. Concerning Class, is it an override of "Document" also ? We have already com.xpn.xwiki.api.Class in the API also which is the class part of the Document. How is it different ? Could we use the same mecanism to instanciate a document that is a class as an XClass ? or XClassManager ? Ludovic Thomas Mortagne wrote:
2007/12/12, Thomas Mortagne <thomas.mortagne@xwiki.com <mailto:thomas.mortagne@xwiki.com>>:
Hi all,
I made a tool to easily manage wiki class and wiki class's objets bundled in application manager some times ago. Problem is theses tools changed since it's creation and new has very wrong names and I would like to rename it.
There is two java classes :
- SuperClass : manage wiki class with it's attached document/sheet/template (assume the wiki class exist in the wiki we working on) and give methods to search, etc. in documents containing objects of this class - SuperDocument : the default implementation overload Document and manage one object of a particular wiki class in its document (to be able to save or delete it), this class is generally overloaded to add some acces methods like getDocuments() in Application java class.
These tools are also usable from Velocity.
For some examples you can view Application Manager plugin (Application and ApplicationClass classes) and Wiki Manager plugin (XWikiServer and XWikiServerClass classes).
It's XWikiApplication and XWikiApplicationClass not Application and ApplicationClass.
I propose : - SuperClass -> ClassManager - SuperDocument -> ObjectDocument (or ObjectManager but i don't like it because it does not imply object in a document)
-- Thomas Mortagne
-- Thomas Mortagne ------------------------------------------------------------------------
_______________________________________________ devs mailing list devs@xwiki.org http://lists.xwiki.org/mailman/listinfo/devs
-- Ludovic Dubost Blog: http://blog.ludovic.org/ XWiki: http://www.xwiki.com Skype: ldubost GTalk: ldubost
2007/12/13, Ludovic Dubost <ludovic@xwiki.org>:
Do we agree SuperDocument should extend com.xpn.xwiki.api.Document ? or is it XWikiDocument ? If I understand correctly it is a Document with helper functions to manage the data of one specific class ? I'm wondering if this should not be part of Document itself (with a setting deciding with class is the "main" object of that Document). We already have a value in the document which forces XWiki to instanciate the Document as a specific class (we are using this in Curriki with AssetDocument or in the new space manager).
Maybe. At first I made SuperDocument/ObjectDocument to not touch core and because I seen then as two different level : "a document" and "a particular document containing an object a type Some.Type". I prefer separate them but I understand that these can be merged.
In any case I'm pro XObjectDocument is we really need an interface for that. I'm +1 to rename Document to XDocument also.
Concerning Class, is it an override of "Document" also ? We have already com.xpn.xwiki.api.Class in the API also which is the class part of the Document. How is it different ? Could we use the same mecanism to instanciate a document that is a class as an XClass ? or XClassManager ?
SuperClass is not a override of "Document" and it's generally considered (it is used this way by Application Manager and Wiki Manager) as singleton like java Class objects. com.xpn.xwiki.api.Class is a class object and just that it should not contains all that is in ClassManager (like sheet/template concepts, force existence of class in wiki it's working...) and all its dependencies. I think com.xpn.xwiki.api.Class has to be just the class and not take care of Document, wikis...
Ludovic
Thomas Mortagne wrote:
2007/12/12, Thomas Mortagne <thomas.mortagne@xwiki.com <mailto:thomas.mortagne@xwiki.com>>:
Hi all,
I made a tool to easily manage wiki class and wiki class's objets bundled in application manager some times ago. Problem is theses tools changed since it's creation and new has very wrong names and I would like to rename it.
There is two java classes :
- SuperClass : manage wiki class with it's attached document/sheet/template (assume the wiki class exist in the wiki we working on) and give methods to search, etc. in documents containing objects of this class - SuperDocument : the default implementation overload Document and manage one object of a particular wiki class in its document (to be able to save or delete it), this class is generally overloaded to add some acces methods like getDocuments() in Application java class.
These tools are also usable from Velocity.
For some examples you can view Application Manager plugin (Application and ApplicationClass classes) and Wiki Manager plugin (XWikiServer and XWikiServerClass classes).
It's XWikiApplication and XWikiApplicationClass not Application and ApplicationClass.
I propose : - SuperClass -> ClassManager - SuperDocument -> ObjectDocument (or ObjectManager but i don't like it because it does not imply object in a document)
-- Thomas Mortagne
-- Thomas Mortagne ------------------------------------------------------------------------
_______________________________________________ devs mailing list devs@xwiki.org http://lists.xwiki.org/mailman/listinfo/devs
-- Ludovic Dubost Blog: http://blog.ludovic.org/ XWiki: http://www.xwiki.com Skype: ldubost GTalk: ldubost
_______________________________________________ devs mailing list devs@xwiki.org http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
2007/12/13, Thomas Mortagne <thomas.mortagne@xwiki.com>:
2007/12/13, Ludovic Dubost <ludovic@xwiki.org>:
Do we agree SuperDocument should extend com.xpn.xwiki.api.Document ? or is it XWikiDocument ? If I understand correctly it is a Document with helper functions to manage the data of one specific class ? I'm wondering if this should not be part of Document itself (with a setting deciding with class is the "main" object of that Document). We already have a value in the document which forces XWiki to instanciate the Document as a specific class (we are using this in Curriki with AssetDocument or in the new space manager).
Maybe. At first I made SuperDocument/ObjectDocument to not touch core and because I seen then as two different level : "a document" and "a particular document containing an object a type Some.Type". I prefer separate them but I understand that these can be merged.
In any case I'm pro XObjectDocument is we really need an interface for that. I'm +1 to rename Document to XDocument also.
Concerning Class, is it an override of "Document" also ? We have already com.xpn.xwiki.api.Class in the API also which is the class part of the Document. How is it different ? Could we use the same mecanism to instanciate a document that is a class as an XClass ? or XClassManager ?
SuperClass is not a override of "Document" and it's generally considered (it is used this way by Application Manager and Wiki Manager) as singleton like java Class objects. com.xpn.xwiki.api.Class is a class object and just that it should not contains all that is in ClassManager (like sheet/template concepts, force existence of class in wiki it's working...) and all its dependencies. I think com.xpn.xwiki.api.Class has to be just the class and not take care of Document, wikis...
Sorry I mixed BaseClass and com.xpn.xwiki.api.Class, BaseClass as to exist but we could consider to replace Class by ClassManager for public user but do we want Class to contains template/sheet concepts ? We could move some ClassManager methods to Class.
Ludovic
Thomas Mortagne wrote:
2007/12/12, Thomas Mortagne <thomas.mortagne@xwiki.com <mailto:thomas.mortagne@xwiki.com>>:
Hi all,
I made a tool to easily manage wiki class and wiki class's objets bundled in application manager some times ago. Problem is theses tools changed since it's creation and new has very wrong names and I would like to rename it.
There is two java classes :
- SuperClass : manage wiki class with it's attached document/sheet/template (assume the wiki class exist in the wiki we working on) and give methods to search, etc. in documents containing objects of this class - SuperDocument : the default implementation overload Document and manage one object of a particular wiki class in its document (to be able to save or delete it), this class is generally overloaded to add some acces methods like getDocuments() in Application java class.
These tools are also usable from Velocity.
For some examples you can view Application Manager plugin (Application and ApplicationClass classes) and Wiki Manager plugin (XWikiServer and XWikiServerClass classes).
It's XWikiApplication and XWikiApplicationClass not Application and ApplicationClass.
I propose : - SuperClass -> ClassManager - SuperDocument -> ObjectDocument (or ObjectManager but i don't like it because it does not imply object in a document)
-- Thomas Mortagne
-- Thomas Mortagne ------------------------------------------------------------------------
_______________________________________________ devs mailing list devs@xwiki.org http://lists.xwiki.org/mailman/listinfo/devs
-- Ludovic Dubost Blog: http://blog.ludovic.org/ XWiki: http://www.xwiki.com Skype: ldubost GTalk: ldubost
_______________________________________________ devs mailing list devs@xwiki.org http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
-- Thomas Mortagne
Thomas Mortagne wrote:
Hi all,
I made a tool to easily manage wiki class and wiki class's objets bundled in application manager some times ago. Problem is theses tools changed since it's creation and new has very wrong names and I would like to rename it.
There is two java classes :
- SuperClass : manage wiki class with it's attached document/sheet/template (assume the wiki class exist in the wiki we working on) and give methods to search, etc. in documents containing objects of this class - SuperDocument : the default implementation overload Document and manage one object of a particular wiki class in its document (to be able to save or delete it), this class is generally overloaded to add some acces methods like getDocuments() in Application java class.
These tools are also usable from Velocity.
For some examples you can view Application Manager plugin (Application and ApplicationClass classes) and Wiki Manager plugin (XWikiServer and XWikiServerClass classes).
I propose : - SuperClass -> ClassManager - SuperDocument -> ObjectDocument (or ObjectManager but i don't like it because it does not imply object in a document)
+1 for ClassManager and ObjectDocument, but changing public class names is not a good idea, especially after a major release. To make a clearer distinction betwee XWiki concepts and Java classes, how about XClassManager and XObjectDocument? Sergiu
2007/12/13, Sergiu Dumitriu <sergiu@xwiki.com>:
Thomas Mortagne wrote:
Hi all,
I made a tool to easily manage wiki class and wiki class's objets bundled in application manager some times ago. Problem is theses tools changed since it's creation and new has very wrong names and I would like to rename it.
There is two java classes :
- SuperClass : manage wiki class with it's attached document/sheet/template (assume the wiki class exist in the wiki we working on) and give methods to search, etc. in documents containing objects of this class - SuperDocument : the default implementation overload Document and manage one object of a particular wiki class in its document (to be able to save or delete it), this class is generally overloaded to add some acces methods like getDocuments() in Application java class.
These tools are also usable from Velocity.
For some examples you can view Application Manager plugin (Application and ApplicationClass classes) and Wiki Manager plugin (XWikiServer and XWikiServerClass classes).
I propose : - SuperClass -> ClassManager - SuperDocument -> ObjectDocument (or ObjectManager but i don't like it because it does not imply object in a document)
+1 for ClassManager and ObjectDocument, but changing public class names is not a good idea, especially after a major release.
As Application Manager is still in bêta (M2) and this feature really used only by Application Manager and Wiki Manager I would like to make this change before the final release. Another solution would be in place of just rename, move this feature in the core renaming it, this way it just a new Platform tool and Wiki Manager and Application Manager can change their dependencies without broken actual SuperClass for some releases... but it's another subject and I'm not sure it's really needed :) To make a clearer distinction betwee XWiki concepts and Java classes,
how about XClassManager and XObjectDocument?
+1 for the "X" suffix. Sergiu
_______________________________________________ devs mailing list devs@xwiki.org http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
participants (3)
-
Ludovic Dubost -
Sergiu Dumitriu -
Thomas Mortagne