ludc
2025-01-16 986aa62ed00bee39363bab41b4eeb8259d446efd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
package com.vci.server.portal.delegate;
 
import java.util.ArrayList;
import java.util.List;
 
import org.apache.commons.lang3.StringUtils;
 
import com.vci.server.portal.cache.UICacheNames;
import com.vci.server.portal.entity.PLActionEntity;
import com.vci.server.portal.service.PLActionEntityService;
import com.vci.server.portal.service.PLTypeActionEntityService;
import com.vci.server.portal.tools.ServerTool;
import com.vci.server.portal.tools.UICacheDataFetcher;
import com.vci.common.utility.ObjectUtility;
import com.vci.corba.common.VCIError;
import com.vci.corba.portal.data.Constraint;
import com.vci.corba.portal.data.PLAction;
import com.vci.corba.portal.data.PLActionCls;
import com.vci.corba.portal.data.PLActionParam;
import com.vci.corba.portal.data.PLCommandParameter;
import com.vci.corba.portal.data.PLPageDefination;
import com.vci.corba.portal.data.PLUILayout;
import com.vci.corba.portal.data.PLTabButton;
import com.vci.corba.portal.data.PLTabPage;
import com.vci.corba.portal.data.PortalVI;
 
public class PortalServiceServeCacheDelegate extends PortalServiceServerDelegate implements PortalServiceServerDelegateInterface{
    
    private PLActionEntityService plActionEntityService = null;
 
    private PLTypeActionEntityService plTypeActionEntityService = null;
    
    public PortalServiceServeCacheDelegate() {
 
        plActionEntityService = PLActionEntityService.getInstance();
 
        plTypeActionEntityService = PLTypeActionEntityService.getInstance();
    }
 
 
    @Override
    public PortalVI[] getPortalVIArrayByTypeName(String typeName)
            throws Throwable {
        return UICacheDataFetcher.getInstance().getPortalVIArrayByTypeName(typeName);
    }
    
    @Override
    public PortalVI[] getPagePortalVIArrayByTypeName(String typeName, long startPage, long endPage)
            throws Throwable {
        return UICacheDataFetcher.getInstance().getPagePortalVIArrayByTypeName(typeName, startPage, endPage);
    }
    
    @Override
    public PortalVI[] getPagePortalVIArrayByCondition(String typeName,
            short sheetType, String sheetName, long startPage, long endPage)
            throws Throwable {
        return UICacheDataFetcher.getInstance().getPagePortalVIArrayByCondition(typeName, sheetType, sheetName, startPage, endPage);
    }
    
    public int getPortalVICountByTypeName(String typeName) throws Throwable {
        return UICacheDataFetcher.getInstance().getPortalVICountByTypeName(typeName);
    }
    
 
    @Override
    public int getPortalVICountByCondition(String typeName, int sheetType,
            String sheetName) throws Throwable {
        return UICacheDataFetcher.getInstance().getPortalVICountByCondition(typeName, sheetType, sheetName);
    }
 
    @Override
    public PortalVI getPortalVIById(String id) throws Throwable {
        return UICacheDataFetcher.getInstance().getPortalVIById(id);
    }
 
    @Override
    public PortalVI getPortalVIBySymbol(String symbol) throws Throwable {
        return UICacheDataFetcher.getInstance().getPortalVIBySymbol(symbol);
    }
 
    @Override
    public boolean savePLAction(PLAction plAction) throws Throwable {
        boolean success =  super.savePLAction(plAction);
        
        if (success) {
            UICacheDataFetcher.getInstance().updateCacheObj(UICacheNames.ACTION);
        }
        return success;
    }
 
    @Override
    public boolean updatePLAction(PLAction plAction) throws Throwable {
        boolean success =  super.updatePLAction(plAction);
        
        if (success) {
            UICacheDataFetcher.getInstance().resetObjType(UICacheNames.ACTION);
        }
        return success;
    }
 
    @Override
    public boolean deletePLAction(PLAction plAction) throws Throwable {
        boolean success =  super.deletePLAction(plAction);
        
        if (success) {
            UICacheDataFetcher.getInstance().resetObjType(UICacheNames.ACTION);
        }
        return success;
    }
 
    @Override
    public boolean deletePLActionByID(String id) throws Throwable {
        boolean success =  super.deletePLActionByID(id);
        
        if (success) {
            UICacheDataFetcher.getInstance().resetObjType(UICacheNames.ACTION);
        }
        return success;
    }
 
    @Override
    public boolean savePLCommandParameter(PLCommandParameter plCommandParameter)
            throws Throwable {
        boolean success =  super.savePLCommandParameter(plCommandParameter);
        
        if (success) {
            UICacheDataFetcher.getInstance().resetObjType(UICacheNames.ACTIONPARAM);
        }
        return success;
    }
 
    @Override
    public boolean batchSavePLCommandParameter(
            PLCommandParameter[] plCommandParameters) throws Throwable {
        boolean success =  super.batchSavePLCommandParameter(plCommandParameters);
        
        if (success) {
            UICacheDataFetcher.getInstance().resetObjType(UICacheNames.ACTIONPARAM);
        }
        return success;
    }
 
    @Override
    public boolean updatePLCommandParameter(
            PLCommandParameter plCommandParameter) throws Throwable {
        boolean success =  super.updatePLCommandParameter(plCommandParameter);
        
        if (success) {
            UICacheDataFetcher.getInstance().resetObjType(UICacheNames.ACTIONPARAM);
        }
        return success;
    }
 
    @Override
    public boolean deletePLCommandParameter(
            PLCommandParameter plCommandParameter) throws Throwable {
        boolean success =  super.deletePLCommandParameter(plCommandParameter);
        
        if (success) {
            UICacheDataFetcher.getInstance().resetObjType(UICacheNames.ACTIONPARAM);
        }
        return success;
    }
 
    @Override
    public boolean deletePLCommandParameterByID(String id) throws Throwable {
        boolean success =  super.deletePLCommandParameterByID(id);
        
        if (success) {
            UICacheDataFetcher.getInstance().resetObjType(UICacheNames.ACTIONPARAM);
        }
        return success;
    }
 
    @Override
    public boolean deletePLCommandParameterByTabButtonId(String id)
            throws Throwable {
        boolean success =  super.deletePLCommandParameterByTabButtonId(id);
        
        if (success) {
            UICacheDataFetcher.getInstance().resetObjType(UICacheNames.ACTIONPARAM);
        }
        return success;
    }
 
    @Override
    public boolean savePLUILayout(
            PLUILayout plUILayout) throws Throwable {
        boolean success =  super.savePLUILayout(plUILayout);
        
        if (success) {
            UICacheDataFetcher.getInstance().resetObjType(UICacheNames.UICONTEXT);
        }
        return success;
    }
 
    @Override
    public boolean batchSavePLUILayout(
            PLUILayout[] plPageLayoutDefinations) throws Throwable {
        boolean success =  super.batchSavePLUILayout(plPageLayoutDefinations);
        
        if (success) {
            UICacheDataFetcher.getInstance().resetObjType(UICacheNames.UICONTEXT);
        }
        return success;
    }
 
    @Override
    public boolean updatePLUILayout(
            PLUILayout plUILayout) throws Throwable {
        boolean success =  super.updatePLUILayout(plUILayout);
        
        if (success) {
            UICacheDataFetcher.getInstance().resetObjType(UICacheNames.UICONTEXT);
        }
        return success;
    }
 
    @Override
    public boolean deletePLUILayout(
            PLUILayout plUILayout) throws Throwable {
        boolean success =  super.deletePLUILayout(plUILayout);
        
        if (success) {
            UICacheDataFetcher.getInstance().resetObjType(UICacheNames.UICONTEXT);
        }
        return success;
    }
 
    @Override
    public boolean deletePLUILayoutByID(String id) throws Throwable {
        boolean success =  super.deletePLUILayoutByID(id);
        
        if (success) {
            UICacheDataFetcher.getInstance().resetObjType(UICacheNames.UICONTEXT);
        }
        return success;
    }
 
    @Override
    public boolean savePLTabButton(PLTabButton plTabButton) throws Throwable {
        boolean success =  super.savePLTabButton(plTabButton);
        
        if (success) {
            UICacheDataFetcher.getInstance().resetObjType(UICacheNames.BUTTON);
        }
        return success;
    }
    
    /**
     * 保存按钮及参数
     */
    @Override
    public boolean savePLTabButtonAndParams(PLTabButton[] plTabButton,
            PLCommandParameter[] btnParams) throws Throwable{
        boolean success =  super.savePLTabButtonAndParams(plTabButton, btnParams);
        
        if (success) {
            UICacheDataFetcher.getInstance().resetObjType(UICacheNames.BUTTON);
            UICacheDataFetcher.getInstance().resetObjType(UICacheNames.BUTTONPARAM);
        }
        return success;
    }
    
    @Override
    public boolean batchSavePLTabButton(PLTabButton[] plTabButtons)
            throws Throwable {
        boolean success =  super.batchSavePLTabButton(plTabButtons);
        
        if (success) {
            UICacheDataFetcher.getInstance().resetObjType(UICacheNames.BUTTON);
        }
        return success;
    }
 
    @Override
    public boolean updatePLTabButton(PLTabButton plTabButton) throws Throwable {
        boolean success =  super.updatePLTabButton(plTabButton);
        
        if (success) {
            UICacheDataFetcher.getInstance().resetObjType(UICacheNames.BUTTON);
        }
        return success;
    }
 
    @Override
    public boolean deletePLTabButton(PLTabButton plTabButton) throws Throwable {
        boolean success =  super.deletePLTabButton(plTabButton);
        
        if (success) {
            UICacheDataFetcher.getInstance().resetObjType(UICacheNames.BUTTON);
        }
        return success;
    }
 
    @Override
    public boolean deletePLTabButtonByID(String id) throws Throwable {
        boolean success =  super.deletePLTabButtonByID(id);
        
        if (success) {
            UICacheDataFetcher.getInstance().resetObjType(UICacheNames.BUTTON);
        }
        return success;
    }
 
    @Override
    public boolean savePLTabPage(PLTabPage plTabPage) throws Throwable {
        boolean success =  super.savePLTabPage(plTabPage);
        
        if (success) {
            UICacheDataFetcher.getInstance().resetObjType(UICacheNames.TABPAGE);
        }
        return success;
    }
 
    @Override
    public boolean batchSavePLTabPage(PLTabPage[] plTabPages) throws Throwable {
        boolean success =  super.batchSavePLTabPage(plTabPages);
        
        if (success) {
            UICacheDataFetcher.getInstance().resetObjType(UICacheNames.TABPAGE);
        }
        return success;
    }
 
    @Override
    public boolean updatePLTabPage(PLTabPage plTabPage) throws Throwable {
        boolean success =  super.updatePLTabPage(plTabPage);
        
        if (success) {
            UICacheDataFetcher.getInstance().resetObjType(UICacheNames.TABPAGE);
        }
        return success;
    }
 
    @Override
    public boolean deletePLTabPage(PLTabPage plTabPage) throws Throwable {
        boolean success =  super.deletePLTabPage(plTabPage);
        
        if (success) {
            UICacheDataFetcher.getInstance().resetObjType(UICacheNames.TABPAGE);
        }
        return success;
    }
 
    @Override
    public boolean deletePLTabPageByID(String id) throws Throwable {
        boolean success =  super.deletePLTabPageByID(id);
        
        if (success) {
            UICacheDataFetcher.getInstance().resetObjType(UICacheNames.TABPAGE);
        }
        return success;
    }
 
    @Override
    public PLAction getPLActionById(String plOId) throws Throwable {
        return UICacheDataFetcher.getInstance().getPLActionById(plOId);
    }
 
    @Override
    public PLAction[] getAllPLAction() throws Throwable {
        return UICacheDataFetcher.getInstance().getActions();
    }
 
    @Override
    public PLCommandParameter getPLCommandParameterById(String plOId)
            throws Throwable {
        return UICacheDataFetcher.getInstance().getPLCommandParameterById(plOId);
    }
 
    @Override
    public PLCommandParameter[] getPLCommandParametersByCommandOId(
            String plCommandOId) throws Throwable {
        List<PLCommandParameter> list = UICacheDataFetcher.getInstance().getCommandParameters(plCommandOId);
        if (list != null) {
            return list.toArray(new PLCommandParameter[0]);
        } else {
            return new PLCommandParameter[0];
        }
    }
 
    @Override
    public PLUILayout getPLUILayoutById(String plOId)
            throws Throwable {
        return UICacheDataFetcher.getInstance().getPLUILayoutById(plOId);
    }
 
    @Override
    public PLUILayout[] getPLUILayoutEntity(
            String contentStr) throws Throwable {
        return UICacheDataFetcher.getInstance().getPLUILayoutEntity(contentStr);
    }
 
    @Override
    public PLUILayout[] getPLUILayoutsByRelatedType(
            String plRelatedType) throws Throwable {
        List<PLUILayout> list = UICacheDataFetcher.getInstance().getContext(plRelatedType);
        if (list != null) {
            return list.toArray(new PLUILayout[0]);
        } else {
            return new PLUILayout[0];
        }
    }
 
    @Override
    public PLUILayout[] getPLUILayoutEntity(
            String plRelatedType, String code) throws Throwable {
        List<PLUILayout> list = UICacheDataFetcher.getInstance().getContext(plRelatedType);
        if (list != null) {
            List<PLUILayout> clist = new ArrayList<PLUILayout>();
            for (PLUILayout context : list) {
                if (context.plCode.equals(code)) {
                    clist.add(context);
                    break;
                }
            }
            return clist.toArray(new PLUILayout[0]);
        } else {
            return new PLUILayout[0];
        }
    }
 
    @Override
    public PLTabPage getPLTabPageById(String plOId) throws Throwable {
        return UICacheDataFetcher.getInstance().getPLTabPageById(plOId);
    }
 
    @Override
    public PLTabPage[] getPLTabPagesByPageDefinationOId(
            String contextId) throws Throwable {
        List<PLTabPage> list = UICacheDataFetcher.getInstance().getTabs(contextId);
        if (list != null) {
            return list.toArray(new PLTabPage[0]);
        } else {
            return new PLTabPage[0];
        }
    }
 
    @Override
    public PLTabPage[] getTabPagesByContextIdAndType(String contextId, int type)
            throws Throwable {
        List<PLTabPage> list = UICacheDataFetcher.getInstance().getTabs(contextId);
        if (list != null) {
            List<PLTabPage> clist = new ArrayList<PLTabPage>();
            for (PLTabPage tab : list) {
                if (tab.plareatype == type) {
                    clist.add(tab);
                }
            }
            return clist.toArray(new PLTabPage[0]);
        } else {
            return new PLTabPage[0];
        }
    }
 
    @Override
    public PLTabButton getPLTabButtonById(String plOId) throws Throwable {
        return UICacheDataFetcher.getInstance().getPLTabButtonById(plOId);
    }
 
    @Override
    public PLTabButton[] getPLTabButtonsByTableOId(String plTableOId)
            throws Throwable {
        List<PLTabButton> list = UICacheDataFetcher.getInstance().getButtons(plTableOId);
        if (list != null) {
            return list.toArray(new PLTabButton[0]);
        } else {
            return new PLTabButton[0];
        }
    }
 
    @Override
    public boolean savePLPageDefination(PLPageDefination plPageDefination)
            throws Throwable {
        UICacheDataFetcher.getInstance().updateCacheObj(UICacheNames.PAGECOMPONENT, plPageDefination);
        return super.savePLPageDefination(plPageDefination);
    }
 
    @Override
    public boolean batchSavePLPageDefination(
            PLPageDefination[] plPageDefinations) throws Throwable {
        UICacheDataFetcher.getInstance().updateCacheObj(UICacheNames.PAGECOMPONENT, plPageDefinations);
        return super.batchSavePLPageDefination(plPageDefinations);
    }
 
    @Override
    public boolean updatePLPageDefination(PLPageDefination plPageDefination)
            throws Throwable {
        UICacheDataFetcher.getInstance().updateCacheObj(UICacheNames.PAGECOMPONENT, plPageDefination);
        return super.updatePLPageDefination(plPageDefination);
    }
 
    @Override
    public boolean deletePLPageDefination(PLPageDefination plPageDefination)
            throws Throwable {
        UICacheDataFetcher.getInstance().delCacheObj(UICacheNames.PAGECOMPONENT, plPageDefination);
        return super.deletePLPageDefination(plPageDefination);
    }
 
    @Override
    public boolean deletePLPageDefinationByID(String id) throws Throwable {
        UICacheDataFetcher.getInstance().delCacheObj(UICacheNames.PAGECOMPONENT, id);
        return super.deletePLPageDefinationByID(id);
    }
 
    @Override
    public PLPageDefination getPLPageDefinationById(String plOId)
            throws Throwable {
        return UICacheDataFetcher.getInstance().getPLPageDefinationById(plOId);
    }
 
    @Override
    public PLPageDefination[] getPLPageDefinationsByPageContextOId(
            String tabId) throws Throwable {
        List<PLPageDefination> list = UICacheDataFetcher.getInstance().getComopnent(tabId);
        if (list != null) {
            return list.toArray(new PLPageDefination[0]);
        } else {
            return new PLPageDefination[0];
        }
    }
 
    @Override
    public PLTabPage[] getPLTabPagesByTypeANDCode(String type, String code)
            throws Throwable {
        List<PLUILayout> contextList = UICacheDataFetcher.getInstance().getContext(type);
        if (contextList == null) {
            return new PLTabPage[0];
        }
        PLUILayout cContext = null;
        for (PLUILayout context : contextList) {
            if (context.plCode.equals(code)) {
                cContext = context;
                break;
            }
        }
        if (cContext == null) {
            return new PLTabPage[0];
        }
        return this.getPLTabPagesByPageDefinationOId(cContext.plOId);
    }
 
    @Override
    public PortalVI getPortalVIByTypeNameAndVIName(String typeName,
            String viName) throws Throwable {
        PortalVI[] vis = UICacheDataFetcher.getInstance().getPortalVIArrayByTypeName(typeName);
        if (vis == null) {
            return ServerTool.getDefaultPortalVI();
        }
        
        for (PortalVI vi : vis) {
            if (vi.viName.equals(viName) && vi.typeName.equals(typeName)) {
                return vi;
            }
        }
        
        return ServerTool.getDefaultPortalVI();
    }
 
    @Override
    public PLAction[] getPLActionsByConsArray(Constraint[] consArray)
            throws Throwable {
        List<PLActionEntity> list = plActionEntityService.getPLActionEntitysByConsMap(consArray);
        List<PLAction> list_ = new ArrayList<PLAction>();
        for(int i = 0; i < list.size(); i++){
            PLActionEntity obj = list.get(i);
            PLAction obj_ = ServerTool.getPLAction(obj);
            if(obj_ != null){
                list_.add(obj_);
            }
        }
        return list_.toArray(new PLAction[0]);
    }
 
    @Override
    public PLActionCls[] getPLActionClsArray() throws VCIError {
        return UICacheDataFetcher.getInstance().getActionCls();
    }
 
    @Override
    public String creaetePLActionCls(PLActionCls cls) {
        if (StringUtils.isBlank(cls.id))
            cls.id =ObjectUtility.getNewObjectID36();
        UICacheDataFetcher.getInstance().updateCacheObj(UICacheNames.ACTIONCLS, cls);
        return super.creaetePLActionCls(cls);
    }
 
    @Override
    public String editPLActionCls(PLActionCls cls) {
        UICacheDataFetcher.getInstance().updateCacheObj(UICacheNames.ACTIONCLS, cls);
        return super.editPLActionCls(cls);
    }
 
    @Override
    public String deletePLActionClsById(String id) {
        UICacheDataFetcher.getInstance().delCacheObj(UICacheNames.ACTIONCLS, id);
        return super.deletePLActionClsById(id);
    }
 
    @Override
    public PLActionParam[] getPLActionParamArrayByActionId(String actionId) throws VCIError {
        return UICacheDataFetcher.getInstance().getPLActionParamArrayByActionId(actionId);
    }
 
    @Override
    public String createPLActionParam(PLActionParam param) {
        UICacheDataFetcher.getInstance().updateCacheObj(UICacheNames.ACTIONPARAM, param);
        return super.createPLActionParam(param);
    }
 
    @Override
    public String createPLActionParamBatch(PLActionParam[] params) {
        UICacheDataFetcher.getInstance().updateCacheObj(UICacheNames.ACTIONPARAM, params);
        return super.createPLActionParamBatch(params);
    }
 
    @Override
    public String editPLActionParam(PLActionParam param) {
        UICacheDataFetcher.getInstance().updateCacheObj(UICacheNames.ACTIONPARAM, param);
        return super.editPLActionParam(param);
    }
 
    @Override
    public String deletePLActionParam(String id) {
        UICacheDataFetcher.getInstance().delCacheObj(UICacheNames.ACTIONPARAM, id);
        return super.deletePLActionParam(id);
    }
    
    @Override
    public boolean copyComptToTabPage(String[] comptOids, PLTabPage plTabPage)
            throws Throwable {
    
        boolean success = super.copyComptToTabPage(comptOids, plTabPage);
        if (success)
            UICacheDataFetcher.getInstance().resetObjType(UICacheNames.PAGECOMPONENT);
        return success;
    
    }
    @Override
    public boolean copyTabPageToPageLayout(String[] tabPageOids,
            PLUILayout plUILayout, short areaType) throws Throwable {
        boolean success = super.copyTabPageToPageLayout(tabPageOids, plUILayout, areaType);
        if (success)
            UICacheDataFetcher.getInstance().resetObjType(UICacheNames.TABPAGE);
        return success;
    }
 
//    @Override
//    public boolean savePLTypeActionEntity(PLTypeAction plTypeAction)
//            throws Throwable {
//        return plTypeActionEntityService.savePLTypeActionEntity(ServerTool.getPLTypeActionEntity(plTypeAction));
//    }
//
//    @Override
//    public boolean deletePLTypeActionEntityByTypeAndAction(String type,
//            String actionoId) throws Throwable {
//        return plTypeActionEntityService.deletePLTypeActionEntityByTypeAndAction(type, actionoId);
//    }
 
    @Override
    public PLAction[] getAllPLActionEntityByType(String type) throws Throwable {
        //TODO 后期确定是否需要更改为缓存模式
        List<PLActionEntity> list = plTypeActionEntityService.getAllPLActionEntityByType(type);
        List<PLAction> list_ = new ArrayList<PLAction>();
        for(int i = 0; i < list.size(); i++){
            PLActionEntity obj = list.get(i);
            PLAction obj_ = ServerTool.getPLAction(obj);
            if(obj_ != null){
                list_.add(obj_);
            }
        }
        return list_.toArray(new PLAction[0]);
    }
 
//    @Override
//    public boolean judgeUpdateButton(int type, String viName, String typeName)
//            throws Throwable {
//        boolean flag = false;
//        PLTabButtonEntityService service = PLTabButtonEntityService.getInstance();
//        flag=service.judgeUpdateButton(type, viName, typeName);
//        return flag;
//    }
//
//    @Override
//    public boolean judgeDeleteButton(String id, String typeName)
//            throws Throwable {
//        boolean flag = false;
//        PLTabButtonEntityService service = PLTabButtonEntityService.getInstance();
//        flag=service.judgeDeleteButton(id, typeName);
//        return flag;
//    }
 
    @Override
    public PLUILayout[] getAllPLUILayouts()
            throws Throwable {
        return UICacheDataFetcher.getInstance().getPageLayouts();
    }
 
    @Override
    public PLTabPage[] getAllPLTabPages() throws Throwable {
        return UICacheDataFetcher.getInstance().getTabPages();
    }
 
    @Override
    public PLPageDefination[] getAllPLPageDefinations() throws Throwable {
        return UICacheDataFetcher.getInstance().getPageDefinations();
    }
 
    @Override
    public PLTabButton[] getAllPLTabButtons() throws Throwable {
        return UICacheDataFetcher.getInstance().getButtons();
    }
 
    @Override
    public PLCommandParameter[] getAllPLCommandParameters() throws Throwable {
        return UICacheDataFetcher.getInstance().getCommandParams();
    }
 
    @Override
    public PortalVI[] getAllPortalVI() throws Throwable {
        return UICacheDataFetcher.getInstance().getPortalVis();
    }
 
    @Override
    public PLPageDefination[] getAllPLPageDefinationsWithNoConf()
            throws Throwable {
        return UICacheDataFetcher.getInstance().getPageDefinationNoConfs();
    }
 
    @Override
    public PortalVI[] getPortalVIBySymbolAndTypeName(String viName, String typeName)
            throws Throwable {
        PortalVI[] pvs =  UICacheDataFetcher.getInstance().getPortalVIArrayByTypeName(typeName);
        
        List<PortalVI> list = new ArrayList<PortalVI>();
        for (PortalVI pv : pvs) {
            if (pv.viName.indexOf(viName) >= 0) {
                list.add(pv);
            }
        }
        return list.toArray(new PortalVI[list.size()]);
    }
}