public class RequirementsService
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
PROPERTY_OBSOLETE
Boolean value that defines if a requirement is marked as obsolete or not.
|
static java.lang.String |
PROPERTY_PRIORITY
Integer value that sets the current priority state of a requirement:
0 not set 1 Low 2 Medium 3 High 4 Critical |
static java.lang.String |
PROPERTY_REVIEWED
Boolean value that defines if a requirement is reviewed or not.
|
static java.lang.String |
PROPERTY_RISK
Integer value that sets the current risk state of a requirement:
0 not set 1 Low 2 Medium 3 High 4 Critical |
static java.lang.String |
PROPERTY_VERSION
Used for external requirement management tools to set their requirement version here.
|
| Constructor and Description |
|---|
RequirementsService() |
| Modifier and Type | Method and Description |
|---|---|
void |
assignTest(java.lang.String sessionId,
int requirementId,
int testId)
This method assigns the test with the provided test ID to the requirement with the provided requirement ID.
|
void |
deleteCustomProperty(java.lang.String sessionId,
int propertyId) |
void |
deleteRequirement(java.lang.String sessionId,
int requirementId,
boolean recursiv)
This method deletes the provided requirement.
|
Test[] |
getAssignedTests(java.lang.String sessionId,
int requirementId)
This method returns all assigned tests for the provided requirement.
|
CustomProperty[] |
getCustomProperties(java.lang.String sessionId,
int projectId)
Retrieves all CustomProperty objects for a project.
|
CustomProperty |
getCustomProperty(java.lang.String sessionId,
int propertyId)
Retrieves a CustomProperty object for the given propertyId.
|
Project |
getProject(java.lang.String sessionId,
int projectId)
This method returns the project for the provided projectId.
|
Project[] |
getProjects(java.lang.String sessionId)
This method returns all existing and available projects.
|
PropertyValue |
getProperty(java.lang.String sessionId,
int requirementId,
java.lang.String propertyId)
This method returns the property value for a provided property ID and requirement.
|
java.lang.String[] |
getPropertyIds(java.lang.String sessionId,
int projectId)
This method returns the property IDs of all defined properties for the provided project.
|
PropertyMetaInfo |
getPropertyInfo(java.lang.String sessionId,
int projectId,
java.lang.String propertyId)
This method returns the meta information for a property of a project.
|
Requirement |
getRequirement(java.lang.String sessionId,
int requirementId)
This method returns the requirement for the provided requirement ID.
|
Requirement[] |
getRequirementChildren(java.lang.String sessionId,
int projectId,
int requirementId)
This method returns all child requirements of the provided requirement.
|
Requirement[] |
getTopLevelRequirements(java.lang.String sessionId,
int projectId)
This method returns all top level requirements of the provided project.
|
void |
insertCustomProperty(java.lang.String sessionId,
CustomProperty newProperty) |
java.lang.String |
logonUser(java.lang.String username,
java.lang.String plainPwd)
Logs on with a given username and password.
|
void |
setRequirementFlagStatus(java.lang.String sessionId,
int requirementId,
int flagType,
java.lang.Boolean includeChildren,
java.lang.String comments)
This method sets or clears a flag for a requirement and optionally its child requirements.
|
void |
unassignTest(java.lang.String sessionId,
int requirementId,
int testId)
This method unassigns the test with the provided test ID from the requirement with the provided requirement ID.
|
void |
updateProperties(java.lang.String sessionId,
int requirementId,
PropertyValue[] properties)
This method updates all provided property values.
|
java.lang.String |
updateProperty(java.lang.String sessionId,
int requirementId,
PropertyValue property)
This method updates the property value.
|
int |
updateRequirement(java.lang.String sessionId,
int projectId,
Requirement requirement,
int prevSiblingId)
This method creates or updates the provided requirement.
|
public static final java.lang.String PROPERTY_RISK
public static final java.lang.String PROPERTY_REVIEWED
public static final java.lang.String PROPERTY_PRIORITY
public static final java.lang.String PROPERTY_OBSOLETE
public static final java.lang.String PROPERTY_VERSION
public java.lang.String logonUser(java.lang.String username,
java.lang.String plainPwd)
username - the login usernameplainPwd - the password of the specified usernameWSFaultException - if logon failspublic Project getProject(java.lang.String sessionId, int projectId) throws WSFaultException
sessionId - the web-service token, generated in the Silk Central UI, or the unique ID of the session created with logonUser(String, String)projectId - ID of the projectWSFaultExceptionpublic Project[] getProjects(java.lang.String sessionId) throws WSFaultException
sessionId - the web-service token, generated in the Silk Central UI, or the unique ID of the session created with logonUser(String, String)WSFaultExceptionpublic Requirement[] getTopLevelRequirements(java.lang.String sessionId, int projectId) throws WSFaultException
sessionId - the web-service token, generated in the Silk Central UI, or the unique ID of the session created with logonUser(String, String)projectId - ID of the projectWSFaultExceptionpublic Requirement[] getRequirementChildren(java.lang.String sessionId, int projectId, int requirementId) throws WSFaultException
sessionId - the web-service token, generated in the Silk Central UI, or the unique ID of the session created with logonUser(String, String)projectId - ID of the projectrequirementId - ID of the requirement from which you want to get the childrenWSFaultExceptionpublic Requirement getRequirement(java.lang.String sessionId, int requirementId) throws WSFaultException
sessionId - the web-service token, generated in the Silk Central UI, or the unique ID of the session created with logonUser(String, String)requirementId - ID of the requirement that is to be returnedWSFaultExceptionpublic int updateRequirement(java.lang.String sessionId,
int projectId,
Requirement requirement,
int prevSiblingId)
throws WSFaultException
sessionId - the web-service token, generated in the Silk Central UI, or the unique ID of the session created with logonUser(String, String)projectId - ID of the project where to update the requirementrequirement - the requirement object of the requirement that is to be updatedprevSiblingId - (optional) if supported, the ID of the previous sibling requirement, -1 if not supported or this is the first siblingWSFaultExceptionpublic void deleteRequirement(java.lang.String sessionId,
int requirementId,
boolean recursiv)
throws WSFaultException
sessionId - the web-service token, generated in the Silk Central UI, or the unique ID of the session created with logonUser(String, String)requirementId - ID of the requirement that is to be deletedrecursiv - boolean, that determines if existing children are to be deleted
(this flag is not supported in the requirements service. The requirement and all its children are always deleted.)WSFaultExceptionpublic java.lang.String[] getPropertyIds(java.lang.String sessionId,
int projectId)
throws WSFaultException
sessionId - the web-service token, generated in the Silk Central UI, or the unique ID of the session created with logonUser(String, String)projectId - ID of the projectWSFaultExceptionpublic PropertyMetaInfo getPropertyInfo(java.lang.String sessionId, int projectId, java.lang.String propertyId) throws WSFaultException
sessionId - the web-service token, generated in the Silk Central UI, or the unique ID of the session created with logonUser(String, String)projectId - ID of the projectpropertyId - ID of the property that is to be retrievedWSFaultExceptionpublic PropertyValue getProperty(java.lang.String sessionId, int requirementId, java.lang.String propertyId) throws WSFaultException
sessionId - the web-service token, generated in the Silk Central UI, or the unique ID of the session created with logonUser(String, String)requirementId - ID of the requirementpropertyId - ID of the property that is to be retrievedWSFaultExceptionpublic java.lang.String updateProperty(java.lang.String sessionId,
int requirementId,
PropertyValue property)
throws WSFaultException
sessionId - the web-service token, generated in the Silk Central UI, or the unique ID of the session created with logonUser(String, String)requirementId - ID of the requirement that is to be updatedproperty - property that is to be updatedWSFaultExceptionpublic void updateProperties(java.lang.String sessionId,
int requirementId,
PropertyValue[] properties)
throws WSFaultException
sessionId - the web-service token, generated in the Silk Central UI, or the unique ID of the session created with logonUser(String, String)requirementId - ID of the requirement that is to be updatedproperties - list of properties that are to be updatedWSFaultExceptionpublic Test[] getAssignedTests(java.lang.String sessionId, int requirementId) throws WSFaultException
sessionId - the web-service token, generated in the Silk Central UI, or the unique ID of the session created with logonUser(String, String)requirementId - ID of the requirement from which you want to get the assigned testsWSFaultExceptionpublic void assignTest(java.lang.String sessionId,
int requirementId,
int testId)
throws WSFaultException
sessionId - the web-service token, generated in the Silk Central UI, or the unique ID of the session created with logonUser(String, String)requirementId - ID of the requirement, that the test ID is to be assigned totestId - ID of the test, that is to be assigned to the requirementWSFaultExceptionpublic void unassignTest(java.lang.String sessionId,
int requirementId,
int testId)
throws WSFaultException
sessionId - the web-service token, generated in the Silk Central UI, or the unique ID of the session created with logonUser(String, String)requirementId - ID of the requirement, that the test ID is to be unassigned fromtestId - ID of the test, that is to be unassigned from the requirementWSFaultExceptionpublic void setRequirementFlagStatus(java.lang.String sessionId,
int requirementId,
int flagType,
java.lang.Boolean includeChildren,
java.lang.String comments)
throws WSFaultException
sessionId - the web-service token, generated in the Silk Central UI, or the unique ID of the session created with logonUser(String, String)requirementId - ID of the requirementflagType - NONE(0), FLAGGED(1)includeChildren - indicates if child requirements need to be flaggedcomments - flag commentsWSFaultExceptionpublic CustomProperty getCustomProperty(java.lang.String sessionId, int propertyId) throws WSFaultException
sessionId - the web-service token, generated in the Silk Central UI, or the unique ID of the session created with logonUser(String, String)propertyId - ID of an existing propertyWSFaultExceptionpublic CustomProperty[] getCustomProperties(java.lang.String sessionId, int projectId) throws WSFaultException
sessionId - the web-service token, generated in the Silk Central UI, or the unique ID of the session created with logonUser(String, String)projectId - ID of the project for which to retrieve the CustomProperty objects.WSFaultExceptionpublic void insertCustomProperty(java.lang.String sessionId,
CustomProperty newProperty)
throws WSFaultException
sessionId - the web-service token, generated in the Silk Central UI, or the unique ID of the session created with logonUser(String, String)newProperty - the CustomProperty object to be added to a project
Note: The project ID has to be set correctly in the CustomProperty object.WSFaultExceptionpublic void deleteCustomProperty(java.lang.String sessionId,
int propertyId)
throws WSFaultException
sessionId - the web-service token, generated in the Silk Central UI, or the unique ID of the session created with logonUser(String, String)propertyId - ID of the CustomProperty to be deletedWSFaultExceptionCopyright © Micro Focus 2004-2019. All rights reserved.