Esempio n. 1
0
class APISchema(ciocvalidators.RootSchema):
    if_key_missing = None

    Owner = ciocvalidators.UnicodeString(not_empty=True, max=100)
    CIC = ciocvalidators.Bool()
    VOL = ciocvalidators.Bool()
    Inactive = ciocvalidators.Bool()
Esempio n. 2
0
class GeneralHeadingBaseSchema(Schema):
    if_key_missing = None

    Used = validators.DictConverter(UsedOptions, if_emtpy=False, if_missing=False)
    NonPublic = validators.StringBool()
    DisplayOrder = validators.Int(min=0, max=validators.MAX_TINY_INT, if_empty=0)
    HeadingGroup = validators.IDValidator()

    TaxonomyRestrict = validators.Bool()
    TaxonomyName = validators.Bool()

    IconNameFull = validators.String(max=65)
Esempio n. 3
0
class AIRSExportOptionsSchema(validators.RootSchema):
    allow_extra_fields = True
    if_key_missing = None

    version = validators.OneOf(["3_1", "3_0", "3_0_Testing"], if_empty="3_0")
    DST = validators.UnicodeString(max=20, not_empty=True)
    IncludeDeleted = validators.Bool()
    IncludeSiteAgency = validators.Bool()
    PartialDate = validators.ISODateConverter()
    PubCodeSync = validators.Bool()
    FileSuffix = validators.String(max=100)
    LabelLangOverride = validators.Int(min=0, max=validators.MAX_TINY_INT)
    AnyLanguageChange = validators.Bool()
Esempio n. 4
0
class ListStreetType(ListValuesModel):
    Table = "GBL_StreetType"
    FieldCode = "st"
    AdminAreaCode = "STREETTYPE"

    NameField = "StreetType"

    ID = "SType_ID"

    ListName = _("Street Type")
    ListNamePlural = _("street types")

    ExtraFields = [
        {
            "type": "language",
            "title": _("Language"),
            "field": "Culture",
            "kwargs": {},
            "validator": validators.ActiveCulture(record_cultures=True),
        },
        {
            "type": "checkbox",
            "title": _("Display After Street"),
            "field": "AfterName",
            "kwargs": {},
            "validator": validators.Bool(),
            "element_title": _("Street Type displays after the Street Name: "),
        },
    ]
Esempio n. 5
0
class ThesaurusLocalBaseSchema(validators.RootSchema):
    if_key_missing = None

    Used = validators.DictConverter(UsedOptions)
    UseAll = validators.DictConverter(UseAllOptions)
    SubjCat_ID = validators.IDValidator()
    SRC_ID = validators.IDValidator()
    Inactive = validators.Bool()
Esempio n. 6
0
class EmailListSchema(ciocvalidators.RootSchema):
    ignore_key_missing = True
    if_key_missing = None

    EmailAddress = ciocvalidators.All(
        validators=[
            ciocvalidators.String(max=1000),
            ciocvalidators.EmailListRegexValidator(not_empty=True),
        ]
    )
    AccessURL = AccessURLValidator(not_empty=True, if_missing=None)

    PDF = ciocvalidators.Bool()
    Subject = ciocvalidators.UnicodeString(max=255, not_empty=True)
    ReplyTo = ciocvalidators.Bool(if_missing=True, accept_iterator=True)
    BodyPrefix = ciocvalidators.UnicodeString()
    BodySuffix = ciocvalidators.UnicodeString()
class OptionsSchema(validators.RootSchema):
    GlobalActivations = validators.Bool()
    InactivateUnused = validators.Bool()
    IncludeShared = validators.Bool()
    RollupLowLevelTerms = validators.Bool()
    ExcludeYBranch = validators.Bool()
    RecommendActivations = validators.Bool()
Esempio n. 8
0
class HeadingGroupBaseSchema(Schema):
    if_key_missing = None

    GroupID = Any(validators.IDValidator(), validators.OneOf(["NEW"]))
    DisplayOrder = validators.Int(min=0, max=256, not_empty=True)
    Descriptions = validators.CultureDictSchema(
        HeadingGroupDescriptionSchema(),
        allow_extra_fields=True,
        fiter_extra_fields=False,
    )
    IconNameFull = validators.String(max=65)

    delete = validators.Bool()
Esempio n. 9
0
class DomainSchema(Schema):
    if_key_missing = None

    DMAP_ID = validators.IDValidator(not_empty=True)
    DefaultCulture = validators.ActiveCulture(not_empty=True)
    CICViewType = validators.IDValidator()
    VOLViewType = validators.IDValidator()
    SecondaryName = validators.Bool()
    GoogleMapsAPIKeyCIC = validators.String(max=100)
    GoogleMapsClientIDCIC = validators.UnicodeString(max=100)
    GoogleMapsChannelCIC = validators.UnicodeString(max=100)
    GoogleMapsAPIKeyVOL = validators.String(max=100)
    GoogleMapsClientIDVOL = validators.UnicodeString(max=100)
    GoogleMapsChannelVOL = validators.UnicodeString(max=100)
Esempio n. 10
0
class APISchema(ciocvalidators.RootSchema):
    if_key_missing = None
    key = ciocvalidators.UUIDValidator(not_empty=True)
    description = ciocvalidators.Bool()
    address = ciocvalidators.Bool()
    email = ciocvalidators.Bool()
    web = ciocvalidators.Bool()
    officephone = ciocvalidators.Bool()
    hours = ciocvalidators.Bool()
Esempio n. 11
0
class PublicationBaseSchema(Schema):
    if_key_missing = None

    PubCode = validators.Regex("^[-A-Z0-9]{,20}$", not_empty=True, strip=True)
    NonPublic = validators.StringBool()
    FieldHeadings = validators.Bool()
    FieldHeadingsNP = validators.Bool()
    FieldDesc = validators.Bool()
    FieldHeadingGroups = validators.Bool()
    FieldHeadingGroupsNP = validators.Bool()

    CanEditHeadingsShared = validators.Bool()
Esempio n. 12
0
class ThesaurusFullSchema(validators.RootSchema):
    if_key_missing = None

    # subject added at runtime
    # subject = ThesaurusBaseSchema()
    descriptions = validators.CultureDictSchema(
        ThesaurusDescriptionSchema(),
        pre_validators=[validators.DeleteKeyIfEmpty()],
        chained_validators=[
            validators.FlagRequiredIfNoCulture(ThesaurusDescriptionSchema)
        ],
    )
    UseSubj_ID = All(validators.Set(use_set=True), ForEach(validators.IDValidator()))
    BroaderSubj_ID = All(
        validators.Set(use_set=True), ForEach(validators.IDValidator())
    )
    RelatedSubj_ID = All(
        validators.Set(use_set=True), ForEach(validators.IDValidator())
    )

    MakeShared = validators.Bool()
Esempio n. 13
0
class EmailSchemaBase(validators.RootSchema):
    if_key_missing = None

    DefaultMsg = validators.Bool()

    StdSubjectBilingual = validators.UnicodeString(max=150)
Esempio n. 14
0
class PosAPISchema(APISchema):
    duties = ciocvalidators.Bool()
    loc = ciocvalidators.Bool()
class OptionsSchema(validators.RootSchema):
    GlobalActivations = validators.Bool()
Esempio n. 16
0
class ListBaseSchema(Schema):
    if_key_missing = None

    allow_extra_fields = True

    delete = validators.Bool()
Esempio n. 17
0
class ThesaurusInactivateSchema(Schema):
    Inactive = validators.Bool()
Esempio n. 18
0
class CicDetailsSchema(validators.Schema):
    TmpLn = validators.ActiveCulture(record_cultures=True, if_error=None)
    InlineResults = validators.Bool()
    UseCICVwTmp = validators.IDValidator(if_error=None)