コード例 #1
0
ファイル: Container.cs プロジェクト: projectpvg1/BE-Project
 /// <summary>
 /// Deletes child object under given parent container
 /// </summary>
 /// <param name="childName">Name of child object to be deleted</param>
 /// <returns>True if deleted successfully
 /// False otherwise</returns>
 public Boolean deleteChildObject(String childName)
 {
     try
     {
         DelHTTPRequest request = new DelHTTPRequest(this.client);
         request.createHTTPRequest(path + "/" +
             childName, Resource1.ObjectRequest);
         ExecutionResult executionResult = request.executeRequest();
         return true;
     }
     catch (ExceptionHandler)
     {
         return false;
     }
 }
コード例 #2
0
ファイル: Handler.cs プロジェクト: projectpvg1/BE-Project
 /// <summary>
 /// Delete an existing object from specified container
 /// </summary>
 /// <param name="containerName">Name of Container from which to delete an object</param>
 /// <param name="objectName">Name of object to be deleted</param>
 /// <returns>True if deleted successfully
 /// False otherwise</returns>
 public Boolean deleteObject(String containerName, String objectName)
 {
     try
     {
         path = CommonConstants.CDMI_PATH_CONSTANT + client.username +
             "/" + containerName + "/" + objectName;
         DelHTTPRequest request = new DelHTTPRequest(this.client);
         request.createHTTPRequest(path, Resource1.ObjectRequest);
         ExecutionResult executionResult = request.executeRequest();
         return true;
     }
     catch (ExceptionHandler)
     {
         return false;
     }
 }
コード例 #3
0
ファイル: Container.cs プロジェクト: projectpvg1/BE-Project
 /// <summary>
 /// Deletes child container under given parent container.
 /// </summary>
 /// <param name="childName">Name of child container to be deleted</param>
 /// <returns>True if deleted successfully
 /// False otherwise</returns>
 public Boolean deleteChildContainer(String childName)
 {
     try
     {
         Container container = getChildContainer(childName);
         if(container.isGetSuccessful())
             if (!container.getChildrenRange().Equals("0-0"))
             container.emptyContainer();
         DelHTTPRequest request = new DelHTTPRequest(this.client);
         request.createHTTPRequest(path + "/" + childName,
             Resource1.ContainerRequest);
         ExecutionResult executionResult = request.executeRequest();
         return true;
     }
     catch (ExceptionHandler)
     {
         return false;
     }
 }
コード例 #4
0
ファイル: Handler.cs プロジェクト: projectpvg1/BE-Project
 /// <summary>
 /// Delete an existing container
 /// </summary>
 /// <param name="containerName">Name of container to be deleted</param>
 /// <returns>True if deleted successfully
 /// False otherwise</returns>
 public Boolean deleteContainer(String containerName)
 {
     try
     {
         path = CommonConstants.CDMI_PATH_CONSTANT + client.username
             + "/" + containerName;
         Container container = new Container(client,path);
         if(container.isGetSuccessful())
             if(!container.getChildrenRange().Equals("0-0"))
                 container.emptyContainer();
         DelHTTPRequest request = new DelHTTPRequest(this.client);
         request.createHTTPRequest(path, Resource1.ContainerRequest);
         ExecutionResult executionResult = request.executeRequest();
         return true;
     }
     catch (ExceptionHandler)
     {
         return false;
     }
 }