Exemple #1
0
class IAddons(Interface):

    enabled = schema.FrozenSet(title=_('Installed addons'),
                               defaultFactory=frozenset,
                               value_type=schema.TextLine(title='Value'),
                               description=_("""List of enabled addons"""))
Exemple #2
0
class IBlockText(Interface):
    text = JSONField(schema=TEXT_SCHEMA)

    description = schema.TextLine()
Exemple #3
0
class IBlockVideo(Interface):
    url = schema.TextLine()
class IEventConditionType(IConditionType):
    event_name = schema.TextLine()
Exemple #5
0
class ITestSchema(Interface):

    text = schema.TextLine(required=False)
    integer = schema.Int(required=False)
    floating = schema.Float(required=False)
    list_of_text = schema.List(value_type=schema.TextLine(), required=False)
    tuple_of_text = schema.Tuple(value_type=schema.TextLine(), required=False)
    set_of_text = schema.Set(value_type=schema.TextLine(), required=False)
    frozenset_of_text = schema.FrozenSet(value_type=schema.TextLine(),
                                         required=False)
    dict_value = schema.Dict(key_type=schema.TextLine(),
                             value_type=schema.TextLine(),
                             required=False)
    datetime = schema.Datetime(required=False)
    date = schema.Date(required=False)
    time = schema.Time(required=False)

    patch_list = fields.PatchField(
        schema.List(value_type=schema.Dict(key_type=schema.Text(),
                                           value_type=schema.Text()),
                    required=False))
    patch_list_int = fields.PatchField(
        schema.List(value_type=schema.Int(), required=False))
    patch_dict = fields.PatchField(schema.Dict(key_type=schema.Text(),
                                               value_type=schema.Text()),
                                   required=False)

    patch_int = fields.PatchField(schema.Int(default=22), required=False)

    patch_int_no_default = fields.PatchField(schema.Int(), required=False)

    bucket_list = fields.BucketListField(
        bucket_len=10,
        required=False,
        value_type=schema.Dict(key_type=schema.Text(),
                               value_type=schema.Text()),
    )

    datetime_bucket_list = fields.BucketListField(bucket_len=10,
                                                  required=False,
                                                  value_type=schema.Datetime())

    union_field = schema.UnionField(schema.Datetime(),
                                    schema.Int(),
                                    required=False)
    union_field_obj = schema.UnionField(schema.Object(IObjectA),
                                        schema.Object(schema=IObjectB),
                                        required=False)

    nested_patch = fields.PatchField(
        schema.Dict(
            required=False,
            key_type=schema.Text(),
            value_type=fields.PatchField(
                schema.List(value_type=schema.Object(
                    schema=INestFieldSchema))),
        ))

    dict_of_obj = schema.Dict(
        required=False,
        key_type=schema.Text(),
        value_type=schema.Object(schema=INestFieldSchema))

    patch_dict_of_obj = fields.PatchField(
        schema.Dict(required=False,
                    key_type=schema.Text(),
                    value_type=schema.Object(schema=INestFieldSchema)))

    patch_tuple = fields.PatchField(
        schema.Tuple(required=False,
                     value_type=schema.Text(schema=INestFieldSchema)))

    bucket_dict = fields.BucketDictField(bucket_len=10,
                                         required=False,
                                         key_type=schema.Text(),
                                         value_type=schema.Text())
Exemple #6
0
class ITestContent3(ITestContent2):
    foobar3 = schema.TextLine(required=False)
Exemple #7
0
class ITestContent5(ITestContent4):
    foobar5 = schema.TextLine(required=False)
Exemple #8
0
class ITestContent1(IItem):
    foobar1 = schema.TextLine()
Exemple #9
0
class ITestContent2(ITestContent1):
    foobar2 = schema.TextLine()
Exemple #10
0
class ILink(IItem):

    index_field('url', type='text')
    url = schema.TextLine(title=_('URL'), required=False)
Exemple #11
0
class ITestBehavior(Interface):
    foobar = schema.TextLine(required=False)
    foobar_context = schema.TextLine(required=False, default='default-foobar')
Exemple #12
0
class IRegistryData(Interface):
    foobar = schema.TextLine()
Exemple #13
0
class IImageAttachment(Interface):

    image = CloudFileField()

    caption = schema.TextLine()
Exemple #14
0
class ILayers(Interface):

    active_layers = schema.FrozenSet(title=_('Active Layers'),
                                     defaultFactory=frozenset,
                                     value_type=schema.TextLine(title='Value'))
Exemple #15
0
class ITestContent1(IItem):
    foobar1 = schema.TextLine(required=False)
Exemple #16
0
class ITestContent3(ITestContent2):
    foobar3 = schema.TextLine()
Exemple #17
0
class ITestContent2(ITestContent1):
    foobar2 = schema.TextLine(required=False)
Exemple #18
0
class ITestContent4(ITestContent3):
    foobar4 = schema.TextLine()
Exemple #19
0
class ITestContent4(ITestContent3):
    foobar4 = schema.TextLine(required=False)
Exemple #20
0
class ITestContent5(ITestContent4):
    foobar5 = schema.TextLine()
Exemple #21
0
class ITestContent6(ITestContent5):
    foobar6 = schema.TextLine(required=False)
Exemple #22
0
class ITestContent6(ITestContent5):
    foobar6 = schema.TextLine()
Exemple #23
0
class IDublinCore(Interface):
    index_field("creators", type="keyword")
    index_field("tags", type="keyword")
    index_field("contributors", type="keyword")

    title = schema.TextLine(
        title="Title", description="The first unqualified Dublin Core 'Title' element value."
    )

    description = schema.Text(
        title="Description", description="The first unqualified Dublin Core 'Description' element value."
    )

    creation_date = schema.Datetime(
        title="Creation Date",
        description="The date and time that an object is created. " "\nThis is normally set automatically.",
    )

    modification_date = schema.Datetime(
        title="Modification Date",
        description="The date and time that the object was last modified in a\n" "meaningful way.",
    )

    effective_date = schema.Datetime(
        title="Effective Date", description="The date and time that an object should be published. "
    )

    expiration_date = schema.Datetime(
        title="Expiration Date", description="The date and time that the object should become unpublished."
    )

    creators = schema.Tuple(
        title="Creators",
        description="The unqualified Dublin Core 'Creator' element values",
        value_type=schema.TextLine(),
        required=False,
        naive=True,
        max_length=1000,
    )

    tags = PatchField(
        schema.Tuple(
            title="Tags",
            description="The unqualified Dublin Core 'Tags' element values",
            value_type=schema.TextLine(),
            required=False,
            naive=True,
            max_length=10000,
        )
    )

    publisher = schema.Text(
        title="Publisher", description="The first unqualified Dublin Core 'Publisher' element value."
    )

    contributors = schema.Tuple(
        title="Contributors",
        description="The unqualified Dublin Core 'Contributor' element values",
        value_type=schema.TextLine(),
        required=False,
        naive=True,
        max_length=10000,
    )
Exemple #24
0
class ITestNoSerializeBehavior(Interface):
    foobar = schema.TextLine()
Exemple #25
0
class IBlockDescription(Interface):
    description = schema.TextLine(required=True)
Exemple #26
0
class IConversation(Interface):

    users = schema.List(value_type=schema.TextLine())
Exemple #27
0
class IBlockImage(Interface):
    url = schema.TextLine()
Exemple #28
0
class ITestBehavior3(Interface):
    foobar = schema.TextLine()
Exemple #29
0
class IBlockTitle(Interface):
    title = schema.TextLine(required=True)
Exemple #30
0
class ISchema(Interface):
    foo = schema.TextLine()