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


java.lang.Object
   org.mmbase.bridge.implementation.BasicCloud

All known Subclasses:   org.mmbase.bridge.implementation.BasicTransaction,
BasicCloud
public class BasicCloud implements Cloud,Cloneable,Comparable<Cloud>,SizeMeasurable,Serializable(Code)
Basic implementation of Cloud. It wraps a.o. the core's ClusterBuilder and Typedef functionalities.
author:
   Rob Vermeulen
author:
   Pierre van Rooden
author:
   Michiel Meeuwissen
version:
   $Id: BasicCloud.java,v 1.181 2008/02/27 11:47:54 michiel Exp $

Inner Class :class BasicCloudStarter implements Runnable

Field Summary
protected  Stringaccount
    
final protected  longcount
    
protected  Stringdescription
    
protected  Stringname
    
protected  Map<String, BasicNodeManager>nodeManagerCache
    
protected  Map<String, Transaction>transactions
    
protected  UserContextuserContext
    

Constructor Summary
 BasicCloud(String cloudName, BasicCloud cloud)
     basic constructor for descendant clouds (i.e.
 BasicCloud(String name, String authenticationType, Map loginInfo, CloudContext cloudContext)
    
 BasicCloud(String name, UserContext user, BasicCloudContext cloudContext)
    

Method Summary
protected  void_readObject(ObjectInputStream in)
    
protected  void_writeObject(ObjectOutputStream out)
    
 voidadd(String currentObjectContext)
     Ignored by basic cloud.
 intadd(BasicNode node)
     Ignored by basic cloud.
 booleancheck(Operation operation, int nodeID)
     Checks access rights.
 booleancheck(Operation operation, int nodeID, int srcNodeID, int dstNodeID)
     Checks access rights.
protected  voidcheckAlias(String aliasName)
    
 voidcheckNodes(BasicNodeList resultNodeList, Query query)
    
public  intcompareTo(Cloud o)
     Compares this cloud to the passed object.
 booleancontains(MMObjectNode node)
     Checks wether the current transaction contains the given node.
public  QuerycreateAggregatedQuery()
    
 voidcreateAlias(BasicNode node, String aliasName)
    
public  NodeListcreateNodeList()
    
public  NodeManagerListcreateNodeManagerList()
    
public  NodeQuerycreateNodeQuery()
    
public  QuerycreateQuery()
    
public  RelationListcreateRelationList()
    
public  RelationManagerListcreateRelationManagerList()
    
public  TransactioncreateTransaction()
    
public  TransactioncreateTransaction(String name)
    
public  TransactioncreateTransaction(String name, boolean overwrite)
    
public  booleanequals(Object o)
     Compares this cloud to the passed object, and returns true if they are equal.
 StringgetAccount()
    
 BasicNodeManagergetBasicNodeManager(MMObjectBuilder bul)
    
 BasicNodeManagergetBasicNodeManager(String nodeManagerName)
    
public  intgetByteSize()
    
public  intgetByteSize(SizeOf sizeof)
    
public  CloudContextgetCloudContext()
    
protected  List<MMObjectNode>getClusterNodes(Query query)
     Result with all Cluster - MMObjectNodes, with cache.
public  StringgetDescription()
    
public  FunctiongetFunction(String setName, String functionName)
    
public  Collection<Function<?>>getFunctions(String setName)
    
protected  NodeListgetLastStepList(Query query)
     Based on multi-level query.
public  NodeListgetList(Query query)
    
public  NodeListgetList(String startNodes, String nodePath, String fields, String constraints, String orderby, String directions, String searchDir, boolean distinct)
    
public  LocalegetLocale()
    
public  StringgetName()
    
public  NodegetNode(String nodeNumber)
    
final public  NodegetNode(int nodeNumber)
    
final public  NodegetNodeByAlias(String aliasname)
    
final public  NodeManagergetNodeManager(String nodeManagerName)
    
public  NodeManagergetNodeManager(int nodeManagerId)
    
public  NodeManagerListgetNodeManagers()
    
public  StringListgetPossibleContexts()
    
public  Map<Object, Object>getProperties()
    
public  ObjectgetProperty(Object key)
    
final public  RelationgetRelation(int nodeNumber)
    
final public  RelationgetRelation(String nodeNumber)
    
 RelationManagergetRelationManager(int sourceManagerId, int destinationManagerId, int roleId)
     Retrieves a RelationManager.
public  RelationManagergetRelationManager(int number)
    
public  RelationManagergetRelationManager(String sourceManagerName, String destinationManagerName, String roleName)
    
public  RelationManagergetRelationManager(NodeManager source, NodeManager destination, String roleName)
    
public  RelationManagergetRelationManager(String roleName)
    
public  RelationManagerListgetRelationManagers()
    
public  RelationManagerListgetRelationManagers(String sourceManagerName, String destinationManagerName, String roleName)
    
public  RelationManagerListgetRelationManagers(NodeManager sourceManager, NodeManager destinationManager, String roleName)
    
protected  NodeListgetResultNodeList(Query query)
     Aggregating query result.
protected  NodeListgetSecureList(Query query)
    
public  TransactiongetTransaction(String name)
    
public  UserContextgetUser()
    
public  booleanhasNode(int nodeNumber)
    
public  booleanhasNode(String nodeNumber)
    
public  booleanhasNodeManager(String nodeManagerName)
    
public  booleanhasRelation(int nodeNumber)
    
public  booleanhasRelation(String nodeNumber)
    
public  booleanhasRelationManager(String sourceManagerName, String destinationManagerName, String roleName)
    
public  booleanhasRelationManager(NodeManager source, NodeManager destination, String roleName)
    
public  booleanhasRelationManager(String roleName)
    
public  booleanhasRole(String roleName)
    
static  booleanisTemporaryId(int id)
     Test if a node id is a temporay id.
 BasicNodemakeNode(MMObjectNode node, String nodeNumber)
    
public  booleanmay(org.mmbase.security.Action action, org.mmbase.util.functions.Parameters parameters)
    
public  booleanmayRead(int nodeNumber)
    
public  booleanmayRead(String nodeNumber)
    
 voidremove(String currentObjectContext)
     Ignored by basic cloud.
 voidremove(MMObjectNode node)
    
public  voidsetLocale(Locale l)
    
public  voidsetProperty(Object key, Object value)
    
 booleansetSecurityConstraint(Query query)
    
public  StringtoString()
    
static synchronized  intuniqueId()
     Create unique temporary node number.
 voidverify(Operation operation, int nodeID)
     Asserts access rights.
 voidverify(Operation operation, int nodeID, int srcNodeID, int dstNodeID)
     Asserts access rights.

Field Detail
account
protected String account(Code)



count
final protected long count(Code)



description
protected String description(Code)



name
protected String name(Code)



nodeManagerCache
protected Map<String, BasicNodeManager> nodeManagerCache(Code)



transactions
protected Map<String, Transaction> transactions(Code)



userContext
protected UserContext userContext(Code)




Constructor Detail
BasicCloud
BasicCloud(String cloudName, BasicCloud cloud)(Code)
basic constructor for descendant clouds (i.e. Transaction)
Parameters:
  cloudName - name of cloud
Parameters:
  cloud - parent cloud



BasicCloud
BasicCloud(String name, String authenticationType, Map loginInfo, CloudContext cloudContext)(Code)

Parameters:
  name - name of cloud
Parameters:
  authenticationType - authentication type
Parameters:
  loginInfo - Map with login credentials
Parameters:
  cloudContext - cloudContext of cloud
throws:
  NotFoundException - If MMBase not yet started, or shutting down.
throws:
  BridgeException - No security could be obtained.
throws:
  SecurityException - Could not perform login



BasicCloud
BasicCloud(String name, UserContext user, BasicCloudContext cloudContext)(Code)

Parameters:
  name - name of cloud
Parameters:
  authenticationType - authentication type
Parameters:
  loginInfo - Map with login credentials
Parameters:
  cloudContext - cloudContext of cloud
throws:
  NotFoundException - If MMBase not yet started, or shutting down.
throws:
  BridgeException - No security could be obtained.
throws:
  SecurityException - Could not perform login




Method Detail
_readObject
protected void _readObject(ObjectInputStream in) throws IOException, ClassNotFoundException(Code)



_writeObject
protected void _writeObject(ObjectOutputStream out) throws IOException(Code)



add
void add(String currentObjectContext)(Code)
Ignored by basic cloud. See BasicTransaction.add(String) .



add
int add(BasicNode node)(Code)
Ignored by basic cloud. See BasicTransaction.add(String) .



check
boolean check(Operation operation, int nodeID)(Code)
Checks access rights.
Parameters:
  operation - the operation to check (READ, WRITE, CREATE, OWN)
Parameters:
  nodeID - the node on which to check the operation true if access is granted, false otherwise



check
boolean check(Operation operation, int nodeID, int srcNodeID, int dstNodeID)(Code)
Checks access rights.
Parameters:
  operation - the operation to check (CREATE, CHANGE_RELATION)
Parameters:
  nodeID - the node on which to check the operation
Parameters:
  srcNodeID - the source node for this relation
Parameters:
  dstNodeID - the destination node for this relation true if access is granted, false otherwise



checkAlias
protected void checkAlias(String aliasName)(Code)
Throws exception if node alias already exists
since:
   MMBase-1.8.4



checkNodes
void checkNodes(BasicNodeList resultNodeList, Query query)(Code)



compareTo
public int compareTo(Cloud o)(Code)
Compares this cloud to the passed object. Returns 0 if they are equal, -1 if the object passed is a Cloud and larger than this cloud, and +1 if the object passed is a Cloud and smaller than this cloud.
Parameters:
  o - the object to compare it with compare number



contains
boolean contains(MMObjectNode node)(Code)
Checks wether the current transaction contains the given node.



createAggregatedQuery
public Query createAggregatedQuery()(Code)



createAlias
void createAlias(BasicNode node, String aliasName)(Code)



createNodeList
public NodeList createNodeList()(Code)



createNodeManagerList
public NodeManagerList createNodeManagerList()(Code)



createNodeQuery
public NodeQuery createNodeQuery()(Code)



createQuery
public Query createQuery()(Code)



createRelationList
public RelationList createRelationList()(Code)



createRelationManagerList
public RelationManagerList createRelationManagerList()(Code)



createTransaction
public Transaction createTransaction()(Code)



createTransaction
public Transaction createTransaction(String name) throws AlreadyExistsException(Code)



createTransaction
public Transaction createTransaction(String name, boolean overwrite) throws AlreadyExistsException(Code)



equals
public boolean equals(Object o)(Code)
Compares this cloud to the passed object, and returns true if they are equal.
Parameters:
  o - the object to compare it with is equal



getAccount
String getAccount()(Code)
Retrieves the current user accountname (unique) the account name



getBasicNodeManager
BasicNodeManager getBasicNodeManager(MMObjectBuilder bul) throws NotFoundException(Code)

since:
   MMBase-1.8



getBasicNodeManager
BasicNodeManager getBasicNodeManager(String nodeManagerName) throws NotFoundException(Code)



getByteSize
public int getByteSize()(Code)



getByteSize
public int getByteSize(SizeOf sizeof)(Code)



getCloudContext
public CloudContext getCloudContext()(Code)



getClusterNodes
protected List<MMObjectNode> getClusterNodes(Query query)(Code)
Result with all Cluster - MMObjectNodes, with cache. Security is not considered here (the query is executed thoughtlessly). The security check is done in getSecureNodes, which calls this one.
Parameters:
  query - query to execute list of cluster nodes
since:
   MMBase-1.7



getDescription
public String getDescription()(Code)



getFunction
public Function getFunction(String setName, String functionName)(Code)



getFunctions
public Collection<Function<?>> getFunctions(String setName)(Code)



getLastStepList
protected NodeList getLastStepList(Query query)(Code)
Based on multi-level query. Returns however 'normal' nodes based on the last step. This is a protected function, which is used in the implemetnedion of getRelatedNodes, getRelations of NodeManager Before it executes the query, the fields of the query are checked. All and only fields of the 'last' NodeManager and the relation should be queried. If fields are present already, but not like this, an exception is thrown. If not fields are present, the rights fields are added first (if the query is still unused, otherwise trhows Exception).
Parameters:
  query - query to execute list of normal nodes
throws:
  BridgeException - If wrong fields in query or could not be added.
since:
   MMBase-1.7



getList
public NodeList getList(Query query)(Code)



getList
public NodeList getList(String startNodes, String nodePath, String fields, String constraints, String orderby, String directions, String searchDir, boolean distinct)(Code)



getLocale
public Locale getLocale()(Code)



getName
public String getName()(Code)



getNode
public Node getNode(String nodeNumber) throws NotFoundException(Code)



getNode
final public Node getNode(int nodeNumber) throws NotFoundException(Code)



getNodeByAlias
final public Node getNodeByAlias(String aliasname) throws NotFoundException(Code)



getNodeManager
final public NodeManager getNodeManager(String nodeManagerName) throws NotFoundException(Code)



getNodeManager
public NodeManager getNodeManager(int nodeManagerId) throws NotFoundException(Code)
Retrieves a node manager
Parameters:
  nodeManagerId - ID of the NodeManager to retrieve the requested NodeManager if the manager exists, null otherwise
throws:
  NotFoundException - node manager not found



getNodeManagers
public NodeManagerList getNodeManagers()(Code)



getPossibleContexts
public StringList getPossibleContexts()(Code)



getProperties
public Map<Object, Object> getProperties()(Code)



getProperty
public Object getProperty(Object key)(Code)



getRelation
final public Relation getRelation(int nodeNumber) throws NotFoundException(Code)



getRelation
final public Relation getRelation(String nodeNumber) throws NotFoundException(Code)



getRelationManager
RelationManager getRelationManager(int sourceManagerId, int destinationManagerId, int roleId)(Code)
Retrieves a RelationManager. Note that you can retrieve a manager with source and destination reversed.
Parameters:
  sourceManagerId - number of the NodeManager of the source node
Parameters:
  destinationManagerId - number of the NodeManager of the destination node
Parameters:
  roleId - number of the role the requested RelationManager



getRelationManager
public RelationManager getRelationManager(int number) throws NotFoundException(Code)



getRelationManager
public RelationManager getRelationManager(String sourceManagerName, String destinationManagerName, String roleName) throws NotFoundException(Code)



getRelationManager
public RelationManager getRelationManager(NodeManager source, NodeManager destination, String roleName) throws NotFoundException(Code)



getRelationManager
public RelationManager getRelationManager(String roleName) throws NotFoundException(Code)



getRelationManagers
public RelationManagerList getRelationManagers()(Code)



getRelationManagers
public RelationManagerList getRelationManagers(String sourceManagerName, String destinationManagerName, String roleName) throws NotFoundException(Code)



getRelationManagers
public RelationManagerList getRelationManagers(NodeManager sourceManager, NodeManager destinationManager, String roleName) throws NotFoundException(Code)



getResultNodeList
protected NodeList getResultNodeList(Query query)(Code)
Aggregating query result.
Parameters:
  query - query to execute list of nodes
since:
   MMBase-1.7



getSecureList
protected NodeList getSecureList(Query query)(Code)
Result with Cluster Nodes (checked security)
Parameters:
  query - query to execute lisr of cluster nodes
since:
   MMBase-1.7



getTransaction
public Transaction getTransaction(String name)(Code)



getUser
public UserContext getUser()(Code)



hasNode
public boolean hasNode(int nodeNumber)(Code)



hasNode
public boolean hasNode(String nodeNumber)(Code)



hasNodeManager
public boolean hasNodeManager(String nodeManagerName)(Code)



hasRelation
public boolean hasRelation(int nodeNumber)(Code)



hasRelation
public boolean hasRelation(String nodeNumber)(Code)



hasRelationManager
public boolean hasRelationManager(String sourceManagerName, String destinationManagerName, String roleName)(Code)



hasRelationManager
public boolean hasRelationManager(NodeManager source, NodeManager destination, String roleName)(Code)



hasRelationManager
public boolean hasRelationManager(String roleName)(Code)



hasRole
public boolean hasRole(String roleName)(Code)



isTemporaryId
static boolean isTemporaryId(int id)(Code)
Test if a node id is a temporay id.
Parameters:
  id - the id (node numebr) to test true if the id is a temporary id
since:
   MMBase-1.5



makeNode
BasicNode makeNode(MMObjectNode node, String nodeNumber)(Code)



may
public boolean may(org.mmbase.security.Action action, org.mmbase.util.functions.Parameters parameters)(Code)



mayRead
public boolean mayRead(int nodeNumber)(Code)



mayRead
public boolean mayRead(String nodeNumber)(Code)



remove
void remove(String currentObjectContext)(Code)
Ignored by basic cloud. See BasicTransaction.remove(String) .



remove
void remove(MMObjectNode node)(Code)



setLocale
public void setLocale(Locale l)(Code)



setProperty
public void setProperty(Object key, Object value)(Code)



setSecurityConstraint
boolean setSecurityConstraint(Query query)(Code)

Parameters:
  query - add security constaint to this query is query secure
since:
   MMBase-1.7



toString
public String toString()(Code)



uniqueId
static synchronized int uniqueId()(Code)
Create unique temporary node number. The Id starts at - 2 and is decremented each time a new id is asked until Integer.MINVALUE is reached (after which counting starts again at -2). the temporary id as an integer



verify
void verify(Operation operation, int nodeID)(Code)
Asserts access rights. throws an exception if an operation is not allowed.
Parameters:
  operation - the operation to check (READ, WRITE, CREATE, OWN)
Parameters:
  nodeID - the node on which to check the operation



verify
void verify(Operation operation, int nodeID, int srcNodeID, int dstNodeID)(Code)
Asserts access rights. throws an exception if an operation is not allowed.
Parameters:
  operation - the operation to check (CREATE, CHANGE_RELATION)
Parameters:
  nodeID - the node on which to check the operation
Parameters:
  srcNodeID - the source node for this relation
Parameters:
  dstNodeID - the destination node for this relation



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.