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


java.lang.Object
   org.mmbase.framework.Framework

All known Subclasses:   org.mmbase.framework.basic.BasicFramework,
Framework
abstract public class Framework (Code)
A framework displays and processes components. The Framework as UrlConverter must never return null, iow, it should always know how to do this.
author:
   Johannes Verelst
author:
   Pierre van Rooden
version:
   $Id: Framework.java,v 1.47 2008/02/24 10:46:20 michiel Exp $
since:
   MMBase-1.9


Field Summary
final public static  StringCOMPONENT_CLASS_KEY
     CSS-class to be used on block.
final public static  StringCOMPONENT_ID_KEY
    
final public static  Parameter<Node>N
     A framework must be able to provide a node to the rendered blocks.
final public static  StringNAMESPACE
    
final public static  StringXSD
    
static  Frameworkframework
     Reference to the Framework singleton.


Method Summary
abstract public  ParameterscreateParameters()
     Return a Parameters object that needs to be passed on to the getUrl() call. Many components will be implemented as servlets, so will not work if the framework does not at least include Parameter.REQUEST and Parameter.RESPONSE .
abstract public  ParameterscreateSettingValueParameters()
    
abstract public  BlockgetBlock(Parameters frameworkParameters)
     Returns the block which is specified by framework parameters.
public static  FrameworkgetInstance()
    
abstract public  StringgetInternalUrl(String path, Map<String, Object> params, Parameters frameworkParameters)
     Generates an URL to a resource to be called and included by a renderer. Typically, this generates a URL to a jsp, called by a renderer such as the JspRenderer , who calls the resource using the RequestDispatcher. This method allows for frameworks to do some filtering on URLs (such as pretty URLs). You should generally not call this method unless you write a Renderer that depends on code or data from external resources.
Parameters:
  path - The page (e.g.
abstract public  StringgetName()
    
abstract public  Parameter[]getParameterDefinition()
    
abstract public  StringgetProcessUrl(String path, Map<String, Object> parameters, Parameters frameworkParameters, boolean escapeAmps)
    
abstract public  BlockgetRenderingBlock(Parameters frameworkParameters)
    
abstract public  CgetSettingValue(Setting<C> setting, Parameters parameters)
     Retrieves the value as configured by this framework for a certain Setting (which is always associated with a certain Component . The framework can (and should) return the default values of the Setting if it does not know what to do.
abstract public  StringgetUrl(String path, Map<String, Object> parameters, Parameters frameworkParameters, boolean escapeAmps)
     Return a (possibly modified) URL for a given path. This method is called (for example) from within the mm:url tag, and can be exposed to the outside world. I.e.
abstract public  StringgetUserBuilder()
     Return the builder name that is used to store users.
abstract public  NodegetUserNode(Parameters frameworkParameters)
     Return an MMBase Node for the user currently using the framework.
abstract public  voidprocess(Processor processor, Parameters blockParameters, Parameters frameworkParameters)
     Processes a block.
abstract public  voidrender(Renderer renderer, Parameters blockParameters, Parameters frameworkParameters, Writer w, Renderer.WindowState state)
     Render content (such as HTML or XML) using a Renderer obtained from a component's block. The framework decides on a (extra) class for the div which is to be rendered, which is put on the request as Framework.COMPONENT_CLASS_KEY .
Parameters:
  renderer - the Renderer used to produce the content.
abstract public  CsetSettingValue(Setting<C> setting, Parameters parameters, C value)
     See Framework.getSettingValue .

Field Detail
COMPONENT_CLASS_KEY
final public static String COMPONENT_CLASS_KEY(Code)
CSS-class to be used on block. T



COMPONENT_ID_KEY
final public static String COMPONENT_ID_KEY(Code)
CSS-id to be used on block



N
final public static Parameter<Node> N(Code)
A framework must be able to provide a node to the rendered blocks. This parameter could indicate _which_ node.



NAMESPACE
final public static String NAMESPACE(Code)



XSD
final public static String XSD(Code)



framework
static Framework framework(Code)
Reference to the Framework singleton.
since:
   MMBase-1.9





Method Detail
createParameters
abstract public Parameters createParameters()(Code)
Return a Parameters object that needs to be passed on to the getUrl() call. Many components will be implemented as servlets, so will not work if the framework does not at least include Parameter.REQUEST and Parameter.RESPONSE . So it is recommended that those parameters are supported by the framework. The MMBase taglib component tag will e.g. auto-fill those parameters. Other parameters can be added using 'mm:frameworkparameter' A framework may create a different or expanded list of parameters, but is responsible for filling them properly. If the framework does not use the MMBase taglib for rendering of components, it needs to provide it's own mechanism to fill the above parameters with default values (such as through a servlet or portlet).



createSettingValueParameters
abstract public Parameters createSettingValueParameters()(Code)

See Also:   Framework.getSettingValue(Setting,Parameters)
See Also:   Framework.setSettingValue(Setting,Parameters,Object)



getBlock
abstract public Block getBlock(Parameters frameworkParameters)(Code)
Returns the block which is specified by framework parameters.



getInstance
public static Framework getInstance()(Code)
Return the framework, or null if there is no framework defined in mmbaseroot.xml the framework



getInternalUrl
abstract public String getInternalUrl(String path, Map<String, Object> params, Parameters frameworkParameters) throws FrameworkException(Code)
Generates an URL to a resource to be called and included by a renderer. Typically, this generates a URL to a jsp, called by a renderer such as the JspRenderer , who calls the resource using the RequestDispatcher. This method allows for frameworks to do some filtering on URLs (such as pretty URLs). You should generally not call this method unless you write a Renderer that depends on code or data from external resources.
Parameters:
  path - The page (e.g. image/css) provided by the component to create an URL for
Parameters:
  params - Extra parameters for that path
Parameters:
  frameworkParameters - The parameters that are required by the framework, such as the'request' and 'cloud' objects A valid interal URL, or null if nothing framework specific could bedetermined (this would make it possible to 'chain' frameworks).



getName
abstract public String getName()(Code)
Return the name of the framework



getParameterDefinition
abstract public Parameter[] getParameterDefinition()(Code)



getProcessUrl
abstract public String getProcessUrl(String path, Map<String, Object> parameters, Parameters frameworkParameters, boolean escapeAmps) throws FrameworkException(Code)



getRenderingBlock
abstract public Block getRenderingBlock(Parameters frameworkParameters)(Code)



getSettingValue
abstract public C getSettingValue(Setting<C> setting, Parameters parameters)(Code)
Retrieves the value as configured by this framework for a certain Setting (which is always associated with a certain Component . The framework can (and should) return the default values of the Setting if it does not know what to do. It can also adminstrate overridden values, e.g. in its own configuration file. Using the 'parameters' (created with Framework.createSettingValueParameters , the Framework can also implement context specific values for a setting. It can e.g. use a request object, and store user specific value as cookies.



getUrl
abstract public String getUrl(String path, Map<String, Object> parameters, Parameters frameworkParameters, boolean escapeAmps) throws FrameworkException(Code)
Return a (possibly modified) URL for a given path. This method is called (for example) from within the mm:url tag, and can be exposed to the outside world. I.e. when within a components's head you use
<mm:url page="/css/style.css" />,
this method is called to determine the proper url (i.e., relative to the framework or component base). If you need treefile/leaffile type of functionality in your framework, you can implement that here in your code.
Parameters:
  path - The path (generally a relative URL) to create an URL for.
Parameters:
  parameters - Parameters The parameters to be passed to the page
Parameters:
  frameworkParameters - The parameters that are required by the framework
Parameters:
  escapeAmps - true if parameters should be added with an escaped & (&amp;).You should escape & when a URL is exposed (i.e. in HTML), but not if the url isfor some reason called directly. An URL relative to the root of this web application (i.e. withouth a context path),



getUserBuilder
abstract public String getUserBuilder()(Code)
Return the builder name that is used to store users. This will return the name of the nodemanager that returns the nodes from the getUserNode() method.
throws:
  UnsupportedOperationException -



getUserNode
abstract public Node getUserNode(Parameters frameworkParameters)(Code)
Return an MMBase Node for the user currently using the framework. It is recommended that this is implemented as is done in BasicFramework , so based on MMBase security only, and using a Parameter.CLOUD as a framework parameter. It can be implemented differently, if the framework chooses not to use MMBase security to distinguish between users.



process
abstract public void process(Processor processor, Parameters blockParameters, Parameters frameworkParameters) throws FrameworkException(Code)
Processes a block. This method can change or se state information and should be called prior to rendering a component's block. A process does not generate content.
Parameters:
  processor - the Processor used to produce the content. This parameter is obtained using Block.getProcessor
Parameters:
  blockParameters - The parameters specific for the call of this renderer's block.
Parameters:
  frameworkParameters - The parameters that are required by the framework, such as the 'request' and 'cloud' objects.
throws:
  FrameworkException - when the process failed to run



render
abstract public void render(Renderer renderer, Parameters blockParameters, Parameters frameworkParameters, Writer w, Renderer.WindowState state) throws FrameworkException(Code)
Render content (such as HTML or XML) using a Renderer obtained from a component's block. The framework decides on a (extra) class for the div which is to be rendered, which is put on the request as Framework.COMPONENT_CLASS_KEY .
Parameters:
  renderer - the Renderer used to produce the content. This parameter is obtained using Block.getRenderer
Parameters:
  blockParameters - The parameters specific for the call of this renderer's block
Parameters:
  frameworkParameters - The parameters that are required by the framework, such as the 'request' and 'cloud' objects
Parameters:
  w - The writer where the code generated by the renderer is to be written (such as the jspWriter)
Parameters:
  state - the window state in which the content should be rendered
throws:
  FrameworkException - when the renderer failed to create content or could not write data to the writer



setSettingValue
abstract public C setSettingValue(Setting<C> setting, Parameters parameters, C value) throws SecurityException(Code)
See Framework.getSettingValue . Depending on the framework, the set value may not necessarily be persistant.
throws:
  SecurityException - If you are not allowed to change the setting.



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.