|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object | +--org.mmbase.bridge.implementation.BasicCloud
| Field Summary | |
protected java.lang.String |
account
|
protected java.lang.String |
description
|
protected java.lang.String |
language
|
protected java.lang.String |
name
|
protected java.util.HashMap |
nodeManagerCache
|
protected BasicCloud |
parentCloud
|
protected java.util.HashMap |
relationManagerCache
|
protected java.util.HashMap |
transactions
|
protected BasicUser |
userContext
|
| Method Summary | |
Transaction |
createTransaction()
Creates a transaction on this cloud. |
Transaction |
createTransaction(java.lang.String name)
Creates a transaction on this cloud with a specified name. |
Transaction |
createTransaction(java.lang.String name,
boolean overwrite)
Creates a transaction on this cloud with a specified name. |
CloudContext |
getCloudContext()
Returns the context to which this cloud belongs. |
java.lang.String |
getDescription()
Returns the description of the cloud. |
NodeList |
getList(java.lang.String startNodes,
java.lang.String nodePath,
java.lang.String fields,
java.lang.String constraints,
java.lang.String orderby,
java.lang.String directions,
java.lang.String searchDir,
boolean distinct)
Returns a list of virtual nodes that are composed by fields of other nodes. |
java.lang.String |
getName()
Returns the name of this cloud. |
Node |
getNode(int nodenumber)
Returns the node with the specified number from this cloud. |
Node |
getNode(java.lang.String nodenumber)
Returns the node with the specified number from this cloud. |
Node |
getNodeByAlias(java.lang.String aliasname)
Returns the node with the specified alias from this cloud. |
NodeManager |
getNodeManager(java.lang.String nodeManagerName)
Returns the specified node manager. |
NodeManagerList |
getNodeManagers()
Returns all node managers available in this cloud. |
RelationManager |
getRelationManager(java.lang.String roleName)
Returns the specified relation manager. |
RelationManager |
getRelationManager(java.lang.String sourceManagerName,
java.lang.String destinationManagerName,
java.lang.String roleName)
Returns the specified relation manager. |
RelationManagerList |
getRelationManagers()
Returns all relation managers available in this cloud. |
Transaction |
getTransaction(java.lang.String name)
Returnes the transaction with the specified name. |
User |
getUser()
Who is using this cloud. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected java.lang.String name
protected java.lang.String account
protected java.lang.String language
protected java.lang.String description
protected java.util.HashMap transactions
protected java.util.HashMap nodeManagerCache
protected java.util.HashMap relationManagerCache
protected BasicCloud parentCloud
protected BasicUser userContext
| Method Detail |
public Node getNode(int nodenumber)
CloudNode with a reference to this
instance of Cloud.getNode in interface Cloudorg.mmbase.bridge.Cloudnumber - the number of the requested nodeNodeNotFoundException - if the specified node could not be foundpublic Node getNode(java.lang.String nodenumber)
CloudNode with a reference to this
instance of Cloud.getNode in interface Cloudorg.mmbase.bridge.Cloudnumber - the number of the requested nodeNodeNotFoundException - if the specified node could not be foundpublic Node getNodeByAlias(java.lang.String aliasname)
CloudNode with a reference to this
instance of Cloud.getNodeByAlias in interface Cloudorg.mmbase.bridge.Cloudalias - the alias of the requested nodeNodeNotFoundException - if the specified node could not be foundpublic NodeManagerList getNodeManagers()
CloudgetNodeManagers in interface Cloudorg.mmbase.bridge.CloudNodeManagerList containing all node managers
available in this cloud.public NodeManager getNodeManager(java.lang.String nodeManagerName)
CloudgetNodeManager in interface Cloudorg.mmbase.bridge.Cloudname - the name of the requested node
managerNodeManagerNotFoundException - if the specified node manager
could not be foundpublic RelationManagerList getRelationManagers()
CloudgetRelationManagers in interface Cloudorg.mmbase.bridge.CloudRelationManagerList containing all relation
managers available in this cloud
public RelationManager getRelationManager(java.lang.String sourceManagerName,
java.lang.String destinationManagerName,
java.lang.String roleName)
CloudgetRelationManager in interface Cloudorg.mmbase.bridge.CloudsourceManagerName - name of the node manager of the
source nodedestinationManagerName - name of the node manager of the
destination noderoleName - name of the roleRelationManagerNotFoundException - if the specified relation
manager could not be foundpublic RelationManager getRelationManager(java.lang.String roleName)
CloudgetRelationManager in interface Cloudorg.mmbase.bridge.CloudroleName - name of the roleRelationManagerNotFoundException - if the specified relation
manager could not be foundpublic Transaction createTransaction()
CloudTransaction will have a generic ID.createTransaction in interface Cloudorg.mmbase.bridge.CloudTransaction on this cloudpublic Transaction createTransaction(java.lang.String name)
CloudcreateTransaction in interface Cloudorg.mmbase.bridge.Cloudname - an unique name to use for the
transactionTransaction on
this cloudTransactionAllreadyExistsException - if a transaction with the
specified name allready
exists
public Transaction createTransaction(java.lang.String name,
boolean overwrite)
CloudcreateTransaction in interface Cloudorg.mmbase.bridge.Cloudname - an unique name to use for the
transactionoverwrite - if true, cancels and the replaces
any existing transaction of this name
for the current userTransaction on
this cloudTransactionAllreadyExistsException - if a transaction with the
specified name allready
exists and overwrite is falsepublic Transaction getTransaction(java.lang.String name)
CloudgetTransaction in interface Cloudorg.mmbase.bridge.Cloudname - the name of the requested transactionpublic CloudContext getCloudContext()
CloudgetCloudContext in interface Cloudorg.mmbase.bridge.CloudCloudContext to which this cloud belongspublic java.lang.String getName()
CloudgetName in interface Cloudorg.mmbase.bridge.Cloudpublic java.lang.String getDescription()
CloudgetDescription in interface Cloudorg.mmbase.bridge.Cloudpublic User getUser()
CloudgetUser in interface Cloudorg.mmbase.bridge.Cloud
public NodeList getList(java.lang.String startNodes,
java.lang.String nodePath,
java.lang.String fields,
java.lang.String constraints,
java.lang.String orderby,
java.lang.String directions,
java.lang.String searchDir,
boolean distinct)
Cloud- A node manager recordcompany containing a field name. - A node manager artist containing a field name. - A node manager url containing a field description and url. - A relation type related between recordcompany and artist. - A relation type related between artist and url. - A relation type homepagerel between artist and url.If node 100 has a node manager called recordcompany we can do the following to get a list of the record company's artists and all urls belonging to these artist (including nodes found through the related relation and the homepagerel relation):
getList("100", "recordcompany,artist,url",
"artist.name,description,url", null, null, null, null, true);
This call returns a list of virtual nodes with the fields artist.name,
description and url for every valid traversal.
If we only want to list homepage urls of the artists we do:
getList("100", "recordcompany,artist,url",
"artist.name,description,homepagerel,url", null, null, null,
null, true);
If we want to list all url's except the the homepage urls we do:
getList("100", "recordcompany,artist,url",
"artist.name,description,related,url", null, null, null, null, true);
If node 200 also has a node manager with name recordcompany we can get the info from their artist together with the info of the artist from the first company by also putting number 200 in the first parameter:
getList("100,200", "recordcompany,artist,url",
"artist.name,description,related,url", null, null, null, null, true);
For more information about the constraints parameter consult
NodeManager.getList(String constraints, String orderby, String
directions).getList in interface Cloudorg.mmbase.bridge.CloudstartNodes - A comma separated list of node numbers that should
be used as a starting point for all traversals
or null if all nodes of the first node
manager in nodePath should be used.nodePath - A comma seperated list of node manager names
which specifies the path that should be followed.
It is possible to explicitly specify a relation
manager that should be used to go from one node to
an other. If no relation manager is specified
between two nodes, all possible relation managers
that can be used to go to the next specified node in
the path are followed.fields - A comma separated list of field names that will make
up the returned virtual
nodes. A fieldname can be prefixed with the
original node manager name of the field and a dot
in cases where more than one node manager in the
path has a field with the same name.constraints - Contraints to prevent nodes from being
included in the resulting list which would normally
by included or null if no contraints
should be applied.orderby - A comma separated list of field names on which the
returned list should be sorted or null
if the order of the returned virtual nodes doesn't
matter.directions - A comma separated list of values indicating wether
to sort up (ascending) or down (descending) on the
corresponding field in the orderby
parameter or null if sorting on all
fields should be up.
The value DOWN (case insensitive) indicates
that sorting on the corresponding field should be
down, all other values (including the
empty value) indicate that sorting on the
corresponding field should be up.
If the number of values found in this parameter are
less than the number of fields in the
orderby parameter, all fields that
don't have a corresponding direction value are
sorted according to the last specified direction
value.searchDir - Determines how directionality affects the search.
This is a string with the following possible values:"both", which is the default, searches for all
valid relations through a path, checking full directionality
of relations where appropriate.
"destination" searches for only those relations
in a path where valid relations exist from source to destination,
in the order of the nodemanagers given in the nodePath.
"source" searches for only those relations
in a path where valid relations exist from destination to source,
in the order of the nodemanagers given in the nodePath.
"all" searches all existing relations, and does
not check on directionality.
A value of null or any other values than those
listed above are ignored. In that case, search is
treated as if the default ("both") was specified.distinct - true if nodes who allready exist in
the list should not be added to the list.
false if all nodes should be added to
the list even if a node with exactly the same field
values is allready present.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||