org.wso2.carbon.registry.core.dao
Interface AssociationDAO

All Known Implementing Classes:
JDBCAssociationDAO

public interface AssociationDAO

Data Access Object for Associations


Method Summary
 void addAssociation(String sourcePath, String targetPath, String associationType)
          Method to persist an association.
 void copyAssociations(String fromPath, String toPath)
          Method to copy associations for a given path to a new path.
 Association[] getAllAssociations(String resourcePath)
          Method to get all association.
 Association[] getAllAssociationsForType(String resourcePath, String associationType)
          Method to get all association of a given type.
 void removeAllAssociations(String resourcePath)
          Method to remove all associations for a given path.
 void removeAssociation(String sourcePath, String targetPath, String associationType)
          Method to remove an association.
 void replaceAssociations(String oldPath, String newPath)
          Method to replace all associations, when moving or renaming a resource.
 

Method Detail

addAssociation

void addAssociation(String sourcePath,
                    String targetPath,
                    String associationType)
                    throws RegistryException
Method to persist an association.

Parameters:
sourcePath - the source path
targetPath - the target path
associationType - the type of the association
Throws:
RegistryException - if some error occurs while adding associations

removeAssociation

void removeAssociation(String sourcePath,
                       String targetPath,
                       String associationType)
                       throws RegistryException
Method to remove an association.

Parameters:
sourcePath - the source path
targetPath - the target path
associationType - the type of the association
Throws:
RegistryException - if some error occurs while removing associations

getAllAssociations

Association[] getAllAssociations(String resourcePath)
                                 throws RegistryException
Method to get all association.

Parameters:
resourcePath - the source path
Returns:
the array of all associations
Throws:
RegistryException - if some error occurs while getting all associations

getAllAssociationsForType

Association[] getAllAssociationsForType(String resourcePath,
                                        String associationType)
                                        throws RegistryException
Method to get all association of a given type.

Parameters:
resourcePath - the source path
associationType - the type of the association
Returns:
the array of associations of a given type
Throws:
RegistryException - if some error occurs while getting associations of a given type

replaceAssociations

void replaceAssociations(String oldPath,
                         String newPath)
                         throws RegistryException
Method to replace all associations, when moving or renaming a resource. All the associations towards a given path can be replaced by the new path by calling this method.

Parameters:
oldPath - the old resource path
newPath - the new resource path
Throws:
RegistryException - if an error occurs while

removeAllAssociations

void removeAllAssociations(String resourcePath)
                           throws RegistryException
Method to remove all associations for a given path.

Parameters:
resourcePath - the source path
Throws:
RegistryException - if an error occurs while

copyAssociations

void copyAssociations(String fromPath,
                      String toPath)
                      throws RegistryException
Method to copy associations for a given path to a new path.

Parameters:
fromPath - the source path
toPath - the destination path
Throws:
RegistryException - if an error occurs while


Copyright © 2014 WSO2 Inc. All Rights Reserved.