Source Code Cross Referenced for MoLazyRemotedValueTree.java in  » J2EE » WiSerFramework » de » ug2t » model » values » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » J2EE » WiSerFramework » de.ug2t.model.values 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        // @@
002:        // @@
003:        /*
004:         * Wi.Ser Framework
005:         *
006:         * Version: 1.8.1, 20-September-2007  
007:         * Copyright (C) 2005 Dirk von der Weiden <dvdw@imail.de>
008:         *
009:         * This library is free software; you can redistribute it and/or
010:         * modify it under the terms of the GNU Lesser General Public
011:         * License as published by the Free Software Foundation; either
012:         * version 2 of the License, or (at your option) any later version.
013:         *
014:         * This library is distributed in the hope that it will be useful,
015:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
016:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
017:         * Lesser General Public License for more details.
018:         *
019:         * You should have received a copy of the GNU Lesser General Public
020:         * License along with this library located in LGPL.txt in the 
021:         * license directory; if not, write to the 
022:         * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
023:         * Boston, MA  02111-1307, USA.
024:         * 
025:         * If this agreement does not cover your requirements, please contact us
026:         * via email to get detailed information about the commercial license 
027:         * or our service offerings!
028:         *
029:         */
030:        // @@
031:        package de.ug2t.model.values;
032:
033:        import java.util.*;
034:
035:        import de.ug2t.kernel.*;
036:        import de.ug2t.model.*;
037:        import de.ug2t.model.persistence.*;
038:        import de.ug2t.unifiedGui.*;
039:        import de.ug2t.unifiedGui.transformer.*;
040:        import de.ug2t.unifiedGui.validator.*;
041:
042:        /**
043:         * 
044:         * @author dvonderweiden
045:         * 
046:         * Created: 06:58:41, 2003 Comment: Kann auch mehrere Kindobjekte mit dem selben
047:         * schlüssel speichern, ist vom KeTreeNode abgeleitet ist daher kompatibel zu
048:         * allen Ui-elementen
049:         */
050:        public class MoLazyRemotedValueTree extends KeTreeNode implements 
051:                IMoValueContainer {
052:            protected IUnValidator pdm_validator = null;
053:            protected IUnTransformer pdm_transformer = null;
054:            protected Vector pdm_observers = null;
055:            protected UnComponent pdm_uiMap = null;
056:            protected IMoMappingErrorHandler pdm_uiErr = null;
057:            protected IMoReader pdm_reader = null;
058:            protected IMoWriter pdm_writer = null;
059:            protected String pdm_myTemplate = null;
060:            protected IMoValue pdm_myTemplateObj = null;
061:            private TreeMap pem_desc = null;
062:
063:            public MoChildDescriptor pcmf_getDesc(String xName) {
064:                if (pem_desc == null || xName == null)
065:                    return (null);
066:
067:                return ((MoChildDescriptor) this .pem_desc.get(xName));
068:            }
069:
070:            public MoChildDescriptor pcmf_addDesc(String xName,
071:                    MoChildDescriptor xDesc) {
072:                if (this .pem_desc == null)
073:                    this .pem_desc = new TreeMap();
074:
075:                return ((MoChildDescriptor) this .pem_desc.put(xName, xDesc));
076:            }
077:
078:            /**
079:             * @param xName
080:             * @param xParent
081:             * @throws Exception
082:             */
083:            public MoLazyRemotedValueTree(String xName, KeTreeNode xParent,
084:                    IUnValidator xVal, IUnTransformer xTr, Vector xObs,
085:                    UnComponent xUiMap, IMoMappingErrorHandler xUiErr)
086:                    throws Exception {
087:                super (xName, xParent);
088:                this .pcmf_setEarlyAutoDelete(true);
089:
090:                this .pdm_validator = xVal;
091:                this .pdm_transformer = xTr;
092:                this .pdm_observers = xObs;
093:                this .pdm_uiMap = xUiMap;
094:                this .pdm_uiErr = xUiErr;
095:
096:                if (xParent == null) {
097:                    this .pdm_myTemplate = null;
098:                    this .pdm_myTemplateObj = this ;
099:                } else {
100:                    this .pdm_myTemplate = xParent.pcmf_getName();
101:                    this .pdm_myTemplateObj = (IMoValueContainer) xParent;
102:                }
103:
104:                return;
105:            }
106:
107:            /**
108:             * @param xName
109:             * @param xParent
110:             * @throws Exception
111:             */
112:            public MoLazyRemotedValueTree(String xName, KeTreeNode xParent)
113:                    throws Exception {
114:                super (xName, xParent);
115:                this .pcmf_setEarlyAutoDelete(true);
116:
117:                if (xParent == null) {
118:                    this .pdm_myTemplate = null;
119:                    this .pdm_myTemplateObj = this ;
120:                } else {
121:                    this .pdm_myTemplate = xParent.pcmf_getName();
122:                    this .pdm_myTemplateObj = (IMoValueContainer) xParent;
123:                }
124:
125:                return;
126:            }
127:
128:            /**
129:             * 
130:             * @param xName
131:             * @param xParent
132:             * @throws Exception
133:             */
134:            public MoLazyRemotedValueTree() throws Exception {
135:                super ("", null);
136:                this .pcmf_setEarlyAutoDelete(true);
137:
138:                this .pdm_myTemplate = null;
139:                this .pdm_myTemplateObj = this ;
140:
141:                return;
142:            }
143:
144:            /**
145:             * <p>
146:             * ...
147:             * </p>
148:             * <p>
149:             * 
150:             * </p>
151:             */
152:            private void pemf_callObservers() {
153:                if (this .pdm_observers != null) {
154:                    Iterator l_it = this .pdm_observers.iterator();
155:                    while (l_it.hasNext())
156:                        ((IMoObserver) l_it.next()).pcmf_modelChanged(this );
157:                }
158:            }
159:
160:            /**
161:             * <p>
162:             * Does...
163:             * </p>
164:             * <p>
165:             * 
166:             * @return a Type with
167:             *         </p>
168:             *         <p>
169:             * @param
170:             *         </p>
171:             */
172:            public IUnValidator pcmf_setValidator(IUnValidator xValidator) {
173:                IUnValidator l_val = this .pdm_validator;
174:                this .pdm_validator = xValidator;
175:
176:                return (l_val);
177:            }
178:
179:            /**
180:             * <p>
181:             * Does...
182:             * </p>
183:             * <p>
184:             * 
185:             * @return a Type with
186:             *         </p>
187:             *         <p>
188:             * @param
189:             *         </p>
190:             */
191:            public UnComponent pcmf_setUiMap(UnComponent xMap) {
192:                UnComponent l_ui = this .pdm_uiMap;
193:                this .pdm_uiMap = xMap;
194:
195:                return (l_ui);
196:            }
197:
198:            /**
199:             * <p>
200:             * Does...
201:             * </p>
202:             * <p>
203:             * 
204:             * @return a Type with
205:             *         </p>
206:             *         <p>
207:             * @param
208:             *         </p>
209:             */
210:            public IMoObserver pcmf_addObserver(IMoObserver xObserv) {
211:                if (this .pdm_observers == null)
212:                    this .pdm_observers = new Vector();
213:
214:                this .pdm_observers.add(xObserv);
215:
216:                return (xObserv);
217:            }
218:
219:            /**
220:             * <p>
221:             * Does...
222:             * </p>
223:             * <p>
224:             * 
225:             * @return a Type with
226:             *         </p>
227:             *         <p>
228:             * @param
229:             *         </p>
230:             */
231:            public IMoObserver pcmf_removeObserver(IMoObserver xObs) {
232:                if (this .pdm_observers == null)
233:                    return (null);
234:
235:                return (this .pdm_observers.remove(xObs) ? xObs : null);
236:            }
237:
238:            /**
239:             * <p>
240:             * Does...
241:             * </p>
242:             * <p>
243:             * 
244:             * @return a Type with
245:             *         </p>
246:             *         <p>
247:             * @param
248:             *         </p>
249:             */
250:            public IMoMappingErrorHandler pcmf_setUiErrorGW(
251:                    IMoMappingErrorHandler xGw) {
252:                IMoMappingErrorHandler l_err = this .pdm_uiErr;
253:                this .pdm_uiErr = xGw;
254:
255:                return (l_err);
256:            }
257:
258:            /**
259:             * <p>
260:             * Does...
261:             * </p>
262:             * <p>
263:             * 
264:             * @return a Type with
265:             *         </p>
266:             *         <p>
267:             * @param
268:             *         </p>
269:             */
270:            public IMoValue pcmf_addValue(String xName, IMoValue xValue) {
271:                KeTreeNode l_node = null;
272:
273:                if (this .pdm_transformer != null)
274:                    if (xValue instanceof  IMoSingleValue) {
275:                        Object l_obj = null;
276:                        l_obj = this .pdm_transformer
277:                                .pcmf_transform(((IMoSingleValue) xValue)
278:                                        .pcmf_getValue());
279:                        ((IMoSingleValue) xValue).pcmf_setValue(l_obj);
280:                        ((IMoSingleValue) xValue).pcmf_setParent(this );
281:                    }
282:
283:                try {
284:                    if (xValue instanceof  MoLazyRemotedValueTree)
285:                        l_node = (MoLazyRemotedValueTree) xValue;
286:                    else {
287:                        if (xValue instanceof  IMoSingleValue)
288:                            ((IMoSingleValue) xValue).pcmf_setParent(this );
289:
290:                        l_node = new KeTreeNode(xName, null);
291:                        l_node.pcmf_setEarlyAutoDelete(true);
292:                        l_node.pcmf_setValue(xValue);
293:                    }
294:                } catch (Exception e) {
295:                    KeLog.pcmf_logException("ug2t", this , e);
296:                }
297:                ;
298:                l_node = this .pcmf_addNode(xName, l_node);
299:                this .pemf_callObservers();
300:
301:                if (l_node == null)
302:                    return (null);
303:                else
304:                    return (l_node instanceof  IMoValue ? (IMoValue) l_node
305:                            : (IMoValue) l_node.pcmf_getValue());
306:            }
307:
308:            /**
309:             * <p>
310:             * Does...
311:             * </p>
312:             * <p>
313:             * 
314:             * @return a Type with
315:             *         </p>
316:             *         <p>
317:             * @param
318:             *         </p>
319:             */
320:
321:            public IMoValue pcmf_getModelValue(String xName) {
322:                KeTreeNode l_node = null;
323:                l_node = (KeTreeNode) this .pcmf_getSubNode(xName);
324:                if (l_node == null)
325:                    return (null);
326:                if (l_node instanceof  MoLazyRemotedValueTree)
327:                    return ((MoLazyRemotedValueTree) l_node);
328:                else
329:                    return ((IMoValue) l_node.pcmf_getValue());
330:            }
331:
332:            /**
333:             * <p>
334:             * Does...
335:             * </p>
336:             * <p>
337:             * 
338:             * @return a Type with
339:             *         </p>
340:             *         <p>
341:             * @param
342:             *         </p>
343:             */
344:
345:            public IMoValue pcmf_removeValue(String xName) {
346:                KeTreeNode l_node = null;
347:                l_node = (KeTreeNode) this .pcmf_removeNode(xName);
348:                IMoValue l_ret = null;
349:
350:                if (l_node instanceof  MoLazyRemotedValueTree)
351:                    l_ret = (MoLazyRemotedValueTree) l_node;
352:                else
353:                    l_ret = (IMoValue) l_node.pcmf_getValue();
354:
355:                if (l_ret instanceof  IMoSingleValue)
356:                    ((IMoSingleValue) l_ret).pcmf_setParent(null);
357:
358:                this .pemf_callObservers();
359:
360:                return (l_ret);
361:            }
362:
363:            /**
364:             * <p>
365:             * Does...
366:             * </p>
367:             * <p>
368:             * 
369:             * @return a Type with
370:             *         </p>
371:             *         <p>
372:             * @param
373:             *         </p>
374:             */
375:
376:            public IMoValue pcmf_cloneModelValue(boolean xChilds, boolean xFull) {
377:                IMoValueContainer l_new = null;
378:                String l_name = null;
379:
380:                try {
381:                    l_new = new MoRemotedValueTree(this .pcmf_getName(), null,
382:                            this .pdm_validator, this .pdm_transformer,
383:                            this .pdm_observers, this .pdm_uiMap, this .pdm_uiErr);
384:                    l_new.pcmf_setMyTemplate(this .pcmf_getMyTemplate());
385:                    l_new.pcmf_setMyTemplateObj(this .pcmf_getMyTemplateObj());
386:                    ((MoRemotedValueTree) l_new)
387:                            .pcmf_setView(IKeViewable.ViewTools
388:                                    .pcmf_cloneViewToLocal(this , this 
389:                                            .pcmf_getView()));
390:
391:                    if (xChilds == true && xFull == false) {
392:                        Iterator l_itk = this .pcmf_getSubNameIterator();
393:                        Iterator l_itv = this .pcmf_getSubIterator();
394:                        IMoValue l_val = null;
395:                        Object l_sub = null;
396:
397:                        while (l_itk.hasNext()) {
398:                            l_name = (String) l_itk.next();
399:                            l_sub = l_itv.next();
400:                            MoChildDescriptor l_desc = this 
401:                                    .pcmf_getDesc(l_name);
402:                            if (l_desc != null) {
403:                                if (l_desc.pcmf_isManatory()) {
404:                                    if (l_sub instanceof  MoLazyRemotedValueTree)
405:                                        l_val = (IMoValue) l_sub;
406:                                    else
407:                                        l_val = (IMoValue) ((KeTreeNode) l_sub)
408:                                                .pcmf_getValue();
409:
410:                                    l_new.pcmf_addValue(l_name, l_val
411:                                            .pcmf_cloneModelValue(xChilds,
412:                                                    xFull));
413:                                }
414:                            }
415:                        }
416:                    } else if (xChilds == true && xFull == true) {
417:                        Iterator l_itk = this .pcmf_getSubNameIterator();
418:                        Iterator l_itv = this .pcmf_getSubIterator();
419:                        IMoValue l_val = null;
420:                        Object l_sub = null;
421:
422:                        while (l_itk.hasNext()) {
423:                            l_name = (String) l_itk.next();
424:                            l_sub = l_itv.next();
425:
426:                            if (l_sub instanceof  MoLazyRemotedValueTree)
427:                                l_val = (IMoValue) l_sub;
428:                            else
429:                                l_val = (IMoValue) ((KeTreeNode) l_sub)
430:                                        .pcmf_getValue();
431:
432:                            l_new.pcmf_addValue(l_name, l_val
433:                                    .pcmf_cloneModelValue(xChilds, xFull));
434:                        }
435:                    }
436:                } catch (Exception e) {
437:                    KeLog.pcmf_logException("ug2t", this , e);
438:                }
439:                ;
440:
441:                l_new.pcmf_setReader(this .pdm_reader);
442:                l_new.pcmf_setWriter(this .pdm_writer);
443:
444:                return (l_new);
445:            }
446:
447:            public IMoValue pcmf_cloneModelValue(boolean xChilds) {
448:                return (pcmf_cloneModelValue(xChilds, true));
449:            }
450:
451:            /**
452:             * <p>
453:             * Does...
454:             * </p>
455:             * <p>
456:             * 
457:             * @return a Type with
458:             *         </p>
459:             *         <p>
460:             * @param
461:             *         </p>
462:             */
463:
464:            public IMoValue pcmf_cloneLocalModelValue(boolean xChilds,
465:                    boolean xFull) {
466:                IMoValueContainer l_new = null;
467:                String l_name = null;
468:
469:                try {
470:                    l_new = new MoLazyRemotedValueTree(this .pcmf_getName(),
471:                            null, this .pdm_validator, this .pdm_transformer,
472:                            this .pdm_observers, this .pdm_uiMap, this .pdm_uiErr);
473:                    ((MoLazyRemotedValueTree) l_new)
474:                            .pcmf_setView(IKeViewable.ViewTools
475:                                    .pcmf_cloneViewToLocal(this , this 
476:                                            .pcmf_getView()));
477:
478:                    if (xChilds == true && xFull == false) {
479:                        Iterator l_itk = this .pcmf_getSubNameIterator();
480:                        Iterator l_itv = this .pcmf_getSubIterator();
481:                        IMoValue l_val = null;
482:                        Object l_sub = null;
483:
484:                        while (l_itk.hasNext()) {
485:                            l_name = (String) l_itk.next();
486:                            MoChildDescriptor l_desc = this 
487:                                    .pcmf_getDesc(l_name);
488:                            if (l_desc != null) {
489:                                if (l_desc.pcmf_isManatory()) {
490:                                    l_sub = l_itv.next();
491:                                    if (l_sub instanceof  MoLazyRemotedValueTree)
492:                                        l_val = (IMoValue) l_sub;
493:                                    else
494:                                        l_val = (IMoValue) ((KeTreeNode) l_sub)
495:                                                .pcmf_getValue();
496:
497:                                    l_new.pcmf_addValue(l_name, l_val
498:                                            .pcmf_cloneModelValue(xChilds,
499:                                                    xFull));
500:                                }
501:                            }
502:                        }
503:                    } else if (xChilds == true && xFull == true) {
504:                        Iterator l_itk = this .pcmf_getSubNameIterator();
505:                        Iterator l_itv = this .pcmf_getSubIterator();
506:                        IMoValue l_val = null;
507:                        Object l_sub = null;
508:
509:                        while (l_itk.hasNext()) {
510:                            l_name = (String) l_itk.next();
511:                            l_sub = l_itv.next();
512:
513:                            if (l_sub instanceof  MoLazyRemotedValueTree)
514:                                l_val = (IMoValue) l_sub;
515:                            else
516:                                l_val = (IMoValue) ((KeTreeNode) l_sub)
517:                                        .pcmf_getValue();
518:
519:                            l_new.pcmf_addValue(l_name, l_val
520:                                    .pcmf_cloneModelValue(xChilds, xFull));
521:                        }
522:                    }
523:                } catch (Exception e) {
524:                    KeLog.pcmf_logException("ug2t", this , e);
525:                }
526:                ;
527:
528:                l_new.pcmf_setReader(this .pdm_reader);
529:                l_new.pcmf_setWriter(this .pdm_writer);
530:
531:                return (l_new);
532:            };
533:
534:            /**
535:             * <p>
536:             * Does ...
537:             * </p>
538:             * <p>
539:             * 
540:             * 
541:             * @return a boolean with ...
542:             *         </p>
543:             */
544:            public boolean pcmf_model2UI() {
545:                boolean l_ret = true;
546:                Iterator l_it = this .pcmf_getSubValueIt();
547:                MoChildDescriptor l_desc = null;
548:                String l_name = null;
549:                boolean l_doMap = true;
550:                IMoValueContainer l_tpl = (IMoValueContainer) this 
551:                        .pcmf_getMyTemplateObj();
552:
553:                if (l_tpl == null)
554:                    l_tpl = this ;
555:
556:                while (l_it.hasNext()) {
557:                    IMoValue l_val = (IMoValue) l_it.next();
558:                    l_name = l_val.pcmf_getMyTemplate();
559:                    l_desc = l_tpl.pcmf_getDesc(l_name);
560:                    if (l_desc != null)
561:                        l_doMap = l_desc.isPem_mapWithParent2Ui();
562:
563:                    if (l_doMap)
564:                        l_ret = l_val.pcmf_model2UI();
565:                    else
566:                        l_doMap = true;
567:                }
568:                return (l_ret);
569:            } // end pcmf_model2UI
570:
571:            /**
572:             * <p>
573:             * Does ...
574:             * </p>
575:             * <p>
576:             * 
577:             * 
578:             * @return a boolean with ...
579:             *         </p>
580:             */
581:            public boolean pcmf_UI2Model() {
582:                boolean l_ret = true;
583:                Iterator l_it = this .pcmf_getSubValueIt();
584:                MoChildDescriptor l_desc = null;
585:                String l_name = null;
586:                boolean l_doMap = true;
587:                IMoValueContainer l_tpl = (IMoValueContainer) this 
588:                        .pcmf_getMyTemplateObj();
589:
590:                if (l_tpl == null)
591:                    l_tpl = this ;
592:
593:                while (l_it.hasNext()) {
594:                    IMoValue l_val = (IMoValue) l_it.next();
595:                    l_name = l_val.pcmf_getMyTemplate();
596:                    l_desc = l_tpl.pcmf_getDesc(l_name);
597:                    if (l_desc != null)
598:                        l_doMap = l_desc.isPem_mapWithParent2Ui();
599:
600:                    if (l_doMap)
601:                        l_ret = l_val.pcmf_UI2Model() ? l_ret : false;
602:                    else
603:                        l_doMap = true;
604:                }
605:                return (l_ret);
606:            } // end pcmf_UI2Model
607:
608:            /**
609:             * <p>
610:             * Does...
611:             * </p>
612:             * <p>
613:             * 
614:             * @return a Type with
615:             *         </p>
616:             *         <p>
617:             * @param
618:             *         </p>
619:             */
620:
621:            public boolean pcmf_validate() {
622:                boolean l_ret = true;
623:                Iterator l_it = this .pcmf_getSubValueIt();
624:                Vector l_error = new Vector();
625:
626:                while (l_it.hasNext()) {
627:                    IMoValue l_val = (IMoValue) l_it.next();
628:                    if (l_val.pcmf_validate() == false) {
629:                        l_ret = false;
630:                        l_error.add(l_val.pcmf_getUiMap());
631:                    }
632:                }
633:                ;
634:                if (l_ret == true && this .pdm_validator != null) {
635:                    l_ret = this .pdm_validator.pcmf_validate(this ) == null ? true
636:                            : false;
637:                    if (l_ret == false && this .pdm_uiMap != null)
638:                        l_error.add(this .pdm_uiMap);
639:                }
640:                ;
641:                if (l_ret == false && this .pdm_uiErr != null)
642:                    this .pdm_uiErr.pcmf_setUiElemets2Error(l_error);
643:
644:                if (l_ret == true)
645:                    this .pemf_callObservers();
646:
647:                return (l_ret);
648:            }
649:
650:            /**
651:             * <p>
652:             * Does...
653:             * </p>
654:             * <p>
655:             * 
656:             * @return a Type with
657:             *         </p>
658:             *         <p>
659:             * @param
660:             *         </p>
661:             */
662:            public boolean pcmf_read(IMoValue xTpl) {
663:                return (this .pdm_reader.pcmf_tplRead(xTpl, this ));
664:            }
665:
666:            /**
667:             * <p>
668:             * Does...
669:             * </p>
670:             * <p>
671:             * 
672:             * @return a Type with
673:             *         </p>
674:             *         <p>
675:             * @param
676:             *         </p>
677:             */
678:            public boolean pcmf_write() {
679:                return (this .pdm_writer.pcmf_writeModel(this ));
680:            }
681:
682:            /**
683:             * <p>
684:             * Does...
685:             * </p>
686:             * <p>
687:             * 
688:             * @return a Type with
689:             *         </p>
690:             *         <p>
691:             * @param
692:             *         </p>
693:             */
694:            public IMoReader pcmf_setReader(IMoReader xReader) {
695:                IMoReader l_pr = this .pdm_reader;
696:                this .pdm_reader = xReader;
697:
698:                return (l_pr);
699:            }
700:
701:            /**
702:             * <p>
703:             * Does...
704:             * </p>
705:             * <p>
706:             * 
707:             * @return a Type with
708:             *         </p>
709:             *         <p>
710:             * @param
711:             *         </p>
712:             */
713:            public IMoWriter pcmf_setWriter(IMoWriter xWriter) {
714:                IMoWriter l_pw = this .pdm_writer;
715:                this .pdm_writer = xWriter;
716:
717:                return (l_pw);
718:            }
719:
720:            /**
721:             * <p>
722:             * Does...
723:             * </p>
724:             * <p>
725:             * 
726:             * @return a Type with
727:             *         </p>
728:             *         <p>
729:             * @param
730:             *         </p>
731:             */
732:            public Iterator pcmf_getSubValueNameIt() {
733:                return (this .pcmf_getSubNameIterator());
734:            }
735:
736:            /**
737:             * <p>
738:             * Does ...
739:             * </p>
740:             * <p>
741:             * 
742:             * @param ...
743:             *          </p>
744:             *          <p>
745:             * @return ...
746:             *         </p>
747:             */
748:            public Iterator pcmf_getSubValueIt() {
749:                if (this .pdm_allSubs == null)
750:                    return (new ArrayList().iterator());
751:
752:                Iterator l_it = this .pdm_allSubs.iterator();
753:                ArrayList l_vect = new ArrayList(this .pdm_allSubs.size());
754:                Object l_value = null;
755:
756:                while (l_it.hasNext()) {
757:                    l_value = l_it.next();
758:                    if (l_value instanceof  MoLazyRemotedValueTree)
759:                        l_vect.add(l_value);
760:                    else
761:                        l_vect.add(((KeTreeNode) l_value).pcmf_getValue());
762:                }
763:
764:                return (l_vect.iterator());
765:            }
766:
767:            /**
768:             * <p>
769:             * Does ...
770:             * </p>
771:             * <p>
772:             * 
773:             * 
774:             * 
775:             * @return a IUnTransformer with ...
776:             *         </p>
777:             *         <p>
778:             * @param xTr
779:             *          ...
780:             *          </p>
781:             */
782:            public IUnTransformer pcmf_getTransformer() {
783:                return (this .pdm_transformer);
784:            }
785:
786:            /**
787:             * <p>
788:             * Does ...
789:             * </p>
790:             * <p>
791:             * 
792:             * 
793:             * 
794:             * @return a IUnTransformer with ...
795:             *         </p>
796:             *         <p>
797:             * @param xTr
798:             *          ...
799:             *          </p>
800:             */
801:            public IUnTransformer pcmf_setTransformer(IUnTransformer xTrans) {
802:                IUnTransformer l_trans = this .pdm_transformer;
803:                this .pdm_transformer = xTrans;
804:                return (l_trans);
805:            }
806:
807:            /**
808:             * <p>
809:             * Does ...
810:             * </p>
811:             * <p>
812:             * 
813:             * 
814:             * 
815:             * @return a Type with ...
816:             *         </p>
817:             *         <p>
818:             * @param ...
819:             *          </p>
820:             */
821:            public IMoMappingErrorHandler pcmf_getUiErrorGW() {
822:                return (this .pdm_uiErr);
823:            }
824:
825:            /**
826:             * <p>
827:             * Does ...
828:             * </p>
829:             * <p>
830:             * 
831:             * 
832:             * 
833:             * @return a UnComponent with ...
834:             *         </p>
835:             *         <p>
836:             * @param xMap
837:             *          ...
838:             *          </p>
839:             */
840:            public UnComponent pcmf_getUiMap() {
841:                return (this .pdm_uiMap);
842:            }
843:
844:            /**
845:             * <p>
846:             * Does...
847:             * </p>
848:             * <p>
849:             * 
850:             * @return a Type with
851:             *         </p>
852:             *         <p>
853:             * @param
854:             *         </p>
855:             */
856:            public IMoReader pcmf_getReader() {
857:                return (this .pdm_reader);
858:            }
859:
860:            /**
861:             * <p>
862:             * Does ...
863:             * </p>
864:             * <p>
865:             * 
866:             * 
867:             * 
868:             * @return a UnComponent with ...
869:             *         </p>
870:             *         <p>
871:             * @param xMap
872:             *          ...
873:             *          </p>
874:             */
875:            public Vector pcmf_getObservers() {
876:                return (this .pdm_observers);
877:            }
878:
879:            /**
880:             * <p>
881:             * Does...
882:             * </p>
883:             * <p>
884:             * 
885:             * @return a Type with
886:             *         </p>
887:             *         <p>
888:             * @param
889:             *         </p>
890:             */
891:            public IMoWriter pcmf_getWriter() {
892:                return (this .pdm_writer);
893:            }
894:
895:            /**
896:             * <p>
897:             * Does...
898:             * </p>
899:             * <p>
900:             * 
901:             * @return a Type with
902:             *         </p>
903:             *         <p>
904:             * @param
905:             *         </p>
906:             */
907:            public String pcmf_getMyTemplate() {
908:                return (this .pdm_myTemplate);
909:            }
910:
911:            /**
912:             * <p>
913:             * Does...
914:             * </p>
915:             * <p>
916:             * 
917:             * @return a Type with
918:             *         </p>
919:             *         <p>
920:             * @param
921:             *         </p>
922:             */
923:            public String pcmf_setMyTemplate(String xTpl) {
924:                String l_old = this .pdm_myTemplate;
925:                this .pdm_myTemplate = xTpl;
926:
927:                return (l_old);
928:            };
929:
930:            /**
931:             * <p>
932:             * Does ...
933:             * </p>
934:             * <p>
935:             * 
936:             * @param ...
937:             *          </p>
938:             *          <p>
939:             * @return ...
940:             *         </p>
941:             */
942:            public IMoValue pcmf_getNewModelValue(String xName, boolean xChilds) {
943:                IMoValue l_mod = null;
944:
945:                try {
946:                    IMoValue l_val = this .pcmf_getModelValue(xName);
947:                    if (l_val == null) {
948:                        KeLog.pcmf_log("ug2t",
949:                                "this model-value-type is not allowed: "
950:                                        + xName, this , KeLog.ERROR);
951:                        return (null);
952:                    }
953:                    l_mod = l_val.pcmf_cloneModelValue(xChilds, false);
954:                    l_mod.pcmf_setMyTemplate(xName);
955:                    l_mod.pcmf_setMyTemplateObj(l_val);
956:                } catch (Exception e) {
957:                    KeLog.pcmf_logException("ug2t", this , e);
958:                }
959:                ;
960:
961:                return (l_mod);
962:            }
963:
964:            public IMoValue pcmf_getMyTemplateObj() {
965:                return (this .pdm_myTemplateObj);
966:            }
967:
968:            public IMoValue pcmf_setMyTemplateObj(IMoValue xTpl) {
969:                IMoValue l_old = this .pdm_myTemplateObj;
970:                this .pdm_myTemplateObj = xTpl;
971:
972:                return (l_old);
973:            }
974:
975:            public IMoValueContainer pcmf_getValueContainer(String xName) {
976:                return ((IMoValueContainer) this .pcmf_getModelValue(xName));
977:            }
978:
979:            public IMoSingleValue pcmf_getSingleValue(String xName) {
980:                return ((IMoSingleValue) this .pcmf_getModelValue(xName));
981:            }
982:
983:            public IMoValueContainer pcmf_getParent() {
984:                return ((IMoValueContainer) this.pcmf_getParentNode());
985:            }
986:
987:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.