KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > terracotta > dso > views > DistributedMethodsWrapper


1 /*
2  * All content copyright (c) 2003-2007 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
3  */

4 package org.terracotta.dso.views;
5
6 import com.terracottatech.config.DistributedMethods;
7 import com.terracottatech.config.DsoApplication;
8
9 public class DistributedMethodsWrapper {
10   private DsoApplication fApp;
11   
12   DistributedMethodsWrapper(DsoApplication dsoApp) {
13     fApp = dsoApp;
14   }
15   
16   int sizeOfMethodExpressionArray() {
17     DistributedMethods distributedMethods = fApp.getDistributedMethods();
18     return distributedMethods != null ? distributedMethods.sizeOfMethodExpressionArray() : 0;
19   }
20   
21   String JavaDoc getMethodExpressionArray(int i) {
22     DistributedMethods distributedMethods = fApp.getDistributedMethods();
23     return distributedMethods != null ? distributedMethods.getMethodExpressionArray(i).getStringValue() : null;
24   }
25   
26   void removeMethodExpression(int i) {
27     DistributedMethods distributedMethods = fApp.getDistributedMethods();
28     if(distributedMethods != null) {
29       distributedMethods.removeMethodExpression(i);
30     }
31     if(sizeOfMethodExpressionArray() == 0) {
32       fApp.unsetDistributedMethods();
33     }
34   }
35 }
36
Popular Tags