There's also <deniedSubtypes> available. I don't know why it's not in the doc.
Florent On 8 Sep 2008, at 15:56, Xavier Pétard wrote: > Thanks for your answers, > > Florent Guillaume a écrit : >> >> On 2 Sep 2008, at 11:25, Xavier Pétard wrote: >> >>> I've defined custom types (let's say MyDoc and MyFolder), and can >>> create some in the repository. >>> But I'd like to have these custom types only : is it possible to >>> (a) overwrite the File and Folder type (or define a Facet and add it >>> to File and Folder types ?) >>> >> You can't redefine a type's schemas by simple overloading, no. You >> could open the Nuxeo jars that defined these types and overload them, >> but that's really not something I would advise. >> > sure... >> >>> (b) to prevent Folder or File creation at the root of workspaces >>> (ie, avoid Workspace>Folder, to have only Workspace>MyFolder>MyDoc, >>> or Workspace>MyDoc ? >>> >> It's possible to redefine what document types are allowed inside >> other >> document types, that's different from the schema. >> Please see the subtypes element of >> http://doc.nuxeo.org/5.1/components/org.nuxeo.ecm.platform.types.TypeService.html#extension_point_types >> > I did something like: > <type id="Workspace" coretype="Workspace"> > <subtypes> > <type>MyFolder</type> > <type>MyDoc</type> > </subtypes> > </type> > <type id="MyFolder" coretype="MyFolder"> > <subtypes> > <type>MyDoc</type> > </subtypes> > </type> > But, merging with the standard definition of Workspace, what I > finaly get is equivalent to : > <type id="Workspace" coretype="Workspace"> > <subtypes> > <type>Folder</type> > <type>File</type> > <type>Note</type> > <type>MyFolder</type> > <type>MyDoc</type> > </subtypes> > </type> > > The idea is I don't want my users being confused by a choice between > "File" and "MyDoc". > There is maybe an other way to hide the standard File creation with > filters... >> >> >>> If it is, can webdav and/or drag&drop plugins import custom types, >>> depending on the destination folder (for instance, if a file is >>> uploaded in a MyFolder, then it is a MyDoc. If a folder is uploaded >>> in a MyFolder, it is a MyFolder) >>> This could be useful to upload subsections via webdav (since >>> sections can only contain sections and not folders). >>> >> At the moment the WebDAV service only creates File and Folder >> objects. >> It may be possible to override this by creating a new FolderImporter >> and registering it, but I haven't tried. >> > Thanks again. >> Florent >> >> > _______________________________________________ > ECM mailing list > [email protected] > http://lists.nuxeo.com/mailman/listinfo/ecm -- Florent Guillaume, Director of R&D, Nuxeo Open Source Enterprise Content Management (ECM) http://www.nuxeo.com http://www.nuxeo.org +33 1 40 33 79 87 _______________________________________________ ECM mailing list [email protected] http://lists.nuxeo.com/mailman/listinfo/ecm
