* @return all endpoints attached to this service artifact.
* @throws GovernanceException if the operation failed.
*/
public Endpoint[] getAttachedEndpoints() throws GovernanceException {
checkRegistryResourceAssociation();
Registry registry = getAssociatedRegistry();
String path = getPath();
List<Endpoint> endpoints = new ArrayList<Endpoint>();
try {
Association[] associations =
registry.getAssociations(path, GovernanceConstants.DEPENDS);
for (Association association : associations) {
String destinationPath = association.getDestinationPath();
GovernanceArtifact governanceArtifact =
GovernanceUtils.retrieveGovernanceArtifactByPath(registry, destinationPath);
if (governanceArtifact instanceof Endpoint) {