Delete A Shared Object; Get A List Of Shared Objects - Juniper NETWORK AND SECURITY MANAGER 2010.4 - API GUIDE REV 1 Manual

Api guide
Table of Contents

Advertisement

Network and Security Manager 2010.4 API Guide

Delete a Shared Object

Get a List of Shared Objects

108
The following Data Centric Service API sample code deletes a shared address object.
* Deletes an Address object
*/
public void testDeleteAddressObject() {
try {
System.out.println("Running testDeleteAddressObject()");
ModifyObjectViewRequest request = new ModifyObjectViewRequest();
request.setAuthToken(DataCentricServiceTest.authToken);
ModifyViewCommandType modifyCmd = new ModifyViewCommandType();
DeleteObjectViewType deleteObject = new DeleteObjectViewType();
ObjectIdentifierType objectId = new ObjectIdentifierType();
objectId.setCategory("address");
objectId.setDomainId(new UnsignedShort("1"));
ObjectIdOrNameType objIdOrName = new ObjectIdOrNameType();
objIdOrName.setObjectName("AddressObjectA");
objectId.setObjectIdOrName(objIdOrName);
deleteObject.addObjectIdentifier(objectId);
modifyCmd.setDeleteObject(deleteObject);
request.addCommand(modifyCmd);
ModifyObjectViewResponse response =
DataCentricServiceTest.stub.ModifyObjectViewRequest(request);
assertTrue(response.getStatus() == StatusCodeType.Success);
} catch (Exception e) {
e.printStackTrace();
}
}
The following Data Centric Service API sample code gets a list of shared objects.
* Gets an object by category.
public void testGetCategoryObject() {
try {
System.out.println("Running testGetCategoryObject()");
GetObjectViewByCategoryRequest request = new
GetObjectViewByCategoryRequest();
request.setAuthToken(DataCentricServiceTest.authToken);
request.setCategory("address");
request.setDomainId(new UnsignedShort("1"));
GetObjectViewByCategoryResponse response =
DataCentricServiceTest.stub.GetObjectViewByCategoryRequest(request);
System.out.println("Status=" + response.getStatus());
DataCentricServiceTest.print(response.getObject());
//gets the first address object returned:
InputStream inputStream =
*/
Copyright © 2010, Juniper Networks, Inc.

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the NETWORK AND SECURITY MANAGER 2010.4 - API GUIDE REV 1 and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Network and security manager 2010.4

Table of Contents