scm.pub.gateway.changerequest
Class ChangeRequest

java.lang.Object
  extended byscm.pub.gateway.changerequest.ChangeRequest

public final class ChangeRequest
extends java.lang.Object

A ChangeRequest object is essentially a proxy object for a live persistent ChangeRequest object. Asking this object for the ChangeRequest information getInfo will result in the latest ChangeRequest information being pulled from the active project database.


Constructor Summary
ChangeRequest(Project proj, java.lang.String CRid)
          Create a gateway to a particular ChangeRequest in this project.
 
Method Summary
 void addNote(java.lang.String user, java.lang.String note)
          Add a note to this ChangeRequest.
 void assignToPhase(java.lang.String user, java.lang.String generic, java.lang.String phase, java.lang.String note)
          Assign this ChangeRequest to a particular user, on a particular Generic and to a particular phase.
 java.util.Vector getFileDescriptors(java.lang.String generic)
          Get all of the file descriptors associated with this ChangeRequest.
 ChangeRequest_d getInfo()
          Get all of the latest information for this ChangeRequest.
 void progress(java.lang.String user, java.lang.String note)
          Progress this ChangeRequest into the TBA state.
 void setAttributeValue(java.lang.String attribute, java.lang.String value)
          Change the value of a particular CR attribute.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChangeRequest

public ChangeRequest(Project proj,
                     java.lang.String CRid)
              throws InvalidProject,
                     InvalidChangeRequest,
                     SystemException
Create a gateway to a particular ChangeRequest in this project.

Parameters:
proj - The project where the ChangeRequest resides.
CRid - The name of the ChangeRequest to retrieve.
Throws:
InvalidProject - If the Project name is invalid.
InvalidChangeRequest - If the change request does not exist.
SystemException - If a system level exception is caught.
Method Detail

getFileDescriptors

public java.util.Vector getFileDescriptors(java.lang.String generic)
                                    throws SystemException
Get all of the file descriptors associated with this ChangeRequest.

Returns:
A list of CRFileDescriptor_d transport objects.
Throws:
SystemException - If the system cannot be accessed.

setAttributeValue

public void setAttributeValue(java.lang.String attribute,
                              java.lang.String value)
                       throws InvalidCRAttribute,
                              InvalidCRAttributeValue,
                              SystemException
Change the value of a particular CR attribute.

Parameters:
attribute - The attribute to change
value - The new value for the given attribute
Throws:
InvalidCRAttribute - If the requested attribute does not exist.
InvalidCRAttributeValue - If the requested attribute value does not exist and the attribute is not editable.
SystemException - If the system cannot be accessed.

assignToPhase

public void assignToPhase(java.lang.String user,
                          java.lang.String generic,
                          java.lang.String phase,
                          java.lang.String note)
                   throws InvalidGeneric,
                          InvalidUser,
                          InvalidChangeRequest,
                          InvalidPhase,
                          SystemException
Assign this ChangeRequest to a particular user, on a particular Generic and to a particular phase.

Parameters:
user - The user this ChangeRequest should be assigned to.
generic - The generic this ChangeRequest should be assigned to.
phase - The phase this ChangeRequest should be assigned to.
note - A note that can be tacked onto the transition.
Throws:
InvalidUser - If the supplied user id is invalid.
InvalidGeneric - If the supplied generic is invalid.
InvalidChangeRequest - If the CR is invalid for whatever reason.
InvalidPhase - If the supplied phase is invalid.
SystemException - If an internal exception is caught.

addNote

public void addNote(java.lang.String user,
                    java.lang.String note)
             throws InvalidUser,
                    SystemException
Add a note to this ChangeRequest.

Parameters:
user - The user this note should be associated with.
note - The contents of the note.
Throws:
InvalidUser - If the supplied user id is invalid.
SystemException - If an internal exception is caught.

progress

public void progress(java.lang.String user,
                     java.lang.String note)
              throws InvalidUser,
                     InvalidChangeRequest,
                     SystemException
Progress this ChangeRequest into the TBA state.

Parameters:
user - The user this progression should be associated with.
note - An optional note.
Throws:
InvalidUser - If the supplied user id is invalid.
InvalidChangeRequest - If the CR is invalid for whatever reason.
SystemException - If an internal exception is caught.

getInfo

public ChangeRequest_d getInfo()
                        throws InvalidChangeRequest,
                               SystemException
Get all of the latest information for this ChangeRequest. Calling this method results in a pull from the Project database so that up to date information is always returned.

Returns:
A ChangeRequest_d value object containing all of the data contained in this ChangeRequest
Throws:
InvalidChangeRequest - If the change request does not exist.
SystemException - If a system level exception is caught.