annotate Lib/IMPL/Web/View/Metadata/FormMeta.pm @ 364:82b6c967bcf1

sync, working on metadata
author cin
date Fri, 29 Nov 2013 16:33:07 +0400
parents d67e45705be5
children 7c621bb95e53
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
362
715b9959b207 WebView: initial work on metadata providers
cin
parents:
diff changeset
1 package IMPL::Web::View::Metadata::FormMeta;
715b9959b207 WebView: initial work on metadata providers
cin
parents:
diff changeset
2 use strict;
715b9959b207 WebView: initial work on metadata providers
cin
parents:
diff changeset
3
363
d67e45705be5 sync, model metadata
cin
parents: 362
diff changeset
4 use IMPL::Const qw(:prop);
362
715b9959b207 WebView: initial work on metadata providers
cin
parents:
diff changeset
5 use IMPL::declare {
364
82b6c967bcf1 sync, working on metadata
cin
parents: 363
diff changeset
6 require => {
82b6c967bcf1 sync, working on metadata
cin
parents: 363
diff changeset
7 Exception => 'IMPL::Exception',
82b6c967bcf1 sync, working on metadata
cin
parents: 363
diff changeset
8 ArgException => '-IMPL::InvalidArgumentException'
82b6c967bcf1 sync, working on metadata
cin
parents: 363
diff changeset
9 },
362
715b9959b207 WebView: initial work on metadata providers
cin
parents:
diff changeset
10 base => [
364
82b6c967bcf1 sync, working on metadata
cin
parents: 363
diff changeset
11 'IMPL::Web::View::Metadata::BaseMeta' => '@_'
362
715b9959b207 WebView: initial work on metadata providers
cin
parents:
diff changeset
12 ],
715b9959b207 WebView: initial work on metadata providers
cin
parents:
diff changeset
13 props => [
715b9959b207 WebView: initial work on metadata providers
cin
parents:
diff changeset
14 decl => PROP_RO,
715b9959b207 WebView: initial work on metadata providers
cin
parents:
diff changeset
15 schema => PROP_RO,
715b9959b207 WebView: initial work on metadata providers
cin
parents:
diff changeset
16 nodes => PROP_RO,
715b9959b207 WebView: initial work on metadata providers
cin
parents:
diff changeset
17 errors => PROP_RO
715b9959b207 WebView: initial work on metadata providers
cin
parents:
diff changeset
18 ]
715b9959b207 WebView: initial work on metadata providers
cin
parents:
diff changeset
19 };
715b9959b207 WebView: initial work on metadata providers
cin
parents:
diff changeset
20
364
82b6c967bcf1 sync, working on metadata
cin
parents: 363
diff changeset
21 sub CTOR {
82b6c967bcf1 sync, working on metadata
cin
parents: 363
diff changeset
22 my ($this,$provider,$model,$type,$args) = @_;
82b6c967bcf1 sync, working on metadata
cin
parents: 363
diff changeset
23
82b6c967bcf1 sync, working on metadata
cin
parents: 363
diff changeset
24 if ($args) {
82b6c967bcf1 sync, working on metadata
cin
parents: 363
diff changeset
25 $this->$_($args->{$_}) foreach grep $args->{$_}, qw(decl schema nodes errors);
82b6c967bcf1 sync, working on metadata
cin
parents: 363
diff changeset
26 }
82b6c967bcf1 sync, working on metadata
cin
parents: 363
diff changeset
27
82b6c967bcf1 sync, working on metadata
cin
parents: 363
diff changeset
28 $this->$_() || die ArgException->new($_ => "The $_ is required")
82b6c967bcf1 sync, working on metadata
cin
parents: 363
diff changeset
29 foreach qw(decl schema);
82b6c967bcf1 sync, working on metadata
cin
parents: 363
diff changeset
30 }
82b6c967bcf1 sync, working on metadata
cin
parents: 363
diff changeset
31
82b6c967bcf1 sync, working on metadata
cin
parents: 363
diff changeset
32 sub GetOwnErrors {
82b6c967bcf1 sync, working on metadata
cin
parents: 363
diff changeset
33
82b6c967bcf1 sync, working on metadata
cin
parents: 363
diff changeset
34 }
362
715b9959b207 WebView: initial work on metadata providers
cin
parents:
diff changeset
35
715b9959b207 WebView: initial work on metadata providers
cin
parents:
diff changeset
36
715b9959b207 WebView: initial work on metadata providers
cin
parents:
diff changeset
37 1;
715b9959b207 WebView: initial work on metadata providers
cin
parents:
diff changeset
38
715b9959b207 WebView: initial work on metadata providers
cin
parents:
diff changeset
39 __END__
715b9959b207 WebView: initial work on metadata providers
cin
parents:
diff changeset
40
715b9959b207 WebView: initial work on metadata providers
cin
parents:
diff changeset
41 =pod
715b9959b207 WebView: initial work on metadata providers
cin
parents:
diff changeset
42
715b9959b207 WebView: initial work on metadata providers
cin
parents:
diff changeset
43 =head1 NAME
715b9959b207 WebView: initial work on metadata providers
cin
parents:
diff changeset
44
715b9959b207 WebView: initial work on metadata providers
cin
parents:
diff changeset
45 =head1 SYNOPSIS
715b9959b207 WebView: initial work on metadata providers
cin
parents:
diff changeset
46
715b9959b207 WebView: initial work on metadata providers
cin
parents:
diff changeset
47 =head1 DESCRIPTION
715b9959b207 WebView: initial work on metadata providers
cin
parents:
diff changeset
48
715b9959b207 WebView: initial work on metadata providers
cin
parents:
diff changeset
49 Метаданные по модели, являющейся частью формы. Элемент формы описывается
715b9959b207 WebView: initial work on metadata providers
cin
parents:
diff changeset
50 несколькими компонентами:
715b9959b207 WebView: initial work on metadata providers
cin
parents:
diff changeset
51
715b9959b207 WebView: initial work on metadata providers
cin
parents:
diff changeset
52 =over
715b9959b207 WebView: initial work on metadata providers
cin
parents:
diff changeset
53
715b9959b207 WebView: initial work on metadata providers
cin
parents:
diff changeset
54 =item * schema
715b9959b207 WebView: initial work on metadata providers
cin
parents:
diff changeset
55
715b9959b207 WebView: initial work on metadata providers
cin
parents:
diff changeset
56 Схема текущего элемента, СomlexType, SimpleType, ComplexNode или SimpleNode
715b9959b207 WebView: initial work on metadata providers
cin
parents:
diff changeset
57
715b9959b207 WebView: initial work on metadata providers
cin
parents:
diff changeset
58 =item * decl
715b9959b207 WebView: initial work on metadata providers
cin
parents:
diff changeset
59
715b9959b207 WebView: initial work on metadata providers
cin
parents:
diff changeset
60 Сам элемент формы, который присутствует в родительском контейнере. Объявление
715b9959b207 WebView: initial work on metadata providers
cin
parents:
diff changeset
61 может совпадать со схемой в случае, когда это был SimpleNode или ComplexNode,
715b9959b207 WebView: initial work on metadata providers
cin
parents:
diff changeset
62 иначе это Node ссылающийся на заранее обпределенный тип.
715b9959b207 WebView: initial work on metadata providers
cin
parents:
diff changeset
63
715b9959b207 WebView: initial work on metadata providers
cin
parents:
diff changeset
64 =item * nodes
715b9959b207 WebView: initial work on metadata providers
cin
parents:
diff changeset
65
715b9959b207 WebView: initial work on metadata providers
cin
parents:
diff changeset
66 Список узлов документа, которые являются экземплярами текущего элемента, в
715b9959b207 WebView: initial work on metadata providers
cin
parents:
diff changeset
67 случае, если этот элемен не является множественным (maxOccur=1), тогда здесь
715b9959b207 WebView: initial work on metadata providers
cin
parents:
diff changeset
68 должен быть только один элемент.
715b9959b207 WebView: initial work on metadata providers
cin
parents:
diff changeset
69
715b9959b207 WebView: initial work on metadata providers
cin
parents:
diff changeset
70 =item * errors
715b9959b207 WebView: initial work on metadata providers
cin
parents:
diff changeset
71
715b9959b207 WebView: initial work on metadata providers
cin
parents:
diff changeset
72 Список ошибок относящихся к данному элементу.
715b9959b207 WebView: initial work on metadata providers
cin
parents:
diff changeset
73
715b9959b207 WebView: initial work on metadata providers
cin
parents:
diff changeset
74 =back
715b9959b207 WebView: initial work on metadata providers
cin
parents:
diff changeset
75
715b9959b207 WebView: initial work on metadata providers
cin
parents:
diff changeset
76 =cut