public class ServiceManagerScriptObject
extends java.lang.Object
Constructor and Description |
---|
ServiceManagerScriptObject()
Construct a uninitialized object.
|
ServiceManagerScriptObject(java.lang.String url,
java.lang.String user,
java.lang.String password)
Construct a new ServiceManagerScriptObject with the specified url and user/password combination
|
Modifier and Type | Method and Description |
---|---|
void |
annotateChange(java.lang.String changeId,
org.dom4j.Element instance)
Retract a Service Manager Change with the specified fields and values
|
void |
annotateChange(java.lang.String changeId,
java.util.Map<java.lang.String,java.lang.Object> fields)
Retract a Service Manager Change with the specified fields and values
|
void |
annotateChange(java.lang.String changeId,
java.lang.String description)
Annotate the Service Manager Change identified by the Change No.
|
void |
annotateChange(java.lang.String changeId,
java.lang.String type,
java.lang.String description)
Annotate the Service Manager Change identified by the Change No.
|
void |
annotateChange(java.lang.String changeId,
java.lang.String type,
java.lang.String operator,
java.lang.String description)
Annotate the Service Manager Change identified by the Change No.
|
java.util.List<java.lang.String> |
approveChange(java.lang.String changeId,
org.dom4j.Element instance)
Approve a Service Manager Change with the specified fields and values
|
java.util.List<java.lang.String> |
approveChange(java.lang.String changeId,
java.util.Map<java.lang.String,java.lang.Object> fields)
Approve a Service Manager Change with the specified fields and values
|
java.util.List<java.lang.String> |
approveChange(java.lang.String changeId,
java.lang.String message)
Approve a Service Manager Change
|
java.util.List<java.lang.String> |
approveChange(java.lang.String changeId,
java.lang.String type,
java.lang.String message)
Approve a Service Manager Change
|
void |
closeChange(java.lang.String changeId,
org.dom4j.Element instance)
Close the Service Manager Change identified by the Change No.
|
void |
closeChange(java.lang.String changeId,
java.util.Map<java.lang.String,java.lang.Object> fields)
Close the Service Manager Change identified by the Change No.
|
void |
closeChange(java.lang.String changeId,
java.lang.String resolution,
java.lang.String fixType)
Close the Service Manager incident identified by the Change No.
|
java.util.List<java.lang.String> |
denyChange(java.lang.String changeId,
org.dom4j.Element instance)
Deny a Service Manager Change with the specified fields and values
|
java.util.List<java.lang.String> |
denyChange(java.lang.String changeId,
java.util.Map<java.lang.String,java.lang.Object> fields)
Deny a Service Manager Change with the specified fields and values
|
java.util.List<java.lang.String> |
denyChange(java.lang.String changeId,
java.lang.String message)
Deny a Service Manager Change
|
java.util.List<java.lang.String> |
denyChange(java.lang.String changeId,
java.lang.String type,
java.lang.String message)
Deny a Service Manager Change
|
java.util.List<ServiceManagerChange> |
getChangeRecords(java.lang.String changeID,
java.lang.String action)
Retrieves the related records for a particular change and returns a list of the related records in a
ServiceManagerChange object depending on the called Webservice
|
java.util.List<ServiceManagerChange> |
getChangeRecords(java.lang.String changeID,
java.lang.String action,
java.lang.String idTokenName)
Retrieves the related records for a particular change and returns a list of the related records in a
ServiceManagerChange object depending on the called Webservice
This is necessary since the Approval records use "ChangeNumber" to identify them while Change uses
"ChangeID".
|
java.util.Map<java.lang.String,java.util.Collection<java.lang.String>> |
getGroupedList(java.lang.String operation,
java.lang.String queryString,
java.lang.String valueElement,
java.lang.String groupElement)
Retrieve a list of strings from Service Manager and group them based on a field on that object
|
java.util.SortedSet<java.lang.String> |
getSortedList(java.lang.String operation,
java.lang.String queryString,
java.lang.String elementName)
Retrieve a list of strings from Service Manager
|
java.util.Collection<java.util.Map<java.lang.String,java.lang.String>> |
getValueMap(java.lang.String operation,
java.lang.String queryString)
Retrieve a list of all fields and values from Service Manager for a specified object
|
void |
initializeClient(java.lang.String url,
java.lang.String user,
java.lang.String password)
Initialize this class with the specified url and user/password combination
|
java.util.List<ServiceManagerChange> |
queryChange(ServiceManagerQuery query)
Retrieve a list of Changes from Service Manager
|
java.util.List<ServiceManagerChange> |
queryChange(java.lang.String queryString)
Retrieve a list of changes from Service Manager
|
void |
retractChange(java.lang.String changeId,
org.dom4j.Element instance)
Retract a Service Manager Change with the specified fields and values
|
void |
retractChange(java.lang.String changeId,
java.util.Map<java.lang.String,java.lang.Object> fields)
Retract a Service Manager Change with the specified fields and values
|
void |
retractChange(java.lang.String changeId,
java.lang.String message)
Retract a Service Manager Change
|
void |
retractChange(java.lang.String changeId,
java.lang.String type,
java.lang.String message)
Retract a Service Manager Change
|
org.dom4j.Node |
sendReceive(java.lang.String action,
org.dom4j.Element payload)
Send a SOAP request to the Service Manager server and return the contents ot the returned SOAP body
|
void |
updateChange(java.lang.String changeId,
org.dom4j.Element instance)
Update the Service Manager incident identified by the Change No.
|
void |
updateChange(java.lang.String changeId,
java.util.Map<java.lang.String,java.lang.Object> fields)
Update the Service Manager incident identified by the Change No.
|
void |
updateChange(java.lang.String changeId,
java.lang.String message)
Update the Service Manager Change identified by the Change No.
|
void |
updateChange(java.lang.String changeId,
java.lang.String message,
java.lang.String status)
Update the Service Manager incident identified by the incidentID with a journal update and status
|
void |
updateChange(java.lang.String changeId,
java.lang.String message,
java.lang.String status,
java.lang.String assignee)
Update the Service Manager Change identified by the Change No.
|
java.util.List<ServiceManagerChange> |
validateCredentials(java.lang.String operation,
java.lang.String queryString)
Given a List Operation this method will return null if the initialized credentials are valid and a string
detailing the error otherwise
|
public ServiceManagerScriptObject()
public ServiceManagerScriptObject(java.lang.String url, java.lang.String user, java.lang.String password)
url
- The URL of the Service Manager web servicesuser
- The user name to use for the Service Manager web servicespassword
- The password to use for the Service Manager web servicespublic void initializeClient(java.lang.String url, java.lang.String user, java.lang.String password)
url
- the url of the Service Manager web servicesuser
- the user for the Service Manager web servicespassword
- the password for the Service Manager web servicespublic java.util.List<java.lang.String> approveChange(java.lang.String changeId, java.lang.String message) throws ServiceManagerException
Note: This method assumes that a extaccess record exists with the following values: Name: cm3r Object Name: Change Data Policy: number field must have the Change No. API Caption and Exclude false
changeId
- change numberServiceManagerException
- if a error occurs with a message detailing that errorpublic java.util.List<java.lang.String> approveChange(java.lang.String changeId, java.lang.String type, java.lang.String message) throws ServiceManagerException
Note: This method assumes that a extaccess record exists with the following values: Name: cm3r Object Name: Change Data Policy: number field must have the Change No. API Caption and Exclude false
changeId
- change numbertype
- activity type to be used for annotationServiceManagerException
- if a error occurs with a message detailing that errorpublic java.util.List<java.lang.String> approveChange(java.lang.String changeId, java.util.Map<java.lang.String,java.lang.Object> fields) throws ServiceManagerException
Note: This method assumes that a extaccess record exists with the following values: Name: cm3r Object Name: Change Data Policy: number field must have the Change No. API Caption and Exclude false
changeId
- change numberfields
- The Map used to construct the instance XML elementServiceManagerException
- if a error occurs with a message detailing that errorpublic java.util.List<java.lang.String> approveChange(java.lang.String changeId, org.dom4j.Element instance) throws ServiceManagerException
Note: This method assumes that a extaccess record exists with the following values: Name: cm3r Object Name: Change Data Policy: number field must have the Change No. API Caption and Exclude false
changeId
- change numberinstance
- the XML instance element for the create requestServiceManagerException
- if a error occurs with a message detailing that errorpublic java.util.List<java.lang.String> denyChange(java.lang.String changeId, java.lang.String message) throws ServiceManagerException
Note: This method assumes that a extaccess record exists with the following values: Name: cm3r Object Name: Change Data Policy: number field must have the Change No. API Caption and Exclude false
changeId
- change numberServiceManagerException
- if a error occurs with a message detailing that errorpublic java.util.List<java.lang.String> denyChange(java.lang.String changeId, java.lang.String type, java.lang.String message) throws ServiceManagerException
Note: This method assumes that a extaccess record exists with the following values: Name: cm3r Object Name: Change Data Policy: number field must have the Change No. API Caption and Exclude false
changeId
- change numbertype
- activity type to be used for annotationServiceManagerException
- if a error occurs with a message detailing that errorpublic java.util.List<java.lang.String> denyChange(java.lang.String changeId, java.util.Map<java.lang.String,java.lang.Object> fields) throws ServiceManagerException
Note: This method assumes that a extaccess record exists with the following values: Name: cm3r Object Name: Change Data Policy: number field must have the Change No. API Caption and Exclude false
changeId
- change numberfields
- The Map used to construct the instance XML elementServiceManagerException
- if a error occurs with a message detailing that errorpublic java.util.List<java.lang.String> denyChange(java.lang.String changeId, org.dom4j.Element instance) throws ServiceManagerException
Note: This method assumes that a extaccess record exists with the following values: Name: cm3r Object Name: Change Data Policy: number field must have the Change No. API Caption and Exclude false
changeId
- change numberinstance
- the XML instance element for the create requestServiceManagerException
- if a error occurs with a message detailing that errorpublic void retractChange(java.lang.String changeId, java.lang.String message) throws ServiceManagerException
Note: This method assumes that a extaccess record exists with the following values: Name: cm3r Object Name: Change Data Policy: number field must have the Change No. API Caption and Exclude false
changeId
- change numberServiceManagerException
- if a error occurs with a message detailing that errorpublic void retractChange(java.lang.String changeId, java.lang.String type, java.lang.String message) throws ServiceManagerException
Note: This method assumes that a extaccess record exists with the following values: Name: cm3r Object Name: Change Data Policy: number field must have the Change No. API Caption and Exclude false
changeId
- change numbertype
- activity type to be used for annotationServiceManagerException
- if a error occurs with a message detailing that errorpublic void retractChange(java.lang.String changeId, java.util.Map<java.lang.String,java.lang.Object> fields) throws ServiceManagerException
Note: This method assumes that a extaccess record exists with the following values: Name: cm3r Object Name: Change Data Policy: number field must have the Change No. API Caption and Exclude false
changeId
- change numberfields
- The Map used to construct the instance XML elementServiceManagerException
- if a error occurs with a message detailing that errorpublic void retractChange(java.lang.String changeId, org.dom4j.Element instance) throws ServiceManagerException
Note: This method assumes that a extaccess record exists with the following values: Name: cm3r Object Name: Change Data Policy: number field must have the Change No. API Caption and Exclude false
changeId
- change numberinstance
- the XML instance element for the create requestServiceManagerException
- if a error occurs with a message detailing that errorpublic void annotateChange(java.lang.String changeId, java.lang.String description) throws ServiceManagerException
Note: This method assumes that a extaccess record exists with the following values: Name: activitycm3r Object Name: ChangeActivity Data Policy: number field must have the ChangeID API Caption type field must have the Type API Caption operator field must have the Operator API Caption description field must have the Description API Caption
changeId
- Change id identifying the incident to updatedescription
- The update descriptionServiceManagerException
- if the annotation was not successfulpublic void annotateChange(java.lang.String changeId, java.lang.String type, java.lang.String description) throws ServiceManagerException
Note: This method assumes that a extaccess record exists with the following values: Name: activitycm3r Object Name: ChangeActivity Data Policy: number field must have the ChangeID API Caption type field must have the Type API Caption description field must have the Description API Caption
changeId
- Change id identifying the incident to updatetype
- The type of this history itemdescription
- The update descriptionServiceManagerException
- if the annotation was not successfulpublic void annotateChange(java.lang.String changeId, java.lang.String type, java.lang.String operator, java.lang.String description) throws ServiceManagerException
Note: This method assumes that a extaccess record exists with the following values: Name: activitycm3r Object Name: ChangeActivity Data Policy: number field must have the ChangeID API Caption type field must have the Type API Caption operator field must have the Operator API Caption description field must have the Description API Caption
changeId
- Change id identifying the incident to updatetype
- The type of this history itemoperator
- The operator updating this history itemdescription
- The update descriptionServiceManagerException
- if the annotation was not successfulpublic void annotateChange(java.lang.String changeId, java.util.Map<java.lang.String,java.lang.Object> fields) throws ServiceManagerException
Note: This method assumes that a extaccess record exists with the following values: Name: cm3r Object Name: Change Data Policy: number field must have the Change No. API Caption and Exclude false
changeId
- change numberfields
- The Map used to construct the instance XML elementServiceManagerException
- if a error occurs with a message detailing that errorpublic void annotateChange(java.lang.String changeId, org.dom4j.Element instance) throws ServiceManagerException
Note: This method assumes that a extaccess record exists with the following values: Name: cm3r Object Name: Change Data Policy: number field must have the Change No. API Caption and Exclude false
changeId
- change numberinstance
- the XML instance element for the create requestServiceManagerException
- if a error occurs with a message detailing that errorpublic void updateChange(java.lang.String changeId, java.lang.String message) throws ServiceManagerException
Note: This method assumes that a extaccess record exists with the following values: Name: cm3r Object Name: Change Data Policy: number field must have the Change No. API Caption and Exclude false update.action field must have the JournalUpdates API Caption and Exclude false
changeId
- Change ID identifying the change to updatemessage
- The message to be added to the JournalUpdatesServiceManagerException
- if the update was not successfulpublic void updateChange(java.lang.String changeId, java.lang.String message, java.lang.String status) throws ServiceManagerException
Note: This method assumes that a extaccess record exists with the following values: Name: cm3r Object Name: Change Data Policy: number field must have the Change No. API Caption and Exclude false update.action field must have the JournalUpdates API Caption and Exclude false problem.status field must have the IMTicketStatus API Caption and Exclude false
changeId
- incident id identifying the incident to updatemessage
- The message to be added to the JournalUpdatesstatus
- The status to update the incident withServiceManagerException
- if the update was not successfulpublic void updateChange(java.lang.String changeId, java.lang.String message, java.lang.String status, java.lang.String assignee) throws ServiceManagerException
Note: This method assumes that a extaccess record exists with the following values: Name: cm3r Object Name: Change Data Policy: number field must have the Change No. API Caption and Exclude false update.action field must have the JournalUpdates API Caption and Exclude false problem.status field must have the IMTicketStatus API Caption and Exclude false assignee.name field must have the AssigneeName API Caption and Exclude false
changeId
- Change id identifying the incident to updatemessage
- The message to be added to the JournalUpdatesstatus
- The status to update the incident withassignee
- The assignee to update the incident withServiceManagerException
- if the update was not successfulpublic void updateChange(java.lang.String changeId, java.util.Map<java.lang.String,java.lang.Object> fields) throws ServiceManagerException
Note: This method assumes that a extaccess record exists with the following values: Name: cm3r Object Name: Change Data Policy: number field must have the Change No. API Caption and Exclude false
changeId
- Change id identifying the incident to updatefields
- The Map used to construct the instance XML elementServiceManagerException
- if a error occurs with a message detailing that errorpublic void updateChange(java.lang.String changeId, org.dom4j.Element instance) throws ServiceManagerException
Note: This method assumes that a extaccess record exists with the following values: Name: cm3r Object Name: Change Data Policy: number field must have the Change No. API Caption and Exclude false
changeId
- Change id identifying the incident to updateinstance
- the XML instance element for the update requestServiceManagerException
- if a error occurs with a message detailing that errorpublic void closeChange(java.lang.String changeId, java.lang.String resolution, java.lang.String fixType) throws ServiceManagerException
Note: This method assumes that a extaccess record exists with the following values: Name: cm3r Object Name: Change Data Policy: number field must have the Change No. API Caption and Exclude false resolution field must have the Resolution API Caption and Exclude false
incidentId
- Change id identifying the incident to closeresolution
- The message to be added to the ResolutionfixType
- Temporary or PermanentServiceManagerException
- if the update was not successfulpublic void closeChange(java.lang.String changeId, java.util.Map<java.lang.String,java.lang.Object> fields) throws ServiceManagerException
Note: This method assumes that a extaccess record exists with the following values: Name: cm3r Object Name: Change Data Policy: number field must have the Change No. API Caption and Exclude false
changeId
- Change id identifying the incident to closefields
- The Map used to construct the instance XML elementServiceManagerException
- if a error occurs with a message detailing that errorpublic void closeChange(java.lang.String changeId, org.dom4j.Element instance) throws ServiceManagerException
Note: This method assumes that a extaccess record exists with the following values: Name: cm3r Object Name: Change Data Policy: number field must have the Change No. API Caption and Exclude false
changeId
- Change id identifying the incident to closeinstance
- the XML instance element for the close requestServiceManagerException
- if a error occurs with a message detailing that errorpublic java.util.List<ServiceManagerChange> queryChange(ServiceManagerQuery query) throws ServiceManagerException
Note: This method assumes that a extaccess record exists with the following values: Name: cm3r Object Name: Change
query
- A ServiceManagerQuery
object used to construct the Service Manager queryServiceManagerChange
objects representing the incidents retrieved from Service ManagerServiceManagerException
- if a error occurs with a message detailing that errorpublic java.util.List<ServiceManagerChange> queryChange(java.lang.String queryString) throws ServiceManagerException
Note: This method assumes that a extaccess record exists with the following values: Name: cm3r Object Name: Change
queryString
- The search query passed to Service ManagerServiceManagerChange
objects representing the Changes retrieved from Service ManagerServiceManagerException
- if a error occurs with a message detailing that errorpublic java.util.List<ServiceManagerChange> getChangeRecords(java.lang.String changeID, java.lang.String action, java.lang.String idTokenName) throws ServiceManagerException
ChangeID
- unique key used to identify the changeaction
- String identifying the webservice request that will be madeidTokenName
- String identifying the Change ID token in the Web Service requestServiceManagerException
public java.util.List<ServiceManagerChange> getChangeRecords(java.lang.String changeID, java.lang.String action) throws ServiceManagerException
ChangeID
- unique key used to identify the changeaction
- String identifying the webservice request that will be madeServiceManagerException
public java.util.SortedSet<java.lang.String> getSortedList(java.lang.String operation, java.lang.String queryString, java.lang.String elementName) throws ServiceManagerException
operation
- The name of the root element of the request ("RetrieveCategoryListRequest" for example)queryString
- The query used to select the valueselementName
- the API Caption of the field to return the values forServiceManagerException
- if a error occurs with a message detailing that errorpublic java.util.Collection<java.util.Map<java.lang.String,java.lang.String>> getValueMap(java.lang.String operation, java.lang.String queryString) throws ServiceManagerException
operation
- The name of the root element of the request ("RetrieveCategoryListRequest" for example)queryString
- The query used to select the valuesServiceManagerException
- if a error occurs with a message detailing that errorpublic java.util.Map<java.lang.String,java.util.Collection<java.lang.String>> getGroupedList(java.lang.String operation, java.lang.String queryString, java.lang.String valueElement, java.lang.String groupElement) throws ServiceManagerException
operation
- The name of the root element of the request ("RetrieveCategoryListRequest" for example)queryString
- The query used to select the valuesvalueElement
- the API Caption of the field to return the values forgroupElement
- the API Caption of the field to group the returned values byServiceManagerException
- if a error occurs with a message detailing that errorpublic java.util.List<ServiceManagerChange> validateCredentials(java.lang.String operation, java.lang.String queryString) throws ServiceManagerException
operation
- The name of the root element of the request ("RetrieveCategoryListRequest" for example)queryString
- String containing the query to pass into the operationServiceManagerException
- if a error occurs with a message detailing that errorpublic org.dom4j.Node sendReceive(java.lang.String action, org.dom4j.Element payload) throws ServiceManagerException
action
- The SOAP Action to perform in Service Manager. The possible values are defined on the extaccess
tablepayload
- A dom4j Element that will be the payload of the SOAP requestServiceManagerException
- if a error occurs with a message detailing that error