|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.telelogic.cs.webservices.ChangeService
public class ChangeService
ChangeService is a web service that communicates with wrapped, document/literal style SOAP messages, and as such can used by any language or tool that understands this communication style. For simplicity this document documents the operations as Java code, but the details of how the operations work are the same no matter what tool or client language is used. Each method described here corresponds to an operation of the same name in the ChangeService WSDL document; each type corresponds to to an XML element in the types section of that document. Combining this document with ChangeService WSDL should give a complete view of how to interact with ChangeService.
ChangeService is automatically deployed as part of a standard Rational Change installation;
no additional configuration is required. As such, it will be available through the same
host and port as the Rational Change web interface. Once Rational Change is running
the WSDL for it can be found at
http://yourserver:8600/your_context/webservices/ChangeService?wsdl
(substitute the server name,
port and context root of your installation).
ChangeService operates with the same security model as the Rational Change web interface:
a user is required to log on to receive a token; the token must be passed
with each request. Operations given an invalid token will fail. Some operations may fail
with a valid token if the user associated with that token is restricted by further security
restrictions like lifecycle or group security. Requests and responses, including the login
operation, are sent as clear-text XML documents. Security conscious sites
are recommended to configure Rational Change to operate over secure HTTP (HTTPS) to encrypt
all communications.
getLoginInfo
. This does not require a token and returns
information about the available Rational Change databases and roles. After deciding
on a database and role, a call can be made to login
to authenticate
the user and receive a token specific that database. Clients must keep track of
this token for the duration of their interaction. All other operations will require a valid
token. Note that a different token is required for each database and role the user
wishes to log on with. Tokens can become invalid after going unused for a certain amount of time
or if the Rational Change server is restarted.Many operations also require a CR ID (change request ID) to know which change request to operate on. In non-DCM-enabled databases this is simply the problem number, which is just a unique integer associated with each change request, for example, 101. In DCM-enabled databases this will be the DCM database identifier, the DCM delimiter, and the problem number, for example, m#101. While the Rational Change web interface will allow users to omit the DCM identifier in some cases and still shows the right change request, ChangeService does not promise this convenience; you should always specify the full CR ID in DCM-enabled databases. In practice, this is usually not a worry since operations that return change requests will already include the correct CR ID.
Attribute
value objects.
Attributes can be defined to have one of several possible types in the database:
string, date, and boolean. Consequently, the Attribute
type has optional value fields for each possible type. When working with an attribute
you should set and read the appropriate value based on the known type of the
attribute. For example, for a string attribute like 'problem_synopsis' you should set
or read the stringValue
field, for a date you should set and
read the dateTimeValue
field, etc. Other values should be left unset,
but will be ignored if present. The type of an attribute found in its
attribute definition.Always take note of the type to the attribute you are dealing with--their types may not always be what you expect. For example, some of the default attributes that are shown as checkboxes in the web interface (that is, some CCM_TOGGLE attributes) have historically used 'string' as their database type; other checkbox attributes use 'boolean' for the database type. While these types are not important to a user of the web interface, web service clients must get them right to avoid errors and confusing results.
While there is no explicit function for deleting attributes, they can
be deleted by setting them to a null value. In most web service client
frameworks this is accomplished by setting the attribute's appropriate
type value to null
, nil
, or a similar "unset" value.
The actual XML request would omit the element for the "null" value entirely,
or create it as an empty element with no children.
Rational Change allows you to treat certain things as "attributes" in its lifecycle editor
even though they are not actually attributes in the database.
Relationships are treated like attributes with regards to adding them
to a form, but they cannot be looked up with attribute related functions.
Pseudo-attributes, which begin with an underscore, cannot be read;
they are used to trigger action when modifying a change request. For example, _COMMENTS
can be set as if it were an attribute, but it actually causes a note to be appended
to the transition log.
Optionally, you may also want to check if your web service client supports HTTP chunking. Though not required, this can significantly decrease the amount of memory required to send large attachments.
Constructor Summary | |
---|---|
ChangeService()
|
Method Summary | |
---|---|
com.telelogic.cs.webservices.types.AddAdminNotesResponse |
addAdminNotes(java.lang.String token,
java.lang.String crid,
com.telelogic.cs.webservices.types.ArrayOfAdminNote adminNotes)
Allows admins to append notes to the transition log. |
com.telelogic.cs.webservices.types.AssociateTaskResponse |
associateTask(java.lang.String token,
java.lang.String crid,
java.lang.String taskId)
Associates an existing task to a change request. |
java.lang.String |
createAssociatedTask(java.lang.String token,
java.lang.String crid,
com.telelogic.cs.webservices.types.ArrayOfAttribute attributes)
Creates a new CM task associated with the given change request. |
com.telelogic.cs.webservices.types.DeleteAttachmentResponse |
deleteAttachment(java.lang.String token,
java.lang.String attachmentId)
Removes an attachment from its associated change request and deletes it. |
com.telelogic.cs.webservices.types.DeleteQueryResponse |
deleteQuery(java.lang.String token,
com.telelogic.cs.webservices.types.QueryType type,
java.lang.String name)
Deletes a saved CR query by name. |
com.telelogic.cs.webservices.types.DisassociateTaskResponse |
disassociateTask(java.lang.String token,
java.lang.String crid,
java.lang.String taskId)
Disassociates a task from a change request. |
javax.activation.DataHandler |
downloadAttachment(java.lang.String token,
java.lang.String attachmentId)
Downloads a single attachment from a CR. |
com.telelogic.cs.webservices.types.ArrayOfStateDefinition |
getAllStateDefs(java.lang.String token)
Gets all state definitions for the current process, that is, the state definitions from each lifecycle. |
com.telelogic.cs.webservices.types.ArrayOfSubmitStates |
getAllSubmitDetails(java.lang.String token)
Gets all states that CRs can be submitted to, plus the label of the corresponding submit transition. |
com.telelogic.cs.webservices.types.ArrayOfString |
getAllSubmitStates(java.lang.String token)
Gets all states that CRs can be submitted to. |
com.telelogic.cs.webservices.types.ArrayOfTask |
getAssociatedTasks(java.lang.String token,
java.lang.String crid,
com.telelogic.cs.webservices.types.ArrayOfString attributeNames)
Gets the tasks associated with a given change request. |
com.telelogic.cs.webservices.types.ArrayOfAttributeDefinition |
getAttributeDefs(java.lang.String token)
Gets all the attribute definitions for the current process. |
com.telelogic.cs.webservices.types.ArrayOfAttribute |
getAttributes(java.lang.String token,
java.lang.String crid,
com.telelogic.cs.webservices.types.ArrayOfString attributeNames)
Gets attributes values for a change request. |
java.lang.String |
getDcmDelimiter(java.lang.String token)
Get the DCM delimiter for the current database. |
java.lang.String |
getDcmId(java.lang.String token)
Get the DCM identifier for the current database. |
com.telelogic.cs.webservices.types.ArrayOfString |
getLifecycles(java.lang.String token)
Gets the names of all lifecycles in the CR process. |
java.lang.String |
getListboxDefaultValue(java.lang.String token)
Used to get the default display value for listboxes, which is normally "Any". |
com.telelogic.cs.webservices.types.ArrayOfListboxEntry |
getListboxEntries(java.lang.String token,
java.lang.String listboxName)
Gets the possible values for a given listbox. |
com.telelogic.cs.webservices.types.LoginInfo |
getLoginInfo()
Returns the databases and roles a user can use to log on to Rational Change. |
com.telelogic.cs.webservices.types.ArrayOfString |
getNextStates(java.lang.String token,
java.lang.String crid)
Determines the next possible states that a CR can be transitioned to by the current user. |
java.lang.String |
getQueryBuilderUrl(java.lang.String token)
Gets a URL to the new query dialog. |
com.telelogic.cs.webservices.types.ArrayOfQueryDefinition |
getQueryDefs(java.lang.String token)
Gets the saved CR queries available to this user. |
com.telelogic.cs.webservices.types.ArrayOfChangeRequest |
getRelatedFrom(java.lang.String token,
java.lang.String crid,
java.lang.String relationship,
com.telelogic.cs.webservices.types.ArrayOfString attributeNames)
Gets related change requests where the relationship travels from the given change request to zero or more other change requests. |
com.telelogic.cs.webservices.types.ArrayOfChangeRequest |
getRelatedTo(java.lang.String token,
java.lang.String crid,
java.lang.String relationship,
com.telelogic.cs.webservices.types.ArrayOfString attributeNames)
Gets related change requests where the relationship travels to the given change request from zero or more other change requests. |
com.telelogic.cs.webservices.types.ArrayOfReportDefinition |
getReportDefs(java.lang.String token)
Gets the saved CR reports available to this user. |
java.lang.String |
getReportUrl(java.lang.String token,
com.telelogic.cs.webservices.types.QueryType type,
java.lang.String name,
java.lang.String optionalTitle)
Gets the URL to run a saved CR report. |
com.telelogic.cs.webservices.types.ArrayOfString |
getRequiredAttributesForSubmit(java.lang.String token,
java.lang.String toState)
Gets the attributes that are required to submit a new CR into a given state. |
com.telelogic.cs.webservices.types.ArrayOfString |
getRequiredAttributesForTransition(java.lang.String token,
java.lang.String fromState,
java.lang.String toState)
Gets the attributes that are required to transitions a CR from one state to another. |
java.lang.String |
getShowUrl(java.lang.String crUrn,
java.lang.String token)
Returns the URL for showing the CR. |
com.telelogic.cs.webservices.types.ArrayOfStateDefinition |
getStateDefsForLifecycle(java.lang.String token,
java.lang.String lifecycle)
Gets the state definitions for a specific lifecycle. |
com.telelogic.cs.webservices.types.ArrayOfString |
getSubmitStatesForLifecycle(java.lang.String token,
java.lang.String lifecycle)
Gets the states that CRs can be submitted to for a particular lifecycle. |
java.lang.String |
getSubmitUrl(java.lang.String submitState,
java.lang.String token)
Returns the URL for submitting a CR. |
java.lang.String |
getTokenlessShowFormUrl(java.lang.String token,
java.lang.String crid)
Gets a URL to a show for for the given change request. |
com.telelogic.cs.webservices.types.ArrayOfTransitionLogEntry |
getTransitionLog(java.lang.String token,
java.lang.String crid)
Returns a structured version of the transition log. |
java.lang.String |
getTransitionUrl(java.lang.String token,
java.lang.String crUrn,
java.lang.String toState,
java.lang.String optionalLabel)
Gets a URL to the transition form to the requested state for a CR. |
com.telelogic.cs.webservices.types.ArrayOfListboxEntry |
getValueListboxEntries(java.lang.String token,
java.lang.String valueListboxName)
Gets the possible values for a given value-listbox. |
boolean |
isDcmEnabled(java.lang.String token)
Determine if the current database is DCM-enabled. |
com.telelogic.cs.webservices.types.ArrayOfAttachmentDetail |
listAttachments(java.lang.String token,
java.lang.String crid)
Gets information about each of the attachments associated with a CR. |
java.lang.String |
login(java.lang.String username,
java.lang.String password,
java.lang.String database,
java.lang.String role)
Logs on a user and returns a unique token to identify them in future requests. |
com.telelogic.cs.webservices.types.LogoutResponse |
logout(java.lang.String token)
Logs out a user by releasing their checked out license immediately (without any license linger time). |
com.telelogic.cs.webservices.types.ArrayOfChangeRequest |
query(java.lang.String token,
java.lang.String queryString,
com.telelogic.cs.webservices.types.ArrayOfString attributeNames)
Queries for change requests with an ad-hoc query string. |
com.telelogic.cs.webservices.types.RelateResponse |
relate(java.lang.String token,
java.lang.String fromCrid,
java.lang.String toCrid,
java.lang.String relationship)
Relates one change request to another through a given relationship name. |
com.telelogic.cs.webservices.types.ArrayOfChangeRequest |
runQuery(java.lang.String token,
com.telelogic.cs.webservices.types.QueryType type,
java.lang.String name,
com.telelogic.cs.webservices.types.ArrayOfString attributeNames)
Runs a saved CR query by name. |
com.telelogic.cs.webservices.types.SetAttributesResponse |
setAttributes(java.lang.String token,
java.lang.String crid,
com.telelogic.cs.webservices.types.ArrayOfAttribute attributes)
Modifies a change request by updating its attributes with the given values. |
com.telelogic.cs.webservices.types.SetTaskAttributesResponse |
setTaskAttributes(java.lang.String token,
java.lang.String taskId,
com.telelogic.cs.webservices.types.ArrayOfAttribute attributes)
Modifies a task by updating its attributes with the given values. |
java.lang.String |
ssoLogin(java.lang.String ssoToken,
java.lang.String database,
java.lang.String role)
Logs on a user using a single sign on (SSO) token instead of a name and password. |
java.lang.String |
submit(java.lang.String token,
java.lang.String toState,
com.telelogic.cs.webservices.types.ArrayOfAttribute initialAttributes)
Submits and creates a new change request. |
com.telelogic.cs.webservices.types.SyncDatabaseResponse |
syncDatabase(java.lang.String token,
java.lang.String database)
In central server mode, waits for the central server to finish syncing all its CRs into a particular database. |
com.telelogic.cs.webservices.types.TransitionResponse |
transition(java.lang.String token,
java.lang.String crid,
java.lang.String toState,
com.telelogic.cs.webservices.types.ArrayOfAttribute attributes)
Transitions a change request to one of its next states. |
com.telelogic.cs.webservices.types.UnrelateResponse |
unrelate(java.lang.String token,
java.lang.String fromCrid,
java.lang.String toCrid,
java.lang.String relationship)
Breaks the relationship between two change requests. |
com.telelogic.cs.webservices.types.UploadAttachmentResponse |
uploadAttachment(java.lang.String token,
java.lang.String toCrid,
javax.activation.DataHandler attachment,
java.lang.String attachmentName,
java.lang.String description)
Uploads a file and attaches it to a change request. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ChangeService()
Method Detail |
---|
public com.telelogic.cs.webservices.types.LoginInfo getLoginInfo()
getLoginInfo
in interface com.telelogic.cs.webservices.ChangeServiceSkeletonInterface
DatabaseInfos
s.
Each DatabaseInfo
contains the name of the database that must
be used with the login
operation, an alias for the
database that can be used as its displayable name, an optional description
of the database, and whether or not the database is enabled. Note that
users logging on with the Admin role can still log on to disabled databases;
other roles cannot.public java.lang.String login(java.lang.String username, java.lang.String password, java.lang.String database, java.lang.String role) throws com.telelogic.cs.webservices.LoginFault
login
in interface com.telelogic.cs.webservices.ChangeServiceSkeletonInterface
username
- name of user to log in as.password
- password.database
- the database to log in to, as returned by
getLoginInfo
.role
- the user role, typically "User". "Admin" is required for
some operations.
com.telelogic.cs.webservices.types.LoginFault
- If any login details are wrong or missing.
com.telelogic.cs.webservices.LoginFault
public com.telelogic.cs.webservices.types.ArrayOfSubmitStates getAllSubmitDetails(java.lang.String token)
getAllSubmitDetails
in interface com.telelogic.cs.webservices.ChangeServiceSkeletonInterface
token
- A token.
java.lang.RuntimeException
- If no process is installed.public com.telelogic.cs.webservices.types.TransitionResponse transition(java.lang.String token, java.lang.String crid, java.lang.String toState, com.telelogic.cs.webservices.types.ArrayOfAttribute attributes) throws com.telelogic.cs.webservices.ModifyFault
Transitions may have required attributes. Values must be supplied for all required attributes that are currently unset on the change request, otherwise the transition will fail.
Users with the process admin privilege can transition between any two existing states. The transition doesn't need to exist in the CR process. This is called an admin transition. Admins are also allowed to omit required attributes.
Fires triggers if appropriate. Updates the transition log to note the change if successful.
transition
in interface com.telelogic.cs.webservices.ChangeServiceSkeletonInterface
token
- crid
- the CR to transition.toState
- the name of the state to transition to.attributes
- the attribute values to update or set on the change request
during the transition.
com.telelogic.cs.webservices.types.ModifyFault
- If the transition could not occur. Possibly because the transition
is invalid or illegal for the current user. Or if
there were missing required attributes.
com.telelogic.cs.webservices.ModifyFault
public com.telelogic.cs.webservices.types.ArrayOfAttribute getAttributes(java.lang.String token, java.lang.String crid, com.telelogic.cs.webservices.types.ArrayOfString attributeNames)
getAttributes
in interface com.telelogic.cs.webservices.ChangeServiceSkeletonInterface
token
- crid
- the change request to inspect.attributeNames
- the names of the attributes
to get the values of.
public com.telelogic.cs.webservices.types.UnrelateResponse unrelate(java.lang.String token, java.lang.String fromCrid, java.lang.String toCrid, java.lang.String relationship) throws com.telelogic.cs.webservices.ModifyFault
unrelate
in interface com.telelogic.cs.webservices.ChangeServiceSkeletonInterface
token
- fromCrid
- the CR ID the relationship comes from.toCrid
- the CR ID the relationship goes to.relationship
- the name of the relationship to break.
Note the direction of the relationship dictates which CR IDs are
used as the "from" and "to" IDs as described for
relate
.
com.telelogic.cs.webservices.types.ModifyFault
- If the relationship cannot be broken, likely because the user
does not have write privileges to one or more of the change requests.
com.telelogic.cs.webservices.ModifyFault
public com.telelogic.cs.webservices.types.RelateResponse relate(java.lang.String token, java.lang.String fromCrid, java.lang.String toCrid, java.lang.String relationship) throws com.telelogic.cs.webservices.ModifyFault
relate
in interface com.telelogic.cs.webservices.ChangeServiceSkeletonInterface
token
- A token.fromCrid
- The CR ID to create the relationship from.toCrid
- The CR ID to relate to.relationship
- The name of the relationship to create.
com.telelogic.cs.webservices.types.ModifyFault
- If the relationship could not be created, likely because the user
does not have write privileges to one or more of the change requests.
com.telelogic.cs.webservices.ModifyFault
public com.telelogic.cs.webservices.types.ArrayOfTask getAssociatedTasks(java.lang.String token, java.lang.String crid, com.telelogic.cs.webservices.types.ArrayOfString attributeNames)
getAssociatedTasks
in interface com.telelogic.cs.webservices.ChangeServiceSkeletonInterface
token
- A token.crid
- The CR ID to get the tasks from.attributeNames
- A list of attribute names to look up on the associated tasks.
public com.telelogic.cs.webservices.types.SetAttributesResponse setAttributes(java.lang.String token, java.lang.String crid, com.telelogic.cs.webservices.types.ArrayOfAttribute attributes) throws com.telelogic.cs.webservices.PartialModifyFault, com.telelogic.cs.webservices.ModifyFault
Fires triggers if appropriate. Updates the transition log to indicate the changes.
Note that some attributes should be considered private and not altered directly.
For example, the transition_log
attribute is kept up to date
when a change request is modified. Making this modifiable then
setting it directly could corrupt the attribute if it is not formatted
in a specific manner. In this case, it is preferable to add a note
to the transition log by setting the _COMMENT
pseudo-attribute,
which has effect of appending a new note to the transition log. Other
special attributes which should considered private include e-signature and
subscription attributes.
setAttributes
in interface com.telelogic.cs.webservices.ChangeServiceSkeletonInterface
token
- A token.crid
- The CR to modify.attributes
- The attribute values to set. Attributes not defined in the CR process are discarded.
com.telelogic.cs.webservices.types.ModifyFault
com.telelogic.cs.webservices.types.PartialModifyFault
- If some, but not all, of the attributes could be updated.
The PartialModificationFault
detail section
will contain a list of all the attributes that could
not be updated.
com.telelogic.cs.webservices.PartialModifyFault
com.telelogic.cs.webservices.ModifyFault
public com.telelogic.cs.webservices.types.ArrayOfListboxEntry getListboxEntries(java.lang.String token, java.lang.String listboxName) throws com.telelogic.cs.webservices.NoMatchFault
If the value-listbox is defined in multiple scopes, precedence is given to personal over shared over system.
getListboxEntries
in interface com.telelogic.cs.webservices.ChangeServiceSkeletonInterface
token
- A token.listboxName
- and the name of the listbox to retrieve.
com.telelogic.cs.webservices.types.NoMatchFault
- If no listbox has the given name.
com.telelogic.cs.webservices.NoMatchFault
public com.telelogic.cs.webservices.types.ArrayOfString getSubmitStatesForLifecycle(java.lang.String token, java.lang.String lifecycle) throws com.telelogic.cs.webservices.NoMatchFault
getSubmitStatesForLifecycle
in interface com.telelogic.cs.webservices.ChangeServiceSkeletonInterface
token
- A token.lifecycle
- The name of a lifecycle.
com.telelogic.cs.webservices.types.NoMatchFault
- If the lifecycle does not exist.
com.telelogic.cs.webservices.NoMatchFault
public java.lang.String createAssociatedTask(java.lang.String token, java.lang.String crid, com.telelogic.cs.webservices.types.ArrayOfAttribute attributes) throws com.telelogic.cs.webservices.CreateFault
createAssociatedTask
in interface com.telelogic.cs.webservices.ChangeServiceSkeletonInterface
token
- A token.crid
- The CRID to associate the task to.attributes
- A list of attribute values to set on the new task. All
attributes must be known task attributes (have an entry in
task_framework.cfg). Unknown attributes are discarded and not set on the
new task.
com.telelogic.cs.webservices.types.CreateFault
- If a new task could not be created and associated to
the change request.
com.telelogic.cs.webservices.CreateFault
public com.telelogic.cs.webservices.types.ArrayOfChangeRequest getRelatedFrom(java.lang.String token, java.lang.String crid, java.lang.String relationship, com.telelogic.cs.webservices.types.ArrayOfString attributeNames)
getRelatedFrom
in interface com.telelogic.cs.webservices.ChangeServiceSkeletonInterface
token
- A token.crid
- The parent CRID.relationship
- A relationship name to follow.attributeNames
- Attributes to return with the related change requests.
public com.telelogic.cs.webservices.types.ArrayOfStateDefinition getStateDefsForLifecycle(java.lang.String token, java.lang.String lifecycle) throws com.telelogic.cs.webservices.NoMatchFault
getStateDefsForLifecycle
in interface com.telelogic.cs.webservices.ChangeServiceSkeletonInterface
token
- A token.lifecycle
- The name of a lifecycle.
com.telelogic.cs.webservices.types.NoMatchFault
- If the lifecycle doesn't exist.
com.telelogic.cs.webservices.NoMatchFault
public java.lang.String submit(java.lang.String token, java.lang.String toState, com.telelogic.cs.webservices.types.ArrayOfAttribute initialAttributes) throws com.telelogic.cs.webservices.CreateFault
submit
in interface com.telelogic.cs.webservices.ChangeServiceSkeletonInterface
token
- A token.toState
- The state to submit to, which must be a valid submit
state.initialAttributes
- The list of attribute values that should be set
on the new CR. All attributes required by the CR process must be
submitted or the operation will fail. Attributes not defined in the CR
process are discarded.
com.telelogic.cs.webservices.types.CreateFault
- If the change request could not be created. The
submit state may not exist, or the user may not have the right
privileges.
com.telelogic.cs.webservices.CreateFault
public java.lang.String ssoLogin(java.lang.String ssoToken, java.lang.String database, java.lang.String role) throws com.telelogic.cs.webservices.SsoTokenFault, com.telelogic.cs.webservices.LoginFault
ssoLogin
in interface com.telelogic.cs.webservices.ChangeServiceSkeletonInterface
ssoToken
- A RDS SSO tokendatabase
- The database to log intorole
- The role of the user.
com.telelogic.cs.webservices.types.LoginFault
- If RDS down or invalid database/role.
com.telelogic.cs.webservices.types.SsoTokenFault
- If the SSO token is not authenticated.
com.telelogic.cs.webservices.SsoTokenFault
com.telelogic.cs.webservices.LoginFault
public com.telelogic.cs.webservices.types.SetTaskAttributesResponse setTaskAttributes(java.lang.String token, java.lang.String taskId, com.telelogic.cs.webservices.types.ArrayOfAttribute attributes) throws com.telelogic.cs.webservices.ModifyFault
setTaskAttributes
in interface com.telelogic.cs.webservices.ChangeServiceSkeletonInterface
token
- A token.taskId
- The task ID to modify.attributes
- A list of attributes to set.
com.telelogic.cs.webservices.types.ModifyFault
- if the task could not be modified.
com.telelogic.cs.webservices.ModifyFault
public com.telelogic.cs.webservices.types.ArrayOfQueryDefinition getQueryDefs(java.lang.String token)
getQueryDefs
in interface com.telelogic.cs.webservices.ChangeServiceSkeletonInterface
token
- A token.public com.telelogic.cs.webservices.types.ArrayOfReportDefinition getReportDefs(java.lang.String token)
getReportDefs
in interface com.telelogic.cs.webservices.ChangeServiceSkeletonInterface
token
- A token.public com.telelogic.cs.webservices.types.ArrayOfChangeRequest runQuery(java.lang.String token, com.telelogic.cs.webservices.types.QueryType type, java.lang.String name, com.telelogic.cs.webservices.types.ArrayOfString attributeNames) throws com.telelogic.cs.webservices.SyntaxFault
runQuery
in interface com.telelogic.cs.webservices.ChangeServiceSkeletonInterface
token
- A token.type
- The type of query: personal, shared or system.
The same query name can be used for different query types.name
- The name of the query to run. The first query found
with this name is run, no matter which subfolder it is in.attributeNames
- The attributes that should be returned with
each returned change request.
ChangeRequest
object for change request that
matches the query. An empty list if no change requests were found. Each
returned object will contain both the CR ID and a list of attribute
values for that CR. The attributes are returned with the same semantics
as for the getAttributes
function: empty
attributes are skipped, attributes are ordered.
com.telelogic.cs.webservices.SyntaxFault
public com.telelogic.cs.webservices.types.ArrayOfChangeRequest query(java.lang.String token, java.lang.String queryString, com.telelogic.cs.webservices.types.ArrayOfString attributeNames) throws com.telelogic.cs.webservices.SyntaxFault
query
in interface com.telelogic.cs.webservices.ChangeServiceSkeletonInterface
token
- A token.queryString
- A query string.attributeNames
- The list of attributes to return with each change
request. The query string should not include a clause against "cvtype".
ChangeRequest
object for change request that
matches the query. An empty list if no change requests were found. Each
returned object will contain both the CR ID and a list of attribute
values for that CR. The attributes are returned with the same semantics
as for the getAttributes
function: empty
attributes are skipped, attributes are ordered.
com.telelogic.cs.webservices.types.SyntaxFault
- If the query string syntax is incorrect. Queries
should be written in the IBM® Rational® Synergy query format.
com.telelogic.cs.webservices.SyntaxFault
public javax.activation.DataHandler downloadAttachment(java.lang.String token, java.lang.String attachmentId)
Clients must support MTOM to upload an attachment. Many web service clients support this, but may require it to be explicitly enabled--consult your documentation for details.
downloadAttachment
in interface com.telelogic.cs.webservices.ChangeServiceSkeletonInterface
token
- attachmentId
- The ID of the attachment to get. The ID can be found
with listAttachments
.
java.lang.RuntimeException
- If the attachment ID doesn't exist or could not be read due to
security restrictions.public com.telelogic.cs.webservices.types.DeleteAttachmentResponse deleteAttachment(java.lang.String token, java.lang.String attachmentId) throws com.telelogic.cs.webservices.ModifyFault
deleteAttachment
in interface com.telelogic.cs.webservices.ChangeServiceSkeletonInterface
token
- A token.attachmentId
- The ID of the attachment to get. The ID can be found with
listAttachments
.
com.telelogic.cs.webservices.types.ModifyFault
- If the delete was unsuccessful, likely because the user didn't
have write privileges for the change request associated
to the attachment.
com.telelogic.cs.webservices.ModifyFault
public com.telelogic.cs.webservices.types.DisassociateTaskResponse disassociateTask(java.lang.String token, java.lang.String crid, java.lang.String taskId) throws com.telelogic.cs.webservices.ModifyFault
disassociateTask
in interface com.telelogic.cs.webservices.ChangeServiceSkeletonInterface
token
- A token.crid
- The CR ID to remove from.taskId
- The task ID to remove.
com.telelogic.cs.webservices.types.ModifyFault
- If the task could not be disassociated, likely because the
change request is not modifiable by the user.
com.telelogic.cs.webservices.ModifyFault
public com.telelogic.cs.webservices.types.ArrayOfAttachmentDetail listAttachments(java.lang.String token, java.lang.String crid)
listAttachments
in interface com.telelogic.cs.webservices.ChangeServiceSkeletonInterface
token
- A token.crid
- A CR to list the attachments for.
AttachmentDetail
s. Each object
contains the ID to download the attachment with, a display name,
the time the attachment was created and associated with its CR, and
the optional description.public java.lang.String getShowUrl(java.lang.String crUrn, java.lang.String token) throws com.telelogic.cs.webservices.UrlFault
getShowUrl
in interface com.telelogic.cs.webservices.ChangeServiceSkeletonInterface
crUrn
- The URN for the CR.token
- The user's token.
com.telelogic.cs.webservices.types.UrlFault
com.telelogic.cs.webservices.UrlFault
public com.telelogic.cs.webservices.types.ArrayOfString getNextStates(java.lang.String token, java.lang.String crid)
getNextStates
in interface com.telelogic.cs.webservices.ChangeServiceSkeletonInterface
token
- A token.crid
- The ID of the CR to get the next states for.
public com.telelogic.cs.webservices.types.SyncDatabaseResponse syncDatabase(java.lang.String token, java.lang.String database)
For example, if a caller quickly modifies a large number of CRs, it may take a while for these changes to be synced. If subsequent actions of the caller depend on a particular database being in sync with the the central database. The caller can call this function to wait for all those changes to sync. Once up-to-date, this function will return and the caller can proceed. Changes made after this function call--even while this is waiting--are ignored.
Times out if the database is online, but hasn't synced any CRs in a while.
syncDatabase
in interface com.telelogic.cs.webservices.ChangeServiceSkeletonInterface
token
- The user's token for any database.database
- The database to sync, unrelated to the token's database.
public com.telelogic.cs.webservices.types.ArrayOfString getRequiredAttributesForTransition(java.lang.String token, java.lang.String fromState, java.lang.String toState) throws com.telelogic.cs.webservices.NoMatchFault
getRequiredAttributesForTransition
in interface com.telelogic.cs.webservices.ChangeServiceSkeletonInterface
token
- A token.fromState
- The name of the state to transition fromtoState
- The name of the state to transition to.
com.telelogic.cs.webservices.types.NoMatchFault
- If the transition does not exist.
com.telelogic.cs.webservices.NoMatchFault
public com.telelogic.cs.webservices.types.LogoutResponse logout(java.lang.String token)
logout
in interface com.telelogic.cs.webservices.ChangeServiceSkeletonInterface
token
- The user token.
public com.telelogic.cs.webservices.types.AssociateTaskResponse associateTask(java.lang.String token, java.lang.String crid, java.lang.String taskId) throws com.telelogic.cs.webservices.ModifyFault
associateTask
in interface com.telelogic.cs.webservices.ChangeServiceSkeletonInterface
token
- A token.crid
- The CR ID to add the task to.taskId
- The task ID to add.
com.telelogic.cs.webservices.types.ModifyFault
- If the task could not be associated, likely because the
change request is not modifiable by the user.
com.telelogic.cs.webservices.ModifyFault
public com.telelogic.cs.webservices.types.ArrayOfString getLifecycles(java.lang.String token)
getLifecycles
in interface com.telelogic.cs.webservices.ChangeServiceSkeletonInterface
token
- A token.
public com.telelogic.cs.webservices.types.ArrayOfChangeRequest getRelatedTo(java.lang.String token, java.lang.String crid, java.lang.String relationship, com.telelogic.cs.webservices.types.ArrayOfString attributeNames)
getRelatedTo
in interface com.telelogic.cs.webservices.ChangeServiceSkeletonInterface
token
- A token.crid
- A CR ID.relationship
- A relationship name to follow.attributeNames
- Attributes to return with the related change requests.
public com.telelogic.cs.webservices.types.UploadAttachmentResponse uploadAttachment(java.lang.String token, java.lang.String toCrid, javax.activation.DataHandler attachment, java.lang.String attachmentName, java.lang.String description) throws com.telelogic.cs.webservices.CreateFault
Clients must support MTOM to upload an attachment. Many web service clients support this, but may require it to be explicitly enabled--consult your documentation for details.
uploadAttachment
in interface com.telelogic.cs.webservices.ChangeServiceSkeletonInterface
token
- A token.toCrid
- The CR ID to attach to.attachment
- The attachment data.attachmentName
- The display name to be used for the attachment.description
- An optional description of the attachment.
com.telelogic.cs.webservices.types.CreateFault
- If the attachment cannot be created or associated with the change request.
com.telelogic.cs.webservices.CreateFault
public boolean isDcmEnabled(java.lang.String token)
isDcmEnabled
in interface com.telelogic.cs.webservices.ChangeServiceSkeletonInterface
token
- The user's token.
public java.lang.String getSubmitUrl(java.lang.String submitState, java.lang.String token) throws com.telelogic.cs.webservices.UrlFault
getSubmitUrl
in interface com.telelogic.cs.webservices.ChangeServiceSkeletonInterface
submitState
- The submit state.token
- The user's token.
com.telelogic.cs.webservices.types.UrlFault
com.telelogic.cs.webservices.UrlFault
public java.lang.String getDcmDelimiter(java.lang.String token) throws com.telelogic.cs.webservices.DcmNotEnabledFault
getDcmDelimiter
in interface com.telelogic.cs.webservices.ChangeServiceSkeletonInterface
token
- The user's token.
com.telelogic.cs.webservices.types.DcmNotEnabledFault
- If DCM is not enabled.
com.telelogic.cs.webservices.DcmNotEnabledFault
public com.telelogic.cs.webservices.types.ArrayOfStateDefinition getAllStateDefs(java.lang.String token)
getAllStateDefs
in interface com.telelogic.cs.webservices.ChangeServiceSkeletonInterface
token
- A token.
public com.telelogic.cs.webservices.types.AddAdminNotesResponse addAdminNotes(java.lang.String token, java.lang.String crid, com.telelogic.cs.webservices.types.ArrayOfAdminNote adminNotes) throws com.telelogic.cs.webservices.ModifyFault
addAdminNotes
in interface com.telelogic.cs.webservices.ChangeServiceSkeletonInterface
token
- An admin token.crid
- The CRID to append to.adminNotes
- A list of notes to add. Each note takes a user display name and timestamp--to use in the note summary--
as well as the text of the note. The display name is used for display only and does not need to be in
any specific format. It does not need to be an actual Change user (though that is normally recommended).
com.telelogic.cs.webservices.types.ModifyFault
- If notes cannot be added to the CR. Most often if you do not have the process admin role.
com.telelogic.cs.webservices.ModifyFault
public com.telelogic.cs.webservices.types.ArrayOfString getAllSubmitStates(java.lang.String token)
getAllSubmitStates
in interface com.telelogic.cs.webservices.ChangeServiceSkeletonInterface
token
- A token.
public com.telelogic.cs.webservices.types.ArrayOfTransitionLogEntry getTransitionLog(java.lang.String token, java.lang.String crid)
getTransitionLog
in interface com.telelogic.cs.webservices.ChangeServiceSkeletonInterface
token
- A token.crid
- The CRID to get the log from.
null
.
This is not typical, but clients should be prepared to handle this.public java.lang.String getDcmId(java.lang.String token) throws com.telelogic.cs.webservices.DcmNotEnabledFault
getDcmId
in interface com.telelogic.cs.webservices.ChangeServiceSkeletonInterface
token
- The user's token.
com.telelogic.cs.webservices.types.DcmNotEnabledFault
- If DCM is not enabled.
com.telelogic.cs.webservices.DcmNotEnabledFault
public java.lang.String getListboxDefaultValue(java.lang.String token)
setAttributes(java.lang.String, java.lang.String, com.telelogic.cs.webservices.types.ArrayOfAttribute)
for details on deleting an attribute value.
getListboxDefaultValue
in interface com.telelogic.cs.webservices.ChangeServiceSkeletonInterface
token
- The user's token.
public com.telelogic.cs.webservices.types.ArrayOfAttributeDefinition getAttributeDefs(java.lang.String token)
getAttributeDefs
in interface com.telelogic.cs.webservices.ChangeServiceSkeletonInterface
token
- A token.
public java.lang.String getTokenlessShowFormUrl(java.lang.String token, java.lang.String crid)
Fails if the CR does not exist.
getTokenlessShowFormUrl
in interface com.telelogic.cs.webservices.ChangeServiceSkeletonInterface
token
- A token.crid
- The ID of the change request to show.
public com.telelogic.cs.webservices.types.ArrayOfString getRequiredAttributesForSubmit(java.lang.String token, java.lang.String toState) throws com.telelogic.cs.webservices.NoMatchFault
getRequiredAttributesForSubmit
in interface com.telelogic.cs.webservices.ChangeServiceSkeletonInterface
token
- A token.toState
- The state to submit to.
com.telelogic.cs.webservices.types.NoMatchFault
- If the submit state is not found.
com.telelogic.cs.webservices.NoMatchFault
public com.telelogic.cs.webservices.types.ArrayOfListboxEntry getValueListboxEntries(java.lang.String token, java.lang.String valueListboxName) throws com.telelogic.cs.webservices.NoMatchFault
If the value-listbox is defined in multiple scopes, precedence is given to personal over shared over system.
getValueListboxEntries
in interface com.telelogic.cs.webservices.ChangeServiceSkeletonInterface
token
- A token.valueListboxName
- The name of the listbox to retrieve.
com.telelogic.cs.webservices.types.NoMatchFault
- If no value-listbox has the given name.
com.telelogic.cs.webservices.NoMatchFault
public java.lang.String getReportUrl(java.lang.String token, com.telelogic.cs.webservices.types.QueryType type, java.lang.String name, java.lang.String optionalTitle)
getReportUrl
in interface com.telelogic.cs.webservices.ChangeServiceSkeletonInterface
token
- A token.type
- The type of query: personal, shared or system.
The same query name can be used for different query types.name
- The name of the report the will be run. The first report
with this name will be used, no matter which subfolder it is in.optionalTitle
- The display title for this report. Can be blank
for a default title.public com.telelogic.cs.webservices.types.DeleteQueryResponse deleteQuery(java.lang.String token, com.telelogic.cs.webservices.types.QueryType type, java.lang.String name) throws com.telelogic.cs.webservices.ModifyFault
deleteQuery
in interface com.telelogic.cs.webservices.ChangeServiceSkeletonInterface
token
- A token.type
- The type of query: personal, shared or system.
The same query name can be used for different query types.name
- The name of the query to delete. The first query with
this name is deleted, no matter what subfolder it is in.
com.telelogic.cs.webservices.ModifyFault
public java.lang.String getQueryBuilderUrl(java.lang.String token)
getQueryBuilderUrl
in interface com.telelogic.cs.webservices.ChangeServiceSkeletonInterface
token
- A token.
public java.lang.String getTransitionUrl(java.lang.String token, java.lang.String crUrn, java.lang.String toState, java.lang.String optionalLabel)
getTransitionUrl
in interface com.telelogic.cs.webservices.ChangeServiceSkeletonInterface
token
- A token.crUrn
- URN to the CR to transition.toState
- The state to transition to. This state must represent a legal transition
from the current state for the user. Can be null
. If not passed,
then the admin transition form is loaded, allowing the user to pick any
state to transition to, if poasses the CR process admin privilege (normally pt_admin).optionalLabel
- Reserved for future use. Can be null
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |