Author: jmorliaguet
Date: Mon Dec 12 21:55:58 2005
New Revision: 2022

Modified:
   cpsskins/branches/jmo-perspectives/io/README.txt
Log:

- draft about the different types, URI



Modified: cpsskins/branches/jmo-perspectives/io/README.txt
==============================================================================
--- cpsskins/branches/jmo-perspectives/io/README.txt    (original)
+++ cpsskins/branches/jmo-perspectives/io/README.txt    Mon Dec 12 21:55:58 2005
@@ -7,6 +7,91 @@
 
 This package contains XML exporters and importers.
 
+Resources need to be identified with a name. Their name is obtained from a
+combination of element, resource and content types.
+
+
+Types
+=====
+
+There are three main types:
+
+Element type
+------------
+
+Element types define a first-level categorization of resources:
+
+- portlet
+
+- format
+
+- theme, themepage, pageblock, cell, slot
+
+- perspective
+
+- filter
+
+- engine
+
+
+The element name of a given resource is obtained from the "IElementType"
+interface:
+
+  element_type = queryType(resource, IElementType)
+  name = element_type.getTaggedValue('name')
+
+or:
+
+  name = resource.elementname
+
+
+Resource type
+-------------
+
+Resource types are a second-level categorization of resources:
+
+- displays: box, area, boxgroup
+
+- formats: widget, style, effect, layout, ...
+
+The resource type is identical to the element type for resources that have no
+second-level type of categorization (portlet, perpective, theme, engine, ...)
+
+The resource name of a given resource is obtained from the "IResourceType"
+interface:
+
+  resource_type = queryType(resource, IResourceType)
+  name = resource_type.getTaggedValue('name')
+
+or:
+
+  name = resource.resourcename
+
+
+Content type
+------------
+
+Content types are unique factory names. They contain a provider and a factory
+name.
+
+- cpsskins.actions, cpsskins.breadcrumbs, ...
+
+- cpsskins.vertical_menu, cpsskins.plain_html
+
+Content type names are unique for a given resource type.
+
+
+The content name of a given resource is obtained from the "IContentType"
+interface:
+
+  content_type = queryType(resource, IContentType)
+  name = content_type.getTaggedValue('name')
+
+or:
+
+  name = resource.contentname
+
+
 URI
 ---
 
@@ -14,20 +99,11 @@
 
 A URI consists of a prefix and a suffix separated by a '.' character.
 
-The prefix is a short name that represents a category of resources and that
-defines a namespace. The suffix identifies the resource inside the namespace.
+The prefix is the resource name described above.
+The suffix identifies the resource inside the namespace.
 
 For instance a portlet will be identified as:
 
-  portlet.my-portlet
-
-or:
-
   portlet.123456
 
-The prefix for a given resource is obtained from the "IResourceType" interface
-as a tagged value called 'name':
-
-  resource_type = queryType(resource, IResourceType)
-  prefix = resource_type.getTaggedValue('name')
 
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to