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


org.mmbase.bridge.NodeManager

All known Subclasses:   org.mmbase.bridge.util.AbstractNodeManager,  org.mmbase.bridge.implementation.BasicNodeManager,  org.mmbase.bridge.implementation.VirtualNodeManager,
NodeManager
public interface NodeManager extends Node(Code)
This interface represents a node's type information object - what used to be the 'builder'. It contains all the field and attribuut information, as well as GUI data for editors and some information on deribed and deriving types. It also contains some maintenance code - code to create new nodes, en code to query objects belonging to the same manager. Since node types are normally maintained through use of config files (and not in the database), as wel as for security issues, the data of a nodetype cannot be changed except through the use of an administration module (which is why we do not include setXXX methods here).
author:
   Rob Vermeulen
author:
   Pierre van Rooden
version:
   $Id: NodeManager.java,v 1.43 2007/12/18 12:44:57 michiel Exp $


Field Summary
final public static  intGUI_PLURAL
    
final public static  intGUI_SINGULAR
    
final public static  intORDER_CREATE
     A constant for use with NodeManager.getFields(int) , meaning `all fields, in storage order (so which are in storage'.
final public static  intORDER_EDIT
     A constant for use with NodeManager.getFields(int) , meaning all fields which a user may want to fill when creating or editing this node.
final public static  intORDER_LIST
     A constant for use with NodeManager.getFields(int) .
final public static  intORDER_NONE
     A constant for use with NodeManager.getFields(int) , meaning `all fields, even those which are not stored.
final public static  intORDER_SEARCH
     A constant for use with NodeManager.getFields(int) On some fields, like binary fields (e.g.


Method Summary
public  FieldListcreateFieldList()
    
public  NodecreateNode()
     Creates a new node.
public  NodeListcreateNodeList()
    
public  NodeQuerycreateQuery()
     Creates a query for this NodeNanager.
public  RelationListcreateRelationList()
    
public  RelationManagerListgetAllowedRelations()
     Retrieve all relation managers that can be used to create relations for objects of this nodemanager.
public  RelationManagerListgetAllowedRelations(String nodeManager, String role, String direction)
     Retrieve all relation managers that can be used to create relations for objects from this nodemanager, to the specified manager, using the specified role and direction.
public  RelationManagerListgetAllowedRelations(NodeManager nodeManager, String role, String direction)
     Retrieve all relation managers that can be used to create relations for objects from this nodemanager, to the specified manager, using the specified role and direction.
public  CloudgetCloud()
     Returns the cloud to which this manager belongs.
public  NodeManagerListgetDescendants()
    
public  StringgetDescription()
     Returns the description of this node manager.
public  StringgetDescription(Locale locale)
     Returns the description of this node manager in a specified language.
public  FieldgetField(String name)
     Returns the field with the specified name.
public  FieldListgetFields()
     Returns a list of all fields defined for this node manager.
public  FieldListgetFields(int order)
     Retrieve a subset of field types of this NodeManager, depending on a given order.
public  StringgetGUIName()
     Returns the descriptive name of this node manager.
public  StringgetGUIName(int plurality)
     Returns the descriptive name of this node manager.
public  StringgetGUIName(int plurality, Locale locale)
     Returns the descriptive name of this node manager ina a specified language.
public  StringgetInfo(String command)
     Retrieve info from a node manager based on a command string. Similar to the $MOD command in SCAN.
Parameters:
  command - the info to obtain, i.e.
public  StringgetInfo(String command, ServletRequest req, ServletResponse resp)
     Retrieve info from a node manager based on a command string Similar to the $MOD command in SCAN.
Parameters:
  command - the info to obtain, i.e.
public  NodeListgetList(String constraints, String orderby, String directions)
     Returns a list of nodes belonging to this node manager.
public  NodeListgetList(NodeQuery query)
    
public  NodeListgetList(String command, Map parameters)
     Retrieve info (as a list of virtual nodes) from a node manager based on a command string. Similar to the LIST command in SCAN. The values retrieved are represented as fields of a virtual node, named following the fieldnames listed in the fields paramaters..
Parameters:
  command - the info to obtain, i.e.
public  NodeListgetList(String command, Map parameters, ServletRequest req, ServletResponse resp)
     Retrieve info from a node manager based on a command string Similar to the LIST command in SCAN. The values retrieved are represented as fields of a virtual node, named following the fieldnames listed in the fields paramaters..
Parameters:
  command - the info to obtain, i.e.
public  StringgetName()
     Returns the name of this node manager.
public  NodeManagergetParent()
     Retrieve the parent of this NodeManager (the Nodemanager that this nodemanager extends from) the NodeManager's parent
throws:
  NotFoundException - if no parent exists (i.e.
public  Map<String, String>getProperties()
    
public  StringgetProperty(String name)
     Retrieve a property of the node manager.
public  booleanhasField(String fieldName)
     Tests whether the field with the specified name exists in this nodemanager.
public  booleanmayCreateNode()
     Check if the current user may create a new node of this type.

Field Detail
GUI_PLURAL
final public static int GUI_PLURAL(Code)



GUI_SINGULAR
final public static int GUI_SINGULAR(Code)



ORDER_CREATE
final public static int ORDER_CREATE(Code)
A constant for use with NodeManager.getFields(int) , meaning `all fields, in storage order (so which are in storage'.



ORDER_EDIT
final public static int ORDER_EDIT(Code)
A constant for use with NodeManager.getFields(int) , meaning all fields which a user may want to fill when creating or editing this node. That are normally all nodes without the `automatic' ones like `number' and `otype'.



ORDER_LIST
final public static int ORDER_LIST(Code)
A constant for use with NodeManager.getFields(int) . When presenting a Node in some list overview then less essential fields can be left out, to get a more concise presentation of the node.



ORDER_NONE
final public static int ORDER_NONE(Code)
A constant for use with NodeManager.getFields(int) , meaning `all fields, even those which are not stored.



ORDER_SEARCH
final public static int ORDER_SEARCH(Code)
A constant for use with NodeManager.getFields(int) On some fields, like binary fields (e.g. images) it makes no sense searching. These are left out among the `search' fields.





Method Detail
createFieldList
public FieldList createFieldList()(Code)
Returns a new, empty field list for this nodemanager The empty list
since:
   MMBase-1.8



createNode
public Node createNode()(Code)
Creates a new node. The returned node will not be visible in the cloud until the commit() method is called on this node. Until then it will have a temporary node number. the new Node



createNodeList
public NodeList createNodeList()(Code)
Returns a new, empty node list for this nodemanager The empty list
since:
   MMBase-1.8



createQuery
public NodeQuery createQuery()(Code)
Creates a query for this NodeNanager. The nodemanager is added as a step, and also all (non byte array) fields are added. The query can be used by getList of Cloud. You can not add steps to this NodeQuery. query for this NodeNanager
since:
   MMBase-1.7
See Also:   NodeManager.getList(NodeQuery)
See Also:   Cloud.createNodeQuery



createRelationList
public RelationList createRelationList()(Code)
Returns a new, empty relation list for this nodemanager The empty list
since:
   MMBase-1.8



getAllowedRelations
public RelationManagerList getAllowedRelations()(Code)
Retrieve all relation managers that can be used to create relations for objects of this nodemanager. the relation manager list
since:
   MMBase-1.6



getAllowedRelations
public RelationManagerList getAllowedRelations(String nodeManager, String role, String direction)(Code)
Retrieve all relation managers that can be used to create relations for objects from this nodemanager, to the specified manager, using the specified role and direction.
Parameters:
  nodeManager - the name of the nodemanger with which to make a relation, can be null
Parameters:
  role - the role with which to make a relation, can be null
Parameters:
  direction - the search direction ("source", "destination", "both"), can be null the relation manager list
since:
   MMBase-1.6



getAllowedRelations
public RelationManagerList getAllowedRelations(NodeManager nodeManager, String role, String direction)(Code)
Retrieve all relation managers that can be used to create relations for objects from this nodemanager, to the specified manager, using the specified role and direction.
Parameters:
  nodeManager - the nodemanger with which to make a relation, can be null
Parameters:
  role - the role with which to make a relation, can be null
Parameters:
  direction - the search direction ("source", "destination", "both"), can be null the relation manager list
since:
   MMBase-1.6



getCloud
public Cloud getCloud()(Code)
Returns the cloud to which this manager belongs. the cloud to which this manager belongs



getDescendants
public NodeManagerList getDescendants()(Code)
Retrieve a list of descendant nodemanagers (the nodemanagers that - possibly indirectly - extend from this nodemanager) a list of NodeManagers
since:
   MMBase-1.7



getDescription
public String getDescription()(Code)
Returns the description of this node manager. the description of this node manager



getDescription
public String getDescription(Locale locale)(Code)
Returns the description of this node manager in a specified language.
Parameters:
  locale - the locale that determines the language for the description the description of this node manager
since:
   MMBase-1.7



getField
public Field getField(String name) throws NotFoundException(Code)
Returns the field with the specified name.
Parameters:
  name - the name of the field to be returned the field with the requested name
throws:
  NotFoundException - is the field does not exist



getFields
public FieldList getFields()(Code)
Returns a list of all fields defined for this node manager. a list of all fields defined for this node manager



getFields
public FieldList getFields(int order)(Code)
Retrieve a subset of field types of this NodeManager, depending on a given order. The order is a integer constant which symbolizes `none', `create', `edit', `list' or `search'. These last three one may recognize from builder XML's. `none' means `all fields'. The actual integer contants are present as the ORDER contants in this interface.
Parameters:
  order - the order in which to list the fields a FieldList object, which is a specialized List of Field objects.
See Also:   NodeManager.ORDER_NONE
See Also:   NodeManager.ORDER_CREATE
See Also:   NodeManager.ORDER_EDIT
See Also:   NodeManager.ORDER_LIST
See Also:   NodeManager.ORDER_SEARCH



getGUIName
public String getGUIName()(Code)
Returns the descriptive name of this node manager. This name will be in the language of the current cloud (defined in cloud.getLocale()). the descriptive name of this node manager



getGUIName
public String getGUIName(int plurality)(Code)
Returns the descriptive name of this node manager. This name will be in the language of the current cloud (defined in cloud.getLocale()).
since:
   MMBase-1.6
Parameters:
  plurality - the plurality (number of objects) for which to return a description(NodeManager.GUI_SINGULAR or NodeManager.GUI_PLURAL) the descriptive name of this node manager



getGUIName
public String getGUIName(int plurality, Locale locale)(Code)
Returns the descriptive name of this node manager ina a specified language.
since:
   MMBase-1.6
Parameters:
  plurality - the plurality (number of objects) for which to return a description(NodeManager.GUI_SINGULAR or NodeManager.GUI_PLURAL)
Parameters:
  locale - the locale that determines the language for the GUI name the descriptive name of this node manager



getInfo
public String getInfo(String command)(Code)
Retrieve info from a node manager based on a command string. Similar to the $MOD command in SCAN.
Parameters:
  command - the info to obtain, i.e. "USER-OS". info from a node manager



getInfo
public String getInfo(String command, ServletRequest req, ServletResponse resp)(Code)
Retrieve info from a node manager based on a command string Similar to the $MOD command in SCAN.
Parameters:
  command - the info to obtain, i.e. "USER-OS".
Parameters:
  req - the Request item to use for obtaining user information. For backward compatibility.
Parameters:
  resp - the Response item to use for redirecting users. For backward compatibility. info from a node manager



getList
public NodeList getList(String constraints, String orderby, String directions)(Code)
Returns a list of nodes belonging to this node manager. Constraints can be given to exclude nodes from the returned list. These constraints follow the syntax of the SQL where clause. It's a good practice to use uppercase letters for the operators and lowercase letters for the fieldnames. Example constraints are:
 "number = 100" (!=, <, >, <= and >= can also be used)
 "name = 'admin'",
 "email IS NULL" (indicating the email field is empty)
 "email LIKE '%.org'" (indication the email should end with .org)
 "number BETWEEN 99 AND 101"
 "name IN ('admin', 'anonymous')"
 
The NOT operator can be used to get the opposite result like:
 "NOT (number = 100)"
 "NOT (name = 'admin')",
 "email IS NOT NULL"
 "email NOT LIKE '%.org'" (indication the email should not end with .org)
 "number NOT BETWEEN 99 AND 101"
 "name NOT IN ('admin', 'anonymous')"
 
Some special functions (not part of standard SQL, but most databases support them) can be used like:
 "LOWER(name) = 'admin'" (to also allow 'Admin' to be selected)
 "LENGTH(name) > 5" (to only select names longer then 5 characters)
 
Constraints can be linked together using AND and OR:
 "((number=100) OR (name='admin') AND email LIKE '%.org')"
 
The single quote can be escaped using it twice for every single occurence:
 "name='aaa''bbb'" (if we want to find the string aaa'bbb)
 
For more info consult a SQL tutorial like Jim Hoffman's introduction to Structured Query Language.
Parameters:
  constraints - Constraints to prevent nodes from beingincluded in the resulting list which would normallyby included or null if no constraintsshould be applied .
Parameters:
  orderby - A comma separated list of field names on which thereturned list should be sorted or nullif the order of the returned virtual nodes doesn'tmatter.
Parameters:
  directions - A comma separated list of values indicating wetherto sort up (ascending) or down (descending) on thecorresponding field in the orderbyparameter or null if sorting on allfields should be up.The value DOWN (case insensitive) indicatesthat sorting on the corresponding field should bedown, all other values (including theempty value) indicate that sorting on thecorresponding field should be up.If the number of values found in this parameter areless than the number of fields in theorderby parameter, all fields thatdon't have a corresponding direction value aresorted according to the last specified directionvalue. a list of nodes belonging to this node manager



getList
public NodeList getList(NodeQuery query)(Code)
Executes a query and returns the result as nodes of this NodeManager (or of extensions)
Parameters:
  query - query to execute list of nodes
since:
   MMBase-1.7



getList
public NodeList getList(String command, Map parameters)(Code)
Retrieve info (as a list of virtual nodes) from a node manager based on a command string. Similar to the LIST command in SCAN. The values retrieved are represented as fields of a virtual node, named following the fieldnames listed in the fields paramaters..
Parameters:
  command - the info to obtain, i.e. "USER-OS".
Parameters:
  parameters - a hashtable containing the named parameters of the list. info from a node manager (as a list of virtual nodes)



getList
public NodeList getList(String command, Map parameters, ServletRequest req, ServletResponse resp)(Code)
Retrieve info from a node manager based on a command string Similar to the LIST command in SCAN. The values retrieved are represented as fields of a virtual node, named following the fieldnames listed in the fields paramaters..
Parameters:
  command - the info to obtain, i.e. "USER-OS".
Parameters:
  parameters - a hashtable containing the named parameters of the list.
Parameters:
  req - the Request item to use for obtaining user information. For backward compatibility.
Parameters:
  resp - the Response item to use for redirecting users. For backward compatibility. info from a node manager (as a list of virtual nodes)



getName
public String getName()(Code)
Returns the name of this node manager. This name is a unique name. the name of this node manager.



getParent
public NodeManager getParent() throws NotFoundException(Code)
Retrieve the parent of this NodeManager (the Nodemanager that this nodemanager extends from) the NodeManager's parent
throws:
  NotFoundException - if no parent exists (i.e. this nodeManager is "object")



getProperties
public Map<String, String> getProperties()(Code)
Retrieve a copy of the node manager's properties a map of node manager properties
since:
   MMBase-1.7



getProperty
public String getProperty(String name)(Code)
Retrieve a property of the node manager.
Parameters:
  name - the name of the property the property value (null if not given)
since:
   MMBase-1.7



hasField
public boolean hasField(String fieldName)(Code)
Tests whether the field with the specified name exists in this nodemanager.
since:
   MMBase-1.6
Parameters:
  fieldName - the name of the field to be returned true if the field with the requested name exists



mayCreateNode
public boolean mayCreateNode()(Code)
Check if the current user may create a new node of this type. Check if the current user may create a new node of this type.



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