Your browser does not support JavaScript and this site utilizes JavaScript to build content and provide links to additional information. You should either enable JavaScript in your browser settings or use a browser that supports JavaScript in order to take full advantage of this site.
1 16 package org.directwebremoting.create; 17 18 import java.util.Map ; 19 20 import org.directwebremoting.extend.Creator; 21 import org.directwebremoting.util.LocalUtil; 22 import org.directwebremoting.util.Messages; 23 24 28 public abstract class AbstractCreator implements Creator 29 { 30 33 public void setProperties(Map params) throws IllegalArgumentException  34 { 35 } 37 38 41 public String getJavascript() 42 { 43 return javascript; 44 } 45 46 49 public void setJavascript(String javascript) 50 { 51 this.javascript = javascript; 52 } 53 54 57 public void setScope(String scope) 58 { 59 checkScope(scope); 60 this.scope = scope; 61 } 62 63 66 public String getScope() 67 { 68 return scope; 69 } 70 71 74 public boolean isCacheable() 75 { 76 return cacheable; 77 } 78 79 82 public void setCacheable(boolean cacheable) 83 { 84 this.cacheable = cacheable; 85 } 86 87 91 protected static void checkScope(String cscope) 92 { 93 if (!cscope.equals(SCRIPT) && !cscope.equals(PAGE) && !cscope.equals(REQUEST) && !cscope.equals(SESSION) && !cscope.equals(APPLICATION)) 94 { 95 throw new IllegalArgumentException (Messages.getString("AbstractCreator.IllegalScope", cscope)); 96 } 97 } 98 99 102 public String toString() 103 { 104 return LocalUtil.getShortClassName(getClass()) + "[" + getJavascript() + "]"; 105 } 106 107 110 private boolean cacheable = false; 111 112 115 private String javascript = null; 116 117 120 private String scope = PAGE; 121 } 122
| Popular Tags
|