AnsweredAssumed Answered

Custom Types

Question asked by msalamon on Aug 2, 2006
I am trying to create a set of related custom types, but I am having a lot of difficulty (which is not helped by the fact that the Schema is not documented).

There are three tiers, 2 spaces and 1 content:

   TopLevelSpace (extends cm:folder)
      BottomLevelSpace (extends cm:folder)
          CustomContent (extends cm:content)

The custom spaces each contain unique properties, which I have added successfully.

(A) One of these properties can have multiple values (which I have gotten to work with <multiple>true</multiple>), but each value is restricted to a certain regex format.  I cannot get this regex constraint to work:

constraint defn:
      <constraint name="zzz:clientMatterConstraint" type="REGEX">
        <parameter name="expression">
     <value><![CDATA[[0-9][0-9][0-9][0-9][0-9]/[0-9][0-9][0-9]}]]> </value>
    <parameter name="requiresMatch">

TopLevelSpace type defn contains this property:

        <property name="zzz:clientMatters">
            <constraint ref="zzz:clientMatterConstraint"/>

Am I doing something wrong?

(B) Also, each of these multiple clientmatter values must be unique within a given TopLevelSpace.  how do I enforce this uniqueness?

(C) I want to limit what can be contained inside of the TopLevelSpace (which extends cm:folder) to just the BottomLevelSpace (the other custom space I have created).  Is there any way to do this?  From this post:, it would appear that I can't, but I wanted to be sure.  I tried to create my own folder type that extended cm:object, but it was not recognized as a space.

Similarly, the BottomevelSpace (which extends cm:folder) should only contain the CustomContent (which extends cm:content).  Can this type of restriction be put in place?

FYI, typically a new TopLevelSpace is created, then one or more BottomLevelSpace's are created, then later CustomContents are added to these.

(D) Finally, how do I limit the type of file that can be attached to the CustomContent to just a pdf file?