Java Doc for ComponentDefinition.java in  » Web-Framework » struts-1.3.8 » org » apache » struts » tiles » 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 » Web Framework » struts 1.3.8 » org.apache.struts.tiles 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.struts.tiles.ComponentDefinition

All known Subclasses:   org.apache.struts.tiles.xmlDefinition.XmlDefinition,
ComponentDefinition
public class ComponentDefinition implements Serializable(Code)
Definition of a template / component attributes. Attributes of a component can be defined with the help of this class. An instance of this class can be used as a bean, and passed to 'insert' tag.


Field Summary
final public static  StringACTION
     Controller name type.
final public static  StringCONTROLLER
     Controller name type.
final public static  StringURL
     Controller name type.
protected  Mapattributes
     Attributes defined for the component.
protected  Stringcontroller
    
protected  StringcontrollerType
     Associated Controller typename, if controllerName defined.
protected static  Loglog
     Commons Logging instance.
protected  Stringname
    
protected  Stringpath
     Component / template path (URL).
protected  Stringrole
     Role associated to definition.

Constructor Summary
public  ComponentDefinition()
     Constructor.
public  ComponentDefinition(ComponentDefinition definition)
     Copy Constructor.
public  ComponentDefinition(XmlDefinition definition)
     Constructor. Create a new definition initialized from a RawDefinition. Raw definitions are used to read definition from a data source (xml file, db, ...). A RawDefinition mainly contains properties of type String, while Definition contains more complex type (ex : Controller). Do a shallow copy : attributes are shared between objects, but not the Map containing attributes. OO Design issues : Actually RawDefinition (XmlDefinition) extends ComponentDefinition. This must not be the case.
public  ComponentDefinition(String name, String path, Map attributes)
     Constructor.

Method Summary
public static  ControllercreateController(String name, String controllerType)
     Create a new instance of controller named in parameter. If controllerType is specified, create controller accordingly. Otherwise, if name denote a classname, create an instance of it.
public static  ControllercreateControllerFromClassname(String classname)
     Create a controller from specified classname
Parameters:
  classname - Controller classname.
public  ObjectgetAttribute(String key)
     Returns the value of the named attribute as an Object, or null if no attribute of the given name exists.
public  MapgetAttributes()
     Access method for the attributes property.
public  StringgetController()
     Get associated controller local URL.
public  ControllergetControllerInstance()
     Get controller instance.
public  StringgetControllerType()
     Get associated controller type.
public  StringgetName()
     Access method for the name property.
public  ControllergetOrCreateController()
     Get or create controller.
public  StringgetPage()
     Access method for the path property.
public  StringgetPath()
     Access method for the path property.
public  StringgetRole()
     Access method for the role property.
public  StringgetTemplate()
     Access method for the template property.
public  voidput(String name, Object content)
     Put an attribute in component / template definition.
public  voidput(String name, Object content, boolean direct)
     Put an attribute in template definition.
public  voidput(String name, Object content, boolean direct, String role)
     Put an attribute in template definition. Attribute can be used as content for tag get.
Parameters:
  name - Attribute name
Parameters:
  content - Attribute value
Parameters:
  direct - Determines how content is handled by get tag: true means content is printed directly; false, the default, means content is included
Parameters:
  role - Determine if content is used by get tag.
public  voidput(String name, Object content, String type, String role)
     Put an attribute in template definition. Attribute can be used as content for tag get.
Parameters:
  name - Attribute name
Parameters:
  content - Attribute value
Parameters:
  type - attribute type: template, string, definition
Parameters:
  role - Determine if content is used by get tag.
public  voidputAttribute(String key, Object value)
    
public  voidsetController(String url)
     Set associated controller URL.
public  voidsetControllerClass(String controller)
     Set associated controller name as a classtype, and controller type as "classname".
public  voidsetControllerInstance(Controller controller)
     Set controller.
public  voidsetControllerType(String controllerType)
     Set associated controller type.
public  voidsetControllerUrl(String controller)
     Set associated controller name as an url, and controller type as "url".
public  voidsetName(String aName)
     Sets the value of the name property.
public  voidsetPage(String page)
     Sets the value of the path property.
public  voidsetPath(String aPath)
     Sets the value of the path property.
public  voidsetRole(String role)
     Sets the value of the role property.
public  voidsetTemplate(String template)
     Sets the value of the template property.
public  StringtoString()
     Returns a description of the attributes.

Field Detail
ACTION
final public static String ACTION(Code)
Controller name type.



CONTROLLER
final public static String CONTROLLER(Code)
Controller name type.



URL
final public static String URL(Code)
Controller name type.



attributes
protected Map attributes(Code)
Attributes defined for the component.



controller
protected String controller(Code)
Associated Controller URL or classname, if defined



controllerType
protected String controllerType(Code)
Associated Controller typename, if controllerName defined. Can be CONTROLLER, ACTION or URL, or null.



log
protected static Log log(Code)
Commons Logging instance.



name
protected String name(Code)
Definition name



path
protected String path(Code)
Component / template path (URL).



role
protected String role(Code)
Role associated to definition.




Constructor Detail
ComponentDefinition
public ComponentDefinition()(Code)
Constructor.



ComponentDefinition
public ComponentDefinition(ComponentDefinition definition)(Code)
Copy Constructor. Create a new definition initialized with parent definition. Do a shallow copy : attributes are shared between copies, but not the Map containing attributes.



ComponentDefinition
public ComponentDefinition(XmlDefinition definition)(Code)
Constructor. Create a new definition initialized from a RawDefinition. Raw definitions are used to read definition from a data source (xml file, db, ...). A RawDefinition mainly contains properties of type String, while Definition contains more complex type (ex : Controller). Do a shallow copy : attributes are shared between objects, but not the Map containing attributes. OO Design issues : Actually RawDefinition (XmlDefinition) extends ComponentDefinition. This must not be the case. I have do it because I am lazy.
throws:
  InstantiationException - if an error occur while instanciating Controller :(classname can't be instanciated, Illegal access with instanciated class,Error while instanciating class, classname can't be instanciated.



ComponentDefinition
public ComponentDefinition(String name, String path, Map attributes)(Code)
Constructor.




Method Detail
createController
public static Controller createController(String name, String controllerType) throws InstantiationException(Code)
Create a new instance of controller named in parameter. If controllerType is specified, create controller accordingly. Otherwise, if name denote a classname, create an instance of it. If class is subclass of org.apache.struts.action.Action, wrap controller appropriately. Otherwise, consider name as an url.
Parameters:
  name - Controller name (classname, url, ...)
Parameters:
  controllerType - Expected Controller type org.apache.struts.tiles.Controller
throws:
  InstantiationException - if an error occur while instanciating Controller :(classname can't be instanciated, Illegal access with instanciated class,Error while instanciating class, classname can't be instanciated.



createControllerFromClassname
public static Controller createControllerFromClassname(String classname) throws InstantiationException(Code)
Create a controller from specified classname
Parameters:
  classname - Controller classname. org.apache.struts.tiles.Controller
throws:
  InstantiationException - if an error occur while instanciating Controller :(classname can't be instanciated, Illegal access with instanciated class,Error while instanciating class, classname can't be instanciated.



getAttribute
public Object getAttribute(String key)(Code)
Returns the value of the named attribute as an Object, or null if no attribute of the given name exists. requested attribute or null if not found



getAttributes
public Map getAttributes()(Code)
Access method for the attributes property. If there is no attributes, return an empty map. the current value of the attributes property



getController
public String getController()(Code)
Get associated controller local URL. URL should be local to webcontainer in order to allow request context followup. URL comes as a string.



getControllerInstance
public Controller getControllerInstance()(Code)
Get controller instance. controller instance.



getControllerType
public String getControllerType()(Code)
Get associated controller type. Type denote a fully qualified classname.



getName
public String getName()(Code)
Access method for the name property. the current value of the name property



getOrCreateController
public Controller getOrCreateController() throws InstantiationException(Code)
Get or create controller. Get controller, create it if necessary. controller if controller or controllerType is set, null otherwise.
throws:
  InstantiationException - if an error occur while instanciating Controller :(classname can't be instanciated, Illegal access with instanciated class,Error while instanciating class, classname can't be instanciated.



getPage
public String getPage()(Code)
Access method for the path property. The current value of the path property.



getPath
public String getPath()(Code)
Access method for the path property. the current value of the path property



getRole
public String getRole()(Code)
Access method for the role property. the current value of the role property



getTemplate
public String getTemplate()(Code)
Access method for the template property. Same as getPath() the current value of the template property



put
public void put(String name, Object content)(Code)
Put an attribute in component / template definition. Attribute can be used as content for tag get.
Parameters:
  name - Attribute name
Parameters:
  content - Attribute value



put
public void put(String name, Object content, boolean direct)(Code)
Put an attribute in template definition. Attribute can be used as content for tag get.
Parameters:
  name - Attribute name
Parameters:
  content - Attribute value �
Parameters:
  direct - Determines how content is handled by get tag: true means content is printed directly; false, the default, means content is included



put
public void put(String name, Object content, boolean direct, String role)(Code)
Put an attribute in template definition. Attribute can be used as content for tag get.
Parameters:
  name - Attribute name
Parameters:
  content - Attribute value
Parameters:
  direct - Determines how content is handled by get tag: true means content is printed directly; false, the default, means content is included
Parameters:
  role - Determine if content is used by get tag. If user is in role, content is used.



put
public void put(String name, Object content, String type, String role)(Code)
Put an attribute in template definition. Attribute can be used as content for tag get.
Parameters:
  name - Attribute name
Parameters:
  content - Attribute value
Parameters:
  type - attribute type: template, string, definition
Parameters:
  role - Determine if content is used by get tag. If user is in role, content is used.



putAttribute
public void putAttribute(String key, Object value)(Code)
Put a new attribute in this component
Parameters:
  key - String key for attribute
Parameters:
  value - Attibute value.



setController
public void setController(String url)(Code)
Set associated controller URL. URL should be local to webcontainer in order to allow request context followup. URL is specified as a string.
Parameters:
  url - Url called locally



setControllerClass
public void setControllerClass(String controller)(Code)
Set associated controller name as a classtype, and controller type as "classname". Name denote a fully qualified classname Convenience method.
Parameters:
  controller - Controller classname.



setControllerInstance
public void setControllerInstance(Controller controller)(Code)
Set controller.



setControllerType
public void setControllerType(String controllerType)(Code)
Set associated controller type. Type denote a fully qualified classname.
Parameters:
  controllerType - Typeof associated controller



setControllerUrl
public void setControllerUrl(String controller)(Code)
Set associated controller name as an url, and controller type as "url". Name must be an url (not checked). Convenience method.
Parameters:
  controller - Controller url



setName
public void setName(String aName)(Code)
Sets the value of the name property.
Parameters:
  aName - the new value of the name property



setPage
public void setPage(String page)(Code)
Sets the value of the path property.
Parameters:
  page - the new value of the path property



setPath
public void setPath(String aPath)(Code)
Sets the value of the path property.
Parameters:
  aPath - the new value of the path property



setRole
public void setRole(String role)(Code)
Sets the value of the role property.
Parameters:
  role - the new value of the path property



setTemplate
public void setTemplate(String template)(Code)
Sets the value of the template property. Same as setPath()
Parameters:
  template - the new value of the path property



toString
public String toString()(Code)
Returns a description of the attributes.



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.