Hi, In EndpointMediaTypeHandler[1] when we try to delete an endpoint there is a special validation to check whether endpoint have any dependancies attached and throw an exception[find the attached screen shot]. Because of this validation user can't delete or even edit endpoint address(URL) without removing the associations. I was enable to discover such behaviour in other media types. Is this dependancy check added for a reason or else can we get rid of it by letting user to edit endpoint details?.
I try this out locally and currently facing some issues due to missing association after I update the endpoint address(URL). Looks like when we update the endpoint address(URL) we are temporally deleting endpoint artifact[2] then it cant find previous dependancies for some reason. public void delete(RequestContext requestContext) throws RegistryException { if (!CommonUtil.isDeleteLockAvailable()) { return; } CommonUtil.acquireDeleteLock(); Registry registry = requestContext.getRegistry(); String path = requestContext.getResourcePath().getPath(); try { if (path == null) { throw new RegistryException("The resource path is not available."); } checkEndpointDependency(registry, path); // Resource resource = registry.get(path); } finally { CommonUtil.releaseDeleteLock(); } } [1] - https://github.com/wso2/carbon-registry/blob/master/components/registry/org.wso2.carbon.registry.extensions/src/main/java/org/wso2/carbon/registry/extensions/handlers/EndpointMediaTypeHandler.java [2] - https://github.com/thushara35/carbon-governance/blob/b1/components/governance/org.wso2.carbon.governance.api/src/main/java/org/wso2/carbon/governance/api/common/GovernanceArtifactManager.java#L360-360 -- Thanks, Thushara Kasun Ranawaka Software Engineer WSO2 Inc.; <http://www.wso2.com> lean.enterprise.middleware Mobile : *+94 (0) 773438949* *thusha...@wso2.com <thusha...@wso2.com>*
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev