Go to primary content
Agile Product Lifecycle Management Web Services Guide
Release 9.3.6
E71166-01
  Go To Table Of Contents
Contents

Previous
Previous
 
Next
Next
 

14 Managing Users and User Profiles

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.

14.1 Handling User Passwords

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);

14.2 Managing Transfer Authorities

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. The createTransferAuthority operation helps you create a transfer record from one 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);

The getTransferAuthority operation helps you retrieve a transfer authority record from the transfer authority record manager.

Example: Getting Transfer Authority

GetTransferAuthorityRequestType getTransferAuthorityRequestType =
new GetTransferAuthorityRequestType();
set to true 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);

The removeTransferAuthority operation helps you 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);