org.wso2.carbon.registry.resource.stub.ResourceAdminServiceExceptionException Java Examples
The following examples show how to use
org.wso2.carbon.registry.resource.stub.ResourceAdminServiceExceptionException.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ProvidingDifferentBeanNamesTestCase.java From micro-integrator with Apache License 2.0 | 5 votes |
private void clearUploadedResource() throws InterruptedException, ResourceAdminServiceExceptionException, RemoteException, XPathExpressionException { ResourceAdminServiceClient resourceAdminServiceStub = new ResourceAdminServiceClient( contextUrls.getBackEndUrl(), context.getContextTenant().getContextUser().getUserName(), context.getContextTenant().getContextUser().getPassword()); resourceAdminServiceStub.deleteResource("/_system/config/spring"); }
Example #2
Source File: ResourceAdminServiceClient.java From product-ei with Apache License 2.0 | 5 votes |
public boolean addResource(String destinationPath, String mediaType, String description, DataHandler dh) throws ResourceAdminServiceExceptionException, RemoteException { if (log.isDebugEnabled()) { log.debug("Destination Path :" + destinationPath); log.debug("Media Type :" + mediaType); } return resourceAdminServiceStub.addResource(destinationPath, mediaType, description, dh, null, null); }
Example #3
Source File: NashornJsScriptStoredInGovRegistryTestCase.java From product-ei with Apache License 2.0 | 5 votes |
private void clearUploadedResource() throws InterruptedException, ResourceAdminServiceExceptionException, RemoteException, XPathExpressionException { ResourceAdminServiceClient resourceAdminServiceStub = new ResourceAdminServiceClient(contextUrls .getBackEndUrl(), context.getContextTenant().getContextUser().getUserName(), context.getContextTenant().getContextUser().getPassword()); resourceAdminServiceStub.deleteResource("/_system/governance/script_js"); }
Example #4
Source File: ProxyServiceEndPointThroughURLTestCase.java From product-ei with Apache License 2.0 | 5 votes |
private void clearUploadedResource() throws InterruptedException, ResourceAdminServiceExceptionException, RemoteException, XPathExpressionException { ResourceAdminServiceClient resourceAdminServiceStub = new ResourceAdminServiceClient(context.getContextUrls().getBackEndUrl(), getSessionCookie()); resourceAdminServiceStub.deleteResource("/_system/config/script_xslt"); }
Example #5
Source File: ResourceAdminServiceClient.java From product-ei with Apache License 2.0 | 5 votes |
public void addWSDL(String description, DataHandler dh) throws ResourceAdminServiceExceptionException, RemoteException { String fileName; fileName = dh.getName().substring(dh.getName().lastIndexOf('/') + 1); log.debug(fileName); resourceAdminServiceStub.addResource("/" + fileName, MEDIA_TYPE_WSDL, description, dh, null, null); }
Example #6
Source File: ResourceAdminServiceClient.java From product-ei with Apache License 2.0 | 5 votes |
public boolean restoreVersion(String path) throws RemoteException, ResourceAdminServiceExceptionException { boolean status = false; status = resourceAdminServiceStub.restoreVersion(path); return status; }
Example #7
Source File: ExcelDataServiceTestCase.java From product-ei with Apache License 2.0 | 5 votes |
/** * Helper method to check resource exist in registry. * * @param resourcePath Resource path * @throws ResourceAdminServiceExceptionException * @throws RemoteException */ private void checkResourceExist(String resourcePath) throws ResourceAdminServiceExceptionException, RemoteException, XPathExpressionException { ResourceAdminServiceClient resourceAdmin = new ResourceAdminServiceClient(dssContext.getContextUrls().getBackEndUrl() , sessionCookie); ResourceData[] resourceDatas = resourceAdmin.getResource(resourcePath); if (resourceDatas == null || resourceDatas.length <= 0) { throw new ResourceAdminServiceExceptionException("Resource not found in registry - " + resourcePath); } }
Example #8
Source File: ResourceAdminServiceClient.java From micro-integrator with Apache License 2.0 | 5 votes |
public void addWSDL(String description, DataHandler dh) throws ResourceAdminServiceExceptionException, RemoteException { String fileName; fileName = dh.getName().substring(dh.getName().lastIndexOf('/') + 1); log.debug(fileName); resourceAdminServiceStub.addResource("/" + fileName, MEDIA_TYPE_WSDL, description, dh, null, null); }
Example #9
Source File: ResourceAdminServiceClient.java From product-ei with Apache License 2.0 | 5 votes |
public void addPolicy(String resourceName, String description, String fetchURL) throws ResourceAdminServiceExceptionException, RemoteException { resourceAdminServiceStub.importResource("/", resourceName, MEDIA_TYPE_POLICY, description, fetchURL, null, null); }
Example #10
Source File: ResourceAdminServiceClient.java From product-ei with Apache License 2.0 | 5 votes |
public void addPolicy(String description, DataHandler dh) throws ResourceAdminServiceExceptionException, RemoteException { String fileName; fileName = dh.getName().substring(dh.getName().lastIndexOf('/') + 1); resourceAdminServiceStub.addResource("/" + fileName, MEDIA_TYPE_POLICY, description, dh, null, null); }
Example #11
Source File: ResourceAdminServiceClient.java From product-ei with Apache License 2.0 | 5 votes |
public void addSchema(String resourceName, String description, String fetchURL) throws ResourceAdminServiceExceptionException, RemoteException { resourceAdminServiceStub.importResource("/", resourceName, MEDIA_TYPE_SCHEMA, description, fetchURL, null, null); }
Example #12
Source File: ResourceAdminServiceClient.java From product-ei with Apache License 2.0 | 5 votes |
public void addWSDL(String resourceName, String description, String fetchURL) throws ResourceAdminServiceExceptionException, RemoteException { resourceAdminServiceStub.importResource("/", resourceName, MEDIA_TYPE_WSDL, description, fetchURL, null, null); }
Example #13
Source File: DS1186JsonRenderTestCase.java From product-ei with Apache License 2.0 | 5 votes |
/** * Delete the security policy from the registry. * @throws RemoteException * @throws MalformedURLException * @throws ResourceAdminServiceExceptionException * @throws XPathExpressionException */ private void deleteResource() throws RemoteException, MalformedURLException, ResourceAdminServiceExceptionException, XPathExpressionException { ResourceAdminServiceClient resourceAdmin = new ResourceAdminServiceClient(dssContext.getContextUrls().getBackEndUrl() , sessionCookie); resourceAdmin.deleteResource("/_system/config/automation/resources/policies/"); }
Example #14
Source File: SpringMediationTestCase.java From micro-integrator with Apache License 2.0 | 5 votes |
private void clearUploadedResource() throws InterruptedException, ResourceAdminServiceExceptionException, RemoteException { ResourceAdminServiceClient resourceAdminServiceStub = new ResourceAdminServiceClient( contextUrls.getBackEndUrl(), getSessionCookie()); resourceAdminServiceStub.deleteResource("/_system/config/spring"); }
Example #15
Source File: CustomIntegrationWithJSStoredInRegistryTestCase.java From product-ei with Apache License 2.0 | 5 votes |
private void clearUploadedResource() throws InterruptedException, ResourceAdminServiceExceptionException, RemoteException, XPathExpressionException { ResourceAdminServiceClient resourceAdminServiceStub = new ResourceAdminServiceClient(contextUrls.getBackEndUrl(), context.getContextTenant().getContextUser().getUserName() , context.getContextTenant().getContextUser().getPassword()); resourceAdminServiceStub.deleteResource("/_system/config/script_js"); Thread.sleep(1000); }
Example #16
Source File: ResourceAdminServiceClient.java From micro-integrator with Apache License 2.0 | 5 votes |
public boolean addResource(String destinationPath, String mediaType, String description, DataHandler dh) throws ResourceAdminServiceExceptionException, RemoteException { if (log.isDebugEnabled()) { log.debug("Destination Path :" + destinationPath); log.debug("Media Type :" + mediaType); } return resourceAdminServiceStub.addResource(destinationPath, mediaType, description, dh, null, null); }
Example #17
Source File: ScriptIntegrationToGenerateFaultTestCase.java From micro-integrator with Apache License 2.0 | 5 votes |
private void clearUploadedResource() throws InterruptedException, ResourceAdminServiceExceptionException, RemoteException, XPathExpressionException { ResourceAdminServiceClient resourceAdminServiceStub = new ResourceAdminServiceClient( contextUrls.getBackEndUrl(), context.getContextTenant().getContextUser().getUserName(), context.getContextTenant().getContextUser().getPassword()); resourceAdminServiceStub.deleteResource("/_system/config/script_js"); }
Example #18
Source File: InvalidXSLTTestCase.java From product-ei with Apache License 2.0 | 5 votes |
private void clearUploadedResource() throws InterruptedException, ResourceAdminServiceExceptionException, RemoteException, XPathExpressionException { ResourceAdminServiceClient resourceAdminServiceStub = new ResourceAdminServiceClient(context.getContextUrls().getBackEndUrl(), getSessionCookie()); resourceAdminServiceStub.deleteResource("/_system/config/script_xslt"); }
Example #19
Source File: SpringMediationBeansTestCase.java From product-ei with Apache License 2.0 | 5 votes |
private void clearUploadedResource() throws InterruptedException, ResourceAdminServiceExceptionException, RemoteException { ResourceAdminServiceClient resourceAdminServiceStub = new ResourceAdminServiceClient( contextUrls.getBackEndUrl(), getSessionCookie()); resourceAdminServiceStub.deleteResource("/_system/config/spring"); }
Example #20
Source File: EI1222JSONSecuredServiceWithXMLCharacterTestCase.java From micro-integrator with Apache License 2.0 | 5 votes |
/** * This method add the Security policy which will be used with the service. * * @throws RemoteException * @throws MalformedURLException * @throws ResourceAdminServiceExceptionException * @throws XPathExpressionException */ private void addResource() throws RemoteException, MalformedURLException, ResourceAdminServiceExceptionException, XPathExpressionException { ResourceAdminServiceClient resourceAdmin = new ResourceAdminServiceClient( dssContext.getContextUrls().getBackEndUrl(), sessionCookie); deleteResource(); resourceAdmin.addResource("/_system/config/automation/resources/policies/SecPolicy-withRoles.xml", "text/comma-separated-values", "", new DataHandler( new URL("file:///" + getResourceLocation() + File.separator + "resources" + File.separator + "SecPolicy-withRoles.xml"))); }
Example #21
Source File: DS1186JsonRenderTestCase.java From micro-integrator with Apache License 2.0 | 5 votes |
/** * This method add the Security policy which will be used with the service. * * @throws RemoteException * @throws MalformedURLException * @throws ResourceAdminServiceExceptionException * @throws XPathExpressionException */ private void addResource() throws RemoteException, MalformedURLException, ResourceAdminServiceExceptionException, XPathExpressionException { ResourceAdminServiceClient resourceAdmin = new ResourceAdminServiceClient( dssContext.getContextUrls().getBackEndUrl(), sessionCookie); deleteResource(); resourceAdmin.addResource("/_system/config/automation/resources/policies/SecPolicy-withRoles.xml", "text/comma-separated-values", "", new DataHandler( new URL("file:///" + getResourceLocation() + File.separator + "resources" + File.separator + "SecPolicy-withRoles.xml"))); }
Example #22
Source File: ResourceAdminServiceClient.java From product-ei with Apache License 2.0 | 5 votes |
public void addWADL(String description, DataHandler dh) throws ResourceAdminServiceExceptionException, RemoteException { String fileName; fileName = dh.getName().substring(dh.getName().lastIndexOf('/') + 1); log.debug(fileName); resourceAdminServiceStub.addResource("/" + fileName, MEDIA_TYPE_WADL, description, dh, null, null); }
Example #23
Source File: ResourceAdminServiceClient.java From product-ei with Apache License 2.0 | 5 votes |
public void addPolicy(String description, DataHandler dh) throws ResourceAdminServiceExceptionException, RemoteException { String fileName; fileName = dh.getName().substring(dh.getName().lastIndexOf('/') + 1); resourceAdminServiceStub.addResource("/" + fileName, MEDIA_TYPE_POLICY, description, dh, null, null); }
Example #24
Source File: SpecifyThrottlingPolicyAsRegistryKeyTest.java From product-ei with Apache License 2.0 | 5 votes |
private void clearUploadedResource() throws InterruptedException, ResourceAdminServiceExceptionException, RemoteException, XPathExpressionException { ResourceAdminServiceClient resourceAdminServiceStub = new ResourceAdminServiceClient( contextUrls.getBackEndUrl(), context.getContextTenant().getContextUser().getUserName(), context.getContextTenant().getContextUser().getPassword()); resourceAdminServiceStub.deleteResource("/_system/config/policy"); Thread.sleep(1000); }
Example #25
Source File: CSVDataServiceTestCase.java From product-ei with Apache License 2.0 | 5 votes |
private void addResource() throws RemoteException, MalformedURLException, ResourceAdminServiceExceptionException, XPathExpressionException { ResourceAdminServiceClient resourceAdmin = new ResourceAdminServiceClient(dssContext.getContextUrls().getBackEndUrl() , sessionCookie); resourceAdmin.deleteResource("/_system/config/automation/resources/csv/"); resourceAdmin.addResource("/_system/config/automation/resources/csv/Products.csv", "text/comma-separated-values", "", new DataHandler(new URL("file:///" + getResourceLocation() + File.separator + "resources" + File.separator + "Products.csv"))); }
Example #26
Source File: RubyScriptSupportTestCase.java From product-ei with Apache License 2.0 | 5 votes |
private void clearUploadedResource() throws InterruptedException, ResourceAdminServiceExceptionException, RemoteException, XPathExpressionException { ResourceAdminServiceClient resourceAdminServiceStub = new ResourceAdminServiceClient( contextUrls.getBackEndUrl(), context.getContextTenant().getContextUser().getUserName(), context.getContextTenant().getContextUser().getPassword()); resourceAdminServiceStub.deleteResource("/_system/governance/script"); }
Example #27
Source File: WSDLOptionsPickedFromRegistryTestCase.java From product-ei with Apache License 2.0 | 5 votes |
private void clearUploadedResource() throws InterruptedException, ResourceAdminServiceExceptionException, RemoteException, XPathExpressionException { ResourceAdminServiceClient resourceAdminServiceStub = new ResourceAdminServiceClient(context.getContextUrls().getBackEndUrl(), getSessionCookie()); resourceAdminServiceStub.deleteResource("/_system/config/proxy"); ; resourceAdminServiceStub.deleteResource("/_system/config/script_xslt"); }
Example #28
Source File: ResourceAdminServiceClient.java From product-ei with Apache License 2.0 | 5 votes |
public void uploadArtifact(String description, DataHandler dh) throws ResourceAdminServiceExceptionException, RemoteException { String fileName; fileName = dh.getName().substring(dh.getName().lastIndexOf('/') + 1); resourceAdminServiceStub.addResource("/" + fileName, MEDIA_TYPE_GOVERNANCE_ARCHIVE, description, dh, null, null); }
Example #29
Source File: ResourceAdminServiceClient.java From product-ei with Apache License 2.0 | 5 votes |
public void addPolicy(String resourceName, String description, String fetchURL) throws ResourceAdminServiceExceptionException, RemoteException { resourceAdminServiceStub.importResource("/", resourceName, MEDIA_TYPE_POLICY, description, fetchURL, null, null); }
Example #30
Source File: SpringMediationTestCase.java From product-ei with Apache License 2.0 | 5 votes |
private void clearUploadedResource() throws InterruptedException, ResourceAdminServiceExceptionException, RemoteException { ResourceAdminServiceClient resourceAdminServiceStub = new ResourceAdminServiceClient(contextUrls.getBackEndUrl(), getSessionCookie()); resourceAdminServiceStub.deleteResource("/_system/config/spring"); }