| 1 | |
package org.apache.turbine.services.rundata; |
| 2 | |
|
| 3 | |
|
| 4 | |
|
| 5 | |
|
| 6 | |
|
| 7 | |
|
| 8 | |
|
| 9 | |
|
| 10 | |
|
| 11 | |
|
| 12 | |
|
| 13 | |
|
| 14 | |
|
| 15 | |
|
| 16 | |
|
| 17 | |
|
| 18 | |
|
| 19 | |
|
| 20 | |
|
| 21 | |
|
| 22 | |
import java.io.IOException; |
| 23 | |
import java.io.PrintWriter; |
| 24 | |
import java.util.ArrayList; |
| 25 | |
import java.util.HashMap; |
| 26 | |
import java.util.List; |
| 27 | |
import java.util.Locale; |
| 28 | |
import java.util.Map; |
| 29 | |
|
| 30 | |
import javax.naming.Context; |
| 31 | |
import javax.servlet.ServletConfig; |
| 32 | |
import javax.servlet.ServletContext; |
| 33 | |
import javax.servlet.http.HttpServletRequest; |
| 34 | |
import javax.servlet.http.HttpServletResponse; |
| 35 | |
import javax.servlet.http.HttpSession; |
| 36 | |
|
| 37 | |
import org.apache.commons.lang.StringUtils; |
| 38 | |
import org.apache.commons.logging.Log; |
| 39 | |
import org.apache.commons.logging.LogFactory; |
| 40 | |
import org.apache.ecs.Document; |
| 41 | |
import org.apache.ecs.Element; |
| 42 | |
import org.apache.ecs.StringElement; |
| 43 | |
import org.apache.fulcrum.mimetype.MimeTypeService; |
| 44 | |
import org.apache.fulcrum.parser.CookieParser; |
| 45 | |
import org.apache.fulcrum.parser.ParameterParser; |
| 46 | |
import org.apache.fulcrum.pool.Recyclable; |
| 47 | |
import org.apache.fulcrum.security.acl.AccessControlList; |
| 48 | |
import org.apache.turbine.Turbine; |
| 49 | |
import org.apache.turbine.TurbineConstants; |
| 50 | |
import org.apache.turbine.om.security.User; |
| 51 | |
import org.apache.turbine.pipeline.DefaultPipelineData; |
| 52 | |
import org.apache.turbine.services.ServiceManager; |
| 53 | |
import org.apache.turbine.services.TurbineServices; |
| 54 | |
import org.apache.turbine.services.template.TurbineTemplate; |
| 55 | |
import org.apache.turbine.util.FormMessages; |
| 56 | |
import org.apache.turbine.util.ServerData; |
| 57 | |
import org.apache.turbine.util.SystemError; |
| 58 | |
import org.apache.turbine.util.template.TemplateInfo; |
| 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 | |
public class DefaultTurbineRunData |
| 84 | |
extends DefaultPipelineData |
| 85 | |
implements TurbineRunData, Recyclable |
| 86 | |
{ |
| 87 | |
|
| 88 | |
|
| 89 | |
|
| 90 | |
private boolean disposed; |
| 91 | |
|
| 92 | |
|
| 93 | 13 | private static Locale defaultLocale = null; |
| 94 | |
|
| 95 | |
|
| 96 | 13 | private static String defaultCharSet = null; |
| 97 | |
|
| 98 | |
|
| 99 | |
private boolean pageSet; |
| 100 | |
|
| 101 | |
|
| 102 | |
private Document page; |
| 103 | |
|
| 104 | |
|
| 105 | |
private String action; |
| 106 | |
|
| 107 | |
|
| 108 | |
private String layout; |
| 109 | |
|
| 110 | |
|
| 111 | |
private String screen; |
| 112 | |
|
| 113 | |
|
| 114 | |
private String templateEncoding; |
| 115 | |
|
| 116 | |
|
| 117 | |
private String title; |
| 118 | |
|
| 119 | |
|
| 120 | |
private boolean outSet; |
| 121 | |
|
| 122 | |
|
| 123 | |
|
| 124 | |
|
| 125 | |
|
| 126 | |
private PrintWriter out; |
| 127 | |
|
| 128 | |
|
| 129 | |
private String charSet; |
| 130 | |
|
| 131 | |
|
| 132 | 28 | private String contentType = "text/html"; |
| 133 | |
|
| 134 | |
|
| 135 | |
private String redirectURI; |
| 136 | |
|
| 137 | |
|
| 138 | 28 | private int statusCode = HttpServletResponse.SC_OK; |
| 139 | |
|
| 140 | |
|
| 141 | 28 | private final List<SystemError> errors = new ArrayList<SystemError>(); |
| 142 | |
|
| 143 | |
|
| 144 | |
private Map<String, Context> jndiContexts; |
| 145 | |
|
| 146 | |
|
| 147 | |
private String remoteAddr; |
| 148 | |
|
| 149 | |
|
| 150 | |
private String remoteHost; |
| 151 | |
|
| 152 | |
|
| 153 | |
private String userAgent; |
| 154 | |
|
| 155 | |
|
| 156 | |
private String stackTrace; |
| 157 | |
|
| 158 | |
|
| 159 | |
private Throwable stackTraceException; |
| 160 | |
|
| 161 | |
|
| 162 | |
|
| 163 | |
|
| 164 | |
|
| 165 | |
|
| 166 | 28 | private final Map<String, Object> debugVariables = new HashMap<String, Object>(); |
| 167 | |
|
| 168 | |
|
| 169 | 13 | private static Log log = LogFactory.getLog(DefaultTurbineRunData.class); |
| 170 | |
|
| 171 | |
|
| 172 | |
|
| 173 | |
|
| 174 | |
|
| 175 | |
|
| 176 | |
|
| 177 | |
|
| 178 | |
public static <T extends User> T getUserFromSession(HttpSession session) |
| 179 | |
{ |
| 180 | |
try |
| 181 | |
{ |
| 182 | |
@SuppressWarnings("unchecked") |
| 183 | 3 | T user = (T) session.getAttribute(User.SESSION_KEY); |
| 184 | 3 | return user; |
| 185 | |
} |
| 186 | 0 | catch (ClassCastException e) |
| 187 | |
{ |
| 188 | 0 | return null; |
| 189 | |
} |
| 190 | |
} |
| 191 | |
|
| 192 | |
|
| 193 | |
|
| 194 | |
|
| 195 | |
|
| 196 | |
|
| 197 | |
|
| 198 | |
public static boolean removeUserFromSession(HttpSession session) |
| 199 | |
{ |
| 200 | |
try |
| 201 | |
{ |
| 202 | 0 | session.removeAttribute(User.SESSION_KEY); |
| 203 | |
} |
| 204 | 0 | catch (Exception e) |
| 205 | |
{ |
| 206 | 0 | return false; |
| 207 | 0 | } |
| 208 | 0 | return true; |
| 209 | |
} |
| 210 | |
|
| 211 | |
|
| 212 | |
|
| 213 | |
|
| 214 | |
|
| 215 | |
|
| 216 | |
|
| 217 | |
|
| 218 | |
|
| 219 | |
|
| 220 | |
protected static Locale getDefaultLocale() |
| 221 | |
{ |
| 222 | 1 | if (defaultLocale == null) |
| 223 | |
{ |
| 224 | |
|
| 225 | 1 | String lang = Turbine.getConfiguration() |
| 226 | |
.getString(TurbineConstants.LOCALE_DEFAULT_LANGUAGE_KEY, |
| 227 | |
TurbineConstants.LOCALE_DEFAULT_LANGUAGE_DEFAULT); |
| 228 | |
|
| 229 | 1 | String country = Turbine.getConfiguration() |
| 230 | |
.getString(TurbineConstants.LOCALE_DEFAULT_COUNTRY_KEY, |
| 231 | |
TurbineConstants.LOCALE_DEFAULT_COUNTRY_DEFAULT); |
| 232 | |
|
| 233 | |
|
| 234 | |
|
| 235 | 1 | defaultLocale = new Locale(lang, country); |
| 236 | |
} |
| 237 | 1 | return defaultLocale; |
| 238 | |
} |
| 239 | |
|
| 240 | |
|
| 241 | |
|
| 242 | |
|
| 243 | |
|
| 244 | |
|
| 245 | |
|
| 246 | |
|
| 247 | |
protected String getDefaultCharSet() |
| 248 | |
{ |
| 249 | 7 | log.debug("getDefaultCharSet()"); |
| 250 | |
|
| 251 | 7 | if (defaultCharSet == null) |
| 252 | |
{ |
| 253 | |
|
| 254 | 2 | defaultCharSet = Turbine.getConfiguration() |
| 255 | |
.getString(TurbineConstants.LOCALE_DEFAULT_CHARSET_KEY, |
| 256 | |
TurbineConstants.LOCALE_DEFAULT_CHARSET_DEFAULT); |
| 257 | 2 | log.debug("defaultCharSet = " + defaultCharSet + " (From Properties)"); |
| 258 | |
} |
| 259 | |
|
| 260 | 7 | String charset = defaultCharSet; |
| 261 | |
|
| 262 | 7 | if (StringUtils.isEmpty(charset)) |
| 263 | |
{ |
| 264 | 1 | log.debug("charset is empty!"); |
| 265 | |
|
| 266 | 1 | Locale locale = getLocale(); |
| 267 | 1 | if (locale == null) |
| 268 | |
{ |
| 269 | 0 | locale = getDefaultLocale(); |
| 270 | 0 | log.debug("Locale was null, is now " + locale + " (from getDefaultLocale())"); |
| 271 | |
} |
| 272 | |
|
| 273 | 1 | log.debug("Locale is " + locale); |
| 274 | |
|
| 275 | 1 | if (!locale.equals(Locale.US)) |
| 276 | |
{ |
| 277 | 1 | log.debug("We don't have US Locale!"); |
| 278 | 1 | ServiceManager serviceManager = TurbineServices.getInstance(); |
| 279 | 1 | MimeTypeService mimeTypeService=null; |
| 280 | |
try { |
| 281 | 1 | mimeTypeService= (MimeTypeService)serviceManager.getService(MimeTypeService.ROLE); |
| 282 | |
} |
| 283 | 0 | catch (Exception e){ |
| 284 | 0 | throw new RuntimeException(e); |
| 285 | 1 | } |
| 286 | 1 | charset = mimeTypeService.getCharSet(locale); |
| 287 | |
|
| 288 | 1 | log.debug("Charset now " + charset); |
| 289 | |
} |
| 290 | |
} |
| 291 | |
|
| 292 | 7 | log.debug("Returning default Charset of " + charset); |
| 293 | 7 | return charset; |
| 294 | |
} |
| 295 | |
|
| 296 | |
|
| 297 | |
|
| 298 | |
|
| 299 | |
public DefaultTurbineRunData() |
| 300 | |
{ |
| 301 | 28 | super(); |
| 302 | |
|
| 303 | |
|
| 304 | 28 | put(Turbine.class, new HashMap<Class<?>, Object>()); |
| 305 | 28 | recycle(); |
| 306 | 28 | } |
| 307 | |
|
| 308 | |
|
| 309 | |
|
| 310 | |
|
| 311 | |
@Override |
| 312 | |
public void recycle() |
| 313 | |
{ |
| 314 | 28 | disposed = false; |
| 315 | 28 | } |
| 316 | |
|
| 317 | |
|
| 318 | |
|
| 319 | |
|
| 320 | |
@Override |
| 321 | |
public void dispose() |
| 322 | |
{ |
| 323 | |
|
| 324 | 1 | get(Turbine.class).clear(); |
| 325 | |
|
| 326 | 1 | pageSet = false; |
| 327 | 1 | page = null; |
| 328 | 1 | action = null; |
| 329 | 1 | layout = null; |
| 330 | 1 | screen = null; |
| 331 | 1 | templateEncoding = null; |
| 332 | 1 | title = null; |
| 333 | 1 | outSet = false; |
| 334 | 1 | out = null; |
| 335 | 1 | charSet = null; |
| 336 | 1 | contentType = "text/html"; |
| 337 | 1 | redirectURI = null; |
| 338 | 1 | statusCode = HttpServletResponse.SC_OK; |
| 339 | 1 | errors.clear(); |
| 340 | 1 | jndiContexts = null; |
| 341 | 1 | remoteAddr = null; |
| 342 | 1 | remoteHost = null; |
| 343 | 1 | userAgent = null; |
| 344 | 1 | stackTrace = null; |
| 345 | 1 | stackTraceException = null; |
| 346 | 1 | debugVariables.clear(); |
| 347 | 1 | } |
| 348 | |
|
| 349 | |
|
| 350 | |
|
| 351 | |
|
| 352 | |
|
| 353 | |
|
| 354 | |
|
| 355 | |
|
| 356 | |
|
| 357 | |
|
| 358 | |
@Override |
| 359 | |
public ParameterParser getParameters() |
| 360 | |
{ |
| 361 | |
|
| 362 | 37 | ParameterParser parameters = getParameterParser(); |
| 363 | 37 | HttpServletRequest request = getRequest(); |
| 364 | |
|
| 365 | 37 | if ((parameters != null) && |
| 366 | |
(parameters.getRequest() != request)) |
| 367 | |
{ |
| 368 | 14 | parameters.setRequest(request); |
| 369 | |
} |
| 370 | |
|
| 371 | 37 | return parameters; |
| 372 | |
} |
| 373 | |
|
| 374 | |
|
| 375 | |
|
| 376 | |
|
| 377 | |
|
| 378 | |
|
| 379 | |
@Override |
| 380 | |
public CookieParser getCookies() |
| 381 | |
{ |
| 382 | |
|
| 383 | 0 | CookieParser cookies = getCookieParser(); |
| 384 | 0 | HttpServletRequest request = getRequest(); |
| 385 | |
|
| 386 | 0 | if ((cookies != null) && |
| 387 | |
(cookies.getRequest() != request)) |
| 388 | |
{ |
| 389 | 0 | cookies.setData(request, getResponse()); |
| 390 | |
} |
| 391 | |
|
| 392 | 0 | return cookies; |
| 393 | |
} |
| 394 | |
|
| 395 | |
|
| 396 | |
|
| 397 | |
|
| 398 | |
|
| 399 | |
|
| 400 | |
@Override |
| 401 | |
public HttpServletRequest getRequest() |
| 402 | |
{ |
| 403 | 93 | return get(Turbine.class, HttpServletRequest.class); |
| 404 | |
} |
| 405 | |
|
| 406 | |
|
| 407 | |
|
| 408 | |
|
| 409 | |
|
| 410 | |
|
| 411 | |
@Override |
| 412 | |
public HttpServletResponse getResponse() |
| 413 | |
{ |
| 414 | 24 | return get(Turbine.class, HttpServletResponse.class); |
| 415 | |
} |
| 416 | |
|
| 417 | |
|
| 418 | |
|
| 419 | |
|
| 420 | |
|
| 421 | |
|
| 422 | |
@Override |
| 423 | |
public HttpSession getSession() |
| 424 | |
{ |
| 425 | 43 | return getRequest().getSession(); |
| 426 | |
} |
| 427 | |
|
| 428 | |
|
| 429 | |
|
| 430 | |
|
| 431 | |
|
| 432 | |
|
| 433 | |
@Override |
| 434 | |
public ServletConfig getServletConfig() |
| 435 | |
{ |
| 436 | 0 | return get(Turbine.class, ServletConfig.class); |
| 437 | |
} |
| 438 | |
|
| 439 | |
|
| 440 | |
|
| 441 | |
|
| 442 | |
|
| 443 | |
|
| 444 | |
@Override |
| 445 | |
public ServletContext getServletContext() |
| 446 | |
{ |
| 447 | 0 | return get(Turbine.class, ServletContext.class); |
| 448 | |
} |
| 449 | |
|
| 450 | |
|
| 451 | |
|
| 452 | |
|
| 453 | |
|
| 454 | |
|
| 455 | |
@Override |
| 456 | |
public <A extends AccessControlList> A getACL() |
| 457 | |
{ |
| 458 | |
@SuppressWarnings("unchecked") |
| 459 | 3 | A acl = (A)get(Turbine.class, AccessControlList.class); |
| 460 | 3 | return acl; |
| 461 | |
} |
| 462 | |
|
| 463 | |
|
| 464 | |
|
| 465 | |
|
| 466 | |
|
| 467 | |
|
| 468 | |
@Override |
| 469 | |
public void setACL(AccessControlList acl) |
| 470 | |
{ |
| 471 | 1 | get(Turbine.class).put(AccessControlList.class, acl); |
| 472 | 1 | } |
| 473 | |
|
| 474 | |
|
| 475 | |
|
| 476 | |
|
| 477 | |
|
| 478 | |
|
| 479 | |
|
| 480 | |
@Override |
| 481 | |
@Deprecated |
| 482 | |
public boolean isPageSet() |
| 483 | |
{ |
| 484 | 0 | return pageSet; |
| 485 | |
} |
| 486 | |
|
| 487 | |
|
| 488 | |
|
| 489 | |
|
| 490 | |
|
| 491 | |
|
| 492 | |
|
| 493 | |
@Override |
| 494 | |
@Deprecated |
| 495 | |
public Document getPage() |
| 496 | |
{ |
| 497 | 0 | pageSet = true; |
| 498 | 0 | if (this.page == null) |
| 499 | |
{ |
| 500 | 0 | this.page = new Document(); |
| 501 | |
} |
| 502 | 0 | return this.page; |
| 503 | |
} |
| 504 | |
|
| 505 | |
|
| 506 | |
|
| 507 | |
|
| 508 | |
|
| 509 | |
|
| 510 | |
@Override |
| 511 | |
public boolean hasAction() |
| 512 | |
{ |
| 513 | 25 | return (StringUtils.isNotEmpty(this.action) |
| 514 | |
&& !this.action.equalsIgnoreCase("null")); |
| 515 | |
} |
| 516 | |
|
| 517 | |
|
| 518 | |
|
| 519 | |
|
| 520 | |
|
| 521 | |
|
| 522 | |
|
| 523 | |
|
| 524 | |
@Override |
| 525 | |
public String getAction() |
| 526 | |
{ |
| 527 | 17 | return (hasAction() ? this.action : ""); |
| 528 | |
} |
| 529 | |
|
| 530 | |
|
| 531 | |
|
| 532 | |
|
| 533 | |
|
| 534 | |
|
| 535 | |
@Override |
| 536 | |
public void setAction(String action) |
| 537 | |
{ |
| 538 | 16 | this.action = action; |
| 539 | 16 | } |
| 540 | |
|
| 541 | |
|
| 542 | |
|
| 543 | |
|
| 544 | |
|
| 545 | |
|
| 546 | |
|
| 547 | |
|
| 548 | |
|
| 549 | |
|
| 550 | |
|
| 551 | |
|
| 552 | |
|
| 553 | |
|
| 554 | |
@Override |
| 555 | |
public String getLayout() |
| 556 | |
{ |
| 557 | 8 | if (this.layout == null) |
| 558 | |
{ |
| 559 | |
|
| 560 | |
|
| 561 | |
|
| 562 | |
|
| 563 | |
|
| 564 | 3 | layout = TurbineTemplate.getDefaultLayoutName(this); |
| 565 | |
|
| 566 | 3 | if (layout == null) |
| 567 | |
{ |
| 568 | 0 | layout = "DefaultLayout"; |
| 569 | |
} |
| 570 | |
} |
| 571 | |
|
| 572 | 8 | return this.layout; |
| 573 | |
} |
| 574 | |
|
| 575 | |
|
| 576 | |
|
| 577 | |
|
| 578 | |
|
| 579 | |
|
| 580 | |
@Override |
| 581 | |
public void setLayout(String layout) |
| 582 | |
{ |
| 583 | 2 | this.layout = layout; |
| 584 | 2 | } |
| 585 | |
|
| 586 | |
|
| 587 | |
|
| 588 | |
|
| 589 | |
|
| 590 | |
|
| 591 | |
|
| 592 | |
@Override |
| 593 | |
public String getLayoutTemplate() |
| 594 | |
{ |
| 595 | 0 | return getTemplateInfo().getLayoutTemplate(); |
| 596 | |
} |
| 597 | |
|
| 598 | |
|
| 599 | |
|
| 600 | |
|
| 601 | |
|
| 602 | |
|
| 603 | |
|
| 604 | |
|
| 605 | |
|
| 606 | |
|
| 607 | |
@Override |
| 608 | |
public void setLayoutTemplate(String layout) |
| 609 | |
{ |
| 610 | 0 | getTemplateInfo().setLayoutTemplate(layout); |
| 611 | 0 | } |
| 612 | |
|
| 613 | |
|
| 614 | |
|
| 615 | |
|
| 616 | |
|
| 617 | |
|
| 618 | |
@Override |
| 619 | |
public boolean hasScreen() |
| 620 | |
{ |
| 621 | 22 | return StringUtils.isNotEmpty(this.screen); |
| 622 | |
} |
| 623 | |
|
| 624 | |
|
| 625 | |
|
| 626 | |
|
| 627 | |
|
| 628 | |
|
| 629 | |
@Override |
| 630 | |
public String getScreen() |
| 631 | |
{ |
| 632 | 13 | return (hasScreen() ? this.screen : ""); |
| 633 | |
} |
| 634 | |
|
| 635 | |
|
| 636 | |
|
| 637 | |
|
| 638 | |
|
| 639 | |
|
| 640 | |
@Override |
| 641 | |
public void setScreen(String screen) |
| 642 | |
{ |
| 643 | 8 | this.screen = screen; |
| 644 | 8 | } |
| 645 | |
|
| 646 | |
|
| 647 | |
|
| 648 | |
|
| 649 | |
|
| 650 | |
|
| 651 | |
|
| 652 | |
@Override |
| 653 | |
public String getScreenTemplate() |
| 654 | |
{ |
| 655 | 0 | return getTemplateInfo().getScreenTemplate(); |
| 656 | |
} |
| 657 | |
|
| 658 | |
|
| 659 | |
|
| 660 | |
|
| 661 | |
|
| 662 | |
|
| 663 | |
|
| 664 | |
|
| 665 | |
|
| 666 | |
@Override |
| 667 | |
public void setScreenTemplate(String screen) |
| 668 | |
{ |
| 669 | 2 | getTemplateInfo().setScreenTemplate(screen); |
| 670 | 2 | } |
| 671 | |
|
| 672 | |
|
| 673 | |
|
| 674 | |
|
| 675 | |
|
| 676 | |
|
| 677 | |
@Override |
| 678 | |
public String getTemplateEncoding() |
| 679 | |
{ |
| 680 | 4 | return templateEncoding; |
| 681 | |
} |
| 682 | |
|
| 683 | |
|
| 684 | |
|
| 685 | |
|
| 686 | |
|
| 687 | |
|
| 688 | |
@Override |
| 689 | |
public void setTemplateEncoding(String encoding) |
| 690 | |
{ |
| 691 | 0 | templateEncoding = encoding; |
| 692 | 0 | } |
| 693 | |
|
| 694 | |
|
| 695 | |
|
| 696 | |
|
| 697 | |
|
| 698 | |
|
| 699 | |
@Override |
| 700 | |
public TemplateInfo getTemplateInfo() |
| 701 | |
{ |
| 702 | 66 | TemplateInfo templateInfo = get(Turbine.class, TemplateInfo.class); |
| 703 | |
|
| 704 | 66 | if (templateInfo == null) |
| 705 | |
{ |
| 706 | 12 | templateInfo = new TemplateInfo(this); |
| 707 | 12 | get(Turbine.class).put(TemplateInfo.class, templateInfo); |
| 708 | |
} |
| 709 | |
|
| 710 | 66 | return templateInfo; |
| 711 | |
} |
| 712 | |
|
| 713 | |
|
| 714 | |
|
| 715 | |
|
| 716 | |
|
| 717 | |
|
| 718 | |
@Override |
| 719 | |
public boolean hasMessage() |
| 720 | |
{ |
| 721 | 0 | StringElement message = get(Turbine.class, StringElement.class); |
| 722 | 0 | return (message != null) |
| 723 | |
&& StringUtils.isNotEmpty(message.toString()); |
| 724 | |
} |
| 725 | |
|
| 726 | |
|
| 727 | |
|
| 728 | |
|
| 729 | |
|
| 730 | |
|
| 731 | |
|
| 732 | |
@Override |
| 733 | |
public String getMessage() |
| 734 | |
{ |
| 735 | 0 | StringElement message = get(Turbine.class, StringElement.class); |
| 736 | 0 | return (message == null ? null : message.toString()); |
| 737 | |
} |
| 738 | |
|
| 739 | |
|
| 740 | |
|
| 741 | |
|
| 742 | |
|
| 743 | |
|
| 744 | |
@Override |
| 745 | |
public void setMessage(String msg) |
| 746 | |
{ |
| 747 | 0 | get(Turbine.class).put(StringElement.class, new StringElement(msg)); |
| 748 | 0 | } |
| 749 | |
|
| 750 | |
|
| 751 | |
|
| 752 | |
|
| 753 | |
|
| 754 | |
|
| 755 | |
|
| 756 | |
@Override |
| 757 | |
public void addMessage(String msg) |
| 758 | |
{ |
| 759 | 0 | addMessage(new StringElement(msg)); |
| 760 | 0 | } |
| 761 | |
|
| 762 | |
|
| 763 | |
|
| 764 | |
|
| 765 | |
|
| 766 | |
|
| 767 | |
|
| 768 | |
@Override |
| 769 | |
public StringElement getMessageAsHTML() |
| 770 | |
{ |
| 771 | 0 | return get(Turbine.class, StringElement.class); |
| 772 | |
} |
| 773 | |
|
| 774 | |
|
| 775 | |
|
| 776 | |
|
| 777 | |
|
| 778 | |
|
| 779 | |
@Override |
| 780 | |
public void setMessage(Element msg) |
| 781 | |
{ |
| 782 | 0 | get(Turbine.class).put(StringElement.class, new StringElement(msg)); |
| 783 | 0 | } |
| 784 | |
|
| 785 | |
|
| 786 | |
|
| 787 | |
|
| 788 | |
|
| 789 | |
|
| 790 | |
|
| 791 | |
@Override |
| 792 | |
public void addMessage(Element msg) |
| 793 | |
{ |
| 794 | 0 | if (msg != null) |
| 795 | |
{ |
| 796 | 0 | StringElement message = get(Turbine.class, StringElement.class); |
| 797 | |
|
| 798 | 0 | if (message != null) |
| 799 | |
{ |
| 800 | 0 | message.addElement(msg); |
| 801 | |
} |
| 802 | |
else |
| 803 | |
{ |
| 804 | 0 | setMessage(msg); |
| 805 | |
} |
| 806 | |
} |
| 807 | 0 | } |
| 808 | |
|
| 809 | |
|
| 810 | |
|
| 811 | |
|
| 812 | |
@Override |
| 813 | |
public void unsetMessage() |
| 814 | |
{ |
| 815 | 0 | get(Turbine.class).remove(StringElement.class); |
| 816 | 0 | } |
| 817 | |
|
| 818 | |
|
| 819 | |
|
| 820 | |
|
| 821 | |
|
| 822 | |
|
| 823 | |
|
| 824 | |
@Override |
| 825 | |
public FormMessages getMessages() |
| 826 | |
{ |
| 827 | 0 | FormMessages messages = get(Turbine.class, FormMessages.class); |
| 828 | 0 | if (messages == null) |
| 829 | |
{ |
| 830 | 0 | messages = new FormMessages(); |
| 831 | 0 | setMessages(messages); |
| 832 | |
} |
| 833 | |
|
| 834 | 0 | return messages; |
| 835 | |
} |
| 836 | |
|
| 837 | |
|
| 838 | |
|
| 839 | |
|
| 840 | |
|
| 841 | |
|
| 842 | |
@Override |
| 843 | |
public void setMessages(FormMessages msgs) |
| 844 | |
{ |
| 845 | 0 | get(Turbine.class).put(FormMessages.class, msgs); |
| 846 | 0 | } |
| 847 | |
|
| 848 | |
|
| 849 | |
|
| 850 | |
|
| 851 | |
|
| 852 | |
|
| 853 | |
@Override |
| 854 | |
public String getTitle() |
| 855 | |
{ |
| 856 | 0 | return (this.title == null ? "" : this.title); |
| 857 | |
} |
| 858 | |
|
| 859 | |
|
| 860 | |
|
| 861 | |
|
| 862 | |
|
| 863 | |
|
| 864 | |
@Override |
| 865 | |
public void setTitle(String title) |
| 866 | |
{ |
| 867 | 0 | this.title = title; |
| 868 | 0 | } |
| 869 | |
|
| 870 | |
|
| 871 | |
|
| 872 | |
|
| 873 | |
|
| 874 | |
|
| 875 | |
@Override |
| 876 | |
public boolean userExists() |
| 877 | |
{ |
| 878 | 0 | User user = getUserFromSession(); |
| 879 | |
|
| 880 | |
|
| 881 | 0 | get(Turbine.class).put(User.class, user); |
| 882 | |
|
| 883 | 0 | return (user != null); |
| 884 | |
} |
| 885 | |
|
| 886 | |
|
| 887 | |
|
| 888 | |
|
| 889 | |
|
| 890 | |
|
| 891 | |
@Override |
| 892 | |
public <T extends User> T getUser() |
| 893 | |
{ |
| 894 | |
@SuppressWarnings("unchecked") |
| 895 | 26 | T user = (T)get(Turbine.class, User.class); |
| 896 | 26 | return user; |
| 897 | |
} |
| 898 | |
|
| 899 | |
|
| 900 | |
|
| 901 | |
|
| 902 | |
|
| 903 | |
|
| 904 | |
@Override |
| 905 | |
public void setUser(User user) |
| 906 | |
{ |
| 907 | 6 | log.debug("user set: " + user.getName()); |
| 908 | 6 | get(Turbine.class).put(User.class, user); |
| 909 | 6 | } |
| 910 | |
|
| 911 | |
|
| 912 | |
|
| 913 | |
|
| 914 | |
|
| 915 | |
|
| 916 | |
|
| 917 | |
@Override |
| 918 | |
public <T extends User> T getUserFromSession() |
| 919 | |
{ |
| 920 | 3 | return getUserFromSession(getSession()); |
| 921 | |
} |
| 922 | |
|
| 923 | |
|
| 924 | |
|
| 925 | |
|
| 926 | |
|
| 927 | |
|
| 928 | |
@Override |
| 929 | |
public boolean removeUserFromSession() |
| 930 | |
{ |
| 931 | 0 | return removeUserFromSession(getSession()); |
| 932 | |
} |
| 933 | |
|
| 934 | |
|
| 935 | |
|
| 936 | |
|
| 937 | |
|
| 938 | |
|
| 939 | |
|
| 940 | |
@Override |
| 941 | |
@Deprecated |
| 942 | |
public boolean isOutSet() |
| 943 | |
{ |
| 944 | 0 | return outSet; |
| 945 | |
} |
| 946 | |
|
| 947 | |
|
| 948 | |
|
| 949 | |
|
| 950 | |
|
| 951 | |
|
| 952 | |
|
| 953 | |
|
| 954 | |
@Override |
| 955 | |
public PrintWriter getOut() |
| 956 | |
throws IOException |
| 957 | |
{ |
| 958 | |
|
| 959 | 0 | if (this.out == null) |
| 960 | |
{ |
| 961 | 0 | setOut(getResponse().getWriter()); |
| 962 | |
} |
| 963 | 0 | pageSet = false; |
| 964 | 0 | outSet = true; |
| 965 | 0 | return this.out; |
| 966 | |
} |
| 967 | |
|
| 968 | |
|
| 969 | |
|
| 970 | |
|
| 971 | |
|
| 972 | |
|
| 973 | |
|
| 974 | |
@Override |
| 975 | |
public void declareDirectResponse() |
| 976 | |
{ |
| 977 | 0 | outSet = true; |
| 978 | 0 | pageSet = false; |
| 979 | 0 | } |
| 980 | |
|
| 981 | |
|
| 982 | |
|
| 983 | |
|
| 984 | |
|
| 985 | |
|
| 986 | |
|
| 987 | |
|
| 988 | |
|
| 989 | |
|
| 990 | |
@Override |
| 991 | |
public Locale getLocale() |
| 992 | |
{ |
| 993 | 3 | Locale locale = get(Turbine.class, Locale.class); |
| 994 | 3 | if (locale == null) |
| 995 | |
{ |
| 996 | 1 | locale = getDefaultLocale(); |
| 997 | |
} |
| 998 | 3 | return locale; |
| 999 | |
} |
| 1000 | |
|
| 1001 | |
|
| 1002 | |
|
| 1003 | |
|
| 1004 | |
|
| 1005 | |
|
| 1006 | |
@Override |
| 1007 | |
public void setLocale(Locale locale) |
| 1008 | |
{ |
| 1009 | 27 | get(Turbine.class).put(Locale.class, locale); |
| 1010 | |
|
| 1011 | |
|
| 1012 | 27 | ParameterParser parameters = get(Turbine.class, ParameterParser.class); |
| 1013 | 27 | CookieParser cookies = get(Turbine.class, CookieParser.class); |
| 1014 | |
|
| 1015 | 27 | if (parameters != null) |
| 1016 | |
{ |
| 1017 | 27 | parameters.setLocale(locale); |
| 1018 | |
} |
| 1019 | |
|
| 1020 | 27 | if (cookies != null) |
| 1021 | |
{ |
| 1022 | 27 | cookies.setLocale(locale); |
| 1023 | |
} |
| 1024 | 27 | } |
| 1025 | |
|
| 1026 | |
|
| 1027 | |
|
| 1028 | |
|
| 1029 | |
|
| 1030 | |
|
| 1031 | |
|
| 1032 | |
|
| 1033 | |
|
| 1034 | |
|
| 1035 | |
@Override |
| 1036 | |
public String getCharSet() |
| 1037 | |
{ |
| 1038 | 4 | log.debug("getCharSet()"); |
| 1039 | |
|
| 1040 | 4 | if (StringUtils.isEmpty(charSet)) |
| 1041 | |
{ |
| 1042 | 4 | log.debug("Charset was null!"); |
| 1043 | 4 | return getDefaultCharSet(); |
| 1044 | |
} |
| 1045 | |
else |
| 1046 | |
{ |
| 1047 | 0 | return charSet; |
| 1048 | |
} |
| 1049 | |
} |
| 1050 | |
|
| 1051 | |
|
| 1052 | |
|
| 1053 | |
|
| 1054 | |
|
| 1055 | |
|
| 1056 | |
@Override |
| 1057 | |
public void setCharSet(String charSet) |
| 1058 | |
{ |
| 1059 | 0 | log.debug("setCharSet(" + charSet + ")"); |
| 1060 | 0 | this.charSet = charSet; |
| 1061 | 0 | } |
| 1062 | |
|
| 1063 | |
|
| 1064 | |
|
| 1065 | |
|
| 1066 | |
|
| 1067 | |
|
| 1068 | |
|
| 1069 | |
|
| 1070 | |
|
| 1071 | |
|
| 1072 | |
|
| 1073 | |
|
| 1074 | |
@Override |
| 1075 | |
public String getContentType() |
| 1076 | |
{ |
| 1077 | 2 | if (StringUtils.isNotEmpty(contentType)) |
| 1078 | |
{ |
| 1079 | 2 | if (StringUtils.isEmpty(charSet)) |
| 1080 | |
{ |
| 1081 | 2 | if (contentType.startsWith("text/")) |
| 1082 | |
{ |
| 1083 | 2 | return contentType + "; charset=" + getDefaultCharSet(); |
| 1084 | |
} |
| 1085 | |
|
| 1086 | 0 | return contentType; |
| 1087 | |
} |
| 1088 | |
else |
| 1089 | |
{ |
| 1090 | 0 | return contentType + "; charset=" + charSet; |
| 1091 | |
} |
| 1092 | |
} |
| 1093 | |
|
| 1094 | 0 | return ""; |
| 1095 | |
} |
| 1096 | |
|
| 1097 | |
|
| 1098 | |
|
| 1099 | |
|
| 1100 | |
|
| 1101 | |
|
| 1102 | |
@Override |
| 1103 | |
public void setContentType(String contentType) |
| 1104 | |
{ |
| 1105 | 0 | this.contentType = contentType; |
| 1106 | 0 | } |
| 1107 | |
|
| 1108 | |
|
| 1109 | |
|
| 1110 | |
|
| 1111 | |
|
| 1112 | |
|
| 1113 | |
|
| 1114 | |
@Override |
| 1115 | |
public String getRedirectURI() |
| 1116 | |
{ |
| 1117 | 4 | return (this.redirectURI == null ? "" : redirectURI); |
| 1118 | |
} |
| 1119 | |
|
| 1120 | |
|
| 1121 | |
|
| 1122 | |
|
| 1123 | |
|
| 1124 | |
|
| 1125 | |
|
| 1126 | |
@Override |
| 1127 | |
public void setRedirectURI(String ruri) |
| 1128 | |
{ |
| 1129 | 0 | this.redirectURI = ruri; |
| 1130 | 0 | } |
| 1131 | |
|
| 1132 | |
|
| 1133 | |
|
| 1134 | |
|
| 1135 | |
|
| 1136 | |
|
| 1137 | |
@Override |
| 1138 | |
public int getStatusCode() |
| 1139 | |
{ |
| 1140 | 0 | return statusCode; |
| 1141 | |
} |
| 1142 | |
|
| 1143 | |
|
| 1144 | |
|
| 1145 | |
|
| 1146 | |
|
| 1147 | |
|
| 1148 | |
@Override |
| 1149 | |
public void setStatusCode(int statusCode) |
| 1150 | |
{ |
| 1151 | 0 | this.statusCode = statusCode; |
| 1152 | 0 | } |
| 1153 | |
|
| 1154 | |
|
| 1155 | |
|
| 1156 | |
|
| 1157 | |
|
| 1158 | |
|
| 1159 | |
@Override |
| 1160 | |
public SystemError[] getSystemErrors() |
| 1161 | |
{ |
| 1162 | 0 | SystemError[] result = new SystemError[errors.size()]; |
| 1163 | 0 | errors.toArray(result); |
| 1164 | 0 | return result; |
| 1165 | |
} |
| 1166 | |
|
| 1167 | |
|
| 1168 | |
|
| 1169 | |
|
| 1170 | |
|
| 1171 | |
|
| 1172 | |
@Override |
| 1173 | |
public void setSystemError(SystemError err) |
| 1174 | |
{ |
| 1175 | 0 | this.errors.add(err); |
| 1176 | 0 | } |
| 1177 | |
|
| 1178 | |
|
| 1179 | |
|
| 1180 | |
|
| 1181 | |
|
| 1182 | |
|
| 1183 | |
@Override |
| 1184 | |
public Map<String, Context> getJNDIContexts() |
| 1185 | |
{ |
| 1186 | 0 | if (jndiContexts == null) |
| 1187 | |
{ |
| 1188 | 0 | jndiContexts = new HashMap<String, Context>(); |
| 1189 | |
} |
| 1190 | 0 | return jndiContexts; |
| 1191 | |
} |
| 1192 | |
|
| 1193 | |
|
| 1194 | |
|
| 1195 | |
|
| 1196 | |
|
| 1197 | |
|
| 1198 | |
@Override |
| 1199 | |
public void setJNDIContexts(Map<String, Context> contexts) |
| 1200 | |
{ |
| 1201 | 0 | this.jndiContexts = contexts; |
| 1202 | 0 | } |
| 1203 | |
|
| 1204 | |
|
| 1205 | |
|
| 1206 | |
|
| 1207 | |
|
| 1208 | |
|
| 1209 | |
@Override |
| 1210 | |
public String getServerScheme() |
| 1211 | |
{ |
| 1212 | 0 | return getServerData().getServerScheme(); |
| 1213 | |
} |
| 1214 | |
|
| 1215 | |
|
| 1216 | |
|
| 1217 | |
|
| 1218 | |
|
| 1219 | |
|
| 1220 | |
@Override |
| 1221 | |
public String getServerName() |
| 1222 | |
{ |
| 1223 | 0 | return getServerData().getServerName(); |
| 1224 | |
} |
| 1225 | |
|
| 1226 | |
|
| 1227 | |
|
| 1228 | |
|
| 1229 | |
|
| 1230 | |
|
| 1231 | |
@Override |
| 1232 | |
public int getServerPort() |
| 1233 | |
{ |
| 1234 | 0 | return getServerData().getServerPort(); |
| 1235 | |
} |
| 1236 | |
|
| 1237 | |
|
| 1238 | |
|
| 1239 | |
|
| 1240 | |
|
| 1241 | |
|
| 1242 | |
@Override |
| 1243 | |
public String getContextPath() |
| 1244 | |
{ |
| 1245 | 0 | return getServerData().getContextPath(); |
| 1246 | |
} |
| 1247 | |
|
| 1248 | |
|
| 1249 | |
|
| 1250 | |
|
| 1251 | |
|
| 1252 | |
|
| 1253 | |
@Override |
| 1254 | |
public String getScriptName() |
| 1255 | |
{ |
| 1256 | 0 | return getServerData().getScriptName(); |
| 1257 | |
} |
| 1258 | |
|
| 1259 | |
|
| 1260 | |
|
| 1261 | |
|
| 1262 | |
|
| 1263 | |
|
| 1264 | |
@Override |
| 1265 | |
public ServerData getServerData() |
| 1266 | |
{ |
| 1267 | 18 | return get(Turbine.class, ServerData.class); |
| 1268 | |
} |
| 1269 | |
|
| 1270 | |
|
| 1271 | |
|
| 1272 | |
|
| 1273 | |
|
| 1274 | |
|
| 1275 | |
@Override |
| 1276 | |
public String getRemoteAddr() |
| 1277 | |
{ |
| 1278 | 0 | if (this.remoteAddr == null) |
| 1279 | |
{ |
| 1280 | 0 | this.remoteAddr = this.getRequest().getRemoteAddr(); |
| 1281 | |
} |
| 1282 | |
|
| 1283 | 0 | return this.remoteAddr; |
| 1284 | |
} |
| 1285 | |
|
| 1286 | |
|
| 1287 | |
|
| 1288 | |
|
| 1289 | |
|
| 1290 | |
|
| 1291 | |
@Override |
| 1292 | |
public String getRemoteHost() |
| 1293 | |
{ |
| 1294 | 0 | if (this.remoteHost == null) |
| 1295 | |
{ |
| 1296 | 0 | this.remoteHost = this.getRequest().getRemoteHost(); |
| 1297 | |
} |
| 1298 | |
|
| 1299 | 0 | return this.remoteHost; |
| 1300 | |
} |
| 1301 | |
|
| 1302 | |
|
| 1303 | |
|
| 1304 | |
|
| 1305 | |
|
| 1306 | |
|
| 1307 | |
|
| 1308 | |
|
| 1309 | |
@Override |
| 1310 | |
public String getUserAgent() |
| 1311 | |
{ |
| 1312 | 0 | if (StringUtils.isEmpty(userAgent)) |
| 1313 | |
{ |
| 1314 | 0 | userAgent = this.getRequest().getHeader("User-Agent"); |
| 1315 | |
} |
| 1316 | |
|
| 1317 | 0 | return userAgent; |
| 1318 | |
} |
| 1319 | |
|
| 1320 | |
|
| 1321 | |
|
| 1322 | |
|
| 1323 | |
|
| 1324 | |
@Override |
| 1325 | |
public void populate() |
| 1326 | |
{ |
| 1327 | 3 | User user = getUserFromSession(); |
| 1328 | 3 | get(Turbine.class).put(User.class, user); |
| 1329 | |
|
| 1330 | 3 | if (user != null) |
| 1331 | |
{ |
| 1332 | 1 | user.setLastAccessDate(); |
| 1333 | 1 | user.incrementAccessCounter(); |
| 1334 | 1 | user.incrementAccessCounterForSession(); |
| 1335 | |
} |
| 1336 | 3 | } |
| 1337 | |
|
| 1338 | |
|
| 1339 | |
|
| 1340 | |
|
| 1341 | |
@Override |
| 1342 | |
public void save() |
| 1343 | |
{ |
| 1344 | 3 | getSession().setAttribute(User.SESSION_KEY, getUser()); |
| 1345 | 3 | } |
| 1346 | |
|
| 1347 | |
|
| 1348 | |
|
| 1349 | |
|
| 1350 | |
|
| 1351 | |
|
| 1352 | |
@Override |
| 1353 | |
public String getStackTrace() |
| 1354 | |
{ |
| 1355 | 2 | return stackTrace; |
| 1356 | |
} |
| 1357 | |
|
| 1358 | |
|
| 1359 | |
|
| 1360 | |
|
| 1361 | |
|
| 1362 | |
|
| 1363 | |
@Override |
| 1364 | |
public Throwable getStackTraceException() |
| 1365 | |
{ |
| 1366 | 1 | return stackTraceException; |
| 1367 | |
} |
| 1368 | |
|
| 1369 | |
|
| 1370 | |
|
| 1371 | |
|
| 1372 | |
|
| 1373 | |
|
| 1374 | |
|
| 1375 | |
@Override |
| 1376 | |
public void setStackTrace(String trace, Throwable exp) |
| 1377 | |
{ |
| 1378 | 1 | stackTrace = trace; |
| 1379 | 1 | stackTraceException = exp; |
| 1380 | 1 | } |
| 1381 | |
|
| 1382 | |
|
| 1383 | |
|
| 1384 | |
|
| 1385 | |
|
| 1386 | |
|
| 1387 | |
|
| 1388 | |
|
| 1389 | |
|
| 1390 | |
@Override |
| 1391 | |
public void setDebugVariable(String name, Object value) |
| 1392 | |
{ |
| 1393 | 0 | this.debugVariables.put(name, value); |
| 1394 | 0 | } |
| 1395 | |
|
| 1396 | |
|
| 1397 | |
|
| 1398 | |
|
| 1399 | |
|
| 1400 | |
|
| 1401 | |
@Override |
| 1402 | |
public Map<String, Object> getDebugVariables() |
| 1403 | |
{ |
| 1404 | 0 | return this.debugVariables; |
| 1405 | |
} |
| 1406 | |
|
| 1407 | |
|
| 1408 | |
|
| 1409 | |
|
| 1410 | |
|
| 1411 | |
|
| 1412 | |
|
| 1413 | |
|
| 1414 | |
|
| 1415 | |
|
| 1416 | |
|
| 1417 | |
|
| 1418 | |
|
| 1419 | |
|
| 1420 | |
|
| 1421 | |
@Override |
| 1422 | |
public ParameterParser getParameterParser() |
| 1423 | |
{ |
| 1424 | 38 | return get(Turbine.class, ParameterParser.class); |
| 1425 | |
} |
| 1426 | |
|
| 1427 | |
|
| 1428 | |
|
| 1429 | |
|
| 1430 | |
|
| 1431 | |
|
| 1432 | |
@Override |
| 1433 | |
public CookieParser getCookieParser() |
| 1434 | |
{ |
| 1435 | 1 | return get(Turbine.class, CookieParser.class); |
| 1436 | |
} |
| 1437 | |
|
| 1438 | |
|
| 1439 | |
|
| 1440 | |
|
| 1441 | |
|
| 1442 | |
|
| 1443 | |
|
| 1444 | |
|
| 1445 | |
|
| 1446 | |
|
| 1447 | |
|
| 1448 | |
@Deprecated |
| 1449 | |
protected void setOut(PrintWriter out) |
| 1450 | |
{ |
| 1451 | 0 | this.out = out; |
| 1452 | 0 | } |
| 1453 | |
|
| 1454 | |
|
| 1455 | |
|
| 1456 | |
|
| 1457 | |
|
| 1458 | |
|
| 1459 | |
protected void setServerScheme(String serverScheme) |
| 1460 | |
{ |
| 1461 | 0 | getServerData().setServerScheme(serverScheme); |
| 1462 | 0 | } |
| 1463 | |
|
| 1464 | |
|
| 1465 | |
|
| 1466 | |
|
| 1467 | |
|
| 1468 | |
|
| 1469 | |
protected void setServerName(String serverName) |
| 1470 | |
{ |
| 1471 | 0 | getServerData().setServerName(serverName); |
| 1472 | 0 | } |
| 1473 | |
|
| 1474 | |
|
| 1475 | |
|
| 1476 | |
|
| 1477 | |
|
| 1478 | |
|
| 1479 | |
protected void setServerPort(int port) |
| 1480 | |
{ |
| 1481 | 0 | getServerData().setServerPort(port); |
| 1482 | 0 | } |
| 1483 | |
|
| 1484 | |
|
| 1485 | |
|
| 1486 | |
|
| 1487 | |
|
| 1488 | |
|
| 1489 | |
protected void setContextPath(String contextPath) |
| 1490 | |
{ |
| 1491 | 0 | getServerData().setContextPath(contextPath); |
| 1492 | 0 | } |
| 1493 | |
|
| 1494 | |
|
| 1495 | |
|
| 1496 | |
|
| 1497 | |
|
| 1498 | |
|
| 1499 | |
protected void setScriptName(String scriptName) |
| 1500 | |
{ |
| 1501 | 0 | getServerData().setScriptName(scriptName); |
| 1502 | 0 | } |
| 1503 | |
|
| 1504 | |
|
| 1505 | |
|
| 1506 | |
|
| 1507 | |
|
| 1508 | |
|
| 1509 | |
@Override |
| 1510 | |
public boolean isDisposed() |
| 1511 | |
{ |
| 1512 | 0 | return disposed; |
| 1513 | |
} |
| 1514 | |
|
| 1515 | |
} |