User Samples

In this section:

 

The User directory contains sample Java Applications that show how to use the ReportCaster User Management features in the API.

Note: The default implementation of ReportCaster User Management is for standalone ReportCaster implementations, or for usage in bulk loading the botuprof tables. This API, as is, does not write to Managed Reporting. As with all the samples, it uses the ReportCaster authentication and context information contained in samples.properties. These sample Java applications are presented as examples for learning purposes and are not represented as production quality applications.


Top of page

x
U01_Add_User.java

This application adds a single user to the ReportCaster repository. It accepts four arguments: the user name, the user password, a description of the user, and the user e-mail address.

Usage: java U01_Add_User <name> <password> <description> <address>


Top of page

x
U02_Add_Group.java

This application adds an empty group to the ReportCaster repository. It accepts two arguments: the group name and a description of the group.

Usage: java U02_Add_Group <name> <description>


Top of page

x
U03_Add_UserInGroup.java

This application adds a user to an existing group. It accepts two arguments: the group name and the user to be added to the group.

Usage: java U03_Add_UserInGroup <groupName> <userName>


Top of page

x
U10_Get_User.java

This application returns, to standard out, the authentication and authorization information for a single specified user. It accepts one argument: the user name.

Usage: java U10_Get_User <name>


Top of page

x
U11_Get_UserList.java

This application returns to standard out a list of all the users in the repository.

Usage: java U11_Get_UserList


Top of page

x
U12_Get_GroupList.java

This application returns to standard out a list of all the groups in the repository.

Usage: java U12_Get_GroupList


Top of page

x
U13_Get_UserByGroup.java

This application returns to standard out the users belonging to the specified group. It accepts one argument, the group name.

Usage: java U13_Get_UserByGroup <groupName>


Top of page

x
U31_Update_User.java

This application updates the password and role of a specified user. It accepts three arguments: the user to be updated, the new user password, and the new user role.

Usage: java U31_Update_User <name> <password> <role>


Top of page

x
U32_Delete_Group.java

This application deletes the specified group. It accepts one argument: the group name.

Usage: java U32_Delete_Group <groupName>


Top of page

x
U33_Delete_User.java

This application deletes the specified user from the repository. It accepts one argument: the user name.

Usage: java U33_Delete_User <name>


Top of page

x
U34_Delete_UserFromGroup.java

This application deletes the specified user from the specified group. It accepts two arguments: the user name and the group name.

Usage: java U34_Delete_UserFromGroup .user.<groupName> <userName>


Top of page

x
U35_Update_UserProp.java

This application updates a user password, description, and address. Generally, this is what the user would update themselves, as opposed to Update_User, which is usually an administrative function. It accepts four arguments: the user name, the new user password, the new description, and the new address.

Usage: java U35_Update_UserProp <name> <password> <description> <address>


Top of page

x
U36_Update_GroupWithUser.java

Although this only accepts a single user, the application code shows how to update a group with a user list. It accepts two arguments: the group name and the user name.

Usage: java U36_Update_GroupWithUser <groupName> <userName>


WebFOCUS