| Agile Product Lifecycle Management Web Services Guide Release 9.3.3 E39310-01 |
|
![]() Previous |
![]() Next |
Users are data objects that you can create, like items and changes. Consequently, you can work with users directly without traversing the administrative node hierarchy. If you have the proper Agile PLM privileges, you can create, modify, and delete users. For example, you could create a program that periodically synchronizes Agile PLM users with data available from a corporate directory.
User names and passwords are commonly used to authenticate your credentials.
The following code sample uses ChangeLoginPassword operation to change login password.
Example: Changing Login Password
ChangeLoginPasswordRequestType changeLoginPasswordRequestType =
new ChangeLoginPasswordRequestType();
AgileChangeLoginPasswordRequestType[] agileChangeLoginPasswordRequestTypeArray =
new AgileChangeLoginPasswordRequestType[1];
agileChangeLoginPasswordRequestTypeArray[0] =
new AgileChangeLoginPasswordRequestType();
agileChangeLoginPasswordRequestTypeArray[0].setUserIdentifier("admin");
agileChangeLoginPasswordRequestTypeArray[0].setNewPassword("newPassword");
agileChangeLoginPasswordRequestTypeArray[0].setOldPassword("oldPassword");
changeLoginPasswordRequestType.setRequests(agileChangeLoginPasswordRequestTypeArray);
The following code sample uses ChangeApprovalPassword operation to change approval password.
Example: Changing Approval Password
ChangeApprovalPasswordRequestType changeApprovalPasswordRequestType =
new ChangeApprovalPasswordRequestType();
AgileChangeApprovalPasswordRequestType[] agileChangeApprovalPasswordRequestTypeArray =
new AgileChangeApprovalPasswordRequestType[1];
agileChangeApprovalPasswordRequestTypeArray[0] =
new AgileChangeApprovalPasswordRequestType();
agileChangeApprovalPasswordRequestTypeArray[0].setUserIdentifier("admin");
agileChangeApprovalPasswordRequestTypeArray[0].setNewPassword("agile1");
agileChangeApprovalPasswordRequestTypeArray[0].setOldPassword("agile");
changeApprovalPasswordRequestType.setRequests(agileChangeApprovalPasswordRequestTypeArray);
You can transfer authority to create records from one user to another.
Agile Core Web Services supports the TransferAuthority operstion alongwith CreateTransferAuthority , GetTransferAuthority and RemoveTransferAuthority operations.
You can use the createTransferAuthority operation to create a transfer record from an Agile user to another.
Example: Creating Transfer Authority
CreateTransferAuthorityRequestType createTransferAuthorityRequestType =
new CreateTransferAuthorityRequestType();
AgileCreateTransferAuthorityRequestType[] agileCreateTransferAuthorityRequestTypeArray =
new AgileCreateTransferAuthorityRequestType[1];
agileCreateTransferAuthorityRequestTypeArray[0] =
new AgileCreateTransferAuthorityRequestType();
TransferAuthorityRequestType transferAuthorityRequestType = new TransferAuthorityRequestType();
transferAuthorityRequestType.setFromUser("badriv"); //loginID of from user
transferAuthorityRequestType.setToUser("yvonnec"); //loginID of to user
Calendar fromDate = Calendar.getInstance();
Calendar toDate = (Calendar) fromDate.clone();
toDate.add(Calendar.DAY_OF_YEAR, + 5);
transferAuthorityRequestType.setFromDate(fromDate);
transferAuthorityRequestType.setToDate(toDate);
transferAuthorityRequestType.setCriteria("AllChanges"); // For an exhaustive list of various criterion that may be used, refer to the Java Client
//This field has two possible input values corresponding to the types 'AFFECT_CHANGES_ALL' - 0 or AFFECT_CHANGES_IN_PERIOD -1
transferAuthorityRequestType.setAffectChanges(0);
agileCreateTransferAuthorityRequestTypeArray[0].setTransferAuthorityRecord(transferAuthorityRequestType);
createTransferAuthorityRequestType.setRequests(agileCreateTransferAuthorityRequestTypeArray);
You can use the getTransferAuthority operation to retrieve a transfer authority record from the transfer authority record manager.
Example: Getting Transfer Authority
GetTransferAuthorityRequestType getTransferAuthorityRequestType =
new GetTransferAuthorityRequestType();
//set to true if you want to retrieve all records
getTransferAuthorityRequestType.setAll(false);
//to download individual records set the unique transfer record Ids, also set the boolean flag as false. See below.
// getTransferAuthorityRequestType.setAll(false);
// AgileGetTransferAuthorityRequestType[] agileGetTransferAuthorityRequestTypeArray =
// new AgileGetTransferAuthorityRequestType[1];
// agileGetTransferAuthorityRequestTypeArray[0] = new AgileGetTransferAuthorityRequestType();
// agileGetTransferAuthorityRequestTypeArray[0].setTransferRecordId("6099367"); //A unqiue Id.
// getTransferAuthorityRequestType.setTransferRecords(agileGetTransferAuthorityRequestTypeArray);
You can use the removeTransferAuthority operation to remove a transfer authority record from the transfer authority record manager.
Example: Removing Transfer Authority
RemoveTransferAuthorityRequestType removeTransferAuthorityRequestType =
new RemoveTransferAuthorityRequestType();
AgileRemoveTransferAuthorityRequestType[] agileRemoveTransferAuthorityRequestTypeArray =
new AgileRemoveTransferAuthorityRequestType[1];
agileRemoveTransferAuthorityRequestTypeArray[0] = new AgileRemoveTransferAuthorityRequestType();
agileRemoveTransferAuthorityRequestTypeArray[0].setTransferRecordId("6102717"); //A unqiue Id.
removeTransferAuthorityRequestType.setRequests(agileRemoveTransferAuthorityRequestTypeArray);