"WEBNMS_5 API Docs"

com.adventnet.nms.provisioning.server
Class Operation

java.lang.Object
  extended by com.adventnet.nms.provisioning.server.Operation

public class Operation
extends java.lang.Object

The Operation class represents a provisioning operation. This class gets the handle of AdventNet Web NMS Config Engine and does the configuration through it. Normally api users need not use this class.But the one who wishes to write ProvisioningAPI implementation can use this api for doing configuration through Config Engine. This class always executes the operation synchronously and scheduling (ie., asynchronous and synchronous mode of operation) is done only in the ProvisioningAPI implementation.

Since:
2.3

Constructor Summary
Operation(Template template)
          Creates a new Operation instance which represents a provisioning operation.
 
Method Summary
 void executeConfigTasks(java.lang.String stageId, java.util.Vector taskVector)
          Method to execute the provisioning operation.
 java.lang.String getRequestID()
          Returns the request id of the request sent.
 TemplateResult getResult()
          Returns the result of this provisioning operation in TemplateResult xml form.
 java.lang.String getStageStatus(java.lang.String stageId)
           
 java.lang.String getStatus()
          Returns the current status of this operation and it will be one of the following: "NOTSTARTED", "INPROGRESS", "FINISHED" or "FAILED".
 void setRequestID(java.lang.String requestID)
          Set the request id before the request sent in case of asynchronous execution.
 void setResult(TemplateResult result)
           
 void setResult(TemplateResult templateresult, java.lang.String stageID)
          Set the result of the operation once configuration finished.
 void setScheduledTime(java.lang.String scheduledTime)
           
 void setStatus(java.lang.String status)
          Set the status of this operation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Operation

public Operation(Template template)
Creates a new Operation instance which represents a provisioning operation. It requires the template reference that contains provisioning operation details.

Parameters:
template - a Template reference which contains config task details.
Method Detail

executeConfigTasks

public void executeConfigTasks(java.lang.String stageId,
                               java.util.Vector taskVector)
                        throws OperationFailedException
Method to execute the provisioning operation. It executes the template synchronously and scheduling is done in the ProvisioningAPI implementation itself.

Throws:
OperationFailedException - if an error occurs

setRequestID

public void setRequestID(java.lang.String requestID)
Set the request id before the request sent in case of asynchronous execution.

Parameters:
requestID - a long value to uniquly identify a operation.

getRequestID

public java.lang.String getRequestID()
Returns the request id of the request sent.

Returns:
request id of this operation

getStatus

public java.lang.String getStatus()
Returns the current status of this operation and it will be one of the following: "NOTSTARTED", "INPROGRESS", "FINISHED" or "FAILED". //No Internationalisation

Returns:
current status of this operation.

setStatus

public void setStatus(java.lang.String status)
Set the status of this operation

Parameters:
status - the status of the opreation

setResult

public void setResult(TemplateResult templateresult,
                      java.lang.String stageID)
Set the result of the operation once configuration finished.

Parameters:
templateResult - TemplateResult that contains result of the operation

setResult

public void setResult(TemplateResult result)

setScheduledTime

public void setScheduledTime(java.lang.String scheduledTime)

getResult

public TemplateResult getResult()
Returns the result of this provisioning operation in TemplateResult xml form. The format of TemplateResult will be available as TemplateResult.dtd in <Web NMS Home>/provisioningtemplates directory.

Returns:
result of this operation

getStageStatus

public java.lang.String getStageStatus(java.lang.String stageId)

"WEBNMS_5 API Docs"

Copyright © 2011 ZOHO Corp., All Rights Reserved.