Java Doc for State.java in  » Database-ORM » MMBase » org » mmbase » framework » basic » 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 » Database ORM » MMBase » org.mmbase.framework.basic 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.mmbase.framework.basic.State

State
public class State (Code)
State is a wrapper arround HttpServletRequest which maintains the current state of framework component rendering.
author:
   Michiel Meeuwissen
version:
   $Id: State.java,v 1.4 2008/02/22 14:05:57 michiel Exp $
since:
   MMBase-1.9


Field Summary
final public static  StringKEY
    

Constructor Summary
public  State(ServletRequest r)
     Use this constructor, if you want to explicitely create a new State object.

Method Summary
public  voidend()
     At the end of the request (or subcomponent), this method must be called, to indicate that this state is no longer in use.
public  voidendBlock()
     After rendering (a certain renderer of) a block, the state must be informed about that.
protected  StringgenerateId(int c)
    
public  BlockgetBlock()
     The currently rendered block, or null if not rendering.
public  intgetDepth()
     With recursive includes of blocks, it may occur that the state is only for components inside a certain other component's block.
public  ParametersgetFrameworkParameters()
     Returns the parameters which were used to initialize rendering of the current block.
public  StringgetId()
     Returns the id of the current block, which uniquely identifies it on the current page (or http request).
public  ProcessorgetProcessor()
    
protected  RenderergetRenderer(Renderer r)
     Determins what should be rendered now.
public  RenderergetRenderer()
    
public  ServletRequestgetRequest()
    
public static  StategetState(ServletRequest request)
     Returns the framework 'State' object for the given request. a State.
public  StringgetUpcomingId()
     If rendering not yet started, this returns the id of a component which would begin now.
public  Renderer.WindowStategetWindowState()
     The current window state of rendering.
public  booleanisRendering()
     Whether something is rendered right now.
protected  voidlocalizeContext()
     Sets up a LocalizationContext attributes based on Component.getBundle and puts in on the request.
protected  booleanneedsProcess()
    
public  voidprocess(Processor proc)
    
public  voidrender(Renderer rend)
     Puts this state in 'render' mode.
public  voidsetAction(String a)
    
public  voidsetBlock(Map<String, Object> map, Block toBlock)
    
protected  voidsetType(Renderer.Type t)
    
public  RendererstartBlock(Parameters frameworkParameters, Renderer renderer)
    
public  StringtoString()
    

Field Detail
KEY
final public static String KEY(Code)




Constructor Detail
State
public State(ServletRequest r)(Code)
Use this constructor, if you want to explicitely create a new State object. E.g. when starting a subcomponent. state = getState(req); if (state.isRendering()) { state = new State(req); } But this is only used by code which want to initiate a new component itself. Normally State.getState(ServletRequest) should suffice.




Method Detail
end
public void end()(Code)
At the end of the request (or subcomponent), this method must be called, to indicate that this state is no longer in use.



endBlock
public void endBlock()(Code)
After rendering (a certain renderer of) a block, the state must be informed about that.



generateId
protected String generateId(int c)(Code)



getBlock
public Block getBlock()(Code)
The currently rendered block, or null if not rendering.



getDepth
public int getDepth()(Code)
With recursive includes of blocks, it may occur that the state is only for components inside a certain other component's block. In that case the depth > 0.



getFrameworkParameters
public Parameters getFrameworkParameters()(Code)
Returns the parameters which were used to initialize rendering of the current block. Or null if currently this state is not 'rendering'.



getId
public String getId()(Code)
Returns the id of the current block, which uniquely identifies it on the current page (or http request).



getProcessor
public Processor getProcessor()(Code)



getRenderer
protected Renderer getRenderer(Renderer r)(Code)
Determins what should be rendered now.
Parameters:
  block - a proposal



getRenderer
public Renderer getRenderer()(Code)



getRequest
public ServletRequest getRequest()(Code)



getState
public static State getState(ServletRequest request)(Code)
Returns the framework 'State' object for the given request. a State. Never null.



getUpcomingId
public String getUpcomingId()(Code)
If rendering not yet started, this returns the id of a component which would begin now.



getWindowState
public Renderer.WindowState getWindowState()(Code)
The current window state of rendering. As yet unimplemented.



isRendering
public boolean isRendering()(Code)
Whether something is rendered right now.



localizeContext
protected void localizeContext()(Code)
Sets up a LocalizationContext attributes based on Component.getBundle and puts in on the request. This is recognized by fmt:message-tag, which in a JspRenderer can therefore be used without fmt:bundle or fmt:setbundle.



needsProcess
protected boolean needsProcess()(Code)



process
public void process(Processor proc)(Code)
Puts this state in 'process' mode
throws:
  IllegalStateException - If the renderer for block block was already rendered.or when the belonging request was already 'ended'.



render
public void render(Renderer rend)(Code)
Puts this state in 'render' mode.



setAction
public void setAction(String a)(Code)



setBlock
public void setBlock(Map<String, Object> map, Block toBlock)(Code)



setType
protected void setType(Renderer.Type t)(Code)



startBlock
public Renderer startBlock(Parameters frameworkParameters, Renderer renderer)(Code)
Whether action must be performed.
throws:
  IllegalStateException - When renderers which should occur 'later' were already rendered,or when the belonging request was already 'ended'.



toString
public String toString()(Code)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.