Diffstat (limited to 'frontend/gamma/js/Clipperz/PM/DataModel/DirectLogin.js') (more/less context) (show whitespace changes)
-rw-r--r-- | frontend/gamma/js/Clipperz/PM/DataModel/DirectLogin.js | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/frontend/gamma/js/Clipperz/PM/DataModel/DirectLogin.js b/frontend/gamma/js/Clipperz/PM/DataModel/DirectLogin.js index 1d38509..8f8696d 100644 --- a/frontend/gamma/js/Clipperz/PM/DataModel/DirectLogin.js +++ b/frontend/gamma/js/Clipperz/PM/DataModel/DirectLogin.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | Clipperz.Base.module('Clipperz.PM.DataModel'); | 26 | Clipperz.Base.module('Clipperz.PM.DataModel'); |
30 | 27 | ||
31 | Clipperz.PM.DataModel.DirectLogin = function(args) { | 28 | Clipperz.PM.DataModel.DirectLogin = function(args) { |
32 | args = args || {}; | 29 | args = args || {}; |
33 | 30 | ||
34 | Clipperz.PM.DataModel.DirectLogin.superclass.constructor.apply(this, arguments); | 31 | Clipperz.PM.DataModel.DirectLogin.superclass.constructor.apply(this, arguments); |
35 | 32 | ||
36 | this._reference =args.reference | 33 | this._reference =args.reference |
37 | ||Clipperz.PM.Crypto.randomKey(); | 34 | ||Clipperz.PM.Crypto.randomKey(); |
38 | this._record =args.record | 35 | this._record =args.record |
39 | ||Clipperz.Base.exception.raise('MandatoryParameter'); | 36 | ||Clipperz.Base.exception.raise('MandatoryParameter'); |
40 | 37 | ||
41 | this._retrieveIndexDataFunction = args.retrieveIndexDataFunction | 38 | this._retrieveIndexDataFunction = args.retrieveIndexDataFunction |
42 | ||this.record().retrieveDirectLoginIndexDataFunction() | 39 | ||this.record().retrieveDirectLoginIndexDataFunction() |
43 | ||Clipperz.Base.exception.raise('MandatoryParameter'); | 40 | ||Clipperz.Base.exception.raise('MandatoryParameter'); |
44 | this._setIndexDataFunction = args.setIndexDataFunction | 41 | this._setIndexDataFunction = args.setIndexDataFunction |
45 | ||this.record().setDirectLoginIndexDataFunction() | 42 | ||this.record().setDirectLoginIndexDataFunction() |
46 | ||Clipperz.Base.exception.raise('MandatoryParameter'); | 43 | ||Clipperz.Base.exception.raise('MandatoryParameter'); |
47 | this._removeIndexDataFunction =args.removeIndexDataFunction | 44 | this._removeIndexDataFunction =args.removeIndexDataFunction |
48 | ||this.record().removeDirectLoginIndexDataFunction() | 45 | ||this.record().removeDirectLoginIndexDataFunction() |
49 | ||Clipperz.Base.exception.raise('MandatoryParameter'); | 46 | ||Clipperz.Base.exception.raise('MandatoryParameter'); |
50 | 47 | ||
51 | this._inputs = null; | 48 | this._inputs = null; |
52 | this._bindings = null; | 49 | this._bindings = null; |
53 | this._formValues = null; | 50 | this._formValues = null; |
54 | 51 | ||
55 | // this._inputsDeferredLock = new MochiKit.Async.DeferredLock(); | 52 | // this._inputsDeferredLock = new MochiKit.Async.DeferredLock(); |
56 | // this._bindingsDeferredLock = new MochiKit.Async.DeferredLock(); | 53 | // this._bindingsDeferredLock = new MochiKit.Async.DeferredLock(); |
57 | // this._formValuesDeferredLock = new MochiKit.Async.DeferredLock(); | 54 | // this._formValuesDeferredLock = new MochiKit.Async.DeferredLock(); |
58 | 55 | ||
59 | this._transientState = null; | 56 | this._transientState = null; |
60 | 57 | ||
61 | this._isBrandNew = MochiKit.Base.isUndefinedOrNull(args.reference); | 58 | this._isBrandNew = MochiKit.Base.isUndefinedOrNull(args.reference); |
62 | 59 | ||
63 | this.record().addDirectLogin(this); | 60 | this.record().addDirectLogin(this); |
64 | 61 | ||
65 | return this; | 62 | return this; |
66 | } | 63 | } |
67 | 64 | ||
68 | Clipperz.Base.extend(Clipperz.PM.DataModel.DirectLogin, Object, { | 65 | Clipperz.Base.extend(Clipperz.PM.DataModel.DirectLogin, Object, { |
69 | 66 | ||
70 | 'toString': function() { | 67 | 'toString': function() { |
71 | return "DirectLogin (" + this.reference() + ")"; | 68 | return "DirectLogin (" + this.reference() + ")"; |
72 | }, | 69 | }, |
73 | 70 | ||
74 | //========================================================================= | 71 | //========================================================================= |
75 | 72 | ||
76 | 'reference': function () { | 73 | 'reference': function () { |
77 | return this._reference; | 74 | return this._reference; |
78 | }, | 75 | }, |
79 | 76 | ||
80 | //------------------------------------------------------------------------- | 77 | //------------------------------------------------------------------------- |
81 | 78 | ||
82 | 'record': function () { | 79 | 'record': function () { |
83 | return this._record; | 80 | return this._record; |
84 | }, | 81 | }, |
85 | 82 | ||
86 | //========================================================================= | 83 | //========================================================================= |
87 | 84 | ||
88 | 'isBrandNew': function () { | 85 | 'isBrandNew': function () { |
89 | return this._isBrandNew; | 86 | return this._isBrandNew; |
90 | }, | 87 | }, |
91 | 88 | ||
92 | //========================================================================= | 89 | //========================================================================= |
93 | 90 | ||
94 | 'removeIndexDataFunction': function () { | 91 | 'removeIndexDataFunction': function () { |
95 | return this._removeIndexDataFunction; | 92 | return this._removeIndexDataFunction; |
96 | }, | 93 | }, |
97 | 94 | ||
98 | 'remove': function () { | 95 | 'remove': function () { |
99 | return Clipperz.Async.callbacks("DirectLogin.remove", [ | 96 | return Clipperz.Async.callbacks("DirectLogin.remove", [ |
100 | MochiKit.Base.partial(this.removeIndexDataFunction(), this.reference()), | 97 | MochiKit.Base.partial(this.removeIndexDataFunction(), this.reference()), |
101 | MochiKit.Base.method(this.record(), 'removeDirectLogin', this) | 98 | MochiKit.Base.method(this.record(), 'removeDirectLogin', this) |
102 | ], {trace:false}); | 99 | ], {trace:false}); |
103 | }, | 100 | }, |
104 | 101 | ||
105 | //========================================================================= | 102 | //========================================================================= |
106 | /* | 103 | /* |
107 | 'inputsDeferredLock': function () { | 104 | 'inputsDeferredLock': function () { |
108 | return this._inputsDeferredLock; | 105 | return this._inputsDeferredLock; |
109 | }, | 106 | }, |
110 | 107 | ||
111 | 'bindingsDeferredLock': function () { | 108 | 'bindingsDeferredLock': function () { |
112 | return this._bindingsDeferredLock; | 109 | return this._bindingsDeferredLock; |
113 | }, | 110 | }, |
114 | 111 | ||
115 | 'formValuesDeferredLock': function () { | 112 | 'formValuesDeferredLock': function () { |
116 | return this._formValuesDeferredLock; | 113 | return this._formValuesDeferredLock; |
117 | }, | 114 | }, |
118 | */ | 115 | */ |
119 | //========================================================================= | 116 | //========================================================================= |
120 | 117 | ||