org.wso2.carbon.registry.admin.api.relations
Interface IRelationService<DependenciesBean,AssociationTreeBean>

Type Parameters:
AssociationTreeBean - This bean can be used to manage relationships from this resource. Each association can have a type, which can be used to group a set of related relationships.
DependenciesBean - This bean can be used to manage dependencies of this resource. A dependency cannot have a type like an association. A dependency is a special type of association of type 'depends'.

public interface IRelationService<DependenciesBean,AssociationTreeBean>

Provides functionality to manage relationships (associations and dependencies) among resources and collections.


Method Summary
 void addAssociation(String path, String type, String associationPaths, String operation)
          Method to add an association (or dependency).
 AssociationTreeBean getAssociationTree(String path, String type)
          Method to obtain a list of associations.
 DependenciesBean getDependencies(String path)
          Method to obtain a list of dependencies.
 

Method Detail

getDependencies

DependenciesBean getDependencies(String path)
                                 throws org.wso2.carbon.registry.core.exceptions.RegistryException
Method to obtain a list of dependencies.

Parameters:
path - the resource path.
Returns:
the list of dependencies.
Throws:
org.wso2.carbon.registry.core.exceptions.RegistryException - if the operation failed.

addAssociation

void addAssociation(String path,
                    String type,
                    String associationPaths,
                    String operation)
                    throws org.wso2.carbon.registry.core.exceptions.RegistryException
Method to add an association (or dependency).

Parameters:
path - the resource path.
type - the type of association. If the type of association is 'depends' a dependency will be created.
associationPaths - the list of associations to be added.
Throws:
org.wso2.carbon.registry.core.exceptions.RegistryException - if the operation failed.

getAssociationTree

AssociationTreeBean getAssociationTree(String path,
                                       String type)
                                       throws org.wso2.carbon.registry.core.exceptions.RegistryException
Method to obtain a list of associations.

Parameters:
path - the resource path.
type - the type of association.
Returns:
the list of associations.
Throws:
org.wso2.carbon.registry.core.exceptions.RegistryException - if the operation failed.


Copyright © 2012 WSO2 Inc. All Rights Reserved.