本文整理汇总了Java中org.wso2.carbon.registry.properties.stub.PropertiesAdminServiceRegistryExceptionException类的典型用法代码示例。如果您正苦于以下问题:Java PropertiesAdminServiceRegistryExceptionException类的具体用法?Java PropertiesAdminServiceRegistryExceptionException怎么用?Java PropertiesAdminServiceRegistryExceptionException使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
PropertiesAdminServiceRegistryExceptionException类属于org.wso2.carbon.registry.properties.stub包,在下文中一共展示了PropertiesAdminServiceRegistryExceptionException类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: update
import org.wso2.carbon.registry.properties.stub.PropertiesAdminServiceRegistryExceptionException; //导入依赖的package包/类
/**
* update a collection or resource
*
* @param path path of the collection or resource to be subscribed
* @return true if property exists, false otherwise
* @throws Exception
*/
private boolean update(String path)
throws RemoteException, PropertiesAdminServiceRegistryExceptionException {
PropertiesAdminServiceClient propertiesAdminServiceClient =
new PropertiesAdminServiceClient( backEndUrl, sessionCookie);
propertiesAdminServiceClient.setProperty(path, "TestPropertyUpdate", "TestValueUpdate");
long startTime = System.currentTimeMillis();
long waitTime = 10000;
while ((System.currentTimeMillis() - startTime) < waitTime) {
try {
if (resourceAdminServiceClient.getProperty(path, "TestPropertyUpdate").equals("TestValueUpdate")) {
return true;
}
} catch (ResourceAdminServiceExceptionException ignored) {
}
}
return false;
}
示例2: testMediationWithLoadOfProperties
import org.wso2.carbon.registry.properties.stub.PropertiesAdminServiceRegistryExceptionException; //导入依赖的package包/类
@SetEnvironment(executionEnvironments = {ExecutionEnvironment.STANDALONE})
@Test(groups = {"wso2.esb","localOnly"}, description = "Class Mediator " +
" -Class mediator which has a load of properties to be passed and mediation")
public void testMediationWithLoadOfProperties()
throws IOException, PropertiesAdminServiceRegistryExceptionException,
ResourceAdminServiceExceptionException, XMLStreamException,
InterruptedException {
OMElement response = axis2Client.sendSimpleStockQuoteRequest(getMainSequenceURL(), null, "WSO2");
String lastPrice=response.getFirstElement()
.getFirstChildWithName(new QName("http://services.samples/xsd","last")).getText();
assertNotNull(lastPrice, "Fault: response message 'last' price null");
String symbol=response.getFirstElement()
.getFirstChildWithName(new QName("http://services.samples/xsd","symbol")).getText();
assertEquals(symbol, "WSO2", "Fault: value 'symbol' mismatched");
//TODO Log Assertion
/*
INFO - SimpleClassMediator Starting Mediation -SimpleClassMediator
INFO - SimpleClassMediator Initialized with User:[esb user]
INFO - SimpleClassMediator E-MAIL:[[email protected]]
INFO - SimpleClassMediator Massage Id:
INFO - SimpleClassMediator Original price:
INFO - SimpleClassMediator Discounted price:
INFO - SimpleClassMediator Final price:
INFO - SimpleClassMediator ----------Added properties----------
*********log added details in synapse config************
INFO - SimpleClassMediator -------------------------------------
INFO - SimpleClassMediator Logged....
refer https://wso2.org/jira/browse/TA-508
*/
}
示例3: removeProperty
import org.wso2.carbon.registry.properties.stub.PropertiesAdminServiceRegistryExceptionException; //导入依赖的package包/类
/**
* Method to remove property from a resource.
*
* @param request Http request with parameters.
* @throws RegistryException throws if there is an error.
*/
public void removeProperty(HttpServletRequest request) throws RegistryException {
String path = (String) Utils.getParameter(request, PATH);
String name = (String) Utils.getParameter(request, NAME);
try {
propertAdminServicestub.removeProperty(path, name);
} catch (RemoteException | PropertiesAdminServiceRegistryExceptionException e) {
throw new RegistryException("Failed to remove the property" + name + "at resource path " + path, e);
}
}
示例4: clean
import org.wso2.carbon.registry.properties.stub.PropertiesAdminServiceRegistryExceptionException; //导入依赖的package包/类
/**
* remove the properties added to collection or resource
*
* @param path path of the collection or resource to be subscribed
* @throws java.rmi.RemoteException
* @throws PropertiesAdminServiceRegistryExceptionException
*
*/
private static void clean(String path) throws IOException,
PropertiesAdminServiceRegistryExceptionException,
InstanceNotFoundException,
ListenerNotFoundException {
PropertiesAdminServiceClient propertiesAdminServiceClient =
new PropertiesAdminServiceClient(
backEndUrl, sessionCookie);
propertiesAdminServiceClient.removeProperty(path, "TestProperty");
}