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


java.lang.Object
   org.mmbase.core.AbstractDescriptor
      org.mmbase.util.functions.Parameter

Parameter
public class Parameter extends AbstractDescriptor implements java.io.Serializable(Code)
Each (function) argument is specified by a Parameter object. A Parameter contains a name and type (it does not contain a value). An array of this is returned by Function.getParameterDefinition , and this same array is used to create new empty Parameters object (by Function.createParameters ), which can contain actual values for each Parameter.
author:
   Daniel Ockeloen (MMFunctionParam)
author:
   Michiel Meeuwissen
since:
   MMBase-1.7
version:
   $Id: Parameter.java,v 1.46 2007/11/25 18:25:49 nklasens Exp $
See Also:   Parameters

Inner Class :public static class Wrapper extends Parameter

Field Summary
final public static  Parameter<org.mmbase.bridge.Cloud>CLOUD
    
final public static  ParameterCORENODE
    
final public static  Parameter[]EMPTY
     An empty Parameter array.
final public static  Parameter<String>FIELD
    
final public static  Parameter<String>LANGUAGE
     Parameter which might be needed in lots of Parameter definitions.
final public static  Parameter<Locale>LOCALE
    
final public static  Parameter<org.mmbase.bridge.Node>NODE
     'system' parameter set for nodefunctions.
final public static  Parameter<javax.servlet.http.HttpServletRequest>REQUEST
    
final public static  Parameter<javax.servlet.http.HttpServletResponse>RESPONSE
    
final public static  Parameter<org.mmbase.security.UserContext>USER
    
protected  DataType<C>dataType
    

Constructor Summary
public  Parameter(String name, DataType<C> dataType)
    
public  Parameter(String name, DataType<C> dataType, boolean copy)
     Create a Parameter object
Parameters:
  name - the name of the parameter
Parameters:
  dataType - the datatype of the parameter to assign or copy
Parameters:
  copy - if true, teh datatype is copied.
public  Parameter(String name, Class<C> type)
    
public  Parameter(String name, Class<C> type, boolean required)
    
public  Parameter(String name, Class<C> type, C defaultValue)
    
public  Parameter(String name, C defaultValue)
    
public  Parameter(Map.Entry<String, C> entry)
    
public  Parameter(Parameter<C> p, boolean required)
    
public  Parameter(Parameter<C> p, C defaultValue)
    

Method Summary
protected  CautoCast(Object value)
     Tries to 'cast' an object for use with this parameter.
public  voidcheckType(Object value)
     Checks if the passed object is of the correct class (compatible with the type of this Parameter), and throws an IllegalArgumentException if it doesn't.
final public static  Parameter<C>[]emptyArray()
    
public  booleanequals(Object o)
     Whether parameter equals to other parameter.
protected static  Class<C>getClass(C v)
    
public static  ClassgetClassForName(String type)
    
public  DataType<C>getDataType()
     Returns the data type of this parameter.
public  CgetDefaultValue()
     Returns the default value of this parameter (derived from the datatype).
public  Class<C>getTypeAsClass()
     Returns the type of values that this parameter accepts.
public  inthashCode()
    
public  booleanisRequired()
     Returns whether the parameter requires a value.
public static  Parameter[]readArrayFromXml(Element element)
    
public static  Parameter<C>readFromXml(Element element)
    
public  voidsetDefaultValue(C defaultValue)
     Sets the default value of this parameter.
public  StringtoString()
    

Field Detail
CLOUD
final public static Parameter<org.mmbase.bridge.Cloud> CLOUD(Code)



CORENODE
final public static Parameter CORENODE(Code)



EMPTY
final public static Parameter[] EMPTY(Code)
An empty Parameter array.



FIELD
final public static Parameter<String> FIELD(Code)



LANGUAGE
final public static Parameter<String> LANGUAGE(Code)
Parameter which might be needed in lots of Parameter definitions. These parameters are 'standard' parameters, which can be filled in by the system. E.g. the mmbase taglib uses these constants, and if it has a cloud ('mm:cloud is used'), then cloud-parameters are filled automaticly.



LOCALE
final public static Parameter<Locale> LOCALE(Code)



NODE
final public static Parameter<org.mmbase.bridge.Node> NODE(Code)
'system' parameter set for nodefunctions.
since:
   MMBase-1.8



REQUEST
final public static Parameter<javax.servlet.http.HttpServletRequest> REQUEST(Code)



RESPONSE
final public static Parameter<javax.servlet.http.HttpServletResponse> RESPONSE(Code)



USER
final public static Parameter<org.mmbase.security.UserContext> USER(Code)



dataType
protected DataType<C> dataType(Code)
The parameter's data type
since:
   MMBase-1.8




Constructor Detail
Parameter
public Parameter(String name, DataType<C> dataType)(Code)
Create a Parameter object
Parameters:
  name - the name of the parameter
Parameters:
  dataType - the datatype of the parameter to copy
since:
   MMBase-1.8



Parameter
public Parameter(String name, DataType<C> dataType, boolean copy)(Code)
Create a Parameter object
Parameters:
  name - the name of the parameter
Parameters:
  dataType - the datatype of the parameter to assign or copy
Parameters:
  copy - if true, teh datatype is copied. if not, it is assigned directly,that is, changing condfiitons on the parameter changes the passed datatype instance.
since:
   MMBase-1.8



Parameter
public Parameter(String name, Class<C> type)(Code)
Create a Parameter object
Parameters:
  name - the name of the parameter
Parameters:
  type - the class of the parameter's possible value



Parameter
public Parameter(String name, Class<C> type, boolean required)(Code)
Create a Parameter object
Parameters:
  name - the name of the parameter
Parameters:
  type - the class of the parameter's possible value
Parameters:
  required - whether the parameter requires a value



Parameter
public Parameter(String name, Class<C> type, C defaultValue)(Code)
Create a Parameter object
Parameters:
  name - the name of the parameter
Parameters:
  type - the class of the parameter's possible value
Parameters:
  defaultValue - the value to use if the parameter has no value set



Parameter
public Parameter(String name, C defaultValue)(Code)



Parameter
public Parameter(Map.Entry<String, C> entry)(Code)
Create Parameter definition by example value
since:
   MMBase-1.9



Parameter
public Parameter(Parameter<C> p, boolean required)(Code)
Copy-constructor, just to copy it with different requiredness



Parameter
public Parameter(Parameter<C> p, C defaultValue)(Code)
Copy-constructor, just to copy it with different defaultValue (which implies that it is not required now)




Method Detail
autoCast
protected C autoCast(Object value)(Code)
Tries to 'cast' an object for use with this parameter. E.g. if value is a String, but this parameter is of type Integer, then the string can be parsed to Integer.
Parameters:
  value - The value to be filled in in this Parameter.



checkType
public void checkType(Object value)(Code)
Checks if the passed object is of the correct class (compatible with the type of this Parameter), and throws an IllegalArgumentException if it doesn't.
Parameters:
  value - teh value whose type (class) to check
throws:
  IllegalArgumentException - if the type is not compatible



emptyArray
final public static Parameter<C>[] emptyArray()(Code)



equals
public boolean equals(Object o)(Code)
Whether parameter equals to other parameter. Only key and type are consided. DefaultValue and required propererties are only 'utilities'. true if o is Parameter of which key and type equal to this' key and type.



getClass
protected static Class<C> getClass(C v)(Code)



getClassForName
public static Class getClassForName(String type)(Code)

since:
   MMBase-1.9



getDataType
public DataType<C> getDataType()(Code)
Returns the data type of this parameter. the datatype
since:
   MMBase-1.8



getDefaultValue
public C getDefaultValue()(Code)
Returns the default value of this parameter (derived from the datatype). the default value



getTypeAsClass
public Class<C> getTypeAsClass()(Code)
Returns the type of values that this parameter accepts. the type as a Class



hashCode
public int hashCode()(Code)



isRequired
public boolean isRequired()(Code)
Returns whether the parameter requires a value. true if a value is required



readArrayFromXml
public static Parameter[] readArrayFromXml(Element element)(Code)

since:
   MMBase-1.9



readFromXml
public static Parameter<C> readFromXml(Element element)(Code)

since:
   MMBase-1.9



setDefaultValue
public void setDefaultValue(C defaultValue)(Code)
Sets the default value of this parameter.
Parameters:
  defaultValue - the default value



toString
public String toString()(Code)



Fields inherited from org.mmbase.core.AbstractDescriptor
protected LocalizedString description(Code)(Java Doc)
protected LocalizedString guiName(Code)(Java Doc)
protected String key(Code)(Java Doc)

Methods inherited from org.mmbase.core.AbstractDescriptor
public Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public Object clone(String name) throws CloneNotSupportedException(Code)(Java Doc)
protected Locale getDefaultLocale()(Code)(Java Doc)
public String getDescription(Locale locale)(Code)(Java Doc)
public String getDescription()(Code)(Java Doc)
public String getGUIName(Locale locale)(Code)(Java Doc)
public String getGUIName()(Code)(Java Doc)
public LocalizedString getLocalizedDescription()(Code)(Java Doc)
public LocalizedString getLocalizedGUIName()(Code)(Java Doc)
public String getName()(Code)(Java Doc)
public void setDescription(String desc, Locale locale)(Code)(Java Doc)
public void setDescription(String desc)(Code)(Java Doc)
public void setGUIName(String g, Locale locale)(Code)(Java Doc)
public void setGUIName(String g)(Code)(Java Doc)
protected void setLocalizedDescription(LocalizedString description)(Code)(Java Doc)
protected void setLocalizedGUIName(LocalizedString value)(Code)(Java Doc)
public String toString()(Code)(Java Doc)

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.